/*!
 * surveyjs - Survey JavaScript library v1.9.60
 * Copyright (c) 2015-2022 Devsoft Baltic OÜ  - http://surveyjs.io/
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
 */
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("jquery"));
	else if(typeof define === 'function' && define.amd)
		define("survey-jquery", ["jquery"], factory);
	else if(typeof exports === 'object')
		exports["survey-jquery"] = factory(require("jquery"));
	else
		root["Survey"] = factory(root["jQuery"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_jquery__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/entries/jquery.ts");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/panel/panel.html":
/*!*******************************************************************************************************************!*\
  !*** ./node_modules/html-loader?interpolate!./node_modules/val-loader!./src/knockout/components/panel/panel.html ***!
  \*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko template: { name: 'survey-panel', data: question, as: 'question', afterRender: question.koPanelAfterRender } --><!-- /ko -->";

/***/ }),

/***/ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/popup/popup.html":
/*!*******************************************************************************************************************!*\
  !*** ./node_modules/html-loader?interpolate!./node_modules/val-loader!./src/knockout/components/popup/popup.html ***!
  \*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div class=\"sv-popup\" tabindex=\"-1\"\n  data-bind=\"visible: isVisible, click: clickOutside, class: styleClass, event: { keydown: function(data, event) { onKeyDown(event); return true; } }\">\n  <div class=\"sv-popup__container\"\n    data-bind=\"style: { left: left, top: top, height: height, minWidth: minWidth, width: width }, click: function() { return true; }, clickBubble: false\">\n    <div class=\"sv-popup__shadow\">\n      <!-- ko if: $data.showHeader -->\n      <!-- ko template: { name: $data.popupHeaderTemplate, data: $data } -->\n      <!-- /ko -->\n      <!-- /ko -->\n      <div class=\"sv-popup__body-content\">\n        <!-- ko if: !!title  -->\n        <div class=\"sv-popup__body-header\" data-bind=\"text: title\"></div>\n        <!-- /ko -->\n        <div class=\"sv-popup__scrolling-content\">\n          <div class=\"sv-popup__content\"\n            data-bind=\"component: { name: contentComponentName, params: contentComponentData }\"></div>\n        </div>\n        <!-- ko if: showFooter  -->\n        <div class=\"sv-popup__body-footer\">\n          <!-- ko component: { name: \"sv-action-bar\", params: { model: $data.footerToolbar } } -->\n          <!-- /ko -->\n        </div>\n        <!-- /ko -->\n      </div>\n    </div>\n  </div>\n</div>";

/***/ }),

/***/ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/progress/buttons.html":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/html-loader?interpolate!./node_modules/val-loader!./src/knockout/components/progress/buttons.html ***!
  \************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: survey.css.progressButtonsContainerCenter\">\n    <div data-bind=\"css: survey.css.progressButtonsContainer\">\n        <div data-bind=\"css: getScrollButtonCss(true), click: clickScrollButton.bind($data, $element.nextElementSibling, true)\" role=\"button\"></div>\n        <div data-bind=\"css: survey.css.progressButtonsListContainer\">\n            <ul data-bind=\"foreach: survey.visiblePages, css: survey.css.progressButtonsList\">\n                <li data-bind=\"css: $parent.getListElementCss($index), click: $parent.isListElementClickable($index) ? $parent.clickListElement.bind($parent, $index) : null\">\n                    <div data-bind=\"css: css.progressButtonsPageTitle, text: locNavigationTitle.koRenderedHtml() || name, attr: { title: locNavigationTitle.koRenderedHtml() || name }\"></div>\n                    <div data-bind=\"css: css.progressButtonsPageDescription, text: locNavigationDescription.koRenderedHtml(), attr: { title: locNavigationDescription.koRenderedHtml() }\"></div>\n                </li>\n            </ul>\n        </div>\n        <div data-bind=\"css: getScrollButtonCss(false), click: clickScrollButton.bind($data, $element.previousElementSibling, false)\" role=\"button\"></div>\n    </div>\n</div>";

/***/ }),

/***/ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/progress/progress.html":
/*!*************************************************************************************************************************!*\
  !*** ./node_modules/html-loader?interpolate!./node_modules/val-loader!./src/knockout/components/progress/progress.html ***!
  \*************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: model.css.progress\">\n    <div data-bind=\"css: model.css.progressBar, style: { width: model.progressValue + '%' }\"\n        role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n        <span data-bind=\"text: model.progressText, css: getProgressTextInBarCss(model.css)\"></span>\n    </div>\n    <span data-bind=\"text: model.progressText, css: getProgressTextUnderBarCss(model.css)\"></span>\n</div>";

/***/ }),

/***/ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/tooltip-error/tooltip-error.html":
/*!***********************************************************************************************************************************!*\
  !*** ./node_modules/html-loader?interpolate!./node_modules/val-loader!./src/knockout/components/tooltip-error/tooltip-error.html ***!
  \***********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko if: question.hasVisibleErrors -->\n  <!-- ko template: { name: 'survey-question-errors', data: question, afterRender: afterRender } -->\n  <!-- /ko -->\n<!-- /ko -->";

/***/ }),

/***/ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/templates/entry.html":
/*!************************************************************************************************************!*\
  !*** ./node_modules/html-loader?interpolate!./node_modules/val-loader!./src/knockout/templates/entry.html ***!
  \************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = "" + __webpack_require__(/*! ./comment.html */ "./src/knockout/templates/comment.html") + "\n" + __webpack_require__(/*! ./flowpanel.html */ "./src/knockout/templates/flowpanel.html") + "\n" + __webpack_require__(/*! ./header.html */ "./src/knockout/templates/header.html") + "\n" + __webpack_require__(/*! ./index.html */ "./src/knockout/templates/index.html") + "\n" + __webpack_require__(/*! ./page.html */ "./src/knockout/templates/page.html") + "\n" + __webpack_require__(/*! ./panel.html */ "./src/knockout/templates/panel.html") + "\n" + __webpack_require__(/*! ./rows.html */ "./src/knockout/templates/rows.html") + "\n" + __webpack_require__(/*! ./row.html */ "./src/knockout/templates/row.html") + "\n" + __webpack_require__(/*! ./string.html */ "./src/knockout/templates/string.html") + "\n" + __webpack_require__(/*! ./timerpanel.html */ "./src/knockout/templates/timerpanel.html") + "\n" + __webpack_require__(/*! ./question.html */ "./src/knockout/templates/question.html") + "\n" + __webpack_require__(/*! ./questioncontent.html */ "./src/knockout/templates/questioncontent.html") + "\n" + __webpack_require__(/*! ./questiontitle.html */ "./src/knockout/templates/questiontitle.html") + "\n" + __webpack_require__(/*! ./question-boolean.html */ "./src/knockout/templates/question-boolean.html") + "\n" + __webpack_require__(/*! ./question-checkbox.html */ "./src/knockout/templates/question-checkbox.html") + "\n" + __webpack_require__(/*! ./question-tagbox.html */ "./src/knockout/templates/question-tagbox.html") + "\n" + __webpack_require__(/*! ./question-ranking.html */ "./src/knockout/templates/question-ranking.html") + "\n" + __webpack_require__(/*! ./question-comment.html */ "./src/knockout/templates/question-comment.html") + "\n" + __webpack_require__(/*! ./question-composite.html */ "./src/knockout/templates/question-composite.html") + "\n" + __webpack_require__(/*! ./question-custom.html */ "./src/knockout/templates/question-custom.html") + "\n" + __webpack_require__(/*! ./question-dropdown.html */ "./src/knockout/templates/question-dropdown.html") + "\n" + __webpack_require__(/*! ./question-empty.html */ "./src/knockout/templates/question-empty.html") + "\n" + __webpack_require__(/*! ./question-errors.html */ "./src/knockout/templates/question-errors.html") + "\n" + __webpack_require__(/*! ./question-expression.html */ "./src/knockout/templates/question-expression.html") + "\n" + __webpack_require__(/*! ./question-file.html */ "./src/knockout/templates/question-file.html") + "\n" + __webpack_require__(/*! ./question-html.html */ "./src/knockout/templates/question-html.html") + "\n" + __webpack_require__(/*! ./question-image.html */ "./src/knockout/templates/question-image.html") + "\n" + __webpack_require__(/*! ./question-imagepicker.html */ "./src/knockout/templates/question-imagepicker.html") + "\n" + __webpack_require__(/*! ./question-matrix.html */ "./src/knockout/templates/question-matrix.html") + "\n" + __webpack_require__(/*! ./question-matrixdynamic.html */ "./src/knockout/templates/question-matrixdynamic.html") + "\n" + __webpack_require__(/*! ./question-multipletext.html */ "./src/knockout/templates/question-multipletext.html") + "\n" + __webpack_require__(/*! ./question-paneldynamic.html */ "./src/knockout/templates/question-paneldynamic.html") + "\n" + __webpack_require__(/*! ./question-paneldynamic-navigator.html */ "./src/knockout/templates/question-paneldynamic-navigator.html") + "\n" + __webpack_require__(/*! ./question-radiogroup.html */ "./src/knockout/templates/question-radiogroup.html") + "\n" + __webpack_require__(/*! ./question-rating.html */ "./src/knockout/templates/question-rating.html") + "\n" + __webpack_require__(/*! ./question-signaturepad.html */ "./src/knockout/templates/question-signaturepad.html") + "\n" + __webpack_require__(/*! ./question-text.html */ "./src/knockout/templates/question-text.html") + "\n" + __webpack_require__(/*! ./question-buttongroup.html */ "./src/knockout/templates/question-buttongroup.html") + "\n" + __webpack_require__(/*! ./popup-pointer.html */ "./src/knockout/templates/popup-pointer.html") + "";

/***/ }),

/***/ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/templates/window.html":
/*!*************************************************************************************************************!*\
  !*** ./node_modules/html-loader?interpolate!./node_modules/val-loader!./src/knockout/templates/window.html ***!
  \*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div style=\"position: fixed; bottom: 3px; right: 10px;\" data-bind=\"css: cssRoot, style:{width: renderedWidth, maxWidth: renderedWidth}\">\n    <div data-bind=\"css: cssHeaderRoot\">\n        <span data-bind=\"click:doExpand\" style=\"width: 100%; cursor: pointer;\">\n            <span style=\"padding-right:10px\" data-bind=\"css: cssHeaderTitle, text: locTitle.koRenderedHtml\"></span>\n            <span aria-hidden=\"true\" data-bind=\"css: cssButton\"></span>\n        </span>\n        <span data-bind=\"visible:isExpanded, click:doExpand\" style=\"float: right; cursor: pointer;\">\n            <span style=\"padding-right:10px\" data-bind=\"css: cssHeaderTitle\">X</span>\n        </span>\n    </div>\n    <div data-bind=\"visible:isExpanded, css: cssBody\">\n        <survey params=\"survey: survey\"></survey>\n    </div>\n</div>";

/***/ }),

/***/ "./node_modules/knockout/build/output/knockout-latest.js":
/*!***************************************************************!*\
  !*** ./node_modules/knockout/build/output/knockout-latest.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 * Knockout JavaScript library v3.5.1
 * (c) The Knockout.js team - http://knockoutjs.com/
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
 */

(function() {(function(n){var A=this||(0,eval)("this"),w=A.document,R=A.navigator,v=A.jQuery,H=A.JSON;v||"undefined"===typeof jQuery||(v=jQuery);(function(n){ true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports,__webpack_require__], __WEBPACK_AMD_DEFINE_FACTORY__ = (n),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined})(function(S,T){function K(a,c){return null===a||typeof a in W?a===c:!1}function X(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=n;b()},c))}}function Y(b,c){var d;return function(){clearTimeout(d);
d=a.a.setTimeout(b,c)}}function Z(a,c){c&&"change"!==c?"beforeChange"===c?this.pc(a):this.gb(a,c):this.qc(a)}function aa(a,c){null!==c&&c.s&&c.s()}function ba(a,c){var d=this.qd,e=d[r];e.ra||(this.Qb&&this.mb[c]?(d.uc(c,a,this.mb[c]),this.mb[c]=null,--this.Qb):e.I[c]||d.uc(c,a,e.J?{da:a}:d.$c(a)),a.Ja&&a.gd())}var a="undefined"!==typeof S?S:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};a.L=function(a,c,d){a[c]=d};a.version="3.5.1";a.b("version",
a.version);a.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1};a.a=function(){function b(a,b){for(var c in a)f.call(a,c)&&b(c,a[c])}function c(a,b){if(b)for(var c in b)f.call(b,c)&&(a[c]=b[c]);return a}function d(a,b){a.__proto__=b;return a}function e(b,c,d,e){var l=b[c].match(q)||[];a.a.D(d.match(q),function(b){a.a.Na(l,b,e)});b[c]=l.join(" ")}var f=Object.prototype.hasOwnProperty,g={__proto__:[]}instanceof Array,h="function"===typeof Symbol,m={},k={};m[R&&/Firefox\/2/i.test(R.userAgent)?
"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];m.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(m,function(a,b){if(b.length)for(var c=0,d=b.length;c<d;c++)k[b[c]]=a});var l={propertychange:!0},p=w&&function(){for(var a=3,b=w.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return 4<a?a:n}(),q=/\S+/g,t;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],
D:function(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c,a[d],d,a)},A:"function"==typeof Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b)}:function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},Lb:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d,a))return a[d];return n},Pa:function(b,c){var d=a.a.A(b,c);0<d?b.splice(d,1):0===d&&b.shift()},wc:function(b){var c=[];b&&a.a.D(b,function(b){0>a.a.A(c,b)&&c.push(b)});return c},Mb:function(a,
b,c){var d=[];if(a)for(var e=0,l=a.length;e<l;e++)d.push(b.call(c,a[e],e));return d},jb:function(a,b,c){var d=[];if(a)for(var e=0,l=a.length;e<l;e++)b.call(c,a[e],e)&&d.push(a[e]);return d},Nb:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},Na:function(b,c,d){var e=a.a.A(a.a.bc(b),c);0>e?d&&b.push(c):d||b.splice(e,1)},Ba:g,extend:c,setPrototypeOf:d,Ab:g?d:c,P:b,Ga:function(a,b,c){if(!a)return a;var d={},e;for(e in a)f.call(a,e)&&(d[e]=
b.call(c,a[e],e,a));return d},Tb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},Yb:function(b){b=a.a.la(b);for(var c=(b[0]&&b[0].ownerDocument||w).createElement("div"),d=0,e=b.length;d<e;d++)c.appendChild(a.oa(b[d]));return c},Ca:function(b,c){for(var d=0,e=b.length,l=[];d<e;d++){var k=b[d].cloneNode(!0);l.push(c?a.oa(k):k)}return l},va:function(b,c){a.a.Tb(b);if(c)for(var d=0,e=c.length;d<e;d++)b.appendChild(c[d])},Xc:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){for(var e=d[0],
l=e.parentNode,k=0,f=c.length;k<f;k++)l.insertBefore(c[k],e);k=0;for(f=d.length;k<f;k++)a.removeNode(d[k])}},Ua:function(a,b){if(a.length){for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==b;)a.length--;if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=0;c!==d;)a.push(c),c=c.nextSibling;a.push(d)}}return a},Zc:function(a,b){7>p?a.setAttribute("selected",b):a.selected=b},Db:function(a){return null===a||a===n?"":a.trim?
a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},vd:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(1!==a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!a},Sb:function(b){return a.a.vd(b,b.ownerDocument.documentElement)},kd:function(b){return!!a.a.Lb(b,a.a.Sb)},R:function(a){return a&&
a.tagName&&a.tagName.toLowerCase()},Ac:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.Ac(b),c)},Gc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},B:function(b,c,d){var e=a.a.Ac(d);d=l[c];if(a.options.useOnlyNativeEvents||d||!v)if(d||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var k=function(a){e.call(b,a)},f="on"+c;b.attachEvent(f,
k);a.a.K.za(b,function(){b.detachEvent(f,k)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(c,e,!1);else t||(t="function"==typeof v(b).on?"on":"bind"),v(b)[t](c,e)},Fb:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.R(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if("function"==typeof w.createEvent)if("function"==
typeof b.dispatchEvent)d=w.createEvent(k[c]||"HTMLEvents"),d.initEvent(c,!0,!0,A,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");else v(b).trigger(c)},f:function(b){return a.O(b)?b():b},bc:function(b){return a.O(b)?b.v():b},Eb:function(b,c,d){var l;c&&("object"===typeof b.classList?
(l=b.classList[d?"add":"remove"],a.a.D(c.match(q),function(a){l.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},Bb:function(b,c){var d=a.a.f(c);if(null===d||d===n)d="";var e=a.h.firstChild(b);!e||3!=e.nodeType||a.h.nextSibling(e)?a.h.va(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Ad(b)},Yc:function(a,b){a.name=b;if(7>=p)try{var c=a.name.replace(/[&<>'"]/g,function(a){return"&#"+a.charCodeAt(0)+";"});a.mergeAttributes(w.createElement("<input name='"+
c+"'/>"),!1)}catch(d){}},Ad:function(a){9<=p&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},wd:function(a){if(p){var b=a.style.width;a.style.width=0;a.style.width=b}},Pd:function(b,c){b=a.a.f(b);c=a.a.f(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},la:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b},Da:function(a){return h?Symbol(a):a},Zd:6===p,$d:7===p,W:p,Lc:function(b,c){for(var d=a.a.la(b.getElementsByTagName("input")).concat(a.a.la(b.getElementsByTagName("textarea"))),
e="string"==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},l=[],k=d.length-1;0<=k;k--)e(d[k])&&l.push(d[k]);return l},Nd:function(b){return"string"==typeof b&&(b=a.a.Db(b))?H&&H.parse?H.parse(b):(new Function("return "+b))():null},hc:function(b,c,d){if(!H||!H.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");
return H.stringify(a.a.f(b),c,d)},Od:function(c,d,e){e=e||{};var l=e.params||{},k=e.includeFields||this.Jc,f=c;if("object"==typeof c&&"form"===a.a.R(c))for(var f=c.action,h=k.length-1;0<=h;h--)for(var g=a.a.Lc(c,k[h]),m=g.length-1;0<=m;m--)l[g[m].name]=g[m].value;d=a.a.f(d);var p=w.createElement("form");p.style.display="none";p.action=f;p.method="post";for(var q in d)c=w.createElement("input"),c.type="hidden",c.name=q,c.value=a.a.hc(a.a.f(d[q])),p.appendChild(c);b(l,function(a,b){var c=w.createElement("input");
c.type="hidden";c.name=a;c.value=b;p.appendChild(c)});w.body.appendChild(p);e.submitter?e.submitter(p):p.submit();setTimeout(function(){p.parentNode.removeChild(p)},0)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.D);a.b("utils.arrayFirst",a.a.Lb);a.b("utils.arrayFilter",a.a.jb);a.b("utils.arrayGetDistinctValues",a.a.wc);a.b("utils.arrayIndexOf",a.a.A);a.b("utils.arrayMap",a.a.Mb);a.b("utils.arrayPushAll",a.a.Nb);a.b("utils.arrayRemoveItem",a.a.Pa);a.b("utils.cloneNodes",a.a.Ca);a.b("utils.createSymbolOrString",
a.a.Da);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",a.a.Jc);a.b("utils.getFormFields",a.a.Lc);a.b("utils.objectMap",a.a.Ga);a.b("utils.peekObservable",a.a.bc);a.b("utils.postJson",a.a.Od);a.b("utils.parseJson",a.a.Nd);a.b("utils.registerEventHandler",a.a.B);a.b("utils.stringifyJson",a.a.hc);a.b("utils.range",a.a.Pd);a.b("utils.toggleDomNodeCssClass",a.a.Eb);a.b("utils.triggerEvent",a.a.Fb);a.b("utils.unwrapObservable",a.a.f);a.b("utils.objectForEach",a.a.P);a.b("utils.addOrRemoveItem",
a.a.Na);a.b("utils.setTextContent",a.a.Bb);a.b("unwrap",a.a.f);Function.prototype.bind||(Function.prototype.bind=function(a){var c=this;if(1===arguments.length)return function(){return c.apply(a,arguments)};var d=Array.prototype.slice.call(arguments,1);return function(){var e=d.slice(0);e.push.apply(e,arguments);return c.apply(a,e)}});a.a.g=new function(){var b=0,c="__ko__"+(new Date).getTime(),d={},e,f;a.a.W?(e=function(a,e){var f=a[c];if(!f||"null"===f||!d[f]){if(!e)return n;f=a[c]="ko"+b++;d[f]=
{}}return d[f]},f=function(a){var b=a[c];return b?(delete d[b],a[c]=null,!0):!1}):(e=function(a,b){var d=a[c];!d&&b&&(d=a[c]={});return d},f=function(a){return a[c]?(delete a[c],!0):!1});return{get:function(a,b){var c=e(a,!1);return c&&c[b]},set:function(a,b,c){(a=e(a,c!==n))&&(a[b]=c)},Ub:function(a,b,c){a=e(a,!0);return a[b]||(a[b]=c)},clear:f,Z:function(){return b++ +c}}};a.b("utils.domData",a.a.g);a.b("utils.domData.clear",a.a.g.clear);a.a.K=new function(){function b(b,c){var d=a.a.g.get(b,e);
d===n&&c&&(d=[],a.a.g.set(b,e,d));return d}function c(c){var e=b(c,!1);if(e)for(var e=e.slice(0),k=0;k<e.length;k++)e[k](c);a.a.g.clear(c);a.a.K.cleanExternalData(c);g[c.nodeType]&&d(c.childNodes,!0)}function d(b,d){for(var e=[],l,f=0;f<b.length;f++)if(!d||8===b[f].nodeType)if(c(e[e.length]=l=b[f]),b[f]!==l)for(;f--&&-1==a.a.A(e,b[f]););}var e=a.a.g.Z(),f={1:!0,8:!0,9:!0},g={1:!0,9:!0};return{za:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");b(a,!0).push(c)},yb:function(c,
d){var f=b(c,!1);f&&(a.a.Pa(f,d),0==f.length&&a.a.g.set(c,e,n))},oa:function(b){a.u.G(function(){f[b.nodeType]&&(c(b),g[b.nodeType]&&d(b.getElementsByTagName("*")))});return b},removeNode:function(b){a.oa(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a){v&&"function"==typeof v.cleanData&&v.cleanData([a])}}};a.oa=a.a.K.oa;a.removeNode=a.a.K.removeNode;a.b("cleanNode",a.oa);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.K);a.b("utils.domNodeDisposal.addDisposeCallback",
a.a.K.za);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.K.yb);(function(){var b=[0,"",""],c=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],e=[1,"<select multiple='multiple'>","</select>"],f={thead:c,tbody:c,tfoot:c,tr:[2,"<table><tbody>","</tbody></table>"],td:d,th:d,option:e,optgroup:e},g=8>=a.a.W;a.a.ua=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var l=e[0];l.parentNode&&11!==l.parentNode.nodeType;)l=l.parentNode;
l.parentNode&&l.parentNode.removeChild(l)}}else{(e=d)||(e=w);var l=e.parentWindow||e.defaultView||A,p=a.a.Db(c).toLowerCase(),q=e.createElement("div"),t;t=(p=p.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&f[p[1]]||b;p=t[0];t="ignored<div>"+t[1]+c+t[2]+"</div>";"function"==typeof l.innerShiv?q.appendChild(l.innerShiv(t)):(g&&e.body.appendChild(q),q.innerHTML=t,g&&q.parentNode.removeChild(q));for(;p--;)q=q.lastChild;e=a.a.la(q.lastChild.childNodes)}return e};a.a.Md=function(b,c){var d=a.a.ua(b,
c);return d.length&&d[0].parentElement||a.a.Yb(d)};a.a.fc=function(b,c){a.a.Tb(b);c=a.a.f(c);if(null!==c&&c!==n)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.ua(c,b.ownerDocument),e=0;e<d.length;e++)b.appendChild(d[e])}})();a.b("utils.parseHtmlFragment",a.a.ua);a.b("utils.setHtml",a.a.fc);a.aa=function(){function b(c,e){if(c)if(8==c.nodeType){var f=a.aa.Uc(c.nodeValue);null!=f&&e.push({ud:c,Kd:f})}else if(1==c.nodeType)for(var f=0,g=c.childNodes,h=g.length;f<h;f++)b(g[f],
e)}var c={};return{Xb:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);c[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},bd:function(a,b){var f=c[a];if(f===n)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),!0}finally{delete c[a]}},cd:function(c,e){var f=
[];b(c,f);for(var g=0,h=f.length;g<h;g++){var m=f[g].ud,k=[m];e&&a.a.Nb(k,e);a.aa.bd(f[g].Kd,k);m.nodeValue="";m.parentNode&&m.parentNode.removeChild(m)}},Uc:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.aa);a.b("memoization.memoize",a.aa.Xb);a.b("memoization.unmemoize",a.aa.bd);a.b("memoization.parseMemoText",a.aa.Uc);a.b("memoization.unmemoizeDomNodeAndDescendants",a.aa.cd);a.na=function(){function b(){if(f)for(var b=f,c=0,d;h<f;)if(d=e[h++]){if(h>b){if(5E3<=
++c){h=f;a.a.Gc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=f}try{d()}catch(p){a.a.Gc(p)}}}function c(){b();h=f=e.length=0}var d,e=[],f=0,g=1,h=0;A.MutationObserver?d=function(a){var b=w.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):d=w&&"onreadystatechange"in w.createElement("script")?function(a){var b=w.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;w.documentElement.removeChild(b);
b=null;a()};w.documentElement.appendChild(b)}:function(a){setTimeout(a,0)};return{scheduler:d,zb:function(b){f||a.na.scheduler(c);e[f++]=b;return g++},cancel:function(a){a=a-(g-f);a>=h&&a<f&&(e[a]=null)},resetForTesting:function(){var a=f-h;h=f=e.length=0;return a},Sd:b}}();a.b("tasks",a.na);a.b("tasks.schedule",a.na.zb);a.b("tasks.runEarly",a.na.Sd);a.Ta={throttle:function(b,c){b.throttleEvaluation=c;var d=null;return a.$({read:b,write:function(e){clearTimeout(d);d=a.a.setTimeout(function(){b(e)},
c)}})},rateLimit:function(a,c){var d,e,f;"number"==typeof c?d=c:(d=c.timeout,e=c.method);a.Hb=!1;f="function"==typeof e?e:"notifyWhenChangesStop"==e?Y:X;a.ub(function(a){return f(a,d,c)})},deferred:function(b,c){if(!0!==c)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.Hb||(b.Hb=!0,b.ub(function(c){var e,f=!1;return function(){if(!f){a.na.cancel(e);e=a.na.zb(c);try{f=!0,b.notifySubscribers(n,"dirty")}finally{f=
!1}}}}))},notify:function(a,c){a.equalityComparer="always"==c?null:K}};var W={undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.Ta);a.ic=function(b,c,d){this.da=b;this.lc=c;this.mc=d;this.Ib=!1;this.fb=this.Jb=null;a.L(this,"dispose",this.s);a.L(this,"disposeWhenNodeIsRemoved",this.l)};a.ic.prototype.s=function(){this.Ib||(this.fb&&a.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)};a.ic.prototype.l=function(b){this.Jb=b;a.a.K.za(b,this.fb=this.s.bind(this))};
a.T=function(){a.a.Ab(this,D);D.qb(this)};var D={qb:function(a){a.U={change:[]};a.sc=1},subscribe:function(b,c,d){var e=this;d=d||"change";var f=new a.ic(e,c?b.bind(c):b,function(){a.a.Pa(e.U[d],f);e.hb&&e.hb(d)});e.Qa&&e.Qa(d);e.U[d]||(e.U[d]=[]);e.U[d].push(f);return f},notifySubscribers:function(b,c){c=c||"change";"change"===c&&this.Gb();if(this.Wa(c)){var d="change"===c&&this.ed||this.U[c].slice(0);try{a.u.xc();for(var e=0,f;f=d[e];++e)f.Ib||f.lc(b)}finally{a.u.end()}}},ob:function(){return this.sc},
Dd:function(a){return this.ob()!==a},Gb:function(){++this.sc},ub:function(b){var c=this,d=a.O(c),e,f,g,h,m;c.gb||(c.gb=c.notifySubscribers,c.notifySubscribers=Z);var k=b(function(){c.Ja=!1;d&&h===c&&(h=c.nc?c.nc():c());var a=f||m&&c.sb(g,h);m=f=e=!1;a&&c.gb(g=h)});c.qc=function(a,b){b&&c.Ja||(m=!b);c.ed=c.U.change.slice(0);c.Ja=e=!0;h=a;k()};c.pc=function(a){e||(g=a,c.gb(a,"beforeChange"))};c.rc=function(){m=!0};c.gd=function(){c.sb(g,c.v(!0))&&(f=!0)}},Wa:function(a){return this.U[a]&&this.U[a].length},
Bd:function(b){if(b)return this.U[b]&&this.U[b].length||0;var c=0;a.a.P(this.U,function(a,b){"dirty"!==a&&(c+=b.length)});return c},sb:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,c)},toString:function(){return"[object Object]"},extend:function(b){var c=this;b&&a.a.P(b,function(b,e){var f=a.Ta[b];"function"==typeof f&&(c=f(c,e)||c)});return c}};a.L(D,"init",D.qb);a.L(D,"subscribe",D.subscribe);a.L(D,"extend",D.extend);a.L(D,"getSubscriptionsCount",D.Bd);a.a.Ba&&a.a.setPrototypeOf(D,
Function.prototype);a.T.fn=D;a.Qc=function(a){return null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.T);a.b("isSubscribable",a.Qc);a.S=a.u=function(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var d=[],e,f=0;return{xc:b,end:c,cc:function(b){if(e){if(!a.Qc(b))throw Error("Only subscribable things can act as dependencies");e.od.call(e.pd,b,b.fd||(b.fd=++f))}},G:function(a,d,e){try{return b(),a.apply(d,e||[])}finally{c()}},qa:function(){if(e)return e.o.qa()},
Va:function(){if(e)return e.o.Va()},Ya:function(){if(e)return e.Ya},o:function(){if(e)return e.o}}}();a.b("computedContext",a.S);a.b("computedContext.getDependenciesCount",a.S.qa);a.b("computedContext.getDependencies",a.S.Va);a.b("computedContext.isInitial",a.S.Ya);a.b("computedContext.registerDependency",a.S.cc);a.b("ignoreDependencies",a.Yd=a.u.G);var I=a.a.Da("_latestValue");a.ta=function(b){function c(){if(0<arguments.length)return c.sb(c[I],arguments[0])&&(c.ya(),c[I]=arguments[0],c.xa()),this;
a.u.cc(c);return c[I]}c[I]=b;a.a.Ba||a.a.extend(c,a.T.fn);a.T.fn.qb(c);a.a.Ab(c,F);a.options.deferUpdates&&a.Ta.deferred(c,!0);return c};var F={equalityComparer:K,v:function(){return this[I]},xa:function(){this.notifySubscribers(this[I],"spectate");this.notifySubscribers(this[I])},ya:function(){this.notifySubscribers(this[I],"beforeChange")}};a.a.Ba&&a.a.setPrototypeOf(F,a.T.fn);var G=a.ta.Ma="__ko_proto__";F[G]=a.ta;a.O=function(b){if((b="function"==typeof b&&b[G])&&b!==F[G]&&b!==a.o.fn[G])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");
return!!b};a.Za=function(b){return"function"==typeof b&&(b[G]===F[G]||b[G]===a.o.fn[G]&&b.Nc)};a.b("observable",a.ta);a.b("isObservable",a.O);a.b("isWriteableObservable",a.Za);a.b("isWritableObservable",a.Za);a.b("observable.fn",F);a.L(F,"peek",F.v);a.L(F,"valueHasMutated",F.xa);a.L(F,"valueWillMutate",F.ya);a.Ha=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.ta(b);a.a.Ab(b,
a.Ha.fn);return b.extend({trackArrayChanges:!0})};a.Ha.fn={remove:function(b){for(var c=this.v(),d=[],e="function"!=typeof b||a.O(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var g=c[f];if(e(g)){0===d.length&&this.ya();if(c[f]!==g)throw Error("Array modified during remove; cannot remove item");d.push(g);c.splice(f,1);f--}}d.length&&this.xa();return d},removeAll:function(b){if(b===n){var c=this.v(),d=c.slice(0);this.ya();c.splice(0,c.length);this.xa();return d}return b?this.remove(function(c){return 0<=
a.a.A(b,c)}):[]},destroy:function(b){var c=this.v(),d="function"!=typeof b||a.O(b)?function(a){return a===b}:b;this.ya();for(var e=c.length-1;0<=e;e--){var f=c[e];d(f)&&(f._destroy=!0)}this.xa()},destroyAll:function(b){return b===n?this.destroy(function(){return!0}):b?this.destroy(function(c){return 0<=a.a.A(b,c)}):[]},indexOf:function(b){var c=this();return a.a.A(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.ya(),this.v()[d]=c,this.xa())},sorted:function(a){var c=this().slice(0);
return a?c.sort(a):c.sort()},reversed:function(){return this().slice(0).reverse()}};a.a.Ba&&a.a.setPrototypeOf(a.Ha.fn,a.ta.fn);a.a.D("pop push reverse shift sort splice unshift".split(" "),function(b){a.Ha.fn[b]=function(){var a=this.v();this.ya();this.zc(a,b,arguments);var d=a[b].apply(a,arguments);this.xa();return d===a?this:d}});a.a.D(["slice"],function(b){a.Ha.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.Pc=function(b){return a.O(b)&&"function"==typeof b.remove&&"function"==
typeof b.push};a.b("observableArray",a.Ha);a.b("isObservableArray",a.Pc);a.Ta.trackArrayChanges=function(b,c){function d(){function c(){if(m){var d=[].concat(b.v()||[]),e;if(b.Wa("arrayChange")){if(!f||1<m)f=a.a.Pb(k,d,b.Ob);e=f}k=d;f=null;m=0;e&&e.length&&b.notifySubscribers(e,"arrayChange")}}e?c():(e=!0,h=b.subscribe(function(){++m},null,"spectate"),k=[].concat(b.v()||[]),f=null,g=b.subscribe(c))}b.Ob={};c&&"object"==typeof c&&a.a.extend(b.Ob,c);b.Ob.sparse=!0;if(!b.zc){var e=!1,f=null,g,h,m=0,
k,l=b.Qa,p=b.hb;b.Qa=function(a){l&&l.call(b,a);"arrayChange"===a&&d()};b.hb=function(a){p&&p.call(b,a);"arrayChange"!==a||b.Wa("arrayChange")||(g&&g.s(),h&&h.s(),h=g=null,e=!1,k=n)};b.zc=function(b,c,d){function l(a,b,c){return k[k.length]={status:a,value:b,index:c}}if(e&&!m){var k=[],p=b.length,g=d.length,h=0;switch(c){case "push":h=p;case "unshift":for(c=0;c<g;c++)l("added",d[c],h+c);break;case "pop":h=p-1;case "shift":p&&l("deleted",b[h],h);break;case "splice":c=Math.min(Math.max(0,0>d[0]?p+d[0]:
d[0]),p);for(var p=1===g?p:Math.min(c+(d[1]||0),p),g=c+g-2,h=Math.max(p,g),U=[],L=[],n=2;c<h;++c,++n)c<p&&L.push(l("deleted",b[c],c)),c<g&&U.push(l("added",d[n],c));a.a.Kc(L,U);break;default:return}f=k}}}};var r=a.a.Da("_state");a.o=a.$=function(b,c,d){function e(){if(0<arguments.length){if("function"===typeof f)f.apply(g.nb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}g.ra||
a.u.cc(e);(g.ka||g.J&&e.Xa())&&e.ha();return g.X}"object"===typeof b?d=b:(d=d||{},b&&(d.read=b));if("function"!=typeof d.read)throw Error("Pass a function that returns the value of the ko.computed");var f=d.write,g={X:n,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:d.read,nb:c||d.owner,l:d.disposeWhenNodeIsRemoved||d.l||null,Sa:d.disposeWhen||d.Sa,Rb:null,I:{},V:0,Ic:null};e[r]=g;e.Nc="function"===typeof f;a.a.Ba||a.a.extend(e,a.T.fn);a.T.fn.qb(e);a.a.Ab(e,C);d.pure?(g.wb=!0,g.J=!0,a.a.extend(e,da)):
d.deferEvaluation&&a.a.extend(e,ea);a.options.deferUpdates&&a.Ta.deferred(e,!0);g.l&&(g.jc=!0,g.l.nodeType||(g.l=null));g.J||d.deferEvaluation||e.ha();g.l&&e.ja()&&a.a.K.za(g.l,g.Rb=function(){e.s()});return e};var C={equalityComparer:K,qa:function(){return this[r].V},Va:function(){var b=[];a.a.P(this[r].I,function(a,d){b[d.Ka]=d.da});return b},Vb:function(b){if(!this[r].V)return!1;var c=this.Va();return-1!==a.a.A(c,b)?!0:!!a.a.Lb(c,function(a){return a.Vb&&a.Vb(b)})},uc:function(a,c,d){if(this[r].wb&&
c===this)throw Error("A 'pure' computed must not be called recursively");this[r].I[a]=d;d.Ka=this[r].V++;d.La=c.ob()},Xa:function(){var a,c,d=this[r].I;for(a in d)if(Object.prototype.hasOwnProperty.call(d,a)&&(c=d[a],this.Ia&&c.da.Ja||c.da.Dd(c.La)))return!0},Jd:function(){this.Ia&&!this[r].rb&&this.Ia(!1)},ja:function(){var a=this[r];return a.ka||0<a.V},Rd:function(){this.Ja?this[r].ka&&(this[r].sa=!0):this.Hc()},$c:function(a){if(a.Hb){var c=a.subscribe(this.Jd,this,"dirty"),d=a.subscribe(this.Rd,
this);return{da:a,s:function(){c.s();d.s()}}}return a.subscribe(this.Hc,this)},Hc:function(){var b=this,c=b.throttleEvaluation;c&&0<=c?(clearTimeout(this[r].Ic),this[r].Ic=a.a.setTimeout(function(){b.ha(!0)},c)):b.Ia?b.Ia(!0):b.ha(!0)},ha:function(b){var c=this[r],d=c.Sa,e=!1;if(!c.rb&&!c.ra){if(c.l&&!a.a.Sb(c.l)||d&&d()){if(!c.jc){this.s();return}}else c.jc=!1;c.rb=!0;try{e=this.zd(b)}finally{c.rb=!1}return e}},zd:function(b){var c=this[r],d=!1,e=c.wb?n:!c.V,d={qd:this,mb:c.I,Qb:c.V};a.u.xc({pd:d,
od:ba,o:this,Ya:e});c.I={};c.V=0;var f=this.yd(c,d);c.V?d=this.sb(c.X,f):(this.s(),d=!0);d&&(c.J?this.Gb():this.notifySubscribers(c.X,"beforeChange"),c.X=f,this.notifySubscribers(c.X,"spectate"),!c.J&&b&&this.notifySubscribers(c.X),this.rc&&this.rc());e&&this.notifySubscribers(c.X,"awake");return d},yd:function(b,c){try{var d=b.Wc;return b.nb?d.call(b.nb):d()}finally{a.u.end(),c.Qb&&!b.J&&a.a.P(c.mb,aa),b.sa=b.ka=!1}},v:function(a){var c=this[r];(c.ka&&(a||!c.V)||c.J&&this.Xa())&&this.ha();return c.X},
ub:function(b){a.T.fn.ub.call(this,b);this.nc=function(){this[r].J||(this[r].sa?this.ha():this[r].ka=!1);return this[r].X};this.Ia=function(a){this.pc(this[r].X);this[r].ka=!0;a&&(this[r].sa=!0);this.qc(this,!a)}},s:function(){var b=this[r];!b.J&&b.I&&a.a.P(b.I,function(a,b){b.s&&b.s()});b.l&&b.Rb&&a.a.K.yb(b.l,b.Rb);b.I=n;b.V=0;b.ra=!0;b.sa=!1;b.ka=!1;b.J=!1;b.l=n;b.Sa=n;b.Wc=n;this.Nc||(b.nb=n)}},da={Qa:function(b){var c=this,d=c[r];if(!d.ra&&d.J&&"change"==b){d.J=!1;if(d.sa||c.Xa())d.I=null,d.V=
0,c.ha()&&c.Gb();else{var e=[];a.a.P(d.I,function(a,b){e[b.Ka]=a});a.a.D(e,function(a,b){var e=d.I[a],m=c.$c(e.da);m.Ka=b;m.La=e.La;d.I[a]=m});c.Xa()&&c.ha()&&c.Gb()}d.ra||c.notifySubscribers(d.X,"awake")}},hb:function(b){var c=this[r];c.ra||"change"!=b||this.Wa("change")||(a.a.P(c.I,function(a,b){b.s&&(c.I[a]={da:b.da,Ka:b.Ka,La:b.La},b.s())}),c.J=!0,this.notifySubscribers(n,"asleep"))},ob:function(){var b=this[r];b.J&&(b.sa||this.Xa())&&this.ha();return a.T.fn.ob.call(this)}},ea={Qa:function(a){"change"!=
a&&"beforeChange"!=a||this.v()}};a.a.Ba&&a.a.setPrototypeOf(C,a.T.fn);var N=a.ta.Ma;C[N]=a.o;a.Oc=function(a){return"function"==typeof a&&a[N]===C[N]};a.Fd=function(b){return a.Oc(b)&&b[r]&&b[r].wb};a.b("computed",a.o);a.b("dependentObservable",a.o);a.b("isComputed",a.Oc);a.b("isPureComputed",a.Fd);a.b("computed.fn",C);a.L(C,"peek",C.v);a.L(C,"dispose",C.s);a.L(C,"isActive",C.ja);a.L(C,"getDependenciesCount",C.qa);a.L(C,"getDependencies",C.Va);a.xb=function(b,c){if("function"===typeof b)return a.o(b,
c,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.o(b,c)};a.b("pureComputed",a.xb);(function(){function b(a,f,g){g=g||new d;a=f(a);if("object"!=typeof a||null===a||a===n||a instanceof RegExp||a instanceof Date||a instanceof String||a instanceof Number||a instanceof Boolean)return a;var h=a instanceof Array?[]:{};g.save(a,h);c(a,function(c){var d=f(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":h[c]=d;break;case "object":case "undefined":var l=g.get(d);h[c]=l!==
n?l:b(d,f,g)}});return h}function c(a,b){if(a instanceof Array){for(var c=0;c<a.length;c++)b(c);"function"==typeof a.toJSON&&b("toJSON")}else for(c in a)b(c)}function d(){this.keys=[];this.values=[]}a.ad=function(c){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return b(c,function(b){for(var c=0;a.O(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.ad(b);return a.a.hc(b,c,d)};d.prototype={constructor:d,save:function(b,c){var d=a.a.A(this.keys,
b);0<=d?this.values[d]=c:(this.keys.push(b),this.values.push(c))},get:function(b){b=a.a.A(this.keys,b);return 0<=b?this.values[b]:n}}})();a.b("toJS",a.ad);a.b("toJSON",a.toJSON);a.Wd=function(b,c,d){function e(c){var e=a.xb(b,d).extend({ma:"always"}),h=e.subscribe(function(a){a&&(h.s(),c(a))});e.notifySubscribers(e.v());return h}return"function"!==typeof Promise||c?e(c.bind(d)):new Promise(e)};a.b("when",a.Wd);(function(){a.w={M:function(b){switch(a.a.R(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?
a.a.g.get(b,a.c.options.$b):7>=a.a.W?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.w.M(b.options[b.selectedIndex]):n;default:return b.value}},cb:function(b,c,d){switch(a.a.R(b)){case "option":"string"===typeof c?(a.a.g.set(b,a.c.options.$b,n),"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.g.set(b,a.c.options.$b,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===
typeof c?c:"");break;case "select":if(""===c||null===c)c=n;for(var e=-1,f=0,g=b.options.length,h;f<g;++f)if(h=a.w.M(b.options[f]),h==c||""===h&&c===n){e=f;break}if(d||0<=e||c===n&&1<b.size)b.selectedIndex=e,6===a.a.W&&a.a.setTimeout(function(){b.selectedIndex=e},0);break;default:if(null===c||c===n)c="";b.value=c}}}})();a.b("selectExtensions",a.w);a.b("selectExtensions.readValue",a.w.M);a.b("selectExtensions.writeValue",a.w.cb);a.m=function(){function b(b){b=a.a.Db(b);123===b.charCodeAt(0)&&(b=b.slice(1,
-1));b+="\n,";var c=[],d=b.match(e),p,q=[],h=0;if(1<d.length){for(var x=0,B;B=d[x];++x){var u=B.charCodeAt(0);if(44===u){if(0>=h){c.push(p&&q.length?{key:p,value:q.join("")}:{unknown:p||q.join("")});p=h=0;q=[];continue}}else if(58===u){if(!h&&!p&&1===q.length){p=q.pop();continue}}else if(47===u&&1<B.length&&(47===B.charCodeAt(1)||42===B.charCodeAt(1)))continue;else 47===u&&x&&1<B.length?(u=d[x-1].match(f))&&!g[u[0]]&&(b=b.substr(b.indexOf(B)+1),d=b.match(e),x=-1,B="/"):40===u||123===u||91===u?++h:
41===u||125===u||93===u?--h:p||q.length||34!==u&&39!==u||(B=B.slice(1,-1));q.push(B)}if(0<h)throw Error("Unbalanced parentheses, braces, or brackets");}return c}var c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,e=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,g={"in":1,"return":1,"typeof":1},
h={};return{Ra:[],wa:h,ac:b,vb:function(e,f){function l(b,e){var f;if(!x){var k=a.getBindingHandler(b);if(k&&k.preprocess&&!(e=k.preprocess(e,b,l)))return;if(k=h[b])f=e,0<=a.a.A(c,f)?f=!1:(k=f.match(d),f=null===k?!1:k[1]?"Object("+k[1]+")"+k[2]:f),k=f;k&&q.push("'"+("string"==typeof h[b]?h[b]:b)+"':function(_z){"+f+"=_z}")}g&&(e="function(){return "+e+" }");p.push("'"+b+"':"+e)}f=f||{};var p=[],q=[],g=f.valueAccessors,x=f.bindingParams,B="string"===typeof e?b(e):e;a.a.D(B,function(a){l(a.key||a.unknown,
a.value)});q.length&&l("_ko_property_writers","{"+q.join(",")+" }");return p.join(",")},Id:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},eb:function(b,c,d,e,f){if(b&&a.O(b))!a.Za(b)||f&&b.v()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.m);a.b("expressionRewriting.bindingRewriteValidators",a.m.Ra);a.b("expressionRewriting.parseObjectLiteral",a.m.ac);a.b("expressionRewriting.preProcessBindings",a.m.vb);a.b("expressionRewriting._twoWayBindings",
a.m.wa);a.b("jsonExpressionRewriting",a.m);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.m.vb);(function(){function b(a){return 8==a.nodeType&&g.test(f?a.text:a.nodeValue)}function c(a){return 8==a.nodeType&&h.test(f?a.text:a.nodeValue)}function d(d,e){for(var f=d,h=1,g=[];f=f.nextSibling;){if(c(f)&&(a.a.g.set(f,k,!0),h--,0===h))return g;g.push(f);b(f)&&h++}if(!e)throw Error("Cannot find closing comment tag to match: "+d.nodeValue);return null}function e(a,b){var c=d(a,b);return c?
0<c.length?c[c.length-1].nextSibling:a.nextSibling:null}var f=w&&"\x3c!--test--\x3e"===w.createComment("test").text,g=f?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,h=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,m={ul:!0,ol:!0},k="__ko_matchedEndComment__";a.h={ea:{},childNodes:function(a){return b(a)?d(a):a.childNodes},Ea:function(c){if(b(c)){c=a.h.childNodes(c);for(var d=0,e=c.length;d<e;d++)a.removeNode(c[d])}else a.a.Tb(c)},va:function(c,d){if(b(c)){a.h.Ea(c);for(var e=
c.nextSibling,f=0,k=d.length;f<k;f++)e.parentNode.insertBefore(d[f],e)}else a.a.va(c,d)},Vc:function(a,c){var d;b(a)?(d=a.nextSibling,a=a.parentNode):d=a.firstChild;d?c!==d&&a.insertBefore(c,d):a.appendChild(c)},Wb:function(c,d,e){e?(e=e.nextSibling,b(c)&&(c=c.parentNode),e?d!==e&&c.insertBefore(d,e):c.appendChild(d)):a.h.Vc(c,d)},firstChild:function(a){if(b(a))return!a.nextSibling||c(a.nextSibling)?null:a.nextSibling;if(a.firstChild&&c(a.firstChild))throw Error("Found invalid end comment, as the first child of "+
a);return a.firstChild},nextSibling:function(d){b(d)&&(d=e(d));if(d.nextSibling&&c(d.nextSibling)){var f=d.nextSibling;if(c(f)&&!a.a.g.get(f,k))throw Error("Found end comment without a matching opening comment, as child of "+d);return null}return d.nextSibling},Cd:b,Vd:function(a){return(a=(f?a.text:a.nodeValue).match(g))?a[1]:null},Sc:function(d){if(m[a.a.R(d)]){var f=d.firstChild;if(f){do if(1===f.nodeType){var k;k=f.firstChild;var h=null;if(k){do if(h)h.push(k);else if(b(k)){var g=e(k,!0);g?k=
g:h=[k]}else c(k)&&(h=[k]);while(k=k.nextSibling)}if(k=h)for(h=f.nextSibling,g=0;g<k.length;g++)h?d.insertBefore(k[g],h):d.appendChild(k[g])}while(f=f.nextSibling)}}}}})();a.b("virtualElements",a.h);a.b("virtualElements.allowedBindings",a.h.ea);a.b("virtualElements.emptyNode",a.h.Ea);a.b("virtualElements.insertAfter",a.h.Wb);a.b("virtualElements.prepend",a.h.Vc);a.b("virtualElements.setDomNodeChildren",a.h.va);(function(){a.ga=function(){this.nd={}};a.a.extend(a.ga.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=
b.getAttribute("data-bind")||a.j.getComponentNameForNode(b);case 8:return a.h.Cd(b);default:return!1}},getBindings:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b):null;return a.j.tc(d,b,c,!1)},getBindingAccessors:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b,{valueAccessors:!0}):null;return a.j.tc(d,b,c,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.h.Vd(b);default:return null}},
parseBindingsString:function(b,c,d,e){try{var f=this.nd,g=b+(e&&e.valueAccessors||""),h;if(!(h=f[g])){var m,k="with($context){with($data||{}){return{"+a.m.vb(b,e)+"}}}";m=new Function("$context","$element",k);h=f[g]=m}return h(c,d)}catch(l){throw l.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+l.message,l;}}});a.ga.instance=new a.ga})();a.b("bindingProvider",a.ga);(function(){function b(b){var c=(b=a.a.g.get(b,z))&&b.N;c&&(b.N=null,c.Tc())}function c(c,d,e){this.node=c;this.yc=
d;this.kb=[];this.H=!1;d.N||a.a.K.za(c,b);e&&e.N&&(e.N.kb.push(c),this.Kb=e)}function d(a){return function(){return a}}function e(a){return a()}function f(b){return a.a.Ga(a.u.G(b),function(a,c){return function(){return b()[c]}})}function g(b,c,e){return"function"===typeof b?f(b.bind(null,c,e)):a.a.Ga(b,d)}function h(a,b){return f(this.getBindings.bind(this,a,b))}function m(b,c){var d=a.h.firstChild(c);if(d){var e,f=a.ga.instance,l=f.preprocessNode;if(l){for(;e=d;)d=a.h.nextSibling(e),l.call(f,e);
d=a.h.firstChild(c)}for(;e=d;)d=a.h.nextSibling(e),k(b,e)}a.i.ma(c,a.i.H)}function k(b,c){var d=b,e=1===c.nodeType;e&&a.h.Sc(c);if(e||a.ga.instance.nodeHasBindings(c))d=p(c,null,b).bindingContextForDescendants;d&&!u[a.a.R(c)]&&m(d,c)}function l(b){var c=[],d={},e=[];a.a.P(b,function ca(f){if(!d[f]){var k=a.getBindingHandler(f);k&&(k.after&&(e.push(f),a.a.D(k.after,function(c){if(b[c]){if(-1!==a.a.A(e,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+e.join(", "));
ca(c)}}),e.length--),c.push({key:f,Mc:k}));d[f]=!0}});return c}function p(b,c,d){var f=a.a.g.Ub(b,z,{}),k=f.hd;if(!c){if(k)throw Error("You cannot apply bindings multiple times to the same element.");f.hd=!0}k||(f.context=d);f.Zb||(f.Zb={});var g;if(c&&"function"!==typeof c)g=c;else{var p=a.ga.instance,q=p.getBindingAccessors||h,m=a.$(function(){if(g=c?c(d,b):q.call(p,b,d)){if(d[t])d[t]();if(d[B])d[B]()}return g},null,{l:b});g&&m.ja()||(m=null)}var x=d,u;if(g){var J=function(){return a.a.Ga(m?m():
g,e)},r=m?function(a){return function(){return e(m()[a])}}:function(a){return g[a]};J.get=function(a){return g[a]&&e(r(a))};J.has=function(a){return a in g};a.i.H in g&&a.i.subscribe(b,a.i.H,function(){var c=(0,g[a.i.H])();if(c){var d=a.h.childNodes(b);d.length&&c(d,a.Ec(d[0]))}});a.i.pa in g&&(x=a.i.Cb(b,d),a.i.subscribe(b,a.i.pa,function(){var c=(0,g[a.i.pa])();c&&a.h.firstChild(b)&&c(b)}));f=l(g);a.a.D(f,function(c){var d=c.Mc.init,e=c.Mc.update,f=c.key;if(8===b.nodeType&&!a.h.ea[f])throw Error("The binding '"+
f+"' cannot be used with virtual elements");try{"function"==typeof d&&a.u.G(function(){var a=d(b,r(f),J,x.$data,x);if(a&&a.controlsDescendantBindings){if(u!==n)throw Error("Multiple bindings ("+u+" and "+f+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");u=f}}),"function"==typeof e&&a.$(function(){e(b,r(f),J,x.$data,x)},null,{l:b})}catch(k){throw k.message='Unable to process binding "'+f+": "+g[f]+'"\nMessage: '+k.message,
k;}})}f=u===n;return{shouldBindDescendants:f,bindingContextForDescendants:f&&x}}function q(b,c){return b&&b instanceof a.fa?b:new a.fa(b,n,n,c)}var t=a.a.Da("_subscribable"),x=a.a.Da("_ancestorBindingInfo"),B=a.a.Da("_dataDependency");a.c={};var u={script:!0,textarea:!0,template:!0};a.getBindingHandler=function(b){return a.c[b]};var J={};a.fa=function(b,c,d,e,f){function k(){var b=p?h():h,f=a.a.f(b);c?(a.a.extend(l,c),x in c&&(l[x]=c[x])):(l.$parents=[],l.$root=f,l.ko=a);l[t]=q;g?f=l.$data:(l.$rawData=
b,l.$data=f);d&&(l[d]=f);e&&e(l,c,f);if(c&&c[t]&&!a.S.o().Vb(c[t]))c[t]();m&&(l[B]=m);return l.$data}var l=this,g=b===J,h=g?n:b,p="function"==typeof h&&!a.O(h),q,m=f&&f.dataDependency;f&&f.exportDependencies?k():(q=a.xb(k),q.v(),q.ja()?q.equalityComparer=null:l[t]=n)};a.fa.prototype.createChildContext=function(b,c,d,e){!e&&c&&"object"==typeof c&&(e=c,c=e.as,d=e.extend);if(c&&e&&e.noChildContext){var f="function"==typeof b&&!a.O(b);return new a.fa(J,this,null,function(a){d&&d(a);a[c]=f?b():b},e)}return new a.fa(b,
this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)},e)};a.fa.prototype.extend=function(b,c){return new a.fa(J,this,null,function(c){a.a.extend(c,"function"==typeof b?b(c):b)},c)};var z=a.a.g.Z();c.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)};c.prototype.sd=function(b){a.a.Pa(this.kb,b);!this.kb.length&&this.H&&this.Cc()};c.prototype.Cc=function(){this.H=!0;this.yc.N&&!this.kb.length&&(this.yc.N=
null,a.a.K.yb(this.node,b),a.i.ma(this.node,a.i.pa),this.Tc())};a.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(b,c,d,e,f){var k=a.a.g.Ub(b,z,{});k.Fa||(k.Fa=new a.T);f&&f.notifyImmediately&&k.Zb[c]&&a.u.G(d,e,[b]);return k.Fa.subscribe(d,e,c)},ma:function(b,c){var d=a.a.g.get(b,z);if(d&&(d.Zb[c]=!0,d.Fa&&d.Fa.notifySubscribers(b,c),c==a.i.H))if(d.N)d.N.Cc();else if(d.N===n&&d.Fa&&d.Fa.Wa(a.i.pa))throw Error("descendantsComplete event not supported for bindings on this node");
},Cb:function(b,d){var e=a.a.g.Ub(b,z,{});e.N||(e.N=new c(b,e,d[x]));return d[x]==e?d:d.extend(function(a){a[x]=e})}};a.Td=function(b){return(b=a.a.g.get(b,z))&&b.context};a.ib=function(b,c,d){1===b.nodeType&&a.h.Sc(b);return p(b,c,q(d))};a.ld=function(b,c,d){d=q(d);return a.ib(b,g(c,d,b),d)};a.Oa=function(a,b){1!==b.nodeType&&8!==b.nodeType||m(q(a),b)};a.vc=function(a,b,c){!v&&A.jQuery&&(v=A.jQuery);if(2>arguments.length){if(b=w.body,!b)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");
}else if(!b||1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");k(q(a,c),b)};a.Dc=function(b){return!b||1!==b.nodeType&&8!==b.nodeType?n:a.Td(b)};a.Ec=function(b){return(b=a.Dc(b))?b.$data:n};a.b("bindingHandlers",a.c);a.b("bindingEvent",a.i);a.b("bindingEvent.subscribe",a.i.subscribe);a.b("bindingEvent.startPossiblyAsyncContentBinding",a.i.Cb);a.b("applyBindings",a.vc);a.b("applyBindingsToDescendants",a.Oa);
a.b("applyBindingAccessorsToNode",a.ib);a.b("applyBindingsToNode",a.ld);a.b("contextFor",a.Dc);a.b("dataFor",a.Ec)})();(function(b){function c(c,e){var k=Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,l;k?k.subscribe(e):(k=f[c]=new a.T,k.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,Gd:e};delete f[c];l||e?k.notifySubscribers(b):a.na.zb(function(){k.notifySubscribers(b)})}),l=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a,
c)}):b(null,null)})}function e(c,d,f,l){l||(l=a.j.loaders.slice(0));var g=l.shift();if(g){var q=g[c];if(q){var t=!1;if(q.apply(g,d.concat(function(a){t?f(null):null!==a?f(a):e(c,d,f,l)}))!==b&&(t=!0,!g.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,f,l)}else f(null)}var f={},g={};a.j={get:function(d,e){var f=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;f?f.Gd?a.u.G(function(){e(f.definition)}):
a.na.zb(function(){e(f.definition)}):c(d,e)},Bc:function(a){delete g[a]},oc:e};a.j.loaders=[];a.b("components",a.j);a.b("components.get",a.j.get);a.b("components.clearCachedDefinition",a.j.Bc)})();(function(){function b(b,c,d,e){function g(){0===--B&&e(h)}var h={},B=2,u=d.template;d=d.viewModel;u?f(c,u,function(c){a.j.oc("loadTemplate",[b,c],function(a){h.template=a;g()})}):g();d?f(c,d,function(c){a.j.oc("loadViewModel",[b,c],function(a){h[m]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});
else if("function"===typeof b[m])d(b[m]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){switch(a.a.R(b)){case "script":return a.a.ua(b.text);case "textarea":return a.a.ua(b.value);case "template":if(e(b.content))return a.a.Ca(b.content.childNodes)}return a.a.Ca(b.childNodes)}function e(a){return A.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?
T||A.require?(T||A.require)([b.require],function(a){a&&"object"===typeof a&&a.Xd&&a["default"]&&(a=a["default"]);c(a)}):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+a+"': "+b);}}var h={};a.j.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.j.tb(b))throw Error("Component "+b+" is already registered");h[b]=c};a.j.tb=function(a){return Object.prototype.hasOwnProperty.call(h,a)};a.j.unregister=function(b){delete h[b];
a.j.Bc(b)};a.j.Fc={getConfig:function(b,c){c(a.j.tb(b)?h[b]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.ua(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.la(c.childNodes));else if(c.element)if(c=c.element,A.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var h=w.getElementById(c);h?f(d(h)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+
c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var m="createViewModel";a.b("components.register",a.j.register);a.b("components.isRegistered",a.j.tb);a.b("components.unregister",a.j.unregister);a.b("components.defaultLoader",a.j.Fc);a.j.loaders.push(a.j.Fc);a.j.dd=h})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Ga(f,function(c){return a.o(c,null,{l:b})}),g=a.a.Ga(f,
function(c){var e=c.v();return c.ja()?a.o({read:function(){return a.a.f(c())},write:a.Za(e)&&function(a){c()(a)},l:b}):e});Object.prototype.hasOwnProperty.call(g,"$raw")||(g.$raw=f);return g}return{$raw:{}}}a.j.getComponentNameForNode=function(b){var c=a.a.R(b);if(a.j.tb(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b||8>=a.a.W&&b.tagName===c))return c};a.j.tc=function(c,e,f,g){if(1===e.nodeType){var h=a.j.getComponentNameForNode(e);if(h){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');
var m={name:h,params:b(e,f)};c.component=g?function(){return m}:m}}return c};var c=new a.ga;9>a.a.W&&(a.j.register=function(a){return function(b){return a.apply(this,arguments)}}(a.j.register),w.createDocumentFragment=function(b){return function(){var c=b(),f=a.j.dd,g;for(g in f);return c}}(w.createDocumentFragment))})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.Ca(c);a.h.va(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a,
b,c):b}var d=0;a.c.component={init:function(e,f,g,h,m){function k(){var a=l&&l.dispose;"function"===typeof a&&a.call(l);q&&q.s();p=l=q=null}var l,p,q,t=a.a.la(a.h.childNodes(e));a.h.Ea(e);a.a.K.za(e,k);a.o(function(){var g=a.a.f(f()),h,u;"string"===typeof g?h=g:(h=a.a.f(g.name),u=a.a.f(g.params));if(!h)throw Error("No component name specified");var n=a.i.Cb(e,m),z=p=++d;a.j.get(h,function(d){if(p===z){k();if(!d)throw Error("Unknown component '"+h+"'");b(h,d,e);var f=c(d,u,{element:e,templateNodes:t});
d=n.createChildContext(f,{extend:function(a){a.$component=f;a.$componentTemplateNodes=t}});f&&f.koDescendantsComplete&&(q=a.i.subscribe(e,a.i.pa,f.koDescendantsComplete,f));l=f;a.Oa(d,e)}})},null,{l:e});return{controlsDescendantBindings:!0}}};a.h.ea.component=!0})();var V={"class":"className","for":"htmlFor"};a.c.attr={update:function(b,c){var d=a.a.f(c())||{};a.a.P(d,function(c,d){d=a.a.f(d);var g=c.indexOf(":"),g="lookupNamespaceURI"in b&&0<g&&b.lookupNamespaceURI(c.substr(0,g)),h=!1===d||null===
d||d===n;h?g?b.removeAttributeNS(g,c):b.removeAttribute(c):d=d.toString();8>=a.a.W&&c in V?(c=V[c],h?b.removeAttribute(c):b[c]=d):h||(g?b.setAttributeNS(g,c,d):b.setAttribute(c,d));"name"===c&&a.a.Yc(b,h?"":d)})}};(function(){a.c.checked={after:["value","attr"],init:function(b,c,d){function e(){var e=b.checked,f=g();if(!a.S.Ya()&&(e||!m&&!a.S.qa())){var k=a.u.G(c);if(l){var q=p?k.v():k,z=t;t=f;z!==f?e&&(a.a.Na(q,f,!0),a.a.Na(q,z,!1)):a.a.Na(q,f,e);p&&a.Za(k)&&k(q)}else h&&(f===n?f=e:e||(f=n)),a.m.eb(k,
d,"checked",f,!0)}}function f(){var d=a.a.f(c()),e=g();l?(b.checked=0<=a.a.A(d,e),t=e):b.checked=h&&e===n?!!d:g()===d}var g=a.xb(function(){if(d.has("checkedValue"))return a.a.f(d.get("checkedValue"));if(q)return d.has("value")?a.a.f(d.get("value")):b.value}),h="checkbox"==b.type,m="radio"==b.type;if(h||m){var k=c(),l=h&&a.a.f(k)instanceof Array,p=!(l&&k.push&&k.splice),q=m||l,t=l?g():n;m&&!b.name&&a.c.uniqueName.init(b,function(){return!0});a.o(e,null,{l:b});a.a.B(b,"click",e);a.o(f,null,{l:b});
k=n}}};a.m.wa.checked=!0;a.c.checkedValue={update:function(b,c){b.value=a.a.f(c())}}})();a.c["class"]={update:function(b,c){var d=a.a.Db(a.a.f(c()));a.a.Eb(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.Eb(b,d,!0)}};a.c.css={update:function(b,c){var d=a.a.f(c());null!==d&&"object"==typeof d?a.a.P(d,function(c,d){d=a.a.f(d);a.a.Eb(b,c,d)}):a.c["class"].update(b,c)}};a.c.enable={update:function(b,c){var d=a.a.f(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.c.disable=
{update:function(b,c){a.c.enable.update(b,function(){return!a.a.f(c())})}};a.c.event={init:function(b,c,d,e,f){var g=c()||{};a.a.P(g,function(g){"string"==typeof g&&a.a.B(b,g,function(b){var k,l=c()[g];if(l){try{var p=a.a.la(arguments);e=f.$data;p.unshift(e);k=l.apply(e,p)}finally{!0!==k&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.c.foreach={Rc:function(b){return function(){var c=b(),d=a.a.bc(c);
if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.ba.Ma};a.a.f(c);return{foreach:d.data,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.ba.Ma}}},init:function(b,c){return a.c.template.init(b,a.c.foreach.Rc(c))},update:function(b,c,d,e,f){return a.c.template.update(b,a.c.foreach.Rc(c),d,e,f)}};a.m.Ra.foreach=!1;a.h.ea.foreach=
!0;a.c.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(l){g=f.body}e=g===b}f=c();a.m.eb(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.B(b,"focus",f);a.a.B(b,"focusin",f);a.a.B(b,"blur",g);a.a.B(b,"focusout",g);b.__ko_hasfocusLastValue=!1},update:function(b,c){var d=!!a.a.f(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===
d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.u.G(a.a.Fb,null,[b,d?"focusin":"focusout"]))}};a.m.wa.hasfocus=!0;a.c.hasFocus=a.c.hasfocus;a.m.wa.hasFocus="hasfocus";a.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.fc(b,c())}};(function(){function b(b,d,e){a.c[b]={init:function(b,c,h,m,k){var l,p,q={},t,x,n;if(d){m=h.get("as");var u=h.get("noChildContext");n=!(m&&u);q={as:m,noChildContext:u,exportDependencies:n}}x=(t=
"render"==h.get("completeOn"))||h.has(a.i.pa);a.o(function(){var h=a.a.f(c()),m=!e!==!h,u=!p,r;if(n||m!==l){x&&(k=a.i.Cb(b,k));if(m){if(!d||n)q.dataDependency=a.S.o();r=d?k.createChildContext("function"==typeof h?h:c,q):a.S.qa()?k.extend(null,q):k}u&&a.S.qa()&&(p=a.a.Ca(a.h.childNodes(b),!0));m?(u||a.h.va(b,a.a.Ca(p)),a.Oa(r,b)):(a.h.Ea(b),t||a.i.ma(b,a.i.H));l=m}},null,{l:b});return{controlsDescendantBindings:!0}}};a.m.Ra[b]=!1;a.h.ea[b]=!0}b("if");b("ifnot",!1,!0);b("with",!0)})();a.c.let={init:function(b,
c,d,e,f){c=f.extend(c);a.Oa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.let=!0;var Q={};a.c.options={init:function(b){if("select"!==a.a.R(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,c,d){function e(){return a.a.jb(b.options,function(a){return a.selected})}function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function g(c,d){if(x&&l)a.i.ma(b,a.i.H);else if(t.length){var e=
0<=a.a.A(t,a.w.M(d[0]));a.a.Zc(d[0],e);x&&!e&&a.u.G(a.a.Fb,null,[b,"change"])}}var h=b.multiple,m=0!=b.length&&h?b.scrollTop:null,k=a.a.f(c()),l=d.get("valueAllowUnset")&&d.has("value"),p=d.get("optionsIncludeDestroyed");c={};var q,t=[];l||(h?t=a.a.Mb(e(),a.w.M):0<=b.selectedIndex&&t.push(a.w.M(b.options[b.selectedIndex])));k&&("undefined"==typeof k.length&&(k=[k]),q=a.a.jb(k,function(b){return p||b===n||null===b||!a.a.f(b._destroy)}),d.has("optionsCaption")&&(k=a.a.f(d.get("optionsCaption")),null!==
k&&k!==n&&q.unshift(Q)));var x=!1;c.beforeRemove=function(a){b.removeChild(a)};k=g;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(k=function(b,c){g(0,c);a.u.G(d.get("optionsAfterRender"),null,[c[0],b!==Q?b:n])});a.a.ec(b,q,function(c,e,g){g.length&&(t=!l&&g[0].selected?[a.w.M(g[0])]:[],x=!0);e=b.ownerDocument.createElement("option");c===Q?(a.a.Bb(e,d.get("optionsCaption")),a.w.cb(e,n)):(g=f(c,d.get("optionsValue"),c),a.w.cb(e,a.a.f(g)),c=f(c,d.get("optionsText"),g),
a.a.Bb(e,c));return[e]},c,k);if(!l){var B;h?B=t.length&&e().length<t.length:B=t.length&&0<=b.selectedIndex?a.w.M(b.options[b.selectedIndex])!==t[0]:t.length||0<=b.selectedIndex;B&&a.u.G(a.a.Fb,null,[b,"change"])}(l||a.S.Ya())&&a.i.ma(b,a.i.H);a.a.wd(b);m&&20<Math.abs(m-b.scrollTop)&&(b.scrollTop=m)}};a.c.options.$b=a.a.g.Z();a.c.selectedOptions={init:function(b,c,d){function e(){var e=c(),f=[];a.a.D(b.getElementsByTagName("option"),function(b){b.selected&&f.push(a.w.M(b))});a.m.eb(e,d,"selectedOptions",
f)}function f(){var d=a.a.f(c()),e=b.scrollTop;d&&"number"==typeof d.length&&a.a.D(b.getElementsByTagName("option"),function(b){var c=0<=a.a.A(d,a.w.M(b));b.selected!=c&&a.a.Zc(b,c)});b.scrollTop=e}if("select"!=a.a.R(b))throw Error("selectedOptions binding applies only to SELECT elements");var g;a.i.subscribe(b,a.i.H,function(){g?e():(a.a.B(b,"change",e),g=a.o(f,null,{l:b}))},null,{notifyImmediately:!0})},update:function(){}};a.m.wa.selectedOptions=!0;a.c.style={update:function(b,c){var d=a.a.f(c()||
{});a.a.P(d,function(c,d){d=a.a.f(d);if(null===d||d===n||!1===d)d="";if(v)v(b).css(c,d);else if(/^--/.test(c))b.style.setProperty(c,d);else{c=c.replace(/-(\w)/g,function(a,b){return b.toUpperCase()});var g=b.style[c];b.style[c]=d;d===g||b.style[c]!=g||isNaN(d)||(b.style[c]=d+"px")}})}};a.c.submit={init:function(b,c,d,e,f){if("function"!=typeof c())throw Error("The value for a submit binding must be a function");a.a.B(b,"submit",function(a){var d,e=c();try{d=e.call(f.$data,b)}finally{!0!==d&&(a.preventDefault?
a.preventDefault():a.returnValue=!1)}})}};a.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Bb(b,c())}};a.h.ea.text=!0;(function(){if(A&&A.navigator){var b=function(a){if(a)return parseFloat(a[1])},c=A.navigator.userAgent,d,e,f,g,h;(d=A.opera&&A.opera.version&&parseInt(A.opera.version()))||(h=b(c.match(/Edge\/([^ ]+)$/)))||b(c.match(/Chrome\/([^ ]+)/))||(e=b(c.match(/Version\/([^ ]+) Safari/)))||(f=b(c.match(/Firefox\/([^ ]+)/)))||(g=a.a.W||b(c.match(/MSIE ([^ ]+)/)))||
(g=b(c.match(/rv:([^ )]+)/)))}if(8<=g&&10>g)var m=a.a.g.Z(),k=a.a.g.Z(),l=function(b){var c=this.activeElement;(c=c&&a.a.g.get(c,k))&&c(b)},p=function(b,c){var d=b.ownerDocument;a.a.g.get(d,m)||(a.a.g.set(d,m,!0),a.a.B(d,"selectionchange",l));a.a.g.set(b,k,c)};a.c.textInput={init:function(b,c,k){function l(c,d){a.a.B(b,c,d)}function m(){var d=a.a.f(c());if(null===d||d===n)d="";L!==n&&d===L?a.a.setTimeout(m,4):b.value!==d&&(y=!0,b.value=d,y=!1,v=b.value)}function r(){w||(L=b.value,w=a.a.setTimeout(z,
4))}function z(){clearTimeout(w);L=w=n;var d=b.value;v!==d&&(v=d,a.m.eb(c(),k,"textInput",d))}var v=b.value,w,L,A=9==a.a.W?r:z,y=!1;g&&l("keypress",z);11>g&&l("propertychange",function(a){y||"value"!==a.propertyName||A(a)});8==g&&(l("keyup",z),l("keydown",z));p&&(p(b,A),l("dragend",r));(!g||9<=g)&&l("input",A);5>e&&"textarea"===a.a.R(b)?(l("keydown",r),l("paste",r),l("cut",r)):11>d?l("keydown",r):4>f?(l("DOMAutoComplete",z),l("dragdrop",z),l("drop",z)):h&&"number"===b.type&&l("keydown",r);l("change",
z);l("blur",z);a.o(m,null,{l:b})}};a.m.wa.textInput=!0;a.c.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.c.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.c.uniqueName.rd;a.a.Yc(b,d)}}};a.c.uniqueName.rd=0;a.c.using={init:function(b,c,d,e,f){var g;d.has("as")&&(g={as:d.get("as"),noChildContext:d.get("noChildContext")});c=f.createChildContext(c,g);a.Oa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.using=!0;a.c.value={init:function(b,c,d){var e=a.a.R(b),f="input"==
e;if(!f||"checkbox"!=b.type&&"radio"!=b.type){var g=[],h=d.get("valueUpdate"),m=!1,k=null;h&&("string"==typeof h?g=[h]:g=a.a.wc(h),a.a.Pa(g,"change"));var l=function(){k=null;m=!1;var e=c(),f=a.w.M(b);a.m.eb(e,d,"value",f)};!a.a.W||!f||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.A(g,"propertychange")||(a.a.B(b,"propertychange",function(){m=!0}),a.a.B(b,"focus",function(){m=!1}),a.a.B(b,"blur",function(){m&&l()}));a.a.D(g,function(c){var d=l;a.a.Ud(c,"after")&&
(d=function(){k=a.w.M(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.B(b,c,d)});var p;p=f&&"file"==b.type?function(){var d=a.a.f(c());null===d||d===n||""===d?b.value="":a.u.G(l)}:function(){var f=a.a.f(c()),g=a.w.M(b);if(null!==k&&f===k)a.a.setTimeout(p,0);else if(f!==g||g===n)"select"===e?(g=d.get("valueAllowUnset"),a.w.cb(b,f,g),g||f===a.w.M(b)||a.u.G(l)):a.w.cb(b,f)};if("select"===e){var q;a.i.subscribe(b,a.i.H,function(){q?d.get("valueAllowUnset")?p():l():(a.a.B(b,"change",l),q=a.o(p,null,{l:b}))},
null,{notifyImmediately:!0})}else a.a.B(b,"change",l),a.o(p,null,{l:b})}else a.ib(b,{checkedValue:c})},update:function(){}};a.m.wa.value=!0;a.c.visible={update:function(b,c){var d=a.a.f(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};a.c.hidden={update:function(b,c){a.c.visible.update(b,function(){return!a.a.f(c())})}};(function(b){a.c[b]={init:function(c,d,e,f,g){return a.c.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");
a.ca=function(){};a.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.ca.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||w;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.C.F(d)}if(1==b.nodeType||8==b.nodeType)return new a.C.ia(b);throw Error("Unknown template type: "+b);};a.ca.prototype.renderTemplate=
function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.ca.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.ca.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.ca);a.kc=function(){function b(b,c,d,h){b=a.m.ac(b);for(var m=a.m.Ra,k=0;k<b.length;k++){var l=b[k].key;if(Object.prototype.hasOwnProperty.call(m,
l)){var p=m[l];if("function"===typeof p){if(l=p(b[k].value))throw Error(l);}else if(!p)throw Error("This template engine does not support the '"+l+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.m.vb(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return h.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,
d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.kc.Ld(b,c)},d)},Ld:function(a,f){return a.replace(c,function(a,c,d,e,l){return b(l,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},md:function(b,c){return a.aa.Xb(function(d,h){var m=d.nextSibling;m&&m.nodeName.toLowerCase()===c&&a.ib(m,b,h)})}}}();a.b("__tr_ambtns",a.kc.md);(function(){a.C={};a.C.F=function(b){if(this.F=b){var c=
a.a.R(b);this.ab="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.C.F.prototype.text=function(){var b=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[b];var c=arguments[0];"innerHTML"===b?a.a.fc(this.F,c):this.F[b]=c};var b=a.a.g.Z()+"_";a.C.F.prototype.data=function(c){if(1===arguments.length)return a.a.g.get(this.F,b+c);a.a.g.set(this.F,b+c,arguments[1])};var c=a.a.g.Z();a.C.F.prototype.nodes=function(){var b=this.F;
if(0==arguments.length){var e=a.a.g.get(b,c)||{},f=e.lb||(3===this.ab?b.content:4===this.ab?b:n);if(!f||e.jd){var g=this.text();g&&g!==e.bb&&(f=a.a.Md(g,b.ownerDocument),a.a.g.set(b,c,{lb:f,bb:g,jd:!0}))}return f}e=arguments[0];this.ab!==n&&this.text("");a.a.g.set(b,c,{lb:e})};a.C.ia=function(a){this.F=a};a.C.ia.prototype=new a.C.F;a.C.ia.prototype.constructor=a.C.ia;a.C.ia.prototype.text=function(){if(0==arguments.length){var b=a.a.g.get(this.F,c)||{};b.bb===n&&b.lb&&(b.bb=b.lb.innerHTML);return b.bb}a.a.g.set(this.F,
c,{bb:arguments[0]})};a.b("templateSources",a.C);a.b("templateSources.domElement",a.C.F);a.b("templateSources.anonymousTemplate",a.C.ia)})();(function(){function b(b,c,d){var e;for(c=a.h.nextSibling(c);b&&(e=b)!==c;)b=a.h.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,h=a.ga.instance,m=h.preprocessNode;if(m){b(e,f,function(a,b){var c=a.previousSibling,d=m.call(h,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):
(c.push(e,f),a.a.Ua(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.vc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.aa.cd(b,[d])});a.a.Ua(c,g)}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,f,h,m){m=m||{};var n=(b&&d(b)||f||{}).ownerDocument,B=m.templateEngine||g;a.kc.xd(f,B,n);f=B.renderTemplate(f,h,m,n);if("number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");n=!1;switch(e){case "replaceChildren":a.h.va(b,
f);n=!0;break;case "replaceNode":a.a.Xc(b,f);n=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+e);}n&&(c(f,h),m.afterRender&&a.u.G(m.afterRender,null,[f,h[m.as||"$data"]]),"replaceChildren"==e&&a.i.ma(b,a.i.H));return f}function f(b,c,d){return a.O(b)?b():"function"===typeof b?b(c,d):b}var g;a.gc=function(b){if(b!=n&&!(b instanceof a.ca))throw Error("templateEngine must inherit from ko.templateEngine");g=b};a.dc=function(b,c,h,m,t){h=h||{};if((h.templateEngine||g)==
n)throw Error("Set a template engine before calling renderTemplate");t=t||"replaceChildren";if(m){var x=d(m);return a.$(function(){var g=c&&c instanceof a.fa?c:new a.fa(c,null,null,null,{exportDependencies:!0}),n=f(b,g.$data,g),g=e(m,t,n,g,h);"replaceNode"==t&&(m=g,x=d(m))},null,{Sa:function(){return!x||!a.a.Sb(x)},l:x&&"replaceNode"==t?x.parentNode:x})}return a.aa.Xb(function(d){a.dc(b,c,h,d,"replaceNode")})};a.Qd=function(b,d,g,h,m){function x(b,c){a.u.G(a.a.ec,null,[h,b,u,g,r,c]);a.i.ma(h,a.i.H)}
function r(a,b){c(b,v);g.afterRender&&g.afterRender(b,a);v=null}function u(a,c){v=m.createChildContext(a,{as:z,noChildContext:g.noChildContext,extend:function(a){a.$index=c;z&&(a[z+"Index"]=c)}});var d=f(b,a,v);return e(h,"ignoreTargetNode",d,v,g)}var v,z=g.as,w=!1===g.includeDestroyed||a.options.foreachHidesDestroyed&&!g.includeDestroyed;if(w||g.beforeRemove||!a.Pc(d))return a.$(function(){var b=a.a.f(d)||[];"undefined"==typeof b.length&&(b=[b]);w&&(b=a.a.jb(b,function(b){return b===n||null===b||
!a.a.f(b._destroy)}));x(b)},null,{l:h});x(d.v());var A=d.subscribe(function(a){x(d(),a)},null,"arrayChange");A.l(h);return A};var h=a.a.g.Z(),m=a.a.g.Z();a.c.template={init:function(b,c){var d=a.a.f(c());if("string"==typeof d||"name"in d)a.h.Ea(b);else if("nodes"in d){d=d.nodes||[];if(a.O(d))throw Error('The "nodes" option must be a plain, non-observable array.');var e=d[0]&&d[0].parentNode;e&&a.a.g.get(e,m)||(e=a.a.Yb(d),a.a.g.set(e,m,!0));(new a.C.ia(b)).nodes(e)}else if(d=a.h.childNodes(b),0<d.length)e=
a.a.Yb(d),(new a.C.ia(b)).nodes(e);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(b,c,d,e,f){var g=c();c=a.a.f(g);d=!0;e=null;"string"==typeof c?c={}:(g="name"in c?c.name:b,"if"in c&&(d=a.a.f(c["if"])),d&&"ifnot"in c&&(d=!a.a.f(c.ifnot)),d&&!g&&(d=!1));"foreach"in c?e=a.Qd(g,d&&c.foreach||[],c,b,f):d?(d=f,"data"in c&&(d=f.createChildContext(c.data,{as:c.as,noChildContext:c.noChildContext,exportDependencies:!0})),
e=a.dc(g,d,c,b)):a.h.Ea(b);f=e;(c=a.a.g.get(b,h))&&"function"==typeof c.s&&c.s();a.a.g.set(b,h,!f||f.ja&&!f.ja()?n:f)}};a.m.Ra.template=function(b){b=a.m.ac(b);return 1==b.length&&b[0].unknown||a.m.Id(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.h.ea.template=!0})();a.b("setTemplateEngine",a.gc);a.b("renderTemplate",a.dc);a.a.Kc=function(a,c,d){if(a.length&&c.length){var e,f,g,h,m;for(e=f=0;(!d||e<d)&&(h=a[f]);++f){for(g=0;m=c[g];++g)if(h.value===
m.value){h.moved=m.index;m.moved=h.index;c.splice(g,1);e=g=0;break}e+=g}}};a.a.Pb=function(){function b(b,d,e,f,g){var h=Math.min,m=Math.max,k=[],l,p=b.length,q,n=d.length,r=n-p||1,v=p+n+1,u,w,z;for(l=0;l<=p;l++)for(w=u,k.push(u=[]),z=h(n,l+r),q=m(0,l-1);q<=z;q++)u[q]=q?l?b[l-1]===d[q-1]?w[q-1]:h(w[q]||v,u[q-1]||v)+1:q+1:l+1;h=[];m=[];r=[];l=p;for(q=n;l||q;)n=k[l][q]-1,q&&n===k[l][q-1]?m.push(h[h.length]={status:e,value:d[--q],index:q}):l&&n===k[l-1][q]?r.push(h[h.length]={status:f,value:b[--l],index:l}):
(--q,--l,g.sparse||h.push({status:"retained",value:d[q]}));a.a.Kc(r,m,!g.dontLimitMoves&&10*p);return h.reverse()}return function(a,d,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];d=d||[];return a.length<d.length?b(a,d,"added","deleted",e):b(d,a,"deleted","added",e)}}();a.b("utils.compareArrays",a.a.Pb);(function(){function b(b,c,d,h,m){var k=[],l=a.$(function(){var l=c(d,m,a.a.Ua(k,b))||[];0<k.length&&(a.a.Xc(k,l),h&&a.u.G(h,null,[d,l,m]));k.length=0;a.a.Nb(k,l)},null,{l:b,Sa:function(){return!a.a.kd(k)}});
return{Y:k,$:l.ja()?l:n}}var c=a.a.g.Z(),d=a.a.g.Z();a.a.ec=function(e,f,g,h,m,k){function l(b){y={Aa:b,pb:a.ta(w++)};v.push(y);r||F.push(y)}function p(b){y=t[b];w!==y.pb.v()&&D.push(y);y.pb(w++);a.a.Ua(y.Y,e);v.push(y)}function q(b,c){if(b)for(var d=0,e=c.length;d<e;d++)a.a.D(c[d].Y,function(a){b(a,d,c[d].Aa)})}f=f||[];"undefined"==typeof f.length&&(f=[f]);h=h||{};var t=a.a.g.get(e,c),r=!t,v=[],u=0,w=0,z=[],A=[],C=[],D=[],F=[],y,I=0;if(r)a.a.D(f,l);else{if(!k||t&&t._countWaitingForRemove){var E=
a.a.Mb(t,function(a){return a.Aa});k=a.a.Pb(E,f,{dontLimitMoves:h.dontLimitMoves,sparse:!0})}for(var E=0,G,H,K;G=k[E];E++)switch(H=G.moved,K=G.index,G.status){case "deleted":for(;u<K;)p(u++);H===n&&(y=t[u],y.$&&(y.$.s(),y.$=n),a.a.Ua(y.Y,e).length&&(h.beforeRemove&&(v.push(y),I++,y.Aa===d?y=null:C.push(y)),y&&z.push.apply(z,y.Y)));u++;break;case "added":for(;w<K;)p(u++);H!==n?(A.push(v.length),p(H)):l(G.value)}for(;w<f.length;)p(u++);v._countWaitingForRemove=I}a.a.g.set(e,c,v);q(h.beforeMove,D);a.a.D(z,
h.beforeRemove?a.oa:a.removeNode);var M,O,P;try{P=e.ownerDocument.activeElement}catch(N){}if(A.length)for(;(E=A.shift())!=n;){y=v[E];for(M=n;E;)if((O=v[--E].Y)&&O.length){M=O[O.length-1];break}for(f=0;u=y.Y[f];M=u,f++)a.h.Wb(e,u,M)}for(E=0;y=v[E];E++){y.Y||a.a.extend(y,b(e,g,y.Aa,m,y.pb));for(f=0;u=y.Y[f];M=u,f++)a.h.Wb(e,u,M);!y.Ed&&m&&(m(y.Aa,y.Y,y.pb),y.Ed=!0,M=y.Y[y.Y.length-1])}P&&e.ownerDocument.activeElement!=P&&P.focus();q(h.beforeRemove,C);for(E=0;E<C.length;++E)C[E].Aa=d;q(h.afterMove,D);
q(h.afterAdd,F)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.ec);a.ba=function(){this.allowTemplateRewriting=!1};a.ba.prototype=new a.ca;a.ba.prototype.constructor=a.ba;a.ba.prototype.renderTemplateSource=function(b,c,d,e){if(c=(9>a.a.W?0:b.nodes)?b.nodes():null)return a.a.la(c.cloneNode(!0).childNodes);b=b.text();return a.a.ua(b,e)};a.ba.Ma=new a.ba;a.gc(a.ba.Ma);a.b("nativeTemplateEngine",a.ba);(function(){a.$a=function(){var a=this.Hd=function(){if(!v||!v.tmpl)return 0;try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();
this.renderTemplateSource=function(b,e,f,g){g=g||w;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||(h=b.text()||"",h=v.template(null,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),b.data("precompiled",h));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(h,b,e);e.appendTo(g.createElement("div"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+
a+" })()) }}"};this.addTemplate=function(a,b){w.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(v.tmpl.tag.ko_code={open:"__.push($1 || '');"},v.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.$a.prototype=new a.ca;a.$a.prototype.constructor=a.$a;var b=new a.$a;0<b.Hd&&a.gc(b);a.b("jqueryTmplTemplateEngine",a.$a)})()})})();})();


/***/ }),

/***/ "./node_modules/process/browser.js":
/*!*****************************************!*\
  !*** ./node_modules/process/browser.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
// don't break things.  But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals.  It's inside a
// function because try/catches deoptimize in certain engines.

var cachedSetTimeout;
var cachedClearTimeout;

function defaultSetTimout() {
    throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
    throw new Error('clearTimeout has not been defined');
}
(function () {
    try {
        if (typeof setTimeout === 'function') {
            cachedSetTimeout = setTimeout;
        } else {
            cachedSetTimeout = defaultSetTimout;
        }
    } catch (e) {
        cachedSetTimeout = defaultSetTimout;
    }
    try {
        if (typeof clearTimeout === 'function') {
            cachedClearTimeout = clearTimeout;
        } else {
            cachedClearTimeout = defaultClearTimeout;
        }
    } catch (e) {
        cachedClearTimeout = defaultClearTimeout;
    }
} ())
function runTimeout(fun) {
    if (cachedSetTimeout === setTimeout) {
        //normal enviroments in sane situations
        return setTimeout(fun, 0);
    }
    // if setTimeout wasn't available but was latter defined
    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
        cachedSetTimeout = setTimeout;
        return setTimeout(fun, 0);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedSetTimeout(fun, 0);
    } catch(e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
            return cachedSetTimeout.call(null, fun, 0);
        } catch(e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
            return cachedSetTimeout.call(this, fun, 0);
        }
    }


}
function runClearTimeout(marker) {
    if (cachedClearTimeout === clearTimeout) {
        //normal enviroments in sane situations
        return clearTimeout(marker);
    }
    // if clearTimeout wasn't available but was latter defined
    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
        cachedClearTimeout = clearTimeout;
        return clearTimeout(marker);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedClearTimeout(marker);
    } catch (e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
            return cachedClearTimeout.call(null, marker);
        } catch (e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
            return cachedClearTimeout.call(this, marker);
        }
    }



}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;

function cleanUpNextTick() {
    if (!draining || !currentQueue) {
        return;
    }
    draining = false;
    if (currentQueue.length) {
        queue = currentQueue.concat(queue);
    } else {
        queueIndex = -1;
    }
    if (queue.length) {
        drainQueue();
    }
}

function drainQueue() {
    if (draining) {
        return;
    }
    var timeout = runTimeout(cleanUpNextTick);
    draining = true;

    var len = queue.length;
    while(len) {
        currentQueue = queue;
        queue = [];
        while (++queueIndex < len) {
            if (currentQueue) {
                currentQueue[queueIndex].run();
            }
        }
        queueIndex = -1;
        len = queue.length;
    }
    currentQueue = null;
    draining = false;
    runClearTimeout(timeout);
}

process.nextTick = function (fun) {
    var args = new Array(arguments.length - 1);
    if (arguments.length > 1) {
        for (var i = 1; i < arguments.length; i++) {
            args[i - 1] = arguments[i];
        }
    }
    queue.push(new Item(fun, args));
    if (queue.length === 1 && !draining) {
        runTimeout(drainQueue);
    }
};

// v8 likes predictible objects
function Item(fun, array) {
    this.fun = fun;
    this.array = array;
}
Item.prototype.run = function () {
    this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};

function noop() {}

process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
    throw new Error('process.binding is not supported');
};

process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };


/***/ }),

/***/ "./node_modules/setimmediate/setImmediate.js":
/*!***************************************************!*\
  !*** ./node_modules/setimmediate/setImmediate.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
    "use strict";

    if (global.setImmediate) {
        return;
    }

    var nextHandle = 1; // Spec says greater than zero
    var tasksByHandle = {};
    var currentlyRunningATask = false;
    var doc = global.document;
    var registerImmediate;

    function setImmediate(callback) {
      // Callback can either be a function or a string
      if (typeof callback !== "function") {
        callback = new Function("" + callback);
      }
      // Copy function arguments
      var args = new Array(arguments.length - 1);
      for (var i = 0; i < args.length; i++) {
          args[i] = arguments[i + 1];
      }
      // Store and register the task
      var task = { callback: callback, args: args };
      tasksByHandle[nextHandle] = task;
      registerImmediate(nextHandle);
      return nextHandle++;
    }

    function clearImmediate(handle) {
        delete tasksByHandle[handle];
    }

    function run(task) {
        var callback = task.callback;
        var args = task.args;
        switch (args.length) {
        case 0:
            callback();
            break;
        case 1:
            callback(args[0]);
            break;
        case 2:
            callback(args[0], args[1]);
            break;
        case 3:
            callback(args[0], args[1], args[2]);
            break;
        default:
            callback.apply(undefined, args);
            break;
        }
    }

    function runIfPresent(handle) {
        // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
        // So if we're currently running a task, we'll need to delay this invocation.
        if (currentlyRunningATask) {
            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
            // "too much recursion" error.
            setTimeout(runIfPresent, 0, handle);
        } else {
            var task = tasksByHandle[handle];
            if (task) {
                currentlyRunningATask = true;
                try {
                    run(task);
                } finally {
                    clearImmediate(handle);
                    currentlyRunningATask = false;
                }
            }
        }
    }

    function installNextTickImplementation() {
        registerImmediate = function(handle) {
            process.nextTick(function () { runIfPresent(handle); });
        };
    }

    function canUsePostMessage() {
        // The test against `importScripts` prevents this implementation from being installed inside a web worker,
        // where `global.postMessage` means something completely different and can't be used for this purpose.
        if (global.postMessage && !global.importScripts) {
            var postMessageIsAsynchronous = true;
            var oldOnMessage = global.onmessage;
            global.onmessage = function() {
                postMessageIsAsynchronous = false;
            };
            global.postMessage("", "*");
            global.onmessage = oldOnMessage;
            return postMessageIsAsynchronous;
        }
    }

    function installPostMessageImplementation() {
        // Installs an event handler on `global` for the `message` event: see
        // * https://developer.mozilla.org/en/DOM/window.postMessage
        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages

        var messagePrefix = "setImmediate$" + Math.random() + "$";
        var onGlobalMessage = function(event) {
            if (event.source === global &&
                typeof event.data === "string" &&
                event.data.indexOf(messagePrefix) === 0) {
                runIfPresent(+event.data.slice(messagePrefix.length));
            }
        };

        if (global.addEventListener) {
            global.addEventListener("message", onGlobalMessage, false);
        } else {
            global.attachEvent("onmessage", onGlobalMessage);
        }

        registerImmediate = function(handle) {
            global.postMessage(messagePrefix + handle, "*");
        };
    }

    function installMessageChannelImplementation() {
        var channel = new MessageChannel();
        channel.port1.onmessage = function(event) {
            var handle = event.data;
            runIfPresent(handle);
        };

        registerImmediate = function(handle) {
            channel.port2.postMessage(handle);
        };
    }

    function installReadyStateChangeImplementation() {
        var html = doc.documentElement;
        registerImmediate = function(handle) {
            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
            var script = doc.createElement("script");
            script.onreadystatechange = function () {
                runIfPresent(handle);
                script.onreadystatechange = null;
                html.removeChild(script);
                script = null;
            };
            html.appendChild(script);
        };
    }

    function installSetTimeoutImplementation() {
        registerImmediate = function(handle) {
            setTimeout(runIfPresent, 0, handle);
        };
    }

    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;

    // Don't get fooled by e.g. browserify environments.
    if ({}.toString.call(global.process) === "[object process]") {
        // For Node.js before 0.9
        installNextTickImplementation();

    } else if (canUsePostMessage()) {
        // For non-IE10 modern browsers
        installPostMessageImplementation();

    } else if (global.MessageChannel) {
        // For web workers, where supported
        installMessageChannelImplementation();

    } else if (doc && "onreadystatechange" in doc.createElement("script")) {
        // For IE 6–8
        installReadyStateChangeImplementation();

    } else {
        // For older browsers
        installSetTimeoutImplementation();
    }

    attachTo.setImmediate = setImmediate;
    attachTo.clearImmediate = clearImmediate;
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))

/***/ }),

/***/ "./node_modules/signature_pad/dist/signature_pad.mjs":
/*!***********************************************************!*\
  !*** ./node_modules/signature_pad/dist/signature_pad.mjs ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/*!
 * Signature Pad v2.3.2
 * https://github.com/szimek/signature_pad
 *
 * Copyright 2017 Szymon Nowak
 * Released under the MIT license
 *
 * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:
 * http://corner.squareup.com/2012/07/smoother-signatures.html
 *
 * Implementation of interpolation using cubic Bézier curves is taken from:
 * http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript
 *
 * Algorithm for approximated length of a Bézier curve is taken from:
 * http://www.lemoda.net/maths/bezier-length/index.html
 *
 */

function Point(x, y, time) {
  this.x = x;
  this.y = y;
  this.time = time || new Date().getTime();
}

Point.prototype.velocityFrom = function (start) {
  return this.time !== start.time ? this.distanceTo(start) / (this.time - start.time) : 1;
};

Point.prototype.distanceTo = function (start) {
  return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2));
};

Point.prototype.equals = function (other) {
  return this.x === other.x && this.y === other.y && this.time === other.time;
};

function Bezier(startPoint, control1, control2, endPoint) {
  this.startPoint = startPoint;
  this.control1 = control1;
  this.control2 = control2;
  this.endPoint = endPoint;
}

// Returns approximated length.
Bezier.prototype.length = function () {
  var steps = 10;
  var length = 0;
  var px = void 0;
  var py = void 0;

  for (var i = 0; i <= steps; i += 1) {
    var t = i / steps;
    var cx = this._point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x);
    var cy = this._point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
    if (i > 0) {
      var xdiff = cx - px;
      var ydiff = cy - py;
      length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);
    }
    px = cx;
    py = cy;
  }

  return length;
};

/* eslint-disable no-multi-spaces, space-in-parens */
Bezier.prototype._point = function (t, start, c1, c2, end) {
  return start * (1.0 - t) * (1.0 - t) * (1.0 - t) + 3.0 * c1 * (1.0 - t) * (1.0 - t) * t + 3.0 * c2 * (1.0 - t) * t * t + end * t * t * t;
};

/* eslint-disable */

// http://stackoverflow.com/a/27078401/815507
function throttle(func, wait, options) {
  var context, args, result;
  var timeout = null;
  var previous = 0;
  if (!options) options = {};
  var later = function later() {
    previous = options.leading === false ? 0 : Date.now();
    timeout = null;
    result = func.apply(context, args);
    if (!timeout) context = args = null;
  };
  return function () {
    var now = Date.now();
    if (!previous && options.leading === false) previous = now;
    var remaining = wait - (now - previous);
    context = this;
    args = arguments;
    if (remaining <= 0 || remaining > wait) {
      if (timeout) {
        clearTimeout(timeout);
        timeout = null;
      }
      previous = now;
      result = func.apply(context, args);
      if (!timeout) context = args = null;
    } else if (!timeout && options.trailing !== false) {
      timeout = setTimeout(later, remaining);
    }
    return result;
  };
}

function SignaturePad(canvas, options) {
  var self = this;
  var opts = options || {};

  this.velocityFilterWeight = opts.velocityFilterWeight || 0.7;
  this.minWidth = opts.minWidth || 0.5;
  this.maxWidth = opts.maxWidth || 2.5;
  this.throttle = 'throttle' in opts ? opts.throttle : 16; // in miliseconds
  this.minDistance = 'minDistance' in opts ? opts.minDistance : 5;

  if (this.throttle) {
    this._strokeMoveUpdate = throttle(SignaturePad.prototype._strokeUpdate, this.throttle);
  } else {
    this._strokeMoveUpdate = SignaturePad.prototype._strokeUpdate;
  }

  this.dotSize = opts.dotSize || function () {
    return (this.minWidth + this.maxWidth) / 2;
  };
  this.penColor = opts.penColor || 'black';
  this.backgroundColor = opts.backgroundColor || 'rgba(0,0,0,0)';
  this.onBegin = opts.onBegin;
  this.onEnd = opts.onEnd;

  this._canvas = canvas;
  this._ctx = canvas.getContext('2d');
  this.clear();

  // We need add these inline so they are available to unbind while still having
  // access to 'self' we could use _.bind but it's not worth adding a dependency.
  this._handleMouseDown = function (event) {
    if (event.which === 1) {
      self._mouseButtonDown = true;
      self._strokeBegin(event);
    }
  };

  this._handleMouseMove = function (event) {
    if (self._mouseButtonDown) {
      self._strokeMoveUpdate(event);
    }
  };

  this._handleMouseUp = function (event) {
    if (event.which === 1 && self._mouseButtonDown) {
      self._mouseButtonDown = false;
      self._strokeEnd(event);
    }
  };

  this._handleTouchStart = function (event) {
    if (event.targetTouches.length === 1) {
      var touch = event.changedTouches[0];
      self._strokeBegin(touch);
    }
  };

  this._handleTouchMove = function (event) {
    // Prevent scrolling.
    event.preventDefault();

    var touch = event.targetTouches[0];
    self._strokeMoveUpdate(touch);
  };

  this._handleTouchEnd = function (event) {
    var wasCanvasTouched = event.target === self._canvas;
    if (wasCanvasTouched) {
      event.preventDefault();
      self._strokeEnd(event);
    }
  };

  // Enable mouse and touch event handlers
  this.on();
}

// Public methods
SignaturePad.prototype.clear = function () {
  var ctx = this._ctx;
  var canvas = this._canvas;

  ctx.fillStyle = this.backgroundColor;
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  ctx.fillRect(0, 0, canvas.width, canvas.height);

  this._data = [];
  this._reset();
  this._isEmpty = true;
};

SignaturePad.prototype.fromDataURL = function (dataUrl) {
  var _this = this;

  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

  var image = new Image();
  var ratio = options.ratio || window.devicePixelRatio || 1;
  var width = options.width || this._canvas.width / ratio;
  var height = options.height || this._canvas.height / ratio;

  this._reset();
  image.src = dataUrl;
  image.onload = function () {
    _this._ctx.drawImage(image, 0, 0, width, height);
  };
  this._isEmpty = false;
};

SignaturePad.prototype.toDataURL = function (type) {
  var _canvas;

  switch (type) {
    case 'image/svg+xml':
      return this._toSVG();
    default:
      for (var _len = arguments.length, options = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        options[_key - 1] = arguments[_key];
      }

      return (_canvas = this._canvas).toDataURL.apply(_canvas, [type].concat(options));
  }
};

SignaturePad.prototype.on = function () {
  this._handleMouseEvents();
  this._handleTouchEvents();
};

SignaturePad.prototype.off = function () {
  this._canvas.removeEventListener('mousedown', this._handleMouseDown);
  this._canvas.removeEventListener('mousemove', this._handleMouseMove);
  document.removeEventListener('mouseup', this._handleMouseUp);

  this._canvas.removeEventListener('touchstart', this._handleTouchStart);
  this._canvas.removeEventListener('touchmove', this._handleTouchMove);
  this._canvas.removeEventListener('touchend', this._handleTouchEnd);
};

SignaturePad.prototype.isEmpty = function () {
  return this._isEmpty;
};

// Private methods
SignaturePad.prototype._strokeBegin = function (event) {
  this._data.push([]);
  this._reset();
  this._strokeUpdate(event);

  if (typeof this.onBegin === 'function') {
    this.onBegin(event);
  }
};

SignaturePad.prototype._strokeUpdate = function (event) {
  var x = event.clientX;
  var y = event.clientY;

  var point = this._createPoint(x, y);
  var lastPointGroup = this._data[this._data.length - 1];
  var lastPoint = lastPointGroup && lastPointGroup[lastPointGroup.length - 1];
  var isLastPointTooClose = lastPoint && point.distanceTo(lastPoint) < this.minDistance;

  // Skip this point if it's too close to the previous one
  if (!(lastPoint && isLastPointTooClose)) {
    var _addPoint = this._addPoint(point),
        curve = _addPoint.curve,
        widths = _addPoint.widths;

    if (curve && widths) {
      this._drawCurve(curve, widths.start, widths.end);
    }

    this._data[this._data.length - 1].push({
      x: point.x,
      y: point.y,
      time: point.time,
      color: this.penColor
    });
  }
};

SignaturePad.prototype._strokeEnd = function (event) {
  var canDrawCurve = this.points.length > 2;
  var point = this.points[0]; // Point instance

  if (!canDrawCurve && point) {
    this._drawDot(point);
  }

  if (point) {
    var lastPointGroup = this._data[this._data.length - 1];
    var lastPoint = lastPointGroup[lastPointGroup.length - 1]; // plain object

    // When drawing a dot, there's only one point in a group, so without this check
    // such group would end up with exactly the same 2 points.
    if (!point.equals(lastPoint)) {
      lastPointGroup.push({
        x: point.x,
        y: point.y,
        time: point.time,
        color: this.penColor
      });
    }
  }

  if (typeof this.onEnd === 'function') {
    this.onEnd(event);
  }
};

SignaturePad.prototype._handleMouseEvents = function () {
  this._mouseButtonDown = false;

  this._canvas.addEventListener('mousedown', this._handleMouseDown);
  this._canvas.addEventListener('mousemove', this._handleMouseMove);
  document.addEventListener('mouseup', this._handleMouseUp);
};

SignaturePad.prototype._handleTouchEvents = function () {
  // Pass touch events to canvas element on mobile IE11 and Edge.
  this._canvas.style.msTouchAction = 'none';
  this._canvas.style.touchAction = 'none';

  this._canvas.addEventListener('touchstart', this._handleTouchStart);
  this._canvas.addEventListener('touchmove', this._handleTouchMove);
  this._canvas.addEventListener('touchend', this._handleTouchEnd);
};

SignaturePad.prototype._reset = function () {
  this.points = [];
  this._lastVelocity = 0;
  this._lastWidth = (this.minWidth + this.maxWidth) / 2;
  this._ctx.fillStyle = this.penColor;
};

SignaturePad.prototype._createPoint = function (x, y, time) {
  var rect = this._canvas.getBoundingClientRect();

  return new Point(x - rect.left, y - rect.top, time || new Date().getTime());
};

SignaturePad.prototype._addPoint = function (point) {
  var points = this.points;
  var tmp = void 0;

  points.push(point);

  if (points.length > 2) {
    // To reduce the initial lag make it work with 3 points
    // by copying the first point to the beginning.
    if (points.length === 3) points.unshift(points[0]);

    tmp = this._calculateCurveControlPoints(points[0], points[1], points[2]);
    var c2 = tmp.c2;
    tmp = this._calculateCurveControlPoints(points[1], points[2], points[3]);
    var c3 = tmp.c1;
    var curve = new Bezier(points[1], c2, c3, points[2]);
    var widths = this._calculateCurveWidths(curve);

    // Remove the first element from the list,
    // so that we always have no more than 4 points in points array.
    points.shift();

    return { curve: curve, widths: widths };
  }

  return {};
};

SignaturePad.prototype._calculateCurveControlPoints = function (s1, s2, s3) {
  var dx1 = s1.x - s2.x;
  var dy1 = s1.y - s2.y;
  var dx2 = s2.x - s3.x;
  var dy2 = s2.y - s3.y;

  var m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };
  var m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };

  var l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);
  var l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);

  var dxm = m1.x - m2.x;
  var dym = m1.y - m2.y;

  var k = l2 / (l1 + l2);
  var cm = { x: m2.x + dxm * k, y: m2.y + dym * k };

  var tx = s2.x - cm.x;
  var ty = s2.y - cm.y;

  return {
    c1: new Point(m1.x + tx, m1.y + ty),
    c2: new Point(m2.x + tx, m2.y + ty)
  };
};

SignaturePad.prototype._calculateCurveWidths = function (curve) {
  var startPoint = curve.startPoint;
  var endPoint = curve.endPoint;
  var widths = { start: null, end: null };

  var velocity = this.velocityFilterWeight * endPoint.velocityFrom(startPoint) + (1 - this.velocityFilterWeight) * this._lastVelocity;

  var newWidth = this._strokeWidth(velocity);

  widths.start = this._lastWidth;
  widths.end = newWidth;

  this._lastVelocity = velocity;
  this._lastWidth = newWidth;

  return widths;
};

SignaturePad.prototype._strokeWidth = function (velocity) {
  return Math.max(this.maxWidth / (velocity + 1), this.minWidth);
};

SignaturePad.prototype._drawPoint = function (x, y, size) {
  var ctx = this._ctx;

  ctx.moveTo(x, y);
  ctx.arc(x, y, size, 0, 2 * Math.PI, false);
  this._isEmpty = false;
};

SignaturePad.prototype._drawCurve = function (curve, startWidth, endWidth) {
  var ctx = this._ctx;
  var widthDelta = endWidth - startWidth;
  var drawSteps = Math.floor(curve.length());

  ctx.beginPath();

  for (var i = 0; i < drawSteps; i += 1) {
    // Calculate the Bezier (x, y) coordinate for this step.
    var t = i / drawSteps;
    var tt = t * t;
    var ttt = tt * t;
    var u = 1 - t;
    var uu = u * u;
    var uuu = uu * u;

    var x = uuu * curve.startPoint.x;
    x += 3 * uu * t * curve.control1.x;
    x += 3 * u * tt * curve.control2.x;
    x += ttt * curve.endPoint.x;

    var y = uuu * curve.startPoint.y;
    y += 3 * uu * t * curve.control1.y;
    y += 3 * u * tt * curve.control2.y;
    y += ttt * curve.endPoint.y;

    var width = startWidth + ttt * widthDelta;
    this._drawPoint(x, y, width);
  }

  ctx.closePath();
  ctx.fill();
};

SignaturePad.prototype._drawDot = function (point) {
  var ctx = this._ctx;
  var width = typeof this.dotSize === 'function' ? this.dotSize() : this.dotSize;

  ctx.beginPath();
  this._drawPoint(point.x, point.y, width);
  ctx.closePath();
  ctx.fill();
};

SignaturePad.prototype._fromData = function (pointGroups, drawCurve, drawDot) {
  for (var i = 0; i < pointGroups.length; i += 1) {
    var group = pointGroups[i];

    if (group.length > 1) {
      for (var j = 0; j < group.length; j += 1) {
        var rawPoint = group[j];
        var point = new Point(rawPoint.x, rawPoint.y, rawPoint.time);
        var color = rawPoint.color;

        if (j === 0) {
          // First point in a group. Nothing to draw yet.

          // All points in the group have the same color, so it's enough to set
          // penColor just at the beginning.
          this.penColor = color;
          this._reset();

          this._addPoint(point);
        } else if (j !== group.length - 1) {
          // Middle point in a group.
          var _addPoint2 = this._addPoint(point),
              curve = _addPoint2.curve,
              widths = _addPoint2.widths;

          if (curve && widths) {
            drawCurve(curve, widths, color);
          }
        } else {
          // Last point in a group. Do nothing.
        }
      }
    } else {
      this._reset();
      var _rawPoint = group[0];
      drawDot(_rawPoint);
    }
  }
};

SignaturePad.prototype._toSVG = function () {
  var _this2 = this;

  var pointGroups = this._data;
  var canvas = this._canvas;
  var ratio = Math.max(window.devicePixelRatio || 1, 1);
  var minX = 0;
  var minY = 0;
  var maxX = canvas.width / ratio;
  var maxY = canvas.height / ratio;
  var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');

  svg.setAttributeNS(null, 'width', canvas.width);
  svg.setAttributeNS(null, 'height', canvas.height);

  this._fromData(pointGroups, function (curve, widths, color) {
    var path = document.createElement('path');

    // Need to check curve for NaN values, these pop up when drawing
    // lines on the canvas that are not continuous. E.g. Sharp corners
    // or stopping mid-stroke and than continuing without lifting mouse.
    if (!isNaN(curve.control1.x) && !isNaN(curve.control1.y) && !isNaN(curve.control2.x) && !isNaN(curve.control2.y)) {
      var attr = 'M ' + curve.startPoint.x.toFixed(3) + ',' + curve.startPoint.y.toFixed(3) + ' ' + ('C ' + curve.control1.x.toFixed(3) + ',' + curve.control1.y.toFixed(3) + ' ') + (curve.control2.x.toFixed(3) + ',' + curve.control2.y.toFixed(3) + ' ') + (curve.endPoint.x.toFixed(3) + ',' + curve.endPoint.y.toFixed(3));

      path.setAttribute('d', attr);
      path.setAttribute('stroke-width', (widths.end * 2.25).toFixed(3));
      path.setAttribute('stroke', color);
      path.setAttribute('fill', 'none');
      path.setAttribute('stroke-linecap', 'round');

      svg.appendChild(path);
    }
  }, function (rawPoint) {
    var circle = document.createElement('circle');
    var dotSize = typeof _this2.dotSize === 'function' ? _this2.dotSize() : _this2.dotSize;
    circle.setAttribute('r', dotSize);
    circle.setAttribute('cx', rawPoint.x);
    circle.setAttribute('cy', rawPoint.y);
    circle.setAttribute('fill', rawPoint.color);

    svg.appendChild(circle);
  });

  var prefix = 'data:image/svg+xml;base64,';
  var header = '<svg' + ' xmlns="http://www.w3.org/2000/svg"' + ' xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + minX + ' ' + minY + ' ' + maxX + ' ' + maxY + '"') + (' width="' + maxX + '"') + (' height="' + maxY + '"') + '>';
  var body = svg.innerHTML;

  // IE hack for missing innerHTML property on SVGElement
  if (body === undefined) {
    var dummy = document.createElement('dummy');
    var nodes = svg.childNodes;
    dummy.innerHTML = '';

    for (var i = 0; i < nodes.length; i += 1) {
      dummy.appendChild(nodes[i].cloneNode(true));
    }

    body = dummy.innerHTML;
  }

  var footer = '</svg>';
  var data = header + body + footer;

  return prefix + btoa(data);
};

SignaturePad.prototype.fromData = function (pointGroups) {
  var _this3 = this;

  this.clear();

  this._fromData(pointGroups, function (curve, widths) {
    return _this3._drawCurve(curve, widths.start, widths.end);
  }, function (rawPoint) {
    return _this3._drawDot(rawPoint);
  });

  this._data = pointGroups;
};

SignaturePad.prototype.toData = function () {
  return this._data;
};

/* harmony default export */ __webpack_exports__["default"] = (SignaturePad);


/***/ }),

/***/ "./node_modules/timers-browserify/main.js":
/*!************************************************!*\
  !*** ./node_modules/timers-browserify/main.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
            (typeof self !== "undefined" && self) ||
            window;
var apply = Function.prototype.apply;

// DOM APIs, for completeness

exports.setTimeout = function() {
  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
};
exports.setInterval = function() {
  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
};
exports.clearTimeout =
exports.clearInterval = function(timeout) {
  if (timeout) {
    timeout.close();
  }
};

function Timeout(id, clearFn) {
  this._id = id;
  this._clearFn = clearFn;
}
Timeout.prototype.unref = Timeout.prototype.ref = function() {};
Timeout.prototype.close = function() {
  this._clearFn.call(scope, this._id);
};

// Does not start the time, just sets up the members needed.
exports.enroll = function(item, msecs) {
  clearTimeout(item._idleTimeoutId);
  item._idleTimeout = msecs;
};

exports.unenroll = function(item) {
  clearTimeout(item._idleTimeoutId);
  item._idleTimeout = -1;
};

exports._unrefActive = exports.active = function(item) {
  clearTimeout(item._idleTimeoutId);

  var msecs = item._idleTimeout;
  if (msecs >= 0) {
    item._idleTimeoutId = setTimeout(function onTimeout() {
      if (item._onTimeout)
        item._onTimeout();
    }, msecs);
  }
};

// setimmediate attaches itself to the global object
__webpack_require__(/*! setimmediate */ "./node_modules/setimmediate/setImmediate.js");
// On some exotic environments, it's not clear which object `setimmediate` was
// able to install onto.  Search each possibility in the same order as the
// `setimmediate` library.
exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
                       (typeof global !== "undefined" && global.setImmediate) ||
                       (this && this.setImmediate);
exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
                         (typeof global !== "undefined" && global.clearImmediate) ||
                         (this && this.clearImmediate);

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || new Function("return this")();
} catch (e) {
	// This works if the window reference is available
	if (typeof window === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),

/***/ "./src/actions/action.ts":
/*!*******************************!*\
  !*** ./src/actions/action.ts ***!
  \*******************************/
/*! exports provided: createDropdownActionModel, createDropdownActionModelAdvanced, Action, ActionDropdownViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return createDropdownActionModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return createDropdownActionModelAdvanced; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return ActionDropdownViewModel; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base */ "./src/base.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../list */ "./src/list.ts");
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../popup */ "./src/popup.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./container */ "./src/actions/container.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};







function createDropdownActionModel(actionOptions, dropdownOptions, locOwner) {
    return createDropdownActionModelAdvanced(actionOptions, dropdownOptions, dropdownOptions, locOwner);
}
function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOptions, locOwner) {
    var listModel = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](listOptions.items, function (item) {
        listOptions.onSelectionChanged(item),
            innerPopupModel.toggleVisibility();
    }, listOptions.allowSelection, listOptions.selectedItem, listOptions.onFilterStringChangedCallback);
    listModel.locOwner = locOwner;
    var innerPopupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: listModel }, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.verticalPosition, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.horizontalPosition, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.showPointer, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.isModal, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onCancel, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onApply, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onHide, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onShow, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.cssClass, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.title);
    innerPopupModel.displayMode = popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.displayMode;
    var newActionOptions = Object.assign({}, actionOptions, {
        component: "sv-action-bar-item-dropdown",
        popupModel: innerPopupModel,
        action: function () {
            !!(actionOptions.action) && actionOptions.action();
            innerPopupModel.toggleVisibility();
        },
    });
    var newAction = new Action(newActionOptions);
    newAction.data = listModel;
    return newAction;
}
var Action = /** @class */ (function (_super) {
    __extends(Action, _super);
    function Action(innerItem) {
        var _this = _super.call(this) || this;
        _this.innerItem = innerItem;
        _this.iconSize = 24;
        _this.locTitleChanged = function () {
            var val = _this.locTitle.renderedHtml;
            _this.setPropertyValue("title", !!val ? val : undefined);
        };
        _this.locTitle = !!innerItem ? innerItem["locTitle"] : null;
        //Object.assign(this, item) to support IE11
        if (!!innerItem) {
            for (var key in innerItem) {
                _this[key] = innerItem[key];
            }
        }
        if (!!_this.locTitleName) {
            _this.locTitleChanged();
        }
        _this.locStrChangedInPopupModel();
        return _this;
    }
    Action.prototype.raiseUpdate = function () {
        this.updateCallback && this.updateCallback();
    };
    Action.prototype.createLocTitle = function () {
        return this.createLocalizableString("title", this, true);
    };
    Object.defineProperty(Action.prototype, "locTitle", {
        get: function () { return this.locTitleValue; },
        set: function (val) {
            if (!val && !this.locTitleValue) {
                val = this.createLocTitle();
            }
            if (!!this.locTitleValue) {
                this.locTitleValue.onStringChanged.remove(this.locTitleChanged);
            }
            this.locTitleValue = val;
            this.locTitleValue.onStringChanged.add(this.locTitleChanged);
            this.locTitleChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Action.prototype, "locTitleName", {
        get: function () {
            return this.locTitle.localizationName;
        },
        set: function (val) {
            this.locTitle.localizationName = val;
        },
        enumerable: false,
        configurable: true
    });
    Action.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        this.locTooltipChanged();
        this.locStrChangedInPopupModel();
    };
    Action.prototype.locStrChangedInPopupModel = function () {
        if (!this.popupModel || !this.popupModel.contentComponentData || !this.popupModel.contentComponentData.model)
            return;
        var model = this.popupModel.contentComponentData.model;
        if (Array.isArray(model.actions)) {
            var actions = model.actions;
            actions.forEach(function (item) {
                if (!!item.locStrsChanged) {
                    item.locStrsChanged();
                }
            });
        }
    };
    Action.prototype.locTooltipChanged = function () {
        if (!this.locTooltipName)
            return;
        this.tooltip = _surveyStrings__WEBPACK_IMPORTED_MODULE_1__["surveyLocalization"].getString(this.locTooltipName, this.locTitle.locale);
    };
    Object.defineProperty(Action.prototype, "cssClasses", {
        get: function () {
            return this.cssClassesValue || _container__WEBPACK_IMPORTED_MODULE_6__["defaultActionBarCss"];
        },
        set: function (val) {
            this.cssClassesValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Action.prototype, "disabled", {
        get: function () {
            return this.enabled !== undefined && !this.enabled;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Action.prototype, "hasTitle", {
        get: function () {
            return (((this.mode != "small" &&
                (this.showTitle || this.showTitle === undefined)) ||
                !this.iconName) &&
                !!this.title);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Action.prototype, "isVisible", {
        get: function () {
            return this.visible && this.mode !== "popup";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Action.prototype, "canShrink", {
        get: function () {
            return !!this.iconName;
        },
        enumerable: false,
        configurable: true
    });
    Action.prototype.getActionRootCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append("sv-action")
            .append(this.css)
            .append("sv-action--space", this.needSpace)
            .append("sv-action--hidden", !this.isVisible)
            .toString();
    };
    Action.prototype.getActionBarItemTitleCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(this.cssClasses.itemTitle)
            .append(this.cssClasses.itemTitleWithIcon, !!this.iconName)
            .toString();
    };
    Action.prototype.getActionBarItemCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(this.cssClasses.item)
            .append(this.cssClasses.itemAsIcon, !this.hasTitle)
            .append(this.cssClasses.itemActive, !!this.active)
            .append(this.cssClasses.itemPressed, !!this.pressed)
            .append(this.innerCss)
            .toString();
    };
    //ILocalizableOwner
    Action.prototype.getLocale = function () { return this.owner ? this.owner.getLocale() : ""; };
    Action.prototype.getMarkdownHtml = function (text, name) { return this.owner ? this.owner.getMarkdownHtml(text, name) : undefined; };
    Action.prototype.getProcessedText = function (text) { return this.owner ? this.owner.getProcessedText(text) : text; };
    Action.prototype.getRenderer = function (name) { return this.owner ? this.owner.getRenderer(name) : null; };
    Action.prototype.getRendererContext = function (locStr) { return this.owner ? this.owner.getRendererContext(locStr) : locStr; };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "id", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "iconName", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "iconSize", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
            defaultValue: true, onSet: function (_, target) {
                target.raiseUpdate();
            }
        })
    ], Action.prototype, "visible", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "tooltip", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
            onSet: function (_, target) {
                target.locTooltipChanged();
            }
        })
    ], Action.prototype, "locTooltipName", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "enabled", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "showTitle", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "action", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "css", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "innerCss", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "data", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "popupModel", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "needSeparator", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "active", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "pressed", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "template", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "component", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "items", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "visibleIndex", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "large" })
    ], Action.prototype, "mode", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "disableTabStop", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "disableShrink", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "disableHide", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
    ], Action.prototype, "needSpace", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], Action.prototype, "ariaChecked", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
            onSet: function (val, target) {
                if (target.locTitleValue.text === val)
                    return;
                target.locTitleValue.text = val;
            }
        })
    ], Action.prototype, "title", void 0);
    return Action;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));

var ActionDropdownViewModel = /** @class */ (function () {
    function ActionDropdownViewModel(item) {
        this.item = item;
        this.funcKey = "sv-dropdown-action";
        this.setupPopupCallbacks();
    }
    ActionDropdownViewModel.prototype.setupPopupCallbacks = function () {
        var _this = this;
        var popupModel = this.popupModel = this.item.popupModel;
        if (!popupModel)
            return;
        popupModel.registerPropertyChangedHandlers(["isVisible"], function () {
            if (!popupModel.isVisible) {
                _this.item.pressed = false;
            }
            else {
                _this.item.pressed = true;
            }
        }, this.funcKey);
    };
    ActionDropdownViewModel.prototype.removePopupCallbacks = function () {
        if (!!this.popupModel) {
            this.popupModel.unregisterPropertyChangedHandlers(["isVisible"], this.funcKey);
        }
    };
    ActionDropdownViewModel.prototype.dispose = function () {
        this.removePopupCallbacks();
    };
    return ActionDropdownViewModel;
}());



/***/ }),

/***/ "./src/actions/adaptive-container.ts":
/*!*******************************************!*\
  !*** ./src/actions/adaptive-container.ts ***!
  \*******************************************/
/*! exports provided: AdaptiveActionContainer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return AdaptiveActionContainer; });
/* harmony import */ var _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/responsivity-manager */ "./src/utils/responsivity-manager.ts");
/* harmony import */ var _action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./action */ "./src/actions/action.ts");
/* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./container */ "./src/actions/container.ts");
/* harmony import */ var src_surveyStrings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/surveyStrings */ "./src/surveyStrings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var AdaptiveActionContainer = /** @class */ (function (_super) {
    __extends(AdaptiveActionContainer, _super);
    function AdaptiveActionContainer() {
        var _this = _super.call(this) || this;
        _this.minVisibleItemsCount = 0;
        _this.isResponsivenessDisabled = false;
        _this.dotsItem = Object(_action__WEBPACK_IMPORTED_MODULE_1__["createDropdownActionModelAdvanced"])({
            id: "dotsItem-id" + AdaptiveActionContainer.ContainerID++,
            css: "sv-dots",
            innerCss: "sv-dots__item",
            iconName: "icon-more",
            visible: false,
            tooltip: src_surveyStrings__WEBPACK_IMPORTED_MODULE_3__["surveyLocalization"].getString("more"),
        }, {
            items: [],
            onSelectionChanged: function (item) {
                _this.hiddenItemSelected(item);
            },
            allowSelection: false
        });
        return _this;
    }
    AdaptiveActionContainer.prototype.hideItemsGreaterN = function (visibleItemsCount) {
        var actionsToHide = this.visibleActions.filter(function (action) { return !action.disableHide; });
        visibleItemsCount = Math.max(visibleItemsCount, this.minVisibleItemsCount) - (this.visibleActions.length - actionsToHide.length);
        var hiddenItems = [];
        actionsToHide.forEach(function (item) {
            if (visibleItemsCount <= 0) {
                item.mode = "popup";
                hiddenItems.push(item.innerItem);
            }
            visibleItemsCount--;
        });
        this.hiddenItemsListModel.setItems(hiddenItems);
    };
    AdaptiveActionContainer.prototype.getVisibleItemsCount = function (availableSize) {
        var itemsSizes = this.visibleActions.map(function (item) { return item.minDimension; });
        var currSize = 0;
        for (var i = 0; i < itemsSizes.length; i++) {
            currSize += itemsSizes[i];
            if (currSize > availableSize)
                return i;
        }
        return i;
    };
    AdaptiveActionContainer.prototype.updateItemMode = function (availableSize, itemsSize) {
        var items = this.visibleActions;
        for (var index = items.length - 1; index >= 0; index--) {
            if (itemsSize > availableSize && !items[index].disableShrink) {
                itemsSize -= items[index].maxDimension - items[index].minDimension;
                items[index].mode = "small";
            }
            else {
                items[index].mode = "large";
            }
        }
    };
    Object.defineProperty(AdaptiveActionContainer.prototype, "hiddenItemsListModel", {
        get: function () {
            return this.dotsItem.data;
        },
        enumerable: false,
        configurable: true
    });
    AdaptiveActionContainer.prototype.hiddenItemSelected = function (item) {
        if (!!item && typeof item.action === "function") {
            item.action();
        }
    };
    AdaptiveActionContainer.prototype.onSet = function () {
        var _this = this;
        this.actions.forEach(function (action) { return action.updateCallback = function () { return _this.raiseUpdate(false); }; });
        _super.prototype.onSet.call(this);
    };
    AdaptiveActionContainer.prototype.onPush = function (item) {
        var _this = this;
        item.updateCallback = function () { return _this.raiseUpdate(false); };
        _super.prototype.onPush.call(this, item);
    };
    AdaptiveActionContainer.prototype.getRenderedActions = function () {
        if (this.actions.length === 1 && !!this.actions[0].iconName)
            return this.actions;
        return this.actions.concat([this.dotsItem]);
    };
    AdaptiveActionContainer.prototype.raiseUpdate = function (isResetInitialized) {
        if (!this.isResponsivenessDisabled) {
            _super.prototype.raiseUpdate.call(this, isResetInitialized);
        }
    };
    AdaptiveActionContainer.prototype.fit = function (dimension, dotsItemSize) {
        if (dimension <= 0)
            return;
        this.dotsItem.visible = false;
        var minSize = 0;
        var maxSize = 0;
        var items = this.visibleActions;
        items.forEach(function (item) {
            minSize += item.minDimension;
            maxSize += item.maxDimension;
        });
        if (dimension >= maxSize) {
            this.setActionsMode("large");
        }
        else if (dimension < minSize) {
            this.setActionsMode("small");
            this.hideItemsGreaterN(this.getVisibleItemsCount(dimension - dotsItemSize));
            this.dotsItem.visible = true;
        }
        else {
            this.updateItemMode(dimension, maxSize);
        }
    };
    AdaptiveActionContainer.prototype.initResponsivityManager = function (container) {
        this.responsivityManager = new _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"](container, this, ".sv-action:not(.sv-dots)>.sv-action__content");
    };
    AdaptiveActionContainer.prototype.resetResponsivityManager = function () {
        if (!!this.responsivityManager) {
            this.responsivityManager.dispose();
            this.responsivityManager = undefined;
        }
    };
    AdaptiveActionContainer.prototype.setActionsMode = function (mode) {
        this.actions.forEach(function (action) { return (action.mode = mode); });
    };
    AdaptiveActionContainer.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.resetResponsivityManager();
    };
    AdaptiveActionContainer.ContainerID = 1;
    return AdaptiveActionContainer;
}(_container__WEBPACK_IMPORTED_MODULE_2__["ActionContainer"]));



/***/ }),

/***/ "./src/actions/container.ts":
/*!**********************************!*\
  !*** ./src/actions/container.ts ***!
  \**********************************/
/*! exports provided: defaultActionBarCss, ActionContainer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return defaultActionBarCss; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return ActionContainer; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base */ "./src/base.ts");
/* harmony import */ var _action__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./action */ "./src/actions/action.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var defaultActionBarCss = {
    root: "sv-action-bar",
    defaultSizeMode: "sv-action-bar--default-size-mode",
    smallSizeMode: "sv-action-bar--small-size-mode",
    item: "sv-action-bar-item",
    itemActive: "sv-action-bar-item--active",
    itemPressed: "sv-action-bar-item--pressed",
    itemIcon: "sv-action-bar-item__icon",
    itemTitle: "sv-action-bar-item__title",
    itemTitleWithIcon: "sv-action-bar-item__title--with-icon",
};
var ActionContainer = /** @class */ (function (_super) {
    __extends(ActionContainer, _super);
    function ActionContainer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.sizeMode = "default";
        return _this;
    }
    ActionContainer.prototype.getMarkdownHtml = function (text, name) {
        return !!this.locOwner ? this.locOwner.getMarkdownHtml(text, name) : undefined;
    };
    ActionContainer.prototype.getRenderer = function (name) {
        return !!this.locOwner ? this.locOwner.getRenderer(name) : null;
    };
    ActionContainer.prototype.getRendererContext = function (locStr) {
        return !!this.locOwner ? this.locOwner.getRendererContext(locStr) : locStr;
    };
    ActionContainer.prototype.getProcessedText = function (text) {
        return this.locOwner ? this.locOwner.getProcessedText(text) : text;
    };
    ActionContainer.prototype.getLocale = function () {
        return !!this.locOwner ? this.locOwner.getLocale() : "";
    };
    ActionContainer.prototype.getRenderedActions = function () {
        return this.actions;
    };
    ActionContainer.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        this.actions.forEach(function (item) { return item.locStrsChanged(); });
    };
    ActionContainer.prototype.raiseUpdate = function (isResetInitialized) {
        this.isEmpty = !this.actions.some(function (action) { return action.visible; });
        this.updateCallback && this.updateCallback(isResetInitialized);
    };
    ActionContainer.prototype.onSet = function () {
        var _this = this;
        this.actions.forEach(function (item) { _this.setActionCssClasses(item); });
        this.raiseUpdate(true);
    };
    ActionContainer.prototype.onPush = function (item) {
        this.setActionCssClasses(item);
        item.owner = this;
        this.raiseUpdate(true);
    };
    ActionContainer.prototype.onRemove = function (item) {
        item.owner = null;
        this.raiseUpdate(true);
    };
    ActionContainer.prototype.setActionCssClasses = function (item) {
        item.cssClasses = this.cssClasses;
    };
    Object.defineProperty(ActionContainer.prototype, "hasActions", {
        get: function () {
            return (this.actions || []).length > 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ActionContainer.prototype, "renderedActions", {
        get: function () {
            return this.getRenderedActions();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ActionContainer.prototype, "visibleActions", {
        get: function () {
            return this.actions.filter(function (action) { return action.visible !== false; });
        },
        enumerable: false,
        configurable: true
    });
    ActionContainer.prototype.getRootCss = function () {
        var sizeModeClass = this.sizeMode === "small" ? this.cssClasses.smallSizeMode : this.cssClasses.defaultSizeMode;
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]().append(this.cssClasses.root + (!!sizeModeClass ? " " + sizeModeClass : "") + (!!this.containerCss ? " " + this.containerCss : ""))
            .append(this.cssClasses.root + "--empty", this.isEmpty)
            .toString();
    };
    ActionContainer.prototype.getDefaultCssClasses = function () {
        return defaultActionBarCss;
    };
    Object.defineProperty(ActionContainer.prototype, "cssClasses", {
        get: function () {
            if (!this.cssClassesValue) {
                this.cssClassesValue = this.getDefaultCssClasses();
            }
            return this.cssClassesValue;
        },
        set: function (val) {
            var _this = this;
            this.cssClassesValue = {};
            this.copyCssClasses(this.cssClassesValue, this.getDefaultCssClasses());
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["mergeValues"])(val, this.cssClasses);
            this.actions.forEach(function (action) {
                _this.setActionCssClasses(action);
            });
        },
        enumerable: false,
        configurable: true
    });
    ActionContainer.prototype.createAction = function (item) {
        return item instanceof _action__WEBPACK_IMPORTED_MODULE_2__["Action"] ? item : new _action__WEBPACK_IMPORTED_MODULE_2__["Action"](item);
    };
    ActionContainer.prototype.addAction = function (val, sortByVisibleIndex) {
        if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
        var res = this.createAction(val);
        this.actions.push(res);
        this.sortItems();
        return res;
    };
    ActionContainer.prototype.sortItems = function () {
        this.actions = []
            .concat(this.actions.filter(function (item) { return item.visibleIndex === undefined || item.visibleIndex >= 0; }))
            .sort(function (firstItem, secondItem) {
            return firstItem.visibleIndex - secondItem.visibleIndex;
        });
    };
    ActionContainer.prototype.setItems = function (items, sortByVisibleIndex) {
        var _this = this;
        if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
        this.actions = items.map(function (item) { return _this.createAction(item); });
        if (sortByVisibleIndex) {
            this.sortItems();
        }
    };
    ActionContainer.prototype.initResponsivityManager = function (container) {
        return;
    };
    ActionContainer.prototype.resetResponsivityManager = function () { };
    ActionContainer.prototype.getActionById = function (id) {
        for (var i = 0; i < this.actions.length; i++) {
            if (this.actions[i].id === id)
                return this.actions[i];
        }
        return null;
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])({
            onSet: function (_, target) {
                target.onSet();
            },
            onPush: function (item, i, target) {
                target.onPush(item);
            },
            onRemove: function (item, i, target) {
                target.onRemove(item);
            }
        })
    ], ActionContainer.prototype, "actions", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], ActionContainer.prototype, "isEmpty", void 0);
    return ActionContainer;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));



/***/ }),

/***/ "./src/base.ts":
/*!*********************!*\
  !*** ./src/base.ts ***!
  \*********************/
/*! exports provided: Bindings, Dependencies, ComputedUpdater, Base, ArrayChanges, Event, EventBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bindings", function() { return Bindings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dependencies", function() { return Dependencies; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComputedUpdater", function() { return ComputedUpdater; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return Base; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayChanges", function() { return ArrayChanges; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return Event; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventBase", function() { return EventBase; });
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};






var Bindings = /** @class */ (function () {
    function Bindings(obj) {
        this.obj = obj;
        this.properties = null;
        this.values = null;
    }
    Bindings.prototype.getType = function () {
        return "bindings";
    };
    Bindings.prototype.getNames = function () {
        var res = [];
        this.fillProperties();
        for (var i = 0; i < this.properties.length; i++) {
            if (this.properties[i].isVisible("", this.obj)) {
                res.push(this.properties[i].name);
            }
        }
        return res;
    };
    Bindings.prototype.getProperties = function () {
        var res = [];
        this.fillProperties();
        for (var i = 0; i < this.properties.length; i++) {
            res.push(this.properties[i]);
        }
        return res;
    };
    Bindings.prototype.setBinding = function (propertyName, valueName) {
        if (!this.values)
            this.values = {};
        var oldValue = this.getJson();
        if (oldValue === valueName)
            return;
        if (!!valueName) {
            this.values[propertyName] = valueName;
        }
        else {
            delete this.values[propertyName];
            if (Object.keys(this.values).length == 0) {
                this.values = null;
            }
        }
        this.onChangedJSON(oldValue);
    };
    Bindings.prototype.clearBinding = function (propertyName) {
        this.setBinding(propertyName, "");
    };
    Bindings.prototype.isEmpty = function () {
        if (!this.values)
            return true;
        for (var key in this.values)
            return false;
        return true;
    };
    Bindings.prototype.getValueNameByPropertyName = function (propertyName) {
        if (!this.values)
            return undefined;
        return this.values[propertyName];
    };
    Bindings.prototype.getPropertiesByValueName = function (valueName) {
        if (!this.values)
            return [];
        var res = [];
        for (var key in this.values) {
            if (this.values[key] == valueName) {
                res.push(key);
            }
        }
        return res;
    };
    Bindings.prototype.getJson = function () {
        if (this.isEmpty())
            return undefined;
        var res = {};
        for (var key in this.values) {
            res[key] = this.values[key];
        }
        return res;
    };
    Bindings.prototype.setJson = function (value) {
        var oldValue = this.getJson();
        this.values = null;
        if (!!value) {
            this.values = {};
            for (var key in value) {
                this.values[key] = value[key];
            }
        }
        this.onChangedJSON(oldValue);
    };
    Bindings.prototype.fillProperties = function () {
        if (this.properties !== null)
            return;
        this.properties = [];
        var objProperties = _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].getPropertiesByObj(this.obj);
        for (var i = 0; i < objProperties.length; i++) {
            if (objProperties[i].isBindable) {
                this.properties.push(objProperties[i]);
            }
        }
    };
    Bindings.prototype.onChangedJSON = function (oldValue) {
        if (this.obj) {
            this.obj.onBindingChanged(oldValue, this.getJson());
        }
    };
    return Bindings;
}());

var Dependencies = /** @class */ (function () {
    function Dependencies(currentDependency, target, property) {
        this.currentDependency = currentDependency;
        this.target = target;
        this.property = property;
        this.dependencies = [];
        this.id = "" + (++Dependencies.DependenciesCount);
    }
    Dependencies.prototype.addDependency = function (target, property) {
        if (this.target === target && this.property === property)
            return;
        if (this.dependencies.some(function (dependency) { return dependency.obj === target && dependency.prop === property; }))
            return;
        this.dependencies.push({
            obj: target,
            prop: property,
            id: this.id
        });
        target.registerPropertyChangedHandlers([property], this.currentDependency, this.id);
    };
    Dependencies.prototype.dispose = function () {
        this.dependencies.forEach(function (dependency) {
            dependency.obj.unregisterPropertyChangedHandlers([dependency.prop], dependency.id);
        });
    };
    Dependencies.DependenciesCount = 0;
    return Dependencies;
}());

var ComputedUpdater = /** @class */ (function () {
    function ComputedUpdater(_updater) {
        this._updater = _updater;
        this.dependencies = undefined;
        this.type = ComputedUpdater.ComputedUpdaterType;
    }
    Object.defineProperty(ComputedUpdater.prototype, "updater", {
        get: function () {
            return this._updater;
        },
        enumerable: false,
        configurable: true
    });
    ComputedUpdater.prototype.setDependencies = function (dependencies) {
        this.clearDependencies();
        this.dependencies = dependencies;
    };
    ComputedUpdater.prototype.getDependencies = function () {
        return this.dependencies;
    };
    ComputedUpdater.prototype.clearDependencies = function () {
        if (this.dependencies) {
            this.dependencies.dispose();
            this.dependencies = undefined;
        }
    };
    ComputedUpdater.prototype.dispose = function () {
        this.clearDependencies();
    };
    ComputedUpdater.ComputedUpdaterType = "__dependency_computed";
    return ComputedUpdater;
}());

/**
 * A base class for all SurveyJS objects.
 */
var Base = /** @class */ (function () {
    function Base() {
        this.propertyHash = {};
        this.eventList = [];
        this.isLoadingFromJsonValue = false;
        this.loadingOwner = null;
        /**
         * An event that is raised when a property of this SurveyJS object has changed.
         *
         * Parameters:
         *
         * - `sender` - A SurveyJS object whose property has changed.
         * - `options.name` - The name of the changed property.
         * - `options.oldValue` - An old value of the property. If the property is an array, `oldValue` contains the same array as `newValue` does.
         * - `options.newValue` - A new value for the property.
         */
        this.onPropertyChanged = this.addEvent();
        /**
         * An event that is raised when an [ItemValue](https://surveyjs.io/form-library/documentation/itemvalue) property is changed.
         *
         * Parameters:
         *
         * - `sender` - A SurveyJS object whose property contains an array of `ItemValue` objects.
         * - `options.obj` - An `ItemValue` object.
         * - `options.propertyName` - The name of the property to which an array of `ItemValue` objects is assigned (for example, `"choices"` or `"rows"`).
         * - `options.name` - The name of the changed property: `"text"` or `"value"`.
         * - `options.newValue` - A new value for the property.
         */
        this.onItemValuePropertyChanged = this.addEvent();
        this.isCreating = true;
        this.bindingsValue = new Bindings(this);
        _jsonobject__WEBPACK_IMPORTED_MODULE_2__["CustomPropertiesCollection"].createProperties(this);
        this.onBaseCreating();
        this.isCreating = false;
    }
    Base.finishCollectDependencies = function () {
        var deps = Base.currentDependencis;
        Base.currentDependencis = undefined;
        return deps;
    };
    Base.startCollectDependencies = function (updater, target, property) {
        if (Base.currentDependencis !== undefined) {
            throw new Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");
        }
        Base.currentDependencis = new Dependencies(updater, target, property);
    };
    Base.collectDependency = function (target, property) {
        if (Base.currentDependencis === undefined)
            return;
        Base.currentDependencis.addDependency(target, property);
    };
    Object.defineProperty(Base, "commentPrefix", {
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].commentPrefix;
        },
        set: function (val) {
            _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].commentPrefix = val;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Returns `true` if a passed `value` is an empty string, array, or object or if it equals to `undefined` or `null`.
     *
     * @param value A value to be checked.
     * @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
     */
    Base.prototype.isValueEmpty = function (value, trimString) {
        if (trimString === void 0) { trimString = true; }
        if (trimString) {
            value = this.trimValue(value);
        }
        return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isValueEmpty(value);
    };
    Base.prototype.trimValue = function (value) {
        if (!!value && (typeof value === "string" || value instanceof String))
            return value.trim();
        return value;
    };
    Base.prototype.isPropertyEmpty = function (value) {
        return value !== "" && this.isValueEmpty(value);
    };
    Base.prototype.dispose = function () {
        for (var i = 0; i < this.eventList.length; i++) {
            this.eventList[i].clear();
        }
        this.onPropertyValueChangedCallback = undefined;
        this.isDisposedValue = true;
    };
    Object.defineProperty(Base.prototype, "isDisposed", {
        get: function () {
            return this.isDisposedValue === true;
        },
        enumerable: false,
        configurable: true
    });
    Base.prototype.addEvent = function () {
        var res = new EventBase();
        this.eventList.push(res);
        return res;
    };
    Base.prototype.onBaseCreating = function () { };
    /**
     * Returns the object type as it is used in the JSON schema.
     */
    Base.prototype.getType = function () {
        return "base";
    };
    /**
     * Use this method to find out if the current object is of a given `typeName` or inherited from it.
     *
     * @param typeName One of the values listed in the [getType()](https://surveyjs.io/form-library/documentation/question#getType) description.
     * @returns `true` if the current object is of a given `typeName` or inherited from it.
     * @see getType
     */
    Base.prototype.isDescendantOf = function (typeName) {
        return _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].isDescendantOf(this.getType(), typeName);
    };
    Base.prototype.getSurvey = function (isLive) {
        if (isLive === void 0) { isLive = false; }
        return null;
    };
    Object.defineProperty(Base.prototype, "isDesignMode", {
        /**
         * Returns `true` if the survey is being designed in Survey Creator.
         */
        get: function () {
            var survey = this.getSurvey();
            return !!survey && survey.isDesignMode;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Base.prototype, "inSurvey", {
        /**
         * Returns `true` if the object is included in a survey.
         *
         * This property may return `false`, for example, when you [create a survey model dynamically](https://surveyjs.io/form-library/documentation/design-survey-create-a-simple-survey#create-or-change-a-survey-model-dynamically).
         */
        get: function () {
            return !!this.getSurvey(true);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Base.prototype, "bindings", {
        get: function () {
            return this.bindingsValue;
        },
        enumerable: false,
        configurable: true
    });
    Base.prototype.checkBindings = function (valueName, value) { };
    Base.prototype.updateBindings = function (propertyName, value) {
        var valueName = this.bindings.getValueNameByPropertyName(propertyName);
        if (!!valueName) {
            this.updateBindingValue(valueName, value);
        }
    };
    Base.prototype.updateBindingValue = function (valueName, value) { };
    Base.prototype.getTemplate = function () {
        return this.getType();
    };
    Object.defineProperty(Base.prototype, "isLoadingFromJson", {
        /**
         * Returns `true` if the object configuration is being loaded from JSON.
         */
        get: function () {
            return this.isLoadingFromJsonValue || this.getIsLoadingFromJson();
        },
        enumerable: false,
        configurable: true
    });
    Base.prototype.getIsLoadingFromJson = function () {
        if (!!this.loadingOwner && this.loadingOwner.isLoadingFromJson)
            return true;
        return this.isLoadingFromJsonValue;
    };
    Base.prototype.startLoadingFromJson = function (json) {
        this.isLoadingFromJsonValue = true;
    };
    Base.prototype.endLoadingFromJson = function () {
        this.isLoadingFromJsonValue = false;
    };
    /**
     * Returns a JSON object that corresponds to the current SurveyJS object.
     * @see fromJSON
     */
    Base.prototype.toJSON = function () {
        return new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toJsonObject(this);
    };
    /**
     * Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.
     *
     * The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.
     *
     * @param json A JSON object with properties that you want to apply to the current SurveyJS object.
     * @see toJSON
     */
    Base.prototype.fromJSON = function (json) {
        new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this);
        this.onSurveyLoad();
    };
    Base.prototype.onSurveyLoad = function () { };
    /**
     * Creates a new object that has the same type and properties as the current SurveyJS object.
     */
    Base.prototype.clone = function () {
        var clonedObj = _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].createClass(this.getType());
        clonedObj.fromJSON(this.toJSON());
        return clonedObj;
    };
    /**
     * Returns a `JsonObjectProperty` object with metadata about a serializable property that belongs to the current SurveyJS object.
     *
     * If the property is not found, this method returns `null`.
     * @param propName A property name.
     */
    Base.prototype.getPropertyByName = function (propName) {
        return _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].findProperty(this.getType(), propName);
    };
    Base.prototype.isPropertyVisible = function (propName) {
        var prop = this.getPropertyByName(propName);
        return !!prop ? prop.isVisible("", this) : false;
    };
    Base.createProgressInfo = function () {
        return {
            questionCount: 0,
            answeredQuestionCount: 0,
            requiredQuestionCount: 0,
            requiredAnsweredQuestionCount: 0,
        };
    };
    Base.prototype.getProgressInfo = function () {
        return Base.createProgressInfo();
    };
    Base.prototype.localeChanged = function () { };
    Base.prototype.locStrsChanged = function () {
        if (!!this.arraysInfo) {
            for (var key in this.arraysInfo) {
                var item = this.arraysInfo[key];
                if (item && item.isItemValues) {
                    var arr = this.getPropertyValue(key);
                    if (arr && !!Base.itemValueLocStrChanged)
                        Base.itemValueLocStrChanged(arr);
                }
            }
        }
        if (!!this.localizableStrings) {
            for (var key in this.localizableStrings) {
                var item = this.getLocalizableString(key);
                if (item)
                    item.strChanged();
            }
        }
    };
    /**
     * Returns the value of a property with a specified name.
     *
     * If the property is not found or does not have a value, this method returns either `undefined`, `defaultValue` specified in the property configuration, or a value passed as the `defaultValue` parameter.
     *
     * @param name A property name.
     * @param defaultValue (Optional) A value to return if the property is not found or does not have a value.
     */
    Base.prototype.getPropertyValue = function (name, defaultValue) {
        if (defaultValue === void 0) { defaultValue = null; }
        var res = this.getPropertyValueCore(this.propertyHash, name);
        if (this.isPropertyEmpty(res)) {
            if (defaultValue != null)
                return defaultValue;
            var prop = _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].findProperty(this.getType(), name);
            if (!!prop && (!prop.isCustom || !this.isCreating)) {
                if (!this.isPropertyEmpty(prop.defaultValue) &&
                    !Array.isArray(prop.defaultValue))
                    return prop.defaultValue;
                if (prop.type == "boolean" || prop.type == "switch")
                    return false;
                if (prop.isCustom && !!prop.onGetValue)
                    return prop.onGetValue(this);
            }
        }
        return res;
    };
    Base.prototype.getPropertyValueCore = function (propertiesHash, name) {
        Base.collectDependency(this, name);
        if (this.getPropertyValueCoreHandler)
            return this.getPropertyValueCoreHandler(propertiesHash, name);
        else
            return propertiesHash[name];
    };
    Base.prototype.geValueFromHash = function () {
        return this.propertyHash["value"];
    };
    Base.prototype.setPropertyValueCore = function (propertiesHash, name, val) {
        if (this.setPropertyValueCoreHandler) {
            if (!this.isDisposedValue) {
                this.setPropertyValueCoreHandler(propertiesHash, name, val);
            }
            else {
                // eslint-disable-next-line no-console
                console.warn("Attempt to set property '" + name + "' of a disposed object '" + this.getType() + "'");
            }
        }
        else
            propertiesHash[name] = val;
    };
    Object.defineProperty(Base.prototype, "isEditingSurveyElement", {
        get: function () {
            var survey = this.getSurvey();
            return !!survey && survey.isEditingSurveyElement;
        },
        enumerable: false,
        configurable: true
    });
    Base.prototype.iteratePropertiesHash = function (func) {
        var _this = this;
        var keys = [];
        for (var key in this.propertyHash) {
            if (key === "value" &&
                this.isEditingSurveyElement &&
                Array.isArray(this.value))
                continue;
            keys.push(key);
        }
        keys.forEach(function (key) { return func(_this.propertyHash, key); });
    };
    /**
     * Assigns a new value to a specified property.
     * @param name A property name.
     * @param val A new value for the property.
     */
    Base.prototype.setPropertyValue = function (name, val) {
        if (!this.isLoadingFromJson) {
            var prop = this.getPropertyByName(name);
            if (!!prop) {
                val = prop.settingValue(this, val);
            }
        }
        var oldValue = this.getPropertyValue(name);
        if (oldValue &&
            Array.isArray(oldValue) &&
            !!this.arraysInfo &&
            (!val || Array.isArray(val))) {
            if (this.isTwoValueEquals(oldValue, val))
                return;
            this.setArrayPropertyDirectly(name, val);
        }
        else {
            this.setPropertyValueDirectly(name, val);
            if (!this.isDisposedValue && !this.isTwoValueEquals(oldValue, val)) {
                this.propertyValueChanged(name, oldValue, val);
            }
        }
    };
    Base.prototype.setArrayPropertyDirectly = function (name, val, sendNotification) {
        if (sendNotification === void 0) { sendNotification = true; }
        var arrayInfo = this.arraysInfo[name];
        this.setArray(name, this.getPropertyValue(name), val, arrayInfo ? arrayInfo.isItemValues : false, arrayInfo ? sendNotification && arrayInfo.onPush : null);
    };
    Base.prototype.setPropertyValueDirectly = function (name, val) {
        this.setPropertyValueCore(this.propertyHash, name, val);
    };
    Base.prototype.clearPropertyValue = function (name) {
        this.setPropertyValueCore(this.propertyHash, name, null);
        delete this.propertyHash[name];
    };
    Base.prototype.onPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) { };
    Base.prototype.itemValuePropertyChanged = function (item, name, oldValue, newValue) {
        this.onItemValuePropertyChanged.fire(this, {
            obj: item,
            name: name,
            oldValue: oldValue,
            newValue: newValue,
            propertyName: item.ownerPropertyName,
        });
    };
    Base.prototype.onPropertyValueChanged = function (name, oldValue, newValue) { };
    Base.prototype.propertyValueChanged = function (name, oldValue, newValue, arrayChanges, target) {
        if (this.isLoadingFromJson)
            return;
        this.updateBindings(name, newValue);
        this.onPropertyValueChanged(name, oldValue, newValue);
        this.onPropertyChanged.fire(this, {
            name: name,
            oldValue: oldValue,
            newValue: newValue,
        });
        this.doPropertyValueChangedCallback(name, oldValue, newValue, arrayChanges, this);
        this.checkConditionPropertyChanged(name);
        if (!this.onPropChangeFunctions)
            return;
        for (var i = 0; i < this.onPropChangeFunctions.length; i++) {
            if (this.onPropChangeFunctions[i].name == name)
                this.onPropChangeFunctions[i].func(newValue);
        }
    };
    Base.prototype.onBindingChanged = function (oldValue, newValue) {
        if (this.isLoadingFromJson)
            return;
        this.doPropertyValueChangedCallback("bindings", oldValue, newValue);
    };
    Object.defineProperty(Base.prototype, "isInternal", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Base.prototype.doPropertyValueChangedCallback = function (name, oldValue, newValue, arrayChanges, target) {
        if (this.isInternal)
            return;
        if (!target)
            target = this;
        var notifier = this.getSurvey();
        if (!notifier)
            notifier = this;
        if (!!notifier.onPropertyValueChangedCallback) {
            notifier.onPropertyValueChangedCallback(name, oldValue, newValue, target, arrayChanges);
        }
        if (notifier !== this && !!this.onPropertyValueChangedCallback) {
            this.onPropertyValueChangedCallback(name, oldValue, newValue, target, arrayChanges);
        }
    };
    Base.prototype.addExpressionProperty = function (name, onExecute, canRun) {
        if (!this.expressionInfo) {
            this.expressionInfo = {};
        }
        this.expressionInfo[name] = { onExecute: onExecute, canRun: canRun };
    };
    Base.prototype.getDataFilteredValues = function () {
        return {};
    };
    Base.prototype.getDataFilteredProperties = function () {
        return {};
    };
    Base.prototype.runConditionCore = function (values, properties) {
        if (!this.expressionInfo)
            return;
        for (var key in this.expressionInfo) {
            this.runConditionItemCore(key, values, properties);
        }
    };
    Base.prototype.canRunConditions = function () {
        return !this.isDesignMode;
    };
    Base.prototype.checkConditionPropertyChanged = function (propName) {
        if (!this.expressionInfo || !this.expressionInfo[propName])
            return;
        if (!this.canRunConditions())
            return;
        this.runConditionItemCore(propName, this.getDataFilteredValues(), this.getDataFilteredProperties());
    };
    Base.prototype.runConditionItemCore = function (propName, values, properties) {
        var _this = this;
        var info = this.expressionInfo[propName];
        var expression = this.getPropertyValue(propName);
        if (!expression)
            return;
        if (!!info.canRun && !info.canRun(this))
            return;
        if (!info.runner) {
            info.runner = new _conditions__WEBPACK_IMPORTED_MODULE_4__["ExpressionRunner"](expression);
            info.runner.onRunComplete = function (res) {
                info.onExecute(_this, res);
            };
        }
        info.runner.expression = expression;
        info.runner.run(values, properties);
    };
    /**
     * Registers a function to call when a property value changes.
     * @param propertyNames An array of one or multiple property names.
     * @param handler A function to call when one of the listed properties change.
     * @param key (Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
     * @see unregisterPropertyChangedHandlers
     */
    Base.prototype.registerPropertyChangedHandlers = function (propertyNames, handler, key) {
        if (key === void 0) { key = null; }
        for (var i = 0; i < propertyNames.length; i++) {
            this.registerFunctionOnPropertyValueChanged(propertyNames[i], handler, key);
        }
    };
    /**
     * Unregisters value change event handlers for the specified properties.
     * @param propertyNames An array of one or multiple property names.
     * @param key (Optional) A key of the registration that you want to cancel.
     * @see registerPropertyChangedHandlers
     */
    Base.prototype.unregisterPropertyChangedHandlers = function (propertyNames, key) {
        if (key === void 0) { key = null; }
        for (var i = 0; i < propertyNames.length; i++) {
            this.unRegisterFunctionOnPropertyValueChanged(propertyNames[i], key);
        }
    };
    Base.prototype.registerFunctionOnPropertyValueChanged = function (name, func, key) {
        if (key === void 0) { key = null; }
        if (!this.onPropChangeFunctions) {
            this.onPropChangeFunctions = [];
        }
        if (key) {
            for (var i = 0; i < this.onPropChangeFunctions.length; i++) {
                var item = this.onPropChangeFunctions[i];
                if (item.name == name && item.key == key) {
                    item.func = func;
                    return;
                }
            }
        }
        this.onPropChangeFunctions.push({ name: name, func: func, key: key });
    };
    Base.prototype.registerFunctionOnPropertiesValueChanged = function (names, func, key) {
        if (key === void 0) { key = null; }
        this.registerPropertyChangedHandlers(names, func, key);
    };
    Base.prototype.unRegisterFunctionOnPropertyValueChanged = function (name, key) {
        if (key === void 0) { key = null; }
        if (!this.onPropChangeFunctions)
            return;
        for (var i = 0; i < this.onPropChangeFunctions.length; i++) {
            var item = this.onPropChangeFunctions[i];
            if (item.name == name && item.key == key) {
                this.onPropChangeFunctions.splice(i, 1);
                return;
            }
        }
    };
    Base.prototype.unRegisterFunctionOnPropertiesValueChanged = function (names, key) {
        if (key === void 0) { key = null; }
        this.unregisterPropertyChangedHandlers(names, key);
    };
    Base.prototype.createCustomLocalizableObj = function (name) {
        var locStr = this.getLocalizableString(name);
        if (locStr)
            return;
        this.createLocalizableString(name, this, false, true);
    };
    Base.prototype.getLocale = function () {
        var locOwner = this.getSurvey();
        return !!locOwner ? locOwner.getLocale() : "";
    };
    Base.prototype.getLocalizationString = function (strName) {
        return _surveyStrings__WEBPACK_IMPORTED_MODULE_5__["surveyLocalization"].getString(strName, this.getLocale());
    };
    Base.prototype.getLocalizationFormatString = function (strName) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
        }
        var str = this.getLocalizationString(strName);
        if (!str || !str.format)
            return "";
        return str.format.apply(str, args);
    };
    Base.prototype.createLocalizableString = function (name, owner, useMarkDown, defaultStr) {
        var _this = this;
        if (useMarkDown === void 0) { useMarkDown = false; }
        if (defaultStr === void 0) { defaultStr = false; }
        var locStr = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](owner, useMarkDown, name);
        if (defaultStr) {
            locStr.localizationName = defaultStr === true ? name : defaultStr;
        }
        locStr.onStrChanged = function (oldValue, newValue) {
            _this.propertyValueChanged(name, oldValue, newValue);
        };
        if (!this.localizableStrings) {
            this.localizableStrings = {};
        }
        this.localizableStrings[name] = locStr;
        return locStr;
    };
    Base.prototype.getLocalizableString = function (name) {
        return !!this.localizableStrings ? this.localizableStrings[name] : null;
    };
    Base.prototype.getLocalizableStringText = function (name, defaultStr) {
        if (defaultStr === void 0) { defaultStr = ""; }
        Base.collectDependency(this, name);
        var locStr = this.getLocalizableString(name);
        if (!locStr)
            return "";
        var res = locStr.text;
        return res ? res : defaultStr;
    };
    Base.prototype.setLocalizableStringText = function (name, value) {
        var locStr = this.getLocalizableString(name);
        if (!locStr)
            return;
        var oldValue = locStr.text;
        if (oldValue != value) {
            locStr.text = value;
            // this.propertyValueChanged(name, oldValue, value);
        }
    };
    Base.prototype.addUsedLocales = function (locales) {
        if (!!this.localizableStrings) {
            for (var key in this.localizableStrings) {
                var item = this.getLocalizableString(key);
                if (item)
                    this.AddLocStringToUsedLocales(item, locales);
            }
        }
        if (!!this.arraysInfo) {
            for (var key in this.arraysInfo) {
                var items = this.getPropertyValue(key);
                if (!items || !items.length)
                    continue;
                for (var i = 0; i < items.length; i++) {
                    var item = items[i];
                    if (item && item.addUsedLocales) {
                        item.addUsedLocales(locales);
                    }
                }
            }
        }
    };
    Base.prototype.searchText = function (text, founded) {
        var strs = [];
        this.getSearchableLocalizedStrings(strs);
        for (var i = 0; i < strs.length; i++) {
            if (strs[i].setFindText(text)) {
                founded.push({ element: this, str: strs[i] });
            }
        }
    };
    Base.prototype.getSearchableLocalizedStrings = function (arr) {
        if (!!this.localizableStrings) {
            var keys_1 = [];
            this.getSearchableLocKeys(keys_1);
            for (var i = 0; i < keys_1.length; i++) {
                var item = this.getLocalizableString(keys_1[i]);
                if (item)
                    arr.push(item);
            }
        }
        if (!this.arraysInfo)
            return;
        var keys = [];
        this.getSearchableItemValueKeys(keys);
        for (var i = 0; i < keys.length; i++) {
            var items = this.getPropertyValue(keys[i]);
            if (!items)
                continue;
            for (var j = 0; j < items.length; j++) {
                arr.push(items[j].locText);
            }
        }
    };
    Base.prototype.getSearchableLocKeys = function (keys) { };
    Base.prototype.getSearchableItemValueKeys = function (keys) { };
    Base.prototype.AddLocStringToUsedLocales = function (locStr, locales) {
        var locs = locStr.getLocales();
        for (var i = 0; i < locs.length; i++) {
            if (locales.indexOf(locs[i]) < 0) {
                locales.push(locs[i]);
            }
        }
    };
    Base.prototype.createItemValues = function (name) {
        var self = this;
        var result = this.createNewArray(name, function (item) {
            item.locOwner = self;
            item.ownerPropertyName = name;
            if (typeof item.getSurvey == "function") {
                var survey = item.getSurvey();
                if (!!survey && typeof survey.makeReactive == "function") {
                    survey.makeReactive(item);
                }
            }
        });
        this.arraysInfo[name].isItemValues = true;
        return result;
    };
    Base.prototype.notifyArrayChanged = function (ar, arrayChanges) {
        !!ar.onArrayChanged && ar.onArrayChanged(arrayChanges);
    };
    Base.prototype.createNewArrayCore = function (name) {
        var res = null;
        if (!!this.createArrayCoreHandler) {
            res = this.createArrayCoreHandler(this.propertyHash, name);
        }
        if (!res) {
            res = new Array();
            this.setPropertyValueCore(this.propertyHash, name, res);
        }
        return res;
    };
    Base.prototype.ensureArray = function (name, onPush, onRemove) {
        if (onPush === void 0) { onPush = null; }
        if (onRemove === void 0) { onRemove = null; }
        if (this.arraysInfo && this.arraysInfo[name]) {
            return;
        }
        return this.createNewArray(name, onPush, onRemove);
    };
    Base.prototype.createNewArray = function (name, onPush, onRemove) {
        if (onPush === void 0) { onPush = null; }
        if (onRemove === void 0) { onRemove = null; }
        var newArray = this.createNewArrayCore(name);
        if (!this.arraysInfo) {
            this.arraysInfo = {};
        }
        this.arraysInfo[name] = { onPush: onPush, isItemValues: false };
        var self = this;
        newArray.push = function (value) {
            var result = Object.getPrototypeOf(newArray).push.call(newArray, value);
            if (!self.isDisposedValue) {
                if (onPush)
                    onPush(value, newArray.length - 1);
                var arrayChanges = new ArrayChanges(newArray.length - 1, 0, [value], []);
                self.propertyValueChanged(name, newArray, newArray, arrayChanges);
                self.notifyArrayChanged(newArray, arrayChanges);
            }
            return result;
        };
        newArray.shift = function () {
            var result = Object.getPrototypeOf(newArray).shift.call(newArray);
            if (!self.isDisposedValue && result) {
                if (onRemove)
                    onRemove(result);
                var arrayChanges = new ArrayChanges(newArray.length - 1, 1, [], []);
                self.propertyValueChanged(name, newArray, newArray, arrayChanges);
                self.notifyArrayChanged(newArray, arrayChanges);
            }
            return result;
        };
        newArray.unshift = function (value) {
            var result = Object.getPrototypeOf(newArray).unshift.call(newArray, value);
            if (!self.isDisposedValue) {
                if (onPush)
                    onPush(value, newArray.length - 1);
                var arrayChanges = new ArrayChanges(0, 0, [value], []);
                self.propertyValueChanged(name, newArray, newArray, arrayChanges);
                self.notifyArrayChanged(newArray, arrayChanges);
            }
            return result;
        };
        newArray.pop = function () {
            var result = Object.getPrototypeOf(newArray).pop.call(newArray);
            if (!self.isDisposedValue) {
                if (onRemove)
                    onRemove(result);
                var arrayChanges = new ArrayChanges(newArray.length - 1, 1, [], []);
                self.propertyValueChanged(name, newArray, newArray, arrayChanges);
                self.notifyArrayChanged(newArray, arrayChanges);
            }
            return result;
        };
        newArray.splice = function (start, deleteCount) {
            var _a;
            var items = [];
            for (var _i = 2; _i < arguments.length; _i++) {
                items[_i - 2] = arguments[_i];
            }
            if (!start)
                start = 0;
            if (!deleteCount)
                deleteCount = 0;
            var result = (_a = Object.getPrototypeOf(newArray).splice).call.apply(_a, __spreadArray([newArray,
                start,
                deleteCount], items, false));
            if (!items)
                items = [];
            if (!self.isDisposedValue) {
                if (onRemove && result) {
                    for (var i = 0; i < result.length; i++) {
                        onRemove(result[i]);
                    }
                }
                if (onPush) {
                    for (var i = 0; i < items.length; i++) {
                        onPush(items[i], start + i);
                    }
                }
                var arrayChanges = new ArrayChanges(start, deleteCount, items, result);
                self.propertyValueChanged(name, newArray, newArray, arrayChanges);
                self.notifyArrayChanged(newArray, arrayChanges);
            }
            return result;
        };
        return newArray;
    };
    Base.prototype.getItemValueType = function () {
        return undefined;
    };
    Base.prototype.setArray = function (name, src, dest, isItemValues, onPush) {
        var deletedItems = [].concat(src);
        Object.getPrototypeOf(src).splice.call(src, 0, src.length);
        if (!!dest) {
            for (var i = 0; i < dest.length; i++) {
                var item = dest[i];
                if (isItemValues) {
                    if (!!Base.createItemValue) {
                        item = Base.createItemValue(item, this.getItemValueType());
                    }
                }
                Object.getPrototypeOf(src).push.call(src, item);
                if (onPush)
                    onPush(src[i]);
            }
        }
        var arrayChanges = new ArrayChanges(0, deletedItems.length, src, deletedItems);
        this.propertyValueChanged(name, deletedItems, src, arrayChanges);
        this.notifyArrayChanged(src, arrayChanges);
    };
    Base.prototype.isTwoValueEquals = function (x, y, caseInSensitive, trimString) {
        if (caseInSensitive === void 0) { caseInSensitive = false; }
        if (trimString === void 0) { trimString = false; }
        return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(x, y, false, !caseInSensitive, trimString);
    };
    Base.copyObject = function (dst, src) {
        for (var key in src) {
            var source = src[key];
            if (typeof source === "object") {
                source = {};
                this.copyObject(source, src[key]);
            }
            dst[key] = source;
        }
    };
    Base.prototype.copyCssClasses = function (dest, source) {
        if (!source)
            return;
        if (typeof source === "string" || source instanceof String) {
            dest["root"] = source;
        }
        else {
            Base.copyObject(dest, source);
        }
    };
    Base.prototype.getValueInLowCase = function (val) {
        if (!!val && typeof val == "string")
            return val.toLowerCase();
        return val;
    };
    Base.prototype.getElementsInDesign = function (includeHidden) {
        if (includeHidden === void 0) { includeHidden = false; }
        return [];
    };
    Base.currentDependencis = undefined;
    return Base;
}());

var ArrayChanges = /** @class */ (function () {
    function ArrayChanges(index, deleteCount, itemsToAdd, deletedItems) {
        this.index = index;
        this.deleteCount = deleteCount;
        this.itemsToAdd = itemsToAdd;
        this.deletedItems = deletedItems;
    }
    return ArrayChanges;
}());

var Event = /** @class */ (function () {
    function Event() {
    }
    Object.defineProperty(Event.prototype, "isEmpty", {
        get: function () {
            return this.length === 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Event.prototype, "length", {
        get: function () {
            return !!this.callbacks ? this.callbacks.length : 0;
        },
        enumerable: false,
        configurable: true
    });
    Event.prototype.fireByCreatingOptions = function (sender, createOptions) {
        if (!this.callbacks)
            return;
        for (var i = 0; i < this.callbacks.length; i++) {
            this.callbacks[i](sender, createOptions());
            if (!this.callbacks)
                return;
        }
    };
    Event.prototype.fire = function (sender, options) {
        if (!this.callbacks)
            return;
        for (var i = 0; i < this.callbacks.length; i++) {
            this.callbacks[i](sender, options);
            if (!this.callbacks)
                return;
        }
    };
    Event.prototype.clear = function () {
        this.callbacks = undefined;
    };
    Event.prototype.add = function (func) {
        if (this.hasFunc(func))
            return;
        if (!this.callbacks) {
            this.callbacks = new Array();
        }
        this.callbacks.push(func);
        this.fireCallbackChanged();
    };
    Event.prototype.remove = function (func) {
        if (this.hasFunc(func)) {
            var index = this.callbacks.indexOf(func, 0);
            this.callbacks.splice(index, 1);
            this.fireCallbackChanged();
        }
    };
    Event.prototype.hasFunc = function (func) {
        if (this.callbacks == null)
            return false;
        return this.callbacks.indexOf(func, 0) > -1;
    };
    Event.prototype.fireCallbackChanged = function () {
        if (!!this.onCallbacksChanged) {
            this.onCallbacksChanged();
        }
    };
    return Event;
}());

var EventBase = /** @class */ (function (_super) {
    __extends(EventBase, _super);
    function EventBase() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return EventBase;
}(Event));



/***/ }),

/***/ "./src/calculatedValue.ts":
/*!********************************!*\
  !*** ./src/calculatedValue.ts ***!
  \********************************/
/*! exports provided: CalculatedValue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CalculatedValue", function() { return CalculatedValue; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * The calculated value is a way to define the variable in Survey Creator.
 * It has two main properties: name and expression. Based on expression the value read-only property is automatically calculated.
 * The name property should be unique though all calculated values.
 * It uses survey.getVariable/seruvey.setVariable functions to get/set its value. The class do not store its value internally.
 * You may set includeIntoResult property to true to store this calculated value into survey result.
 */
var CalculatedValue = /** @class */ (function (_super) {
    __extends(CalculatedValue, _super);
    function CalculatedValue(name, expression) {
        if (name === void 0) { name = null; }
        if (expression === void 0) { expression = null; }
        var _this = _super.call(this) || this;
        _this.expressionIsRunning = false;
        _this.isCalculated = false;
        if (!!name) {
            _this.name = name;
        }
        if (!!expression) {
            _this.expression = expression;
        }
        return _this;
    }
    CalculatedValue.prototype.setOwner = function (data) {
        this.data = data;
        this.rerunExpression();
    };
    CalculatedValue.prototype.getType = function () {
        return "calculatedvalue";
    };
    CalculatedValue.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        return !!this.data && !!this.data["getSurvey"]
            ? this.data.getSurvey()
            : null;
    };
    Object.defineProperty(CalculatedValue.prototype, "owner", {
        get: function () {
            return this.data;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CalculatedValue.prototype, "name", {
        /**
         * The calculated value name. It should be non empty and unique.
         */
        get: function () {
            return this.getPropertyValue("name", "");
        },
        set: function (val) {
            this.setPropertyValue("name", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CalculatedValue.prototype, "includeIntoResult", {
        /**
         * Set this property to true to include the non-empty calculated value into survey result, survey.data property.
         */
        get: function () {
            return this.getPropertyValue("includeIntoResult", false);
        },
        set: function (val) {
            this.setPropertyValue("includeIntoResult", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CalculatedValue.prototype, "expression", {
        /**
         * The Expression that used to calculate the value. You may use standard operators like +, -, * and /, squares (). Here is the example of accessing the question value {questionname}.
         * Example: "({quantity} * {price}) * (100 - {discount}) / 100"
         */
        get: function () {
            return this.getPropertyValue("expression", "");
        },
        set: function (val) {
            this.setPropertyValue("expression", val);
            this.rerunExpression();
        },
        enumerable: false,
        configurable: true
    });
    CalculatedValue.prototype.locCalculation = function () {
        this.expressionIsRunning = true;
    };
    CalculatedValue.prototype.unlocCalculation = function () {
        this.expressionIsRunning = false;
    };
    CalculatedValue.prototype.resetCalculation = function () {
        this.isCalculated = false;
    };
    CalculatedValue.prototype.doCalculation = function (calculatedValues, values, properties) {
        if (this.isCalculated)
            return;
        this.runExpressionCore(calculatedValues, values, properties);
        this.isCalculated = true;
    };
    CalculatedValue.prototype.runExpression = function (values, properties) {
        this.runExpressionCore(null, values, properties);
    };
    Object.defineProperty(CalculatedValue.prototype, "value", {
        get: function () {
            if (!this.data)
                return undefined;
            return this.data.getVariable(this.name);
        },
        enumerable: false,
        configurable: true
    });
    CalculatedValue.prototype.setValue = function (val) {
        if (!this.data)
            return;
        this.data.setVariable(this.name, val);
    };
    Object.defineProperty(CalculatedValue.prototype, "canRunExpression", {
        get: function () {
            return (!!this.data &&
                !this.isLoadingFromJson &&
                !!this.expression &&
                !this.expressionIsRunning &&
                !!this.name);
        },
        enumerable: false,
        configurable: true
    });
    CalculatedValue.prototype.rerunExpression = function () {
        if (!this.canRunExpression)
            return;
        this.runExpression(this.data.getFilteredValues(), this.data.getFilteredProperties());
    };
    CalculatedValue.prototype.runExpressionCore = function (calculatedValues, values, properties) {
        if (!this.canRunExpression)
            return;
        this.ensureExpression(values);
        this.locCalculation();
        if (!!calculatedValues) {
            this.runDependentExpressions(calculatedValues, values, properties);
        }
        this.expressionRunner.run(values, properties);
    };
    CalculatedValue.prototype.runDependentExpressions = function (calculatedValues, values, properties) {
        var variables = this.expressionRunner.getVariables();
        if (!variables)
            return;
        for (var i = 0; i < calculatedValues.length; i++) {
            var calcItem = calculatedValues[i];
            if (calcItem === this || variables.indexOf(calcItem.name) < 0)
                continue;
            calcItem.doCalculation(calculatedValues, values, properties);
            values[calcItem.name] = calcItem.value;
        }
    };
    CalculatedValue.prototype.ensureExpression = function (values) {
        var _this = this;
        if (!!this.expressionRunner)
            return;
        this.expressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_2__["ExpressionRunner"](this.expression);
        this.expressionRunner.onRunComplete = function (newValue) {
            if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(newValue, _this.value)) {
                _this.setValue(newValue);
            }
            _this.unlocCalculation();
        };
    };
    return CalculatedValue;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("calculatedvalue", [
    { name: "!name", isUnique: true },
    "expression:expression",
    "includeIntoResult:boolean",
], function () {
    return new CalculatedValue();
}, "base");


/***/ }),

/***/ "./src/choicesRestful.ts":
/*!*******************************!*\
  !*** ./src/choicesRestful.ts ***!
  \*******************************/
/*! exports provided: ChoicesRestful, ChoicesRestfull */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestful", function() { return ChoicesRestful; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestfull", function() { return ChoicesRestfull; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





var XmlParser = /** @class */ (function () {
    function XmlParser() {
        this.parser = new DOMParser();
    }
    XmlParser.prototype.assignValue = function (target, name, value) {
        if (Array.isArray(target[name])) {
            target[name].push(value);
        }
        else if (target[name] !== undefined) {
            target[name] = [target[name]].concat(value);
        }
        else if (typeof value === "object" &&
            Object.keys(value).length === 1 &&
            Object.keys(value)[0] === name) {
            target[name] = value[name];
        }
        else {
            target[name] = value;
        }
    };
    XmlParser.prototype.xml2Json = function (xmlNode, result) {
        if (xmlNode.children && xmlNode.children.length > 0) {
            for (var i = 0; i < xmlNode.children.length; i++) {
                var childNode = xmlNode.children[i];
                var childObject = {};
                this.xml2Json(childNode, childObject);
                this.assignValue(result, childNode.nodeName, childObject);
            }
        }
        else {
            this.assignValue(result, xmlNode.nodeName, xmlNode.textContent);
        }
    };
    XmlParser.prototype.parseXmlString = function (xmlString) {
        var xmlRoot = this.parser.parseFromString(xmlString, "text/xml");
        var json = {};
        this.xml2Json(xmlRoot, json);
        return json;
    };
    return XmlParser;
}());
/**
 * Configures access to a RESTful service that returns choices for [Checkbox](https://surveyjs.io/Examples/Library?id=questiontype-checkbox), [Dropdown](https://surveyjs.io/Examples/Library?id=questiontype-dropdown), [Radiogroup](https://surveyjs.io/Examples/Library?id=questiontype-radiogroup), and other multiple-choice question types.
 *
 * Use the following properties to configure this object:
 *
 * ```js
 * {
 *   url: "http://...", // A RESTful service's URL.
 *   valueName: "value", // Specifies which field contains choice values.
 *   titleName: "title", // Specifies which field contains display texts for choice values.
 *   imageLinkName: "imageUrl", // Specifies which field contains image URLs. Used in Image Picker questions.
 *   // Path to the array of choices. Specify `path` only if the array of choices is nested within the object returned by the service.
 *   // The following path separators are allowed: semicolon `;`, comma `,`.
 *   path: "myNestedArray"
 * }
 * ```
 *
 * Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property.
 */
var ChoicesRestful = /** @class */ (function (_super) {
    __extends(ChoicesRestful, _super);
    function ChoicesRestful() {
        var _this = _super.call(this) || this;
        _this.lastObjHash = "";
        _this.isRunningValue = false;
        _this.processedUrl = "";
        _this.processedPath = "";
        _this.isUsingCacheFromUrl = undefined;
        _this.error = null;
        _this.createItemValue = function (value) {
            return new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](value);
        };
        return _this;
    }
    Object.defineProperty(ChoicesRestful, "EncodeParameters", {
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].webserviceEncodeParameters;
        },
        set: function (val) {
            _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].webserviceEncodeParameters = val;
        },
        enumerable: false,
        configurable: true
    });
    ChoicesRestful.clearCache = function () {
        ChoicesRestful.itemsResult = {};
        ChoicesRestful.sendingSameRequests = {};
    };
    ChoicesRestful.addSameRequest = function (obj) {
        if (!obj.isUsingCache)
            return false;
        var hash = obj.objHash;
        var res = ChoicesRestful.sendingSameRequests[hash];
        if (!res) {
            ChoicesRestful.sendingSameRequests[obj.objHash] = [];
            return false;
        }
        res.push(obj);
        obj.isRunningValue = true;
        return true;
    };
    ChoicesRestful.unregisterSameRequests = function (obj, items) {
        if (!obj.isUsingCache)
            return;
        var res = ChoicesRestful.sendingSameRequests[obj.objHash];
        delete ChoicesRestful.sendingSameRequests[obj.objHash];
        if (!res)
            return;
        for (var i = 0; i < res.length; i++) {
            res[i].isRunningValue = false;
            if (!!res[i].getResultCallback) {
                res[i].getResultCallback(items);
            }
        }
    };
    ChoicesRestful.getCachedItemsResult = function (obj) {
        var hash = obj.objHash;
        var res = ChoicesRestful.itemsResult[hash];
        if (!res)
            return false;
        if (obj.getResultCallback) {
            obj.getResultCallback(res);
        }
        return true;
    };
    ChoicesRestful.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        return !!this.owner ? this.owner.survey : null;
    };
    ChoicesRestful.prototype.run = function (textProcessor) {
        if (textProcessor === void 0) { textProcessor = null; }
        if (!this.url || !this.getResultCallback)
            return;
        this.processedText(textProcessor);
        if (!this.processedUrl) {
            this.doEmptyResultCallback({});
            this.lastObjHash = this.objHash;
            return;
        }
        if (this.lastObjHash === this.objHash)
            return;
        this.lastObjHash = this.objHash;
        this.error = null;
        if (this.useChangedItemsResults())
            return;
        if (ChoicesRestful.addSameRequest(this))
            return;
        this.sendRequest();
    };
    Object.defineProperty(ChoicesRestful.prototype, "isUsingCache", {
        get: function () {
            if (this.isUsingCacheFromUrl === true)
                return true;
            if (this.isUsingCacheFromUrl === false)
                return false;
            return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].useCachingForChoicesRestful;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "isRunning", {
        get: function () {
            return this.getIsRunning();
        },
        enumerable: false,
        configurable: true
    });
    ChoicesRestful.prototype.getIsRunning = function () {
        return this.isRunningValue;
    };
    Object.defineProperty(ChoicesRestful.prototype, "isWaitingForParameters", {
        get: function () {
            return this.url && !this.processedUrl;
        },
        enumerable: false,
        configurable: true
    });
    ChoicesRestful.prototype.useChangedItemsResults = function () {
        return ChoicesRestful.getCachedItemsResult(this);
    };
    ChoicesRestful.prototype.doEmptyResultCallback = function (serverResult) {
        var items = [];
        if (this.updateResultCallback) {
            items = this.updateResultCallback(items, serverResult);
        }
        this.getResultCallback(items);
    };
    ChoicesRestful.prototype.processedText = function (textProcessor) {
        var urlText = this.url;
        if (!!urlText) {
            urlText = urlText
                .replace(ChoicesRestful.cacheText, "")
                .replace(ChoicesRestful.noCacheText, "");
        }
        if (textProcessor) {
            var pUrl = textProcessor.processTextEx(urlText, false, _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].webserviceEncodeParameters);
            var pPath = textProcessor.processTextEx(this.path, false, _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].webserviceEncodeParameters);
            if (!pUrl.hasAllValuesOnLastRun || !pPath.hasAllValuesOnLastRun) {
                this.processedUrl = "";
                this.processedPath = "";
            }
            else {
                this.processedUrl = pUrl.text;
                this.processedPath = pPath.text;
            }
        }
        else {
            this.processedUrl = urlText;
            this.processedPath = this.path;
        }
        if (this.onProcessedUrlCallback) {
            this.onProcessedUrlCallback(this.processedUrl, this.processedPath);
        }
    };
    ChoicesRestful.prototype.parseResponse = function (response) {
        var parsedResponse;
        if (!!response &&
            typeof response.indexOf === "function" &&
            response.indexOf("<") === 0) {
            var parser = new XmlParser();
            parsedResponse = parser.parseXmlString(response);
        }
        else {
            try {
                parsedResponse = JSON.parse(response);
            }
            catch (_a) {
                parsedResponse = (response || "")
                    .split("\n")
                    .map(function (s) { return s.trim(" "); })
                    .filter(function (s) { return !!s; });
            }
        }
        return parsedResponse;
    };
    ChoicesRestful.prototype.sendRequest = function () {
        var xhr = new XMLHttpRequest();
        xhr.open("GET", this.processedUrl);
        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        var self = this;
        var loadingObjHash = this.objHash;
        xhr.onload = function () {
            self.beforeLoadRequest();
            if (xhr.status === 200) {
                self.onLoad(self.parseResponse(xhr.response), loadingObjHash);
            }
            else {
                self.onError(xhr.statusText, xhr.responseText);
            }
        };
        var options = { request: xhr };
        if (!!ChoicesRestful.onBeforeSendRequest) {
            ChoicesRestful.onBeforeSendRequest(this, options);
        }
        this.beforeSendRequest();
        options.request.send();
    };
    ChoicesRestful.prototype.getType = function () {
        return "choicesByUrl";
    };
    Object.defineProperty(ChoicesRestful.prototype, "isEmpty", {
        get: function () {
            return (!this.url &&
                !this.path &&
                !this.valueName &&
                !this.titleName &&
                !this.imageLinkName);
        },
        enumerable: false,
        configurable: true
    });
    ChoicesRestful.prototype.getCustomPropertiesNames = function () {
        var properties = this.getCustomProperties();
        var res = new Array();
        for (var i = 0; i < properties.length; i++) {
            res.push(this.getCustomPropertyName(properties[i].name));
        }
        return res;
    };
    ChoicesRestful.prototype.getCustomPropertyName = function (propertyName) {
        return propertyName + "Name";
    };
    ChoicesRestful.prototype.getCustomProperties = function () {
        var properties = _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].getProperties(this.itemValueType);
        var res = [];
        for (var i = 0; i < properties.length; i++) {
            if (properties[i].name === "value" ||
                properties[i].name === "text" ||
                properties[i].name === "visibleIf" ||
                properties[i].name === "enableIf")
                continue;
            res.push(properties[i]);
        }
        return res;
    };
    ChoicesRestful.prototype.setData = function (json) {
        this.clear();
        if (json.url)
            this.url = json.url;
        if (json.path)
            this.path = json.path;
        if (json.valueName)
            this.valueName = json.valueName;
        if (json.titleName)
            this.titleName = json.titleName;
        if (json.imageLinkName)
            this.imageLinkName = json.imageLinkName;
        if (json.allowEmptyResponse !== undefined)
            this.allowEmptyResponse = json.allowEmptyResponse;
        if (json.attachOriginalItems !== undefined)
            this.attachOriginalItems = json.attachOriginalItems;
        var properties = this.getCustomPropertiesNames();
        for (var i = 0; i < properties.length; i++) {
            if (json[properties[i]])
                this[properties[i]] = json[properties[i]];
        }
    };
    ChoicesRestful.prototype.getData = function () {
        if (this.isEmpty)
            return null;
        var res = {};
        if (this.url)
            res["url"] = this.url;
        if (this.path)
            res["path"] = this.path;
        if (this.valueName)
            res["valueName"] = this.valueName;
        if (this.titleName)
            res["titleName"] = this.titleName;
        if (this.imageLinkName)
            res["imageLinkName"] = this.imageLinkName;
        if (this.allowEmptyResponse)
            res["allowEmptyResponse"] = this.allowEmptyResponse;
        if (this.attachOriginalItems)
            res["attachOriginalItems"] = this.attachOriginalItems;
        var properties = this.getCustomPropertiesNames();
        for (var i = 0; i < properties.length; i++) {
            if (this[properties[i]])
                res[properties[i]] = this[properties[i]];
        }
        return res;
    };
    Object.defineProperty(ChoicesRestful.prototype, "url", {
        /**
         * A RESTful service's URL.
         *
         * This property supports [dynamic URLs](https://surveyjs.io/Documentation/Library?id=design-survey-conditional-logic#dynamic-texts). For example, the URL below depends on the `region` question's value. When the value changes, the survey automatically loads a new dataset that corresponds to the selected region.
         *
         * ```js
         * url: "https://surveyjs.io/api/CountriesExample?region={region}"
         * ```
         *
         * [View Example](https://surveyjs.io/Examples/Library/?id=questiontype-dropdownrestfull (linkStyle))
         * @see path
         * @see valueName
         * @see titleName
         */
        get: function () {
            return this.getPropertyValue("url", "");
        },
        set: function (val) {
            this.setPropertyValue("url", val);
            this.isUsingCacheFromUrl = undefined;
            if (!val)
                return;
            if (val.indexOf(ChoicesRestful.cacheText) > -1) {
                this.isUsingCacheFromUrl = true;
            }
            else {
                if (val.indexOf(ChoicesRestful.noCacheText) > -1) {
                    this.isUsingCacheFromUrl = false;
                }
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "path", {
        /**
         * Path to the array of choices. The following path separators are allowed: semicolon `;`, comma `,`.
         *
         * Specify this property only if the array of choices is nested within the object returned by the service. For example, the service returns the following object:
         *
         * ```js
         * {
         *   countries: [ ... ],
         *   capitals: [ ... ]
         * }
         * ```
         *
         * To populate choices with values from the `countries` array, set the `path` property to `"countries"`. To use the `capitals` array, set this property to `"capitals"`.
         * @see url
         * @see valueName
         * @see titleName
         */
        get: function () {
            return this.getPropertyValue("path", "");
        },
        set: function (val) {
            this.setPropertyValue("path", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "valueName", {
        /**
         * Specifies which property in the obtained data object contains choice values.
         *
         * [View Example](https://surveyjs.io/Examples/Library/?id=questiontype-dropdownrestfull (linkStyle))
         *
         * @see url
         * @see path
         * @see titleName
         */
        get: function () {
            return this.getPropertyValue("valueName", "");
        },
        set: function (val) {
            this.setPropertyValue("valueName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "titleName", {
        /**
         * Specifies which property in the obtained data object contains display texts for choices.
         *
         * @see url
         * @see path
         * @see valueName
         */
        get: function () {
            return this.getPropertyValue("titleName", "");
        },
        set: function (val) {
            this.setPropertyValue("titleName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "imageLinkName", {
        /**
         * Specifies which property in the obtained data object contains image URLs. Used only in [Image Picker](https://surveyjs.io/Examples/Library?id=questiontype-imagepicker) questions.
         *
         * @see url
         * @see path
         * @see valueName
         */
        get: function () {
            return this.getPropertyValue("imageLinkName", "");
        },
        set: function (val) {
            this.setPropertyValue("imageLinkName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "allowEmptyResponse", {
        get: function () {
            return this.getPropertyValue("allowEmptyResponse");
        },
        set: function (val) {
            this.setPropertyValue("allowEmptyResponse", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "attachOriginalItems", {
        get: function () {
            return this.getPropertyValue("attachOriginalItems");
        },
        set: function (val) {
            this.setPropertyValue("attachOriginalItems", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChoicesRestful.prototype, "itemValueType", {
        get: function () {
            if (!this.owner)
                return "itemvalue";
            var prop = _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].findProperty(this.owner.getType(), "choices");
            if (!prop)
                return "itemvalue";
            if (prop.type == "itemvalue[]")
                return "itemvalue";
            return prop.type;
        },
        enumerable: false,
        configurable: true
    });
    ChoicesRestful.prototype.clear = function () {
        this.url = "";
        this.path = "";
        this.valueName = "";
        this.titleName = "";
        this.imageLinkName = "";
        var properties = this.getCustomPropertiesNames();
        for (var i = 0; i < properties.length; i++) {
            if (this[properties[i]])
                this[properties[i]] = "";
        }
    };
    ChoicesRestful.prototype.beforeSendRequest = function () {
        this.isRunningValue = true;
        if (!!this.beforeSendRequestCallback) {
            this.beforeSendRequestCallback();
        }
    };
    ChoicesRestful.prototype.beforeLoadRequest = function () {
        this.isRunningValue = false;
    };
    ChoicesRestful.prototype.onLoad = function (result, loadingObjHash) {
        if (loadingObjHash === void 0) { loadingObjHash = null; }
        if (!loadingObjHash) {
            loadingObjHash = this.objHash;
        }
        var items = new Array();
        var updatedResult = this.getResultAfterPath(result);
        if (updatedResult && updatedResult["length"]) {
            for (var i = 0; i < updatedResult.length; i++) {
                var itemValue = updatedResult[i];
                if (!itemValue)
                    continue;
                var value = !!this.getItemValueCallback
                    ? this.getItemValueCallback(itemValue)
                    : this.getValue(itemValue);
                var item = this.createItemValue(value);
                this.setTitle(item, itemValue);
                this.setCustomProperties(item, itemValue);
                if (this.attachOriginalItems) {
                    item.originalItem = itemValue;
                }
                var imageLink = this.getImageLink(itemValue);
                if (!!imageLink) {
                    item.imageLink = imageLink;
                }
                items.push(item);
            }
        }
        else {
            if (!this.allowEmptyResponse) {
                this.error = new _error__WEBPACK_IMPORTED_MODULE_3__["WebRequestEmptyError"](null, this.owner);
            }
        }
        if (this.updateResultCallback) {
            items = this.updateResultCallback(items, result);
        }
        if (this.isUsingCache) {
            ChoicesRestful.itemsResult[loadingObjHash] = items;
        }
        this.callResultCallback(items, loadingObjHash);
        ChoicesRestful.unregisterSameRequests(this, items);
    };
    ChoicesRestful.prototype.callResultCallback = function (items, loadingObjHash) {
        if (loadingObjHash != this.objHash)
            return;
        this.getResultCallback(items);
    };
    ChoicesRestful.prototype.setCustomProperties = function (item, itemValue) {
        var properties = this.getCustomProperties();
        for (var i = 0; i < properties.length; i++) {
            var prop = properties[i];
            var val = this.getValueCore(itemValue, this.getPropertyBinding(prop.name));
            if (!this.isValueEmpty(val)) {
                item[prop.name] = val;
            }
        }
    };
    ChoicesRestful.prototype.getPropertyBinding = function (propertyName) {
        if (this[this.getCustomPropertyName(propertyName)])
            return this[this.getCustomPropertyName(propertyName)];
        if (this[propertyName])
            return this[propertyName];
        return propertyName;
    };
    ChoicesRestful.prototype.onError = function (status, response) {
        this.error = new _error__WEBPACK_IMPORTED_MODULE_3__["WebRequestError"](status, response, this.owner);
        this.doEmptyResultCallback(response);
        ChoicesRestful.unregisterSameRequests(this, []);
    };
    ChoicesRestful.prototype.getResultAfterPath = function (result) {
        if (!result)
            return result;
        if (!this.processedPath)
            return result;
        var pathes = this.getPathes();
        for (var i = 0; i < pathes.length; i++) {
            result = result[pathes[i]];
            if (!result)
                return null;
        }
        return result;
    };
    ChoicesRestful.prototype.getPathes = function () {
        var pathes = [];
        if (this.processedPath.indexOf(";") > -1) {
            pathes = this.path.split(";");
        }
        else {
            pathes = this.processedPath.split(",");
        }
        if (pathes.length == 0)
            pathes.push(this.processedPath);
        return pathes;
    };
    ChoicesRestful.prototype.getValue = function (item) {
        if (!item)
            return null;
        if (this.valueName)
            return this.getValueCore(item, this.valueName);
        if (!(item instanceof Object))
            return item;
        var len = Object.keys(item).length;
        if (len < 1)
            return null;
        return item[Object.keys(item)[0]];
    };
    ChoicesRestful.prototype.setTitle = function (item, itemValue) {
        var title = this.titleName ? this.titleName : "title";
        var val = this.getValueCore(itemValue, title);
        if (!val)
            return;
        if (typeof val === "string") {
            item.text = val;
        }
        else {
            item.locText.setJson(val);
        }
    };
    ChoicesRestful.prototype.getImageLink = function (item) {
        var imageLink = this.imageLinkName ? this.imageLinkName : "imageLink";
        return this.getValueCore(item, imageLink);
    };
    ChoicesRestful.prototype.getValueCore = function (item, property) {
        if (!item)
            return null;
        if (property.indexOf(".") < 0)
            return item[property];
        var properties = property.split(".");
        for (var i = 0; i < properties.length; i++) {
            item = item[properties[i]];
            if (!item)
                return null;
        }
        return item;
    };
    Object.defineProperty(ChoicesRestful.prototype, "objHash", {
        get: function () {
            return (this.processedUrl +
                ";" +
                this.processedPath +
                ";" +
                this.valueName +
                ";" +
                this.titleName +
                ";" +
                this.imageLinkName);
        },
        enumerable: false,
        configurable: true
    });
    ChoicesRestful.cacheText = "{CACHE}";
    ChoicesRestful.noCacheText = "{NOCACHE}";
    ChoicesRestful.itemsResult = {};
    ChoicesRestful.sendingSameRequests = {};
    return ChoicesRestful;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));

/**
 * Obsolete, please use ChoicesRestful
 */
var ChoicesRestfull = /** @class */ (function (_super) {
    __extends(ChoicesRestfull, _super);
    function ChoicesRestfull() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Object.defineProperty(ChoicesRestfull, "EncodeParameters", {
        get: function () {
            return ChoicesRestful.EncodeParameters;
        },
        set: function (val) {
            ChoicesRestful.EncodeParameters = val;
        },
        enumerable: false,
        configurable: true
    });
    ChoicesRestfull.clearCache = function () {
        ChoicesRestful.clearCache();
    };
    Object.defineProperty(ChoicesRestfull, "onBeforeSendRequest", {
        get: function () {
            return ChoicesRestful.onBeforeSendRequest;
        },
        set: function (val) {
            ChoicesRestful.onBeforeSendRequest = val;
        },
        enumerable: false,
        configurable: true
    });
    return ChoicesRestfull;
}(ChoicesRestful));

_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("choicesByUrl", [
    "url",
    "path",
    "valueName",
    "titleName",
    {
        name: "imageLinkName",
        visibleIf: function (obj) {
            return !!obj && !!obj.owner && obj.owner.getType() == "imagepicker";
        },
    },
    { name: "allowEmptyResponse:boolean" },
    { name: "attachOriginalItems:boolean", visible: false },
], function () {
    return new ChoicesRestful();
});


/***/ }),

/***/ "./src/conditionProcessValue.ts":
/*!**************************************!*\
  !*** ./src/conditionProcessValue.ts ***!
  \**************************************/
/*! exports provided: ProcessValue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProcessValue", function() { return ProcessValue; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");

var surveyBuiltInVarible = "@survey";
var ProcessValue = /** @class */ (function () {
    function ProcessValue() {
        this.values = null;
        this.properties = null;
    }
    ProcessValue.prototype.getFirstName = function (text, obj) {
        if (obj === void 0) { obj = null; }
        if (!text)
            return text;
        var res = "";
        if (!!obj) {
            res = this.getFirstPropertyName(text, obj);
            if (!!res)
                return res;
        }
        for (var i = 0; i < text.length; i++) {
            var ch = text[i];
            if (ch == "." || ch == "[")
                break;
            res += ch;
        }
        return res;
    };
    ProcessValue.prototype.hasValue = function (text, values) {
        if (values === void 0) { values = null; }
        if (!values)
            values = this.values;
        var res = this.getValueCore(text, values);
        return res.hasValue;
    };
    ProcessValue.prototype.getValue = function (text, values) {
        if (values === void 0) { values = null; }
        if (!values)
            values = this.values;
        var res = this.getValueCore(text, values);
        return res.value;
    };
    ProcessValue.prototype.setValue = function (obj, text, value) {
        if (!text)
            return;
        var nonNestedObj = this.getNonNestedObject(obj, text, true);
        if (!nonNestedObj)
            return;
        obj = nonNestedObj.value;
        text = nonNestedObj.text;
        if (!!obj && !!text) {
            obj[text] = value;
        }
    };
    ProcessValue.prototype.getValueInfo = function (valueInfo) {
        if (!!valueInfo.path) {
            valueInfo.value = this.getValueFromPath(valueInfo.path, this.values);
            valueInfo.hasValue =
                valueInfo.value !== null && !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(valueInfo.value);
            if (!valueInfo.hasValue &&
                valueInfo.path.length > 1 &&
                valueInfo.path[valueInfo.path.length - 1] == "length") {
                valueInfo.hasValue = true;
                valueInfo.value = 0;
            }
            return;
        }
        var res = this.getValueCore(valueInfo.name, this.values);
        valueInfo.value = res.value;
        valueInfo.hasValue = res.hasValue;
        valueInfo.path = res.hasValue ? res.path : null;
    };
    ProcessValue.prototype.getValueFromPath = function (path, values) {
        if (path.length === 2 && path[0] === surveyBuiltInVarible) {
            return this.getValueFromSurvey(path[1]);
        }
        var index = 0;
        while (!!values && index < path.length) {
            var ind_name = path[index];
            if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(ind_name) &&
                Array.isArray(values) &&
                ind_name >= values.length)
                return null;
            values = values[ind_name];
            index++;
        }
        return values;
    };
    ProcessValue.prototype.getValueCore = function (text, values) {
        var question = this.getQuestionDirectly(text);
        if (question) {
            return { hasValue: true, value: question.value, path: [text] };
        }
        var res = this.getValueFromValues(text, values);
        if (!!text && !res.hasValue) {
            var val = this.getValueFromSurvey(text);
            if (val !== undefined) {
                res.hasValue = true;
                res.value = val;
                res.path = [surveyBuiltInVarible, text];
            }
        }
        return res;
    };
    ProcessValue.prototype.getQuestionDirectly = function (name) {
        if (!!this.properties && !!this.properties.survey)
            return this.properties.survey.getQuestionByValueName(name);
        return undefined;
    };
    ProcessValue.prototype.getValueFromSurvey = function (name) {
        if (!!this.properties && !!this.properties.survey)
            return this.properties.survey.getBuiltInVariableValue(name.toLocaleLowerCase());
        return undefined;
    };
    ProcessValue.prototype.getValueFromValues = function (text, values) {
        var res = { hasValue: false, value: null, path: null };
        var curValue = values;
        if (!curValue && curValue !== 0 && curValue !== false)
            return res;
        if (text &&
            text.lastIndexOf(".length") > -1 &&
            text.lastIndexOf(".length") === text.length - ".length".length) {
            res.value = 0;
            res.hasValue = true;
        }
        var nonNestedObj = this.getNonNestedObject(curValue, text, false);
        if (!nonNestedObj)
            return res;
        res.path = nonNestedObj.path;
        res.value = !!nonNestedObj.text
            ? this.getObjectValue(nonNestedObj.value, nonNestedObj.text)
            : nonNestedObj.value;
        res.hasValue = !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(res.value);
        return res;
    };
    ProcessValue.prototype.getNonNestedObject = function (obj, text, createPath) {
        var curName = this.getFirstPropertyName(text, obj, createPath);
        var path = !!curName ? [curName] : null;
        while (text != curName && !!obj) {
            var isArray = text[0] == "[";
            if (!isArray) {
                if (!curName && text == this.getFirstName(text))
                    return { value: obj, text: text, path: path };
                obj = this.getObjectValue(obj, curName);
                if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(obj) && !createPath)
                    return null;
                text = text.substring(curName.length);
            }
            else {
                var objInArray = this.getObjInArray(obj, text);
                if (!objInArray)
                    return null;
                obj = objInArray.value;
                text = objInArray.text;
                path.push(objInArray.index);
            }
            if (!!text && text[0] == ".") {
                text = text.substring(1);
            }
            curName = this.getFirstPropertyName(text, obj, createPath);
            if (!!curName) {
                path.push(curName);
            }
        }
        return { value: obj, text: text, path: path };
    };
    ProcessValue.prototype.getObjInArray = function (curValue, text) {
        if (!Array.isArray(curValue))
            return null;
        var index = 1;
        var str = "";
        while (index < text.length && text[index] != "]") {
            str += text[index];
            index++;
        }
        text = index < text.length ? text.substring(index + 1) : "";
        index = this.getIntValue(str);
        if (index < 0 || index >= curValue.length)
            return null;
        return { value: curValue[index], text: text, index: index };
    };
    ProcessValue.prototype.getFirstPropertyName = function (name, obj, createProp) {
        if (createProp === void 0) { createProp = false; }
        if (!name)
            return name;
        if (!obj)
            obj = {};
        if (obj.hasOwnProperty(name))
            return name;
        var nameInLow = name.toLowerCase();
        var A = nameInLow[0];
        var a = A.toUpperCase();
        for (var key in obj) {
            var first = key[0];
            if (first === a || first === A) {
                var keyName = key.toLowerCase();
                if (keyName == nameInLow)
                    return key;
                if (nameInLow.length <= keyName.length)
                    continue;
                var ch = nameInLow[keyName.length];
                if (ch != "." && ch != "[")
                    continue;
                if (keyName == nameInLow.substring(0, keyName.length))
                    return key;
            }
        }
        if (createProp && name[0] !== "[") {
            var ind = name.indexOf(".");
            if (ind > -1) {
                name = name.substring(0, ind);
                obj[name] = {};
            }
            return name;
        }
        return "";
    };
    ProcessValue.prototype.getObjectValue = function (obj, name) {
        if (!name)
            return null;
        return obj[name];
    };
    ProcessValue.prototype.getIntValue = function (str) {
        if (str == "0" || ((str | 0) > 0 && str % 1 == 0))
            return Number(str);
        return -1;
    };
    return ProcessValue;
}());



/***/ }),

/***/ "./src/conditions.ts":
/*!***************************!*\
  !*** ./src/conditions.ts ***!
  \***************************/
/*! exports provided: ExpressionExecutor, ExpressionRunnerBase, ConditionRunner, ExpressionRunner */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionExecutor", function() { return ExpressionExecutor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionRunnerBase", function() { return ExpressionRunnerBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConditionRunner", function() { return ConditionRunner; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionRunner", function() { return ExpressionRunner; });
/* harmony import */ var _conditionProcessValue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conditionProcessValue */ "./src/conditionProcessValue.ts");
/* harmony import */ var _conditionsParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conditionsParser */ "./src/conditionsParser.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var ExpressionExecutor = /** @class */ (function () {
    function ExpressionExecutor(expression) {
        this.processValue = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_0__["ProcessValue"]();
        this.parser = new _conditionsParser__WEBPACK_IMPORTED_MODULE_1__["ConditionsParser"]();
        this.isAsyncValue = false;
        this.hasFunctionValue = false;
        this.setExpression(expression);
    }
    Object.defineProperty(ExpressionExecutor.prototype, "expression", {
        get: function () {
            return this.expressionValue;
        },
        enumerable: false,
        configurable: true
    });
    ExpressionExecutor.prototype.setExpression = function (value) {
        if (this.expression === value)
            return;
        this.expressionValue = value;
        this.operand = this.parser.parseExpression(value);
        this.hasFunctionValue = this.canRun() ? this.operand.hasFunction() : false;
        this.isAsyncValue = this.hasFunction()
            ? this.operand.hasAsyncFunction()
            : false;
    };
    ExpressionExecutor.prototype.getVariables = function () {
        if (!this.operand)
            return [];
        var variables = [];
        this.operand.setVariables(variables);
        return variables;
    };
    ExpressionExecutor.prototype.hasFunction = function () {
        return this.hasFunctionValue;
    };
    Object.defineProperty(ExpressionExecutor.prototype, "isAsync", {
        get: function () {
            return this.isAsyncValue;
        },
        enumerable: false,
        configurable: true
    });
    ExpressionExecutor.prototype.canRun = function () {
        return !!this.operand;
    };
    ExpressionExecutor.prototype.run = function (values, properties) {
        var _this = this;
        if (properties === void 0) { properties = null; }
        if (!this.operand)
            return null;
        this.processValue.values = values;
        this.processValue.properties = properties;
        if (!this.isAsync)
            return this.runValues();
        this.asyncFuncList = [];
        this.operand.addToAsyncList(this.asyncFuncList);
        for (var i = 0; i < this.asyncFuncList.length; i++) {
            this.asyncFuncList[i].onAsyncReady = function () {
                _this.doAsyncFunctionReady();
            };
        }
        for (var i = 0; i < this.asyncFuncList.length; i++) {
            this.asyncFuncList[i].evaluateAsync(this.processValue);
        }
        return false;
    };
    ExpressionExecutor.prototype.doAsyncFunctionReady = function () {
        for (var i = 0; i < this.asyncFuncList.length; i++) {
            if (!this.asyncFuncList[i].isReady)
                return;
        }
        this.runValues();
    };
    ExpressionExecutor.prototype.runValues = function () {
        var res = this.operand.evaluate(this.processValue);
        if (!!this.onComplete) {
            this.onComplete(res);
        }
        return res;
    };
    ExpressionExecutor.createExpressionExecutor = function (expression) { return new ExpressionExecutor(expression); };
    return ExpressionExecutor;
}());

var ExpressionRunnerBase = /** @class */ (function () {
    function ExpressionRunnerBase(expression) {
        this.expression = expression;
    }
    Object.defineProperty(ExpressionRunnerBase.prototype, "expression", {
        get: function () {
            return !!this.expressionExecutor ? this.expressionExecutor.expression : "";
        },
        set: function (value) {
            var _this = this;
            if (!!this.expressionExecutor && value === this.expression)
                return;
            this.expressionExecutor = ExpressionExecutor.createExpressionExecutor(value);
            this.expressionExecutor.onComplete = function (res) { _this.doOnComplete(res); };
        },
        enumerable: false,
        configurable: true
    });
    ExpressionRunnerBase.prototype.getVariables = function () {
        return this.expressionExecutor.getVariables();
    };
    ExpressionRunnerBase.prototype.hasFunction = function () {
        return this.expressionExecutor.hasFunction();
    };
    Object.defineProperty(ExpressionRunnerBase.prototype, "isAsync", {
        get: function () {
            return this.expressionExecutor.isAsync;
        },
        enumerable: false,
        configurable: true
    });
    ExpressionRunnerBase.prototype.canRun = function () {
        return this.expressionExecutor.canRun();
    };
    ExpressionRunnerBase.prototype.runCore = function (values, properties) {
        if (properties === void 0) { properties = null; }
        return this.expressionExecutor.run(values, properties);
    };
    ExpressionRunnerBase.prototype.doOnComplete = function (res) { };
    return ExpressionRunnerBase;
}());

var ConditionRunner = /** @class */ (function (_super) {
    __extends(ConditionRunner, _super);
    function ConditionRunner() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ConditionRunner.prototype.run = function (values, properties) {
        if (properties === void 0) { properties = null; }
        return this.runCore(values, properties) == true;
    };
    ConditionRunner.prototype.doOnComplete = function (res) {
        if (!!this.onRunComplete)
            this.onRunComplete(res == true);
    };
    return ConditionRunner;
}(ExpressionRunnerBase));

var ExpressionRunner = /** @class */ (function (_super) {
    __extends(ExpressionRunner, _super);
    function ExpressionRunner() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ExpressionRunner.prototype.run = function (values, properties) {
        if (properties === void 0) { properties = null; }
        return this.runCore(values, properties);
    };
    ExpressionRunner.prototype.doOnComplete = function (res) {
        if (!!this.onRunComplete)
            this.onRunComplete(res);
    };
    return ExpressionRunner;
}(ExpressionRunnerBase));



/***/ }),

/***/ "./src/conditionsParser.ts":
/*!*********************************!*\
  !*** ./src/conditionsParser.ts ***!
  \*********************************/
/*! exports provided: ConditionsParserError, ConditionsParser */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConditionsParserError", function() { return ConditionsParserError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConditionsParser", function() { return ConditionsParser; });
/* harmony import */ var _expressions_expressionParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./expressions/expressionParser */ "./src/expressions/expressionParser.ts");

var ConditionsParserError = /** @class */ (function () {
    function ConditionsParserError(at, code) {
        this.at = at;
        this.code = code;
    }
    return ConditionsParserError;
}());

var ConditionsParser = /** @class */ (function () {
    function ConditionsParser() {
    }
    ConditionsParser.prototype.patchExpression = function (text) {
        return text
            .replace(/=>/g, ">=")
            .replace(/=</g, "<=")
            .replace(/<>/g, "!=")
            .replace(/equals/g, "equal ")
            .replace(/notequals/g, "notequal ");
    };
    ConditionsParser.prototype.createCondition = function (text) {
        return this.parseExpression(text);
    };
    ConditionsParser.prototype.parseExpression = function (text) {
        try {
            var result = ConditionsParser.parserCache[text];
            if (result === undefined) {
                result = Object(_expressions_expressionParser__WEBPACK_IMPORTED_MODULE_0__["parse"])(this.patchExpression(text));
                if (!result.hasAsyncFunction()) {
                    ConditionsParser.parserCache[text] = result;
                }
            }
            return result;
        }
        catch (e) {
            if (e instanceof _expressions_expressionParser__WEBPACK_IMPORTED_MODULE_0__["SyntaxError"]) {
                this.conditionError = new ConditionsParserError(e.location.start.offset, e.message);
            }
        }
    };
    Object.defineProperty(ConditionsParser.prototype, "error", {
        get: function () {
            return this.conditionError;
        },
        enumerable: false,
        configurable: true
    });
    ConditionsParser.parserCache = {};
    return ConditionsParser;
}());



/***/ }),

/***/ "./src/defaultCss/cssbootstrap.ts":
/*!****************************************!*\
  !*** ./src/defaultCss/cssbootstrap.ts ***!
  \****************************************/
/*! exports provided: defaultBootstrapCss */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapCss", function() { return defaultBootstrapCss; });
/* harmony import */ var _cssstandard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cssstandard */ "./src/defaultCss/cssstandard.ts");

var defaultBootstrapCss = {
    root: "sv_main sv_bootstrap_css",
    container: "sv_container",
    header: "panel-heading card-header",
    body: "panel-body card-block mt-4",
    bodyEmpty: "panel-body card-block mt-4 sv_body_empty",
    footer: "panel-footer card-footer",
    title: "",
    description: "",
    logo: "sv_logo",
    logoImage: "sv_logo__image",
    headerText: "sv_header__text",
    navigationButton: "btn sv_nav_btn",
    completedPage: "",
    navigation: {
        complete: "sv_complete_btn",
        prev: "sv_prev_btn",
        next: "sv_next_btn",
        start: "sv_start_btn",
        preview: "sv_preview_btn",
        edit: "sv_edit_btn",
    },
    progress: "progress center-block mx-auto mb-4",
    progressBar: "progress-bar",
    progressTextUnderBar: "sv-hidden",
    progressTextInBar: "sv-hidden",
    progressButtonsContainerCenter: "sv_progress-buttons__container-center",
    progressButtonsContainer: "sv_progress-buttons__container",
    progressButtonsImageButtonLeft: "sv_progress-buttons__image-button-left",
    progressButtonsImageButtonRight: "sv_progress-buttons__image-button-right",
    progressButtonsImageButtonHidden: "sv_progress-buttons__image-button--hidden",
    progressButtonsListContainer: "sv_progress-buttons__list-container",
    progressButtonsList: "sv_progress-buttons__list",
    progressButtonsListElementPassed: "sv_progress-buttons__list-element--passed",
    progressButtonsListElementCurrent: "sv_progress-buttons__list-element--current",
    progressButtonsListElementNonClickable: "sv_progress-buttons__list-element--nonclickable",
    progressButtonsPageTitle: "sv_progress-buttons__page-title",
    progressButtonsPageDescription: "sv_progress-buttons__page-description",
    page: {
        root: "",
        title: "",
        description: "small",
    },
    pageTitle: "",
    pageDescription: "small",
    row: "sv_row",
    question: {
        mainRoot: "sv_qstn",
        flowRoot: "sv_q_flow sv_qstn",
        header: "",
        headerLeft: "title-left",
        content: "",
        contentLeft: "content-left",
        titleLeftRoot: "sv_qstn_left",
        title: "",
        titleExpandable: "sv_q_title_expandable",
        titleExpanded: "sv_q_title_expanded",
        titleCollapsed: "sv_q_title_collapsed",
        number: "sv_q_num",
        description: "small",
        descriptionUnderInput: "small",
        requiredText: "sv_q_required_text",
        comment: "form-control",
        required: "",
        titleRequired: "",
        hasError: "has-error",
        indent: 20,
        formGroup: "form-group",
        disabled: "sv_q--disabled",
    },
    panel: {
        title: "sv_p_title",
        titleExpandable: "sv_p_title_expandable",
        titleExpanded: "sv_p_title_expanded",
        titleCollapsed: "sv_p_title_collapsed",
        titleOnError: "",
        icon: "sv_panel_icon",
        iconExpanded: "sv_expanded",
        description: "small sv_p_description",
        container: "sv_p_container",
        footer: "sv_p_footer",
        number: "sv_q_num",
        requiredText: "sv_q_required_text",
    },
    error: {
        root: "alert alert-danger",
        icon: "glyphicon glyphicon-exclamation-sign",
        item: "",
        locationTop: "sv_qstn_error_top",
        locationBottom: "sv_qstn_error_bottom",
    },
    boolean: {
        root: "sv_qbln form-inline checkbox",
        rootRadio: "sv_qbln form-inline checkbox",
        item: "sv-boolean",
        control: "sv-visuallyhidden",
        controlCheckbox: "sv-visuallyhidden",
        itemChecked: "sv-boolean--checked checked",
        itemIndeterminate: "sv-boolean--indeterminate",
        itemDisabled: "sv-boolean--disabled",
        switch: "sv-boolean__switch",
        slider: "sv-boolean__slider",
        label: "sv-boolean__label ",
        disabledLabel: "sv-boolean__label--disabled",
        materialDecorator: "sv-item__decorator sv-boolean__decorator",
        itemDecorator: "sv-item__svg sv-boolean__svg",
        checkedPath: "sv-boolean__checked-path",
        uncheckedPath: "sv-boolean__unchecked-path",
        indeterminatePath: "sv-boolean__indeterminate-path",
    },
    checkbox: {
        root: "sv_qcbc sv_qcbx form-inline",
        item: "checkbox",
        itemChecked: "checked",
        itemSelectAll: "sv_q_checkbox_selectall",
        itemNone: "sv_q_checkbox_none",
        itemInline: "sv_q_checkbox_inline",
        itemControl: "",
        itemDecorator: "sv-hidden",
        label: "",
        labelChecked: "",
        controlLabel: "",
        materialDecorator: "checkbox-material",
        other: "sv_q_checkbox_other form-control",
        column: "sv_q_select_column",
    },
    ranking: {
        root: "sv-ranking",
        rootMobileMod: "sv-ranking--mobile",
        rootDragMod: "sv-ranking--drag",
        rootDisabled: "sv-ranking--disabled",
        item: "sv-ranking-item",
        itemContent: "sv-ranking-item__content",
        itemIndex: "sv-ranking-item__index",
        // itemText: "sv-ranking-item__text",
        controlLabel: "sv-ranking-item__text",
        itemGhostNode: "sv-ranking-item__ghost",
        itemIconContainer: "sv-ranking-item__icon-container",
        itemIcon: "sv-ranking-item__icon",
        itemIconHoverMod: "sv-ranking-item__icon--hover",
        itemIconFocusMod: "sv-ranking-item__icon--focus",
        itemGhostMod: "sv-ranking-item--ghost",
        itemDragMod: "sv-ranking-item--drag",
    },
    comment: "form-control",
    dropdown: {
        root: "sv_q_dd_root",
        selectWrapper: "sv_q_dd_select_wrapper",
        control: "form-control sv_q_dd_control",
        controlValue: "sv_q_dd_value",
        other: "sv_q_dd_other form-control",
        cleanButton: "sv_q_dd_clean-button",
        cleanButtonSvg: "sv_q_dd_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        filterStringInput: "sv_q_dd_filter-string-input",
    },
    tagbox: {
        root: "sv_q_dd_root",
        selectWrapper: "sv_q_dd_select_wrapper",
        control: "form-control sv_q_dd_control",
        controlValue: "sv_q_dd_value",
        other: "sv_q_dd_other form-control",
        cleanButton: "sv_q_dd_clean-button",
        cleanButtonSvg: "sv_q_dd_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        filterStringInput: "sv_q_dd_filter-string-input",
    },
    html: { root: "" },
    image: { root: "sv_q_image", image: "sv_image_image" },
    matrix: {
        root: "table sv_q_matrix",
        label: "sv_q_m_label",
        itemChecked: "checked",
        itemDecorator: "sv-hidden",
        cellText: "sv_q_m_cell_text",
        cellTextSelected: "sv_q_m_cell_selected bg-primary",
        cellLabel: "sv_q_m_cell_label",
        cellResponsiveTitle: "sv-hidden"
    },
    matrixdropdown: {
        root: "table",
        cell: "sv_matrix_cell",
        headerCell: "sv_matrix_cell_header",
        row: "sv_matrix_row",
        rowAdditional: "sv-matrix__row--additional",
        detailRow: "sv_matrix_detail_row",
        detailRowText: "sv_matrix_cell_detail_rowtext",
        detailCell: "sv_matrix_cell_detail",
        detailButton: "sv_matrix_cell_detail_button",
        detailButtonExpanded: "sv_matrix_cell_detail_button_expanded",
        detailIcon: "sv_detail_panel_icon",
        detailIconExpanded: "sv_detail_expanded",
        detailPanelCell: "sv_matrix_cell_detail_panel",
        actionsCell: "sv_matrix_cell sv_matrix_cell_actions",
    },
    matrixdynamic: {
        root: "table",
        button: "button",
        buttonAdd: "",
        buttonRemove: "",
        iconAdd: "",
        iconRemove: "",
        iconDrag: "sv-matrixdynamic__drag-icon",
        headerCell: "sv_matrix_cell_header",
        row: "sv_matrix_row",
        detailRow: "sv_matrix_detail_row",
        detailCell: "sv_matrix_cell_detail",
        detailButton: "sv_matrix_cell_detail_button",
        detailButtonExpanded: "sv_matrix_cell_detail_button_expanded",
        detailIcon: "sv_detail_panel_icon",
        detailIconExpanded: "sv_detail_expanded",
        detailPanelCell: "sv_matrix_cell_detail_panel",
        actionsCell: "sv_matrix_cell sv_matrix_cell_actions",
        emptyRowsSection: "sv_matrix_empty_rows_section",
        emptyRowsText: "sv_matrix_empty_rows_text",
        emptyRowsButton: "",
        ghostRow: "sv-matrix-row--drag-drop-ghost-mod"
    },
    paneldynamic: {
        root: "",
        navigation: "sv-paneldynamic__navigation",
        progressTop: "sv-paneldynamic__progress sv-paneldynamic__progress--top",
        progressBottom: "sv-paneldynamic__progress sv-paneldynamic__progress--bottom",
        title: "sv-title sv-question__title",
        button: "button",
        buttonAdd: "button sv-paneldynamic__add-btn",
        buttonRemove: "sv_p_remove_btn",
        buttonRemoveRight: "button sv-paneldynamic__remove-btn--right",
        buttonPrev: "sv-paneldynamic__prev-btn",
        buttonNext: "sv-paneldynamic__next-btn",
        buttonPrevDisabled: "sv-paneldynamic__prev-btn--disabled",
        buttonNextDisabled: "sv-paneldynamic__next-btn--disabled",
        progressContainer: "sv-paneldynamic__progress-container",
        progress: "sv-progress",
        progressBar: "sv-progress__bar",
        progressText: "sv-paneldynamic__progress-text",
        panelWrapper: "sv_p_wrapper",
        panelWrapperInRow: "sv_p_wrapper_in_row",
        footer: "",
        progressBtnIcon: "icon-progressbutton"
    },
    multipletext: {
        root: "sv_q_mt table",
        itemTitle: "sv_q_mt_title",
        item: "sv_q_mt_item",
        itemLabel: "sv_q_mt_label",
        row: "form-group bmd-form-group",
        itemValue: "sv_q_mt_item_value form-control",
    },
    radiogroup: {
        root: "sv_qcbc form-inline",
        item: "radio",
        itemChecked: "checked",
        itemInline: "sv_q_radiogroup_inline",
        label: "",
        labelChecked: "",
        itemControl: "",
        itemDecorator: "sv-hidden",
        controlLabel: "",
        materialDecorator: "circle",
        other: "sv_q_radiogroup_other form-control",
        clearButton: "sv_q_radiogroup_clear button",
        column: "sv_q_select_column",
    },
    buttongroup: {
        root: "sv-button-group",
        item: "sv-button-group__item",
        itemIcon: "sv-button-group__item-icon",
        itemDecorator: "sv-button-group__item-decorator",
        itemCaption: "sv-button-group__item-caption",
        itemHover: "sv-button-group__item--hover",
        itemSelected: "sv-button-group__item--selected",
        itemDisabled: "sv-button-group__item--disabled",
        itemControl: "sv-visuallyhidden",
    },
    imagepicker: {
        root: "sv_imgsel",
        item: "sv_q_imgsel",
        itemChecked: "checked",
        itemInline: "sv_q_imagepicker_inline",
        label: "sv_q_imgsel_label",
        itemControl: "sv_q_imgsel_control_item",
        image: "sv_q_imgsel_image",
        itemText: "sv_q_imgsel_text",
        clearButton: "sv_q_radiogroup_clear",
    },
    rating: {
        root: "btn-group",
        item: "btn btn-default btn-secondary",
        selected: "active",
        minText: "sv_q_rating_min_text",
        itemText: "sv_q_rating_item_text",
        maxText: "sv_q_rating_max_text",
        disabled: "",
    },
    text: "form-control",
    expression: "form-control",
    file: {
        root: "sv_q_file",
        placeholderInput: "sv_q_file_placeholder",
        preview: "sv_q_file_preview",
        removeButton: "sv_q_file_remove_button",
        fileInput: "sv_q_file_input",
        removeFile: "sv_q_file_remove",
        fileDecorator: "sv-hidden",
        fileSign: "sv_q_file_sign",
        removeButtonBottom: "sv-hidden",
        dragAreaPlaceholder: "sv-hidden",
        fileList: "",
    },
    signaturepad: {
        root: "sv_q_signaturepad sjs_sp_container",
        controls: "sjs_sp_controls",
        placeholder: "sjs_sp_placeholder",
        clearButton: "sjs_sp_clear",
    },
    saveData: {
        root: "",
        saving: "alert alert-info",
        error: "alert alert-danger",
        success: "alert alert-success",
        saveAgainButton: "",
    },
    window: {
        root: "modal-content",
        body: "modal-body",
        header: {
            root: "modal-header panel-title",
            title: "pull-left",
            button: "glyphicon pull-right",
            buttonExpanded: "glyphicon pull-right glyphicon-chevron-up",
            buttonCollapsed: "glyphicon pull-right glyphicon-chevron-down",
        },
    },
};
_cssstandard__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]["bootstrap"] = defaultBootstrapCss;


/***/ }),

/***/ "./src/defaultCss/cssbootstrapmaterial.ts":
/*!************************************************!*\
  !*** ./src/defaultCss/cssbootstrapmaterial.ts ***!
  \************************************************/
/*! exports provided: defaultBootstrapMaterialCss */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapMaterialCss", function() { return defaultBootstrapMaterialCss; });
/* harmony import */ var _cssstandard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cssstandard */ "./src/defaultCss/cssstandard.ts");

var defaultBootstrapMaterialCss = {
    root: "sv_main sv_bootstrapmaterial_css",
    container: "sv_container",
    header: "card-heading",
    body: "card-body",
    bodyEmpty: "card-body sv_body_empty",
    footer: "card-footer",
    title: "",
    description: "",
    logo: "sv_logo",
    logoImage: "sv_logo__image",
    headerText: "sv_header__text",
    navigationButton: "btn-primary sv_nav_btn",
    completedPage: "",
    navigation: {
        complete: "sv_complete_btn",
        prev: "sv_prev_btn",
        next: "sv_next_btn",
        start: "sv_start_btn",
        preview: "sv_preview_btn",
        edit: "sv_edit_btn",
    },
    progress: "progress center-block mx-auto mb-4",
    progressBar: "progress-bar",
    progressTextUnderBar: "sv-hidden",
    progressTextInBar: "sv-hidden",
    progressButtonsContainerCenter: "sv_progress-buttons__container-center",
    progressButtonsContainer: "sv_progress-buttons__container",
    progressButtonsImageButtonLeft: "sv_progress-buttons__image-button-left",
    progressButtonsImageButtonRight: "sv_progress-buttons__image-button-right",
    progressButtonsImageButtonHidden: "sv_progress-buttons__image-button--hidden",
    progressButtonsListContainer: "sv_progress-buttons__list-container",
    progressButtonsList: "sv_progress-buttons__list",
    progressButtonsListElementPassed: "sv_progress-buttons__list-element--passed",
    progressButtonsListElementCurrent: "sv_progress-buttons__list-element--current",
    progressButtonsListElementNonClickable: "sv_progress-buttons__list-element--nonclickable",
    progressButtonsPageTitle: "sv_progress-buttons__page-title",
    progressButtonsPageDescription: "sv_progress-buttons__page-description",
    page: {
        root: "",
        title: "",
        description: "small",
    },
    pageTitle: "",
    pageDescription: "small",
    row: "sv_row",
    question: {
        mainRoot: "sv_qstn form-group bmd-form-group",
        flowRoot: "sv_q_flow form-group bmd-form-group",
        header: "",
        headerLeft: "title-left",
        content: "",
        contentLeft: "content-left",
        titleLeftRoot: "sv_qstn_left",
        requiredText: "sv_q_required_text",
        title: "",
        titleExpandable: "sv_q_title_expandable",
        titleExpanded: "sv_q_title_expanded",
        titleCollapsed: "sv_q_title_collapsed",
        number: "sv_q_num",
        description: "small",
        descriptionUnderInput: "small",
        comment: "form-control",
        required: "",
        titleRequired: "",
        hasError: "has-error",
        indent: 20,
        formGroup: "form-group bmd-form-group",
        disabled: "sv_q--disabled",
    },
    panel: {
        title: "sv_p_title",
        titleExpandable: "sv_p_title_expandable",
        titleExpanded: "sv_p_title_expanded",
        titleCollapsed: "sv_p_title_collapsed",
        titleOnError: "",
        icon: "sv_panel_icon",
        iconExpanded: "sv_expanded",
        description: "small sv_p_description",
        container: "sv_p_container",
        footer: "sv_p_footer",
        number: "sv_q_num",
        requiredText: "sv_q_required_text",
    },
    error: {
        root: "alert alert-danger",
        icon: "glyphicon glyphicon-exclamation-sign",
        item: "",
        locationTop: "sv_qstn_error_top",
        locationBottom: "sv_qstn_error_bottom",
    },
    boolean: {
        root: "sv_qbln checkbox",
        rootRadio: "sv_qbln form-inline checkbox",
        item: "sv-boolean",
        control: "sv-visuallyhidden",
        controlCheckbox: "sv-visuallyhidden",
        itemChecked: "sv-boolean--checked checked",
        itemIndeterminate: "sv-boolean--indeterminate",
        itemDisabled: "sv-boolean--disabled",
        switch: "sv-boolean__switch",
        slider: "sv-boolean__slider",
        label: "sv-boolean__label ",
        disabledLabel: "sv-boolean__label--disabled",
        materialDecorator: "sv-item__decorator sv-boolean__decorator",
        itemDecorator: "sv-item__svg sv-boolean__svg",
        checkedPath: "sv-boolean__checked-path",
        uncheckedPath: "sv-boolean__unchecked-path",
        indeterminatePath: "sv-boolean__indeterminate-path",
    },
    checkbox: {
        root: "sv_qcbx",
        item: "checkbox",
        itemChecked: "checked",
        itemSelectAll: "sv_q_checkbox_selectall",
        itemNone: "sv_q_checkbox_none",
        itemInline: "sv_q_checkbox_inline",
        itemDecorator: "sv-hidden",
        itemControl: "",
        label: "",
        labelChecked: "",
        controlLabel: "",
        materialDecorator: "checkbox-decorator",
        other: "sv_q_checkbox_other form-control",
        column: "sv_q_select_column",
    },
    ranking: {
        root: "sv-ranking",
        rootMobileMod: "sv-ranking--mobile",
        rootDragMod: "sv-ranking--drag",
        rootDisabled: "sv-ranking--disabled",
        item: "sv-ranking-item",
        itemContent: "sv-ranking-item__content",
        itemIndex: "sv-ranking-item__index",
        // itemText: "sv-ranking-item__text",
        controlLabel: "sv-ranking-item__text",
        itemGhostNode: "sv-ranking-item__ghost",
        itemIconContainer: "sv-ranking-item__icon-container",
        itemIcon: "sv-ranking-item__icon",
        itemIconHoverMod: "sv-ranking-item__icon--hover",
        itemIconFocusMod: "sv-ranking-item__icon--focus",
        itemGhostMod: "sv-ranking-item--ghost",
        itemDragMod: "sv-ranking-item--drag",
    },
    comment: "form-control",
    dropdown: {
        root: "sv_q_dd_root",
        selectWrapper: "sv_q_dd_select_wrapper",
        control: "form-control sv_q_dd_control",
        controlValue: "sv_q_dd_value",
        other: "sv_q_dd_other form-control",
        cleanButton: "sv_q_dd_clean-button",
        cleanButtonSvg: "sv_q_dd_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        filterStringInput: "sv_q_dd_filter-string-input",
    },
    tagbox: {
        root: "sv_q_dd_root",
        selectWrapper: "sv_q_dd_select_wrapper",
        control: "form-control sv_q_dd_control",
        controlValue: "sv_q_dd_value",
        other: "sv_q_dd_other form-control",
        cleanButton: "sv_q_dd_clean-button",
        cleanButtonSvg: "sv_q_dd_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        filterStringInput: "sv_q_dd_filter-string-input",
    },
    html: { root: "" },
    image: { root: "sv_q_image", image: "sv_image_image" },
    matrix: {
        root: "table sv_q_matrix",
        row: "form-group bmd-form-group",
        label: "sv_q_m_label radio-inline",
        cellText: "sv_q_m_cell_text",
        cellTextSelected: "sv_q_m_cell_selected bg-primary",
        cellLabel: "sv_q_m_cell_label",
        itemValue: "form-control",
        itemChecked: "checked",
        itemDecorator: "sv-hidden",
        materialDecorator: "bmd-radio",
        cellResponsiveTitle: "sv-hidden"
    },
    matrixdropdown: {
        root: "table",
        itemValue: "form-group bmd-form-group",
        headerCell: "sv_matrix_cell_header",
        row: "sv_matrix_row",
        rowAdditional: "sv-matrix__row--additional",
        detailRow: "sv_matrix_detail_row",
        detailRowText: "sv_matrix_cell_detail_rowtext",
        detailCell: "sv_matrix_cell_detail",
        detailButton: "sv_matrix_cell_detail_button",
        detailButtonExpanded: "sv_matrix_cell_detail_button_expanded",
        detailIcon: "sv_detail_panel_icon",
        detailIconExpanded: "sv_detail_expanded",
        detailPanelCell: "sv_matrix_cell_detail_panel",
        actionsCell: "sv_matrix_cell sv_matrix_cell_actions",
    },
    matrixdynamic: {
        mainRoot: "sv_qstn",
        flowRoot: "sv_q_flow",
        root: "table",
        button: "btn btn-primary",
        itemValue: "form-group bmd-form-group",
        buttonAdd: "",
        buttonRemove: "",
        iconAdd: "",
        iconRemove: "",
        iconDrag: "sv-matrixdynamic__drag-icon",
        headerCell: "sv_matrix_cell_header",
        row: "sv_matrix_row",
        detailRow: "sv_matrix_detail_row",
        detailCell: "sv_matrix_cell_detail",
        detailButton: "sv_matrix_cell_detail_button",
        detailButtonExpanded: "sv_matrix_cell_detail_button_expanded",
        detailIcon: "sv_detail_panel_icon",
        detailIconExpanded: "sv_detail_expanded",
        detailPanelCell: "sv_matrix_cell_detail_panel",
        actionsCell: "sv_matrix_cell sv_matrix_cell_actions",
        emptyRowsSection: "sv_matrix_empty_rows_section",
        emptyRowsText: "sv_matrix_empty_rows_text",
        emptyRowsButton: "",
        ghostRow: "sv-matrix-row--drag-drop-ghost-mod"
    },
    paneldynamic: {
        root: "",
        navigation: "sv-paneldynamic__navigation",
        progressTop: "sv-paneldynamic__progress sv-paneldynamic__progress--top",
        progressBottom: "sv-paneldynamic__progress sv-paneldynamic__progress--bottom",
        title: "sv-title sv-question__title",
        button: "button",
        buttonAdd: "button sv-paneldynamic__add-btn btn btn-primary",
        buttonRemove: "button sv-paneldynamic__remove-btn btn btn-primary",
        buttonRemoveRight: "sv-paneldynamic__remove-btn--right",
        buttonPrev: "sv-paneldynamic__prev-btn",
        buttonNext: "sv-paneldynamic__next-btn",
        buttonPrevDisabled: "sv-paneldynamic__prev-btn--disabled",
        buttonNextDisabled: "sv-paneldynamic__next-btn--disabled",
        progressContainer: "sv-paneldynamic__progress-container",
        progress: "sv-progress",
        progressBar: "sv-progress__bar",
        progressText: "sv-paneldynamic__progress-text",
        panelWrapper: "sv_p_wrapper",
        panelWrapperInRow: "sv_p_wrapper_in_row",
        progressBtnIcon: "icon-progressbutton",
        footer: ""
    },
    multipletext: {
        root: "sv_q_mt table",
        itemTitle: "sv_q_mt_title",
        item: "sv_q_mt_item",
        itemLabel: "sv_q_mt_label",
        row: "form-group bmd-form-group",
        itemValue: "sv_q_mt_item_value form-control",
    },
    radiogroup: {
        root: "",
        item: "radio",
        itemChecked: "checked",
        itemInline: "sv_q_radiogroup_inline",
        itemDecorator: "sv-hidden",
        label: "",
        labelChecked: "",
        itemControl: "",
        controlLabel: "sv_q_radiogroup_control_label",
        materialDecorator: "bmd-radio",
        other: "sv_q_radiogroup_other form-control",
        clearButton: "sv_q_radiogroup_clear button btn btn-primary",
        column: "sv_q_select_column",
    },
    buttongroup: {
        root: "sv-button-group",
        item: "sv-button-group__item",
        itemIcon: "sv-button-group__item-icon",
        itemDecorator: "sv-button-group__item-decorator",
        itemCaption: "sv-button-group__item-caption",
        itemSelected: "sv-button-group__item--selected",
        itemHover: "sv-button-group__item--hover",
        itemDisabled: "sv-button-group__item--disabled",
        itemControl: "sv-visuallyhidden",
    },
    imagepicker: {
        root: "sv_imgsel",
        item: "sv_q_imgsel",
        itemChecked: "checked",
        itemInline: "sv_q_imagepicker_inline",
        label: "sv_q_imgsel_label",
        itemControl: "sv_q_imgsel_control_item",
        image: "sv_q_imgsel_image",
        itemText: "sv_q_imgsel_text",
        clearButton: "sv_q_radiogroup_clear",
    },
    rating: {
        root: "btn-group",
        item: "btn btn-default btn-secondary",
        selected: "active",
        minText: "sv_q_rating_min_text",
        itemText: "sv_q_rating_item_text",
        maxText: "sv_q_rating_max_text",
        disabled: "",
    },
    text: "form-control",
    expression: "form-control",
    file: {
        root: "form-group bmd-form-group is-fileinput sv_q_file",
        placeholderInput: "",
        preview: "sv_q_file_preview",
        removeButton: "sv_q_file_remove_button",
        fileInput: "sv_q_file_input",
        fileSign: "sv_q_file_sign",
        removeFile: "sv_q_file_remove",
        fileDecorator: "sv-hidden",
        removeButtonBottom: "sv-hidden",
        dragAreaPlaceholder: "sv-hidden",
        fileList: "",
    },
    signaturepad: {
        root: "sv_q_signaturepad sjs_sp_container",
        controls: "sjs_sp_controls",
        placeholder: "sjs_sp_placeholder",
        clearButton: "sjs_sp_clear",
    },
    saveData: {
        root: "",
        saving: "alert alert-info",
        error: "alert alert-danger",
        success: "alert alert-success",
        saveAgainButton: "",
    },
    window: {
        root: "modal-content",
        body: "modal-body",
        header: {
            root: "modal-header card-title",
            title: "pull-left",
            button: "glyphicon pull-right",
            buttonExpanded: "glyphicon pull-right glyphicon-chevron-up",
            buttonCollapsed: "glyphicon pull-right glyphicon-chevron-down",
        },
    },
};
_cssstandard__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]["bootstrapmaterial"] = defaultBootstrapMaterialCss;


/***/ }),

/***/ "./src/defaultCss/cssmodern.ts":
/*!*************************************!*\
  !*** ./src/defaultCss/cssmodern.ts ***!
  \*************************************/
/*! exports provided: modernCss */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modernCss", function() { return modernCss; });
/* harmony import */ var _cssstandard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cssstandard */ "./src/defaultCss/cssstandard.ts");

var modernCss = {
    root: "sv-root-modern",
    timerRoot: "sv-body__timer",
    container: "sv-container-modern",
    header: "sv-title sv-container-modern__title",
    headerClose: "sv-container-modern__close",
    body: "sv-body",
    bodyEmpty: "sv-body sv-body--empty",
    footer: "sv-footer sv-body__footer sv-clearfix",
    title: "",
    description: "",
    logo: "sv-logo",
    logoImage: "sv-logo__image",
    headerText: "sv-header__text",
    navigationButton: "sv-btn sv-btn--navigation",
    completedPage: "sv-completedpage",
    navigation: {
        complete: "sv-footer__complete-btn",
        prev: "sv-footer__prev-btn",
        next: "sv-footer__next-btn",
        start: "sv-footer__start-btn",
        preview: "sv-footer__preview-btn",
        edit: "sv-footer__edit-btn",
    },
    panel: {
        title: "sv-title sv-panel__title",
        titleExpandable: "sv-panel__title--expandable",
        titleExpanded: "sv-panel__title--expanded",
        titleCollapsed: "sv-panel__title--collapsed",
        titleOnError: "sv-panel__title--error",
        description: "sv-description sv-panel__description",
        container: "sv-panel sv-row__panel",
        content: "sv-panel__content",
        icon: "sv-panel__icon",
        iconExpanded: "sv-panel__icon--expanded",
        footer: "sv-panel__footer",
        requiredText: "sv-panel__required-text",
        number: "sv-question__num",
    },
    paneldynamic: {
        root: "sv-paneldynamic",
        navigation: "sv-paneldynamic__navigation",
        title: "sv-title sv-question__title",
        button: "sv-btn",
        buttonRemove: "sv-paneldynamic__remove-btn",
        buttonRemoveRight: "sv-paneldynamic__remove-btn--right",
        buttonAdd: "sv-paneldynamic__add-btn",
        progressTop: "sv-paneldynamic__progress sv-paneldynamic__progress--top",
        progressBottom: "sv-paneldynamic__progress sv-paneldynamic__progress--bottom",
        buttonPrev: "sv-paneldynamic__prev-btn",
        buttonNext: "sv-paneldynamic__next-btn",
        buttonPrevDisabled: "sv-paneldynamic__prev-btn--disabled",
        buttonNextDisabled: "sv-paneldynamic__next-btn--disabled",
        progressContainer: "sv-paneldynamic__progress-container",
        progress: "sv-progress",
        progressBar: "sv-progress__bar",
        progressText: "sv-paneldynamic__progress-text",
        separator: "sv-paneldynamic__separator",
        panelWrapper: "sv-paneldynamic__panel-wrapper",
        panelWrapperInRow: "sv-paneldynamic__panel-wrapper--in-row",
        progressBtnIcon: "icon-progressbutton",
        footer: ""
    },
    progress: "sv-progress sv-body__progress",
    progressBar: "sv-progress__bar",
    progressText: "sv-progress__text",
    progressTextInBar: "sv-hidden",
    progressButtonsContainerCenter: "sv_progress-buttons__container-center",
    progressButtonsContainer: "sv_progress-buttons__container",
    progressButtonsImageButtonLeft: "sv_progress-buttons__image-button-left",
    progressButtonsImageButtonRight: "sv_progress-buttons__image-button-right",
    progressButtonsImageButtonHidden: "sv_progress-buttons__image-button--hidden",
    progressButtonsListContainer: "sv_progress-buttons__list-container",
    progressButtonsList: "sv_progress-buttons__list",
    progressButtonsListElementPassed: "sv_progress-buttons__list-element--passed",
    progressButtonsListElementCurrent: "sv_progress-buttons__list-element--current",
    progressButtonsListElementNonClickable: "sv_progress-buttons__list-element--nonclickable",
    progressButtonsPageTitle: "sv_progress-buttons__page-title",
    progressButtonsPageDescription: "sv_progress-buttons__page-description",
    page: {
        root: "sv-page sv-body__page",
        title: "sv-title sv-page__title",
        description: "sv-description sv-page__description",
    },
    pageTitle: "sv-title sv-page__title",
    pageDescription: "sv-description sv-page__description",
    row: "sv-row sv-clearfix",
    question: {
        mainRoot: "sv-question sv-row__question",
        flowRoot: "sv-question sv-row__question sv-row__question--flow",
        asCell: "sv-table__cell",
        header: "sv-question__header",
        headerLeft: "sv-question__header--location--left",
        headerTop: "sv-question__header--location--top",
        headerBottom: "sv-question__header--location--bottom",
        content: "sv-question__content",
        contentLeft: "sv-question__content--left",
        titleLeftRoot: "",
        answered: "sv-question--answered",
        titleOnAnswer: "sv-question__title--answer",
        titleOnError: "sv-question__title--error",
        title: "sv-title sv-question__title",
        titleExpandable: "sv-question__title--expandable",
        titleExpanded: "sv-question__title--expanded",
        titleCollapsed: "sv-question__title--collapsed",
        icon: "sv-question__icon",
        iconExpanded: "sv-question__icon--expanded",
        requiredText: "sv-question__required-text",
        number: "sv-question__num",
        description: "sv-description sv-question__description",
        descriptionUnderInput: "sv-description sv-question__description",
        comment: "sv-comment",
        required: "sv-question--required",
        titleRequired: "sv-question__title--required",
        indent: 20,
        footer: "sv-question__footer",
        formGroup: "sv-question__form-group",
        hasError: "",
        disabled: "sv-question--disabled",
    },
    image: { root: "sv-image", image: "sv_image_image" },
    error: {
        root: "sv-question__erbox",
        icon: "",
        item: "",
        locationTop: "sv-question__erbox--location--top",
        locationBottom: "sv-question__erbox--location--bottom",
    },
    checkbox: {
        root: "sv-selectbase",
        item: "sv-item sv-checkbox sv-selectbase__item",
        itemSelectAll: "sv-checkbox--selectall",
        itemNone: "sv-checkbox--none",
        itemDisabled: "sv-item--disabled sv-checkbox--disabled",
        itemChecked: "sv-checkbox--checked",
        itemHover: "sv-checkbox--allowhover",
        itemInline: "sv-selectbase__item--inline",
        label: "sv-selectbase__label",
        labelChecked: "",
        itemControl: "sv-visuallyhidden sv-item__control",
        itemDecorator: "sv-item__svg sv-checkbox__svg",
        itemSvgIconId: "#icon-moderncheck",
        controlLabel: "sv-item__control-label",
        materialDecorator: "sv-item__decorator sv-selectbase__decorator sv-checkbox__decorator",
        other: "sv-comment sv-question__other",
        column: "sv-selectbase__column",
    },
    ranking: {
        root: "sv-ranking",
        rootMobileMod: "sv-ranking--mobile",
        rootDragMod: "sv-ranking--drag",
        rootDisabled: "sv-ranking--disabled",
        item: "sv-ranking-item",
        itemContent: "sv-ranking-item__content",
        itemIndex: "sv-ranking-item__index",
        // itemText: "sv-ranking-item__text",
        controlLabel: "sv-ranking-item__text",
        itemGhostNode: "sv-ranking-item__ghost",
        itemIconContainer: "sv-ranking-item__icon-container",
        itemIcon: "sv-ranking-item__icon",
        itemIconHoverMod: "sv-ranking-item__icon--hover",
        itemIconFocusMod: "sv-ranking-item__icon--focus",
        itemGhostMod: "sv-ranking-item--ghost",
        itemDragMod: "sv-ranking-item--drag",
    },
    radiogroup: {
        root: "sv-selectbase",
        item: "sv-item sv-radio sv-selectbase__item",
        itemInline: "sv-selectbase__item--inline",
        label: "sv-selectbase__label",
        labelChecked: "",
        itemDisabled: "sv-item--disabled sv-radio--disabled",
        itemChecked: "sv-radio--checked",
        itemHover: "sv-radio--allowhover",
        itemControl: "sv-visuallyhidden sv-item__control",
        itemDecorator: "sv-item__svg sv-radio__svg",
        itemSvgIconId: "#icon-modernradio",
        controlLabel: "sv-item__control-label",
        materialDecorator: "sv-item__decorator sv-selectbase__decorator sv-radio__decorator",
        other: "sv-comment sv-question__other",
        clearButton: "sv-btn sv-selectbase__clear-btn",
        column: "sv-selectbase__column",
    },
    buttongroup: {
        root: "sv-button-group",
        item: "sv-button-group__item",
        itemIcon: "sv-button-group__item-icon",
        itemDecorator: "sv-button-group__item-decorator",
        itemCaption: "sv-button-group__item-caption",
        itemSelected: "sv-button-group__item--selected",
        itemHover: "sv-button-group__item--hover",
        itemDisabled: "sv-button-group__item--disabled",
        itemControl: "sv-visuallyhidden",
    },
    boolean: {
        root: "sv_qbln",
        rootRadio: "sv_qbln",
        small: "sv-row__question--small",
        item: "sv-boolean sv-item",
        control: "sv-visuallyhidden",
        itemChecked: "sv-boolean--checked",
        itemIndeterminate: "sv-boolean--indeterminate",
        itemDisabled: "sv-item--disabled sv-boolean--disabled",
        switch: "sv-boolean__switch",
        slider: "sv-boolean__slider",
        label: "sv-boolean__label",
        disabledLabel: "sv-boolean__label--disabled",
        //checkbox
        rootCheckbox: "sv_qbln",
        checkboxItem: "sv-boolean sv-item",
        checkboxItemChecked: "sv-boolean--checked",
        controlCheckbox: "sv-visuallyhidden",
        checkboxControlLabel: "sv-boolean__label",
        checkboxItemIndeterminate: "sv-boolean--indeterminate",
        checkboxItemDisabled: "sv-item--disabled sv-boolean--disabled",
        checkboxMaterialDecorator: "sv-item__decorator sv-boolean__decorator ",
        checkboxItemDecorator: "sv-item__svg  sv-boolean__svg",
        indeterminatePath: "sv-boolean__indeterminate-path",
        svgIconCheckedId: "#icon-modernbooleancheckchecked",
        svgIconUncheckedId: "#icon-modernbooleancheckunchecked",
        svgIconIndId: "#icon-modernbooleancheckind",
    },
    text: {
        root: "sv-text",
        small: "sv-row__question--small",
        onError: "sv-text--error",
    },
    multipletext: {
        root: "sv-multipletext",
        item: "sv-multipletext__item",
        itemLabel: "sv-multipletext__item-label",
        itemTitle: "sv-multipletext__item-title",
        row: "sv-multipletext__row",
        cell: "sv-multipletext__cell",
    },
    dropdown: {
        root: "",
        small: "sv-row__question--small",
        control: "sv-dropdown",
        selectWrapper: "",
        other: "sv-comment sv-question__other",
        onError: "sv-dropdown--error",
        cleanButton: "sv-dropdown_clean-button",
        cleanButtonSvg: "sv-dropdown_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        filterStringInput: "sv-dropdown__filter-string-input",
        controlValue: "sv-dropdown__value",
        controlInputFieldComponent: "sv_dropdown_control__input-field-component",
    },
    tagbox: {
        root: "",
        small: "sv-row__question--small",
        selectWrapper: "sv_select_wrapper sv-tagbox_wrapper",
        other: "sv-input sv-comment sv-selectbase__other",
        cleanButton: "sv-tagbox_clean-button sv-dropdown_clean-button",
        cleanButtonSvg: "sv-tagbox_clean-button-svg sv-dropdown_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        cleanItemButton: "sv-tagbox__item_clean-button",
        cleanItemButtonSvg: "sv-tagbox__item_clean-button-svg",
        cleanItemButtonIconId: "icon-clear_16x16",
        control: "sv-input sv-tagbox sv-dropdown",
        controlValue: "sv-tagbox__value sv-dropdown__value",
        controlEmpty: "sv-dropdown--empty sv-tagbox--empty",
        placeholderInput: "sv-tagbox__placeholder",
        filterStringInput: "sv-tagbox__filter-string-input sv-dropdown__filter-string-input"
    },
    imagepicker: {
        root: "sv-selectbase sv-imagepicker",
        column: "sv-selectbase__column",
        item: "sv-imagepicker__item",
        itemInline: "sv-imagepicker__item--inline",
        itemChecked: "sv-imagepicker__item--checked",
        itemDisabled: "sv-imagepicker__item--disabled",
        itemHover: "sv-imagepicker__item--allowhover",
        label: "sv-imagepicker__label",
        itemControl: "sv-imagepicker__control sv-visuallyhidden",
        image: "sv-imagepicker__image",
        itemText: "sv-imagepicker__text",
        clearButton: "sv-btn",
        other: "sv-comment sv-question__other",
    },
    matrix: {
        tableWrapper: "sv-matrix",
        root: "sv-table sv-matrix-root",
        rowError: "sv-matrix__row--error",
        cell: "sv-table__cell sv-matrix__cell",
        headerCell: "sv-table__cell sv-table__cell--header",
        label: "sv-item sv-radio sv-matrix__label",
        itemValue: "sv-visuallyhidden sv-item__control sv-radio__control",
        itemChecked: "sv-radio--checked",
        itemDisabled: "sv-item--disabled sv-radio--disabled",
        itemHover: "sv-radio--allowhover",
        materialDecorator: "sv-item__decorator sv-radio__decorator",
        itemDecorator: "sv-item__svg sv-radio__svg",
        cellText: "sv-matrix__text",
        cellTextSelected: "sv-matrix__text--checked",
        cellTextDisabled: "sv-matrix__text--disabled",
        cellResponsiveTitle: "sv-hidden",
        itemSvgIconId: "#icon-modernradio",
    },
    matrixdropdown: {
        root: "sv-table sv-matrixdropdown",
        cell: "sv-table__cell",
        headerCell: "sv-table__cell sv-table__cell--header",
        row: "sv-table__row",
        rowAdditional: "sv-table__row--additional",
        detailRow: "sv-table__row--detail",
        detailRowText: "sv-table__cell--detail-rowtext",
        detailCell: "sv-table__cell--detail",
        choiceCell: "sv-table__cell--choice",
        detailButton: "sv-table__cell--detail-button",
        detailButtonExpanded: "sv-table__cell--detail-button--expanded",
        detailIcon: "sv-detail-panel__icon",
        detailIconExpanded: "sv-detail-panel__icon--expanded",
        detailPanelCell: "sv-table__cell--detail-panel",
        actionsCell: "sv-table__cell sv-table__cell--actions",
    },
    matrixdynamic: {
        root: "sv-table sv-matrixdynamic",
        cell: "sv-table__cell",
        headerCell: "sv-table__cell sv-table__cell--header",
        button: "sv-btn",
        buttonAdd: "sv-matrixdynamic__add-btn",
        buttonRemove: "sv-matrixdynamic__remove-btn",
        iconAdd: "",
        iconRemove: "",
        iconDrag: "sv-matrixdynamic__drag-icon",
        row: "sv-table__row",
        detailRow: "sv-table__row--detail",
        detailCell: "sv-table__cell--detail",
        choiceCell: "sv-table__cell--choice",
        detailButton: "sv-table__cell--detail-button",
        detailButtonExpanded: "sv-table__cell--detail-button--expanded",
        detailIcon: "sv-detail-panel__icon",
        detailIconExpanded: "sv-detail-panel__icon--expanded",
        detailPanelCell: "sv-table__cell--detail-panel",
        actionsCell: "sv-table__cell sv-table__cell--actions",
        emptyRowsSection: "sv-table__empty--rows--section",
        emptyRowsText: "sv-table__empty--rows--text",
        emptyRowsButton: "",
        ghostRow: "sv-matrix-row--drag-drop-ghost-mod"
    },
    rating: {
        root: "sv-rating",
        item: "sv-rating__item",
        selected: "sv-rating__item--selected",
        minText: "sv-rating__min-text",
        itemText: "sv-rating__item-text",
        maxText: "sv-rating__max-text",
        itemDisabled: "sv-rating--disabled",
        filterStringInput: "sv-dropdown__filter-string-input",
    },
    comment: {
        root: "sv-comment",
        small: "sv-row__question--small",
    },
    expression: "",
    file: {
        root: "sv-file",
        other: "sv-comment sv-question__other",
        placeholderInput: "sv-visuallyhidden",
        preview: "sv-file__preview",
        fileSignBottom: "sv-file__sign",
        fileDecorator: "sv-file__decorator",
        fileInput: "sv-visuallyhidden",
        noFileChosen: "sv-description sv-file__no-file-chosen",
        chooseFile: "sv-btn sv-file__choose-btn",
        controlDisabled: "sv-file__choose-btn--disabled",
        removeButton: "sv-hidden",
        removeButtonBottom: "sv-btn sv-file__clean-btn",
        removeFile: "sv-hidden",
        removeFileSvg: "sv-file__remove-svg",
        removeFileSvgIconId: "icon-removefile",
        wrapper: "sv-file__wrapper",
        dragAreaPlaceholder: "sv-hidden",
        fileList: "",
    },
    signaturepad: {
        root: "sv-signaturepad sjs_sp_container",
        small: "sv-row__question--small",
        controls: "sjs_sp_controls",
        placeholder: "sjs_sp_placeholder",
        clearButton: "sjs_sp_clear",
    },
    saveData: {
        root: "",
        saving: "",
        error: "",
        success: "",
        saveAgainButton: "",
    },
    window: {
        root: "sv_window",
        body: "sv_window_content",
        header: {
            root: "sv_window_title",
            title: "",
            button: "",
            buttonExpanded: "",
            buttonCollapsed: "",
        },
    },
    variables: {
        themeMark: "--sv-modern-mark"
    }
};
_cssstandard__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]["modern"] = modernCss;


/***/ }),

/***/ "./src/defaultCss/cssstandard.ts":
/*!***************************************!*\
  !*** ./src/defaultCss/cssstandard.ts ***!
  \***************************************/
/*! exports provided: surveyCss, defaultStandardCss */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return surveyCss; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStandardCss", function() { return defaultStandardCss; });
var surveyCss = {
    currentType: "",
    getCss: function () {
        var loc = this.currentType ? this[this.currentType] : defaultStandardCss;
        if (!loc)
            loc = defaultStandardCss;
        return loc;
    }
};
var defaultStandardCss = {
    root: "sv_main sv_default_css",
    container: "sv_container",
    header: "sv_header",
    body: "sv_body",
    bodyEmpty: "sv_body sv_body_empty",
    footer: "sv_nav",
    title: "",
    description: "",
    logo: "sv_logo",
    logoImage: "sv_logo__image",
    headerText: "sv_header__text",
    navigationButton: "sv_nav_btn",
    completedPage: "sv_completed_page",
    navigation: {
        complete: "sv_complete_btn",
        prev: "sv_prev_btn",
        next: "sv_next_btn",
        start: "sv_start_btn",
        preview: "sv_preview_btn",
        edit: "sv_edit_btn",
    },
    progress: "sv_progress",
    progressBar: "sv_progress_bar",
    progressTextInBar: "sv-hidden",
    progressButtonsContainerCenter: "sv_progress-buttons__container-center",
    progressButtonsContainer: "sv_progress-buttons__container",
    progressButtonsImageButtonLeft: "sv_progress-buttons__image-button-left",
    progressButtonsImageButtonRight: "sv_progress-buttons__image-button-right",
    progressButtonsImageButtonHidden: "sv_progress-buttons__image-button--hidden",
    progressButtonsListContainer: "sv_progress-buttons__list-container",
    progressButtonsList: "sv_progress-buttons__list",
    progressButtonsListElementPassed: "sv_progress-buttons__list-element--passed",
    progressButtonsListElementCurrent: "sv_progress-buttons__list-element--current",
    progressButtonsListElementNonClickable: "sv_progress-buttons__list-element--nonclickable",
    progressButtonsPageTitle: "sv_progress-buttons__page-title",
    progressButtonsPageDescription: "sv_progress-buttons__page-description",
    page: {
        root: "sv_p_root",
        title: "sv_page_title",
        description: "",
    },
    // TODO: move to the page object
    pageTitle: "sv_page_title",
    pageDescription: "",
    row: "sv_row",
    question: {
        mainRoot: "sv_q sv_qstn",
        flowRoot: "sv_q_flow sv_qstn",
        header: "",
        headerLeft: "title-left",
        content: "",
        contentLeft: "content-left",
        titleLeftRoot: "sv_qstn_left",
        requiredText: "sv_q_required_text",
        title: "sv_q_title",
        titleExpandable: "sv_q_title_expandable",
        titleExpanded: "sv_q_title_expanded",
        titleCollapsed: "sv_q_title_collapsed",
        number: "sv_q_num",
        description: "sv_q_description",
        comment: "",
        required: "",
        titleRequired: "",
        hasError: "",
        indent: 20,
        footer: "sv_q_footer",
        formGroup: "form-group",
        asCell: "sv_matrix_cell",
        icon: "sv_question_icon",
        iconExpanded: "sv_expanded",
        disabled: "sv_q--disabled",
    },
    panel: {
        title: "sv_p_title",
        titleExpandable: "sv_p_title_expandable",
        titleExpanded: "sv_p_title_expanded",
        titleCollapsed: "sv_p_title_collapsed",
        titleOnError: "",
        icon: "sv_panel_icon",
        iconExpanded: "sv_expanded",
        description: "sv_p_description",
        container: "sv_p_container",
        footer: "sv_p_footer",
        number: "sv_q_num",
        requiredText: "sv_q_required_text",
    },
    error: {
        root: "sv_q_erbox",
        icon: "",
        item: "",
        locationTop: "sv_qstn_error_top",
        locationBottom: "sv_qstn_error_bottom",
    },
    boolean: {
        root: "sv_qcbc sv_qbln",
        rootRadio: "sv_qcbc sv_qbln",
        item: "sv-boolean",
        control: "sv-visuallyhidden",
        itemChecked: "sv-boolean--checked checked",
        itemIndeterminate: "sv-boolean--indeterminate",
        itemDisabled: "sv-boolean--disabled",
        switch: "sv-boolean__switch",
        slider: "sv-boolean__slider",
        label: "sv-boolean__label ",
        disabledLabel: "sv-boolean__label--disabled",
        //checkbox
        rootCheckbox: "sv_qcbc sv_qbln",
        checkboxItem: "sv-boolean",
        checkboxItemChecked: "sv-boolean--checked",
        controlCheckbox: "sv-visuallyvisible",
        checkboxControlLabel: "sv-boolean__label",
        checkboxItemIndeterminate: "sv-boolean--indeterminate",
        checkboxItemDisabled: "sv-item--disabled sv-boolean--disabled",
        checkboxMaterialDecorator: "sv-item__decorator sv-boolean__decorator",
        checkboxItemDecorator: "sv-item__svg sv-boolean__svg",
    },
    checkbox: {
        root: "sv_qcbc sv_qcbx",
        item: "sv_q_checkbox",
        itemSelectAll: "sv_q_checkbox_selectall",
        itemNone: "sv_q_checkbox_none",
        itemChecked: "checked",
        itemInline: "sv_q_checkbox_inline",
        label: "sv_q_checkbox_label",
        labelChecked: "",
        itemControl: "sv_q_checkbox_control_item",
        itemDecorator: "sv-hidden",
        controlLabel: "sv_q_checkbox_control_label",
        other: "sv_q_other sv_q_checkbox_other",
        column: "sv_q_select_column",
    },
    ranking: {
        root: "sv-ranking",
        rootMobileMod: "sv-ranking--mobile",
        rootDragMod: "sv-ranking--drag",
        rootDisabled: "sv-ranking--disabled",
        item: "sv-ranking-item",
        itemContent: "sv-ranking-item__content",
        itemIndex: "sv-ranking-item__index",
        // itemText: "sv-ranking-item__text",
        controlLabel: "sv-ranking-item__text",
        itemGhostNode: "sv-ranking-item__ghost",
        itemIconContainer: "sv-ranking-item__icon-container",
        itemIcon: "sv-ranking-item__icon",
        itemIconHoverMod: "sv-ranking-item__icon--hover",
        itemIconFocusMod: "sv-ranking-item__icon--focus",
        itemGhostMod: "sv-ranking-item--ghost",
        itemDragMod: "sv-ranking-item--drag",
    },
    comment: "",
    dropdown: {
        root: "",
        control: "sv_q_dropdown_control",
        controlInputFieldComponent: "sv_q_dropdown_control__input-field-component",
        selectWrapper: "sv_select_wrapper",
        other: "sv_q_dd_other",
        cleanButton: "sv_q_dropdown_clean-button",
        cleanButtonSvg: "sv_q_dropdown_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        controlValue: "sv_q_dropdown__value",
        filterStringInput: "sv_q_dropdown__filter-string-input"
    },
    html: { root: "" },
    image: { root: "sv_q_image", image: "sv_image_image" },
    matrix: {
        root: "sv_q_matrix",
        label: "sv_q_m_label",
        itemChecked: "checked",
        itemDecorator: "sv-hidden",
        cell: "sv_q_m_cell",
        cellText: "sv_q_m_cell_text",
        cellTextSelected: "sv_q_m_cell_selected",
        cellLabel: "sv_q_m_cell_label",
        cellResponsiveTitle: "sv-hidden"
    },
    matrixdropdown: {
        root: "sv_q_matrix_dropdown",
        cell: "sv_matrix_cell",
        headerCell: "sv_matrix_cell_header",
        row: "sv_matrix_row",
        rowAdditional: "sv-matrix__row--additional",
        detailRow: "sv_matrix_detail_row",
        detailRowText: "sv_matrix_cell_detail_rowtext",
        detailCell: "sv_matrix_cell_detail",
        choiceCell: "sv-table__cell--choice",
        detailButton: "sv_matrix_cell_detail_button",
        detailButtonExpanded: "sv_matrix_cell_detail_button_expanded",
        detailIcon: "sv_detail_panel_icon",
        detailIconExpanded: "sv_detail_expanded",
        detailPanelCell: "sv_matrix_cell_detail_panel",
        actionsCell: "sv_matrix_cell sv_matrix_cell_actions",
    },
    matrixdynamic: {
        root: "sv_q_matrix_dynamic",
        button: "sv_matrix_dynamic_button",
        buttonAdd: "",
        buttonRemove: "",
        iconAdd: "",
        iconRemove: "",
        iconDrag: "sv-matrixdynamic__drag-icon",
        cell: "sv_matrix_cell",
        headerCell: "sv_matrix_cell_header",
        row: "sv_matrix_row",
        detailRow: "sv_matrix_detail_row",
        detailCell: "sv_matrix_cell_detail",
        choiceCell: "sv-table__cell--choice",
        detailButton: "sv_matrix_cell_detail_button",
        detailButtonExpanded: "sv_matrix_cell_detail_button_expanded",
        detailIcon: "sv_detail_panel_icon",
        detailIconExpanded: "sv_detail_expanded",
        detailPanelCell: "sv_matrix_cell_detail_panel",
        actionsCell: "sv_matrix_cell sv_matrix_cell_actions",
        emptyRowsSection: "sv_matrix_empty_rows_section",
        emptyRowsText: "sv_matrix_empty_rows_text",
        emptyRowsButton: "",
        ghostRow: "sv-matrix-row--drag-drop-ghost-mod"
    },
    paneldynamic: {
        root: "sv_panel_dynamic",
        title: "sv_p_title",
        button: "",
        buttonAdd: "sv-paneldynamic__add-btn",
        buttonRemove: "sv_p_remove_btn",
        buttonRemoveRight: "sv_p_remove_btn_right",
        buttonPrev: "sv-paneldynamic__prev-btn",
        buttonPrevDisabled: "sv-paneldynamic__prev-btn--disabled",
        buttonNextDisabled: "sv-paneldynamic__next-btn--disabled",
        buttonNext: "sv-paneldynamic__next-btn",
        progressContainer: "sv-paneldynamic__progress-container",
        progress: "sv-progress",
        progressBar: "sv-progress__bar",
        progressText: "sv-paneldynamic__progress-text",
        panelWrapper: "sv_p_wrapper",
        panelWrapperInRow: "sv_p_wrapper_in_row",
        footer: "",
        progressBtnIcon: "icon-progressbutton"
    },
    multipletext: {
        root: "sv_q_mt",
        itemTitle: "sv_q_mt_title",
        item: "sv_q_mt_item",
        row: "sv_q_mt_row",
        itemLabel: "sv_q_mt_label",
        itemValue: "sv_q_mt_item_value sv_q_text_root",
    },
    radiogroup: {
        root: "sv_qcbc",
        item: "sv_q_radiogroup",
        itemChecked: "checked",
        itemInline: "sv_q_radiogroup_inline",
        itemDecorator: "sv-hidden",
        label: "sv_q_radiogroup_label",
        labelChecked: "",
        itemControl: "sv_q_radiogroup_control_item",
        controlLabel: "",
        other: "sv_q_other sv_q_radiogroup_other",
        clearButton: "sv_q_radiogroup_clear",
        column: "sv_q_select_column",
    },
    buttongroup: {
        root: "sv-button-group",
        item: "sv-button-group__item",
        itemIcon: "sv-button-group__item-icon",
        itemDecorator: "sv-button-group__item-decorator",
        itemCaption: "sv-button-group__item-caption",
        itemHover: "sv-button-group__item--hover",
        itemSelected: "sv-button-group__item--selected",
        itemDisabled: "sv-button-group__item--disabled",
        itemControl: "sv-visuallyhidden",
    },
    imagepicker: {
        root: "sv_imgsel",
        item: "sv_q_imgsel",
        itemChecked: "checked",
        label: "sv_q_imgsel_label",
        itemControl: "sv_q_imgsel_control_item",
        image: "sv_q_imgsel_image",
        itemInline: "sv_q_imagepicker_inline",
        itemText: "sv_q_imgsel_text",
        clearButton: "sv_q_radiogroup_clear",
        column: "sv_q_select_column"
    },
    rating: {
        root: "sv_q_rating",
        item: "sv_q_rating_item",
        selected: "active",
        minText: "sv_q_rating_min_text",
        itemText: "sv_q_rating_item_text",
        maxText: "sv_q_rating_max_text",
    },
    text: "sv_q_text_root",
    expression: "",
    file: {
        root: "sv_q_file",
        placeholderInput: "sv-visuallyhidden",
        preview: "sv_q_file_preview",
        removeButton: "sv_q_file_remove_button",
        fileInput: "sv-visuallyhidden",
        removeFile: "sv_q_file_remove",
        fileDecorator: "sv-file__decorator",
        fileSign: "sv_q_file_sign",
        chooseFile: "sv_q_file_choose_button",
        noFileChosen: "sv_q_file_placeholder",
        dragAreaPlaceholder: "sv-hidden",
        fileList: "",
    },
    signaturepad: {
        root: "sv_q_signaturepad sjs_sp_container",
        controls: "sjs_sp_controls",
        placeholder: "sjs_sp_placeholder",
        clearButton: "sjs_sp_clear",
    },
    saveData: {
        root: "",
        saving: "",
        error: "",
        success: "",
        saveAgainButton: "",
    },
    window: {
        root: "sv_window",
        body: "sv_window_content",
        header: {
            root: "sv_window_title",
            title: "",
            button: "",
            buttonExpanded: "",
            buttonCollapsed: "",
        },
    },
    variables: {
        themeMark: "--sv-default-mark"
    },
    tagbox: {
        root: "",
        small: "sv_q_row__question--small",
        selectWrapper: "sv_select_wrapper sv_q_tagbox_wrapper",
        other: "sv_q_input sv_q_comment sv_q_selectbase__other",
        cleanButton: "sv_q_tagbox_clean-button sv_q_dropdown_clean-button",
        cleanButtonSvg: "sv_q_tagbox_clean-button-svg sv_q_dropdown_clean-button-svg",
        cleanButtonIconId: "icon-clear_16x16",
        cleanItemButton: "sv_q_tagbox-item_clean-button",
        cleanItemButtonSvg: "sv_q_tagbox-item_clean-button-svg",
        cleanItemButtonIconId: "icon-clear_16x16",
        control: "sv_q_input sv_q_tagbox sv_q_dropdown_control",
        controlValue: "sv_q_tagbox__value sv_q_dropdown__value",
        controlEmpty: "sv_q_dropdown--empty sv_q_tagbox--empty",
        placeholderInput: "sv_q_tagbox__placeholder",
        filterStringInput: "sv_q_tagbox__filter-string-input sv_q_dropdown__filter-string-input"
    },
};
surveyCss["standard"] = defaultStandardCss;


/***/ }),

/***/ "./src/defaultCss/defaultV2Css.ts":
/*!****************************************!*\
  !*** ./src/defaultCss/defaultV2Css.ts ***!
  \****************************************/
/*! exports provided: defaultV2Css */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return defaultV2Css; });
/* harmony import */ var _cssstandard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cssstandard */ "./src/defaultCss/cssstandard.ts");

var defaultV2Css = {
    root: "sd-root-modern",
    rootMobile: "sd-root-modern--mobile",
    rootReadOnly: "sd-root--readonly",
    container: "sd-container-modern",
    header: "sd-title sd-container-modern__title",
    body: "sd-body",
    bodyWithTimer: "sd-body--with-timer",
    clockTimerRoot: "sd-timer",
    clockTimerRootTop: "sd-timer--top",
    clockTimerRootBottom: "sd-timer--bottom",
    clockTimerProgress: "sd-timer__progress",
    clockTimerProgressAnimation: "sd-timer__progress--animation",
    clockTimerTextContainer: "sd-timer__text-container",
    clockTimerMinorText: "sd-timer__text--minor",
    clockTimerMajorText: "sd-timer__text--major",
    bodyEmpty: "sd-body sd-body--empty",
    footer: "sd-footer sd-body__navigation sd-clearfix",
    title: "sd-title",
    description: "sd-description",
    logo: "sd-logo",
    logoImage: "sd-logo__image",
    headerText: "sd-header__text",
    headerClose: "sd-hidden",
    navigationButton: "",
    bodyNavigationButton: "sd-btn",
    completedPage: "sd-completedpage",
    timerRoot: "sd-body__timer",
    navigation: {
        complete: "sd-btn--action sd-navigation__complete-btn",
        prev: "sd-navigation__prev-btn",
        next: "sd-navigation__next-btn",
        start: "sd-navigation__start-btn",
        preview: "sd-navigation__preview-btn",
        edit: "",
    },
    panel: {
        title: "sd-title sd-element__title sd-panel__title",
        titleExpandable: "sd-element__title--expandable",
        titleExpanded: "sd-element__title--expanded",
        titleCollapsed: "sd-element__title--collapsed",
        titleDisabled: "sd-element__title--disabled",
        titleOnExpand: "sd-panel__title--expanded",
        titleOnError: "sd-panel__title--error",
        titleBar: "sd-action-title-bar",
        description: "sd-description sd-panel__description",
        container: "sd-element sd-element--complex sd-panel sd-row__panel",
        withFrame: "sd-element--with-frame",
        content: "sd-panel__content",
        icon: "sd-panel__icon",
        iconExpanded: "sd-panel__icon--expanded",
        footer: "sd-panel__footer",
        requiredText: "sd-panel__required-text",
        header: "sd-panel__header sd-element__header sd-element__header--location-top",
        collapsed: "sd-element--collapsed",
        expanded: "sd-element--expanded",
        nested: "sd-element--nested",
        invisible: "sd-element--invisible",
        navigationButton: "",
    },
    paneldynamic: {
        mainRoot: "sd-element  sd-question sd-question--paneldynamic sd-element--complex sd-question--complex sd-row__question",
        empty: "sd-question--empty",
        root: "sd-paneldynamic",
        navigation: "sd-paneldynamic__navigation",
        title: "sd-title sd-element__title sd-question__title",
        button: "sd-action sd-paneldynamic__btn",
        buttonRemove: "sd-action--negative sd-paneldynamic__remove-btn",
        buttonAdd: "sd-paneldynamic__add-btn",
        buttonPrev: "sd-paneldynamic__prev-btn sd-action--icon sd-action",
        buttonPrevDisabled: "sd-action--disabled",
        buttonNextDisabled: "sd-action--disabled",
        buttonNext: "sd-paneldynamic__next-btn sd-action--icon sd-action",
        progressContainer: "sd-paneldynamic__progress-container",
        progress: "sd-progress",
        progressBar: "sd-progress__bar",
        progressText: "sd-paneldynamic__progress-text",
        separator: "sd-paneldynamic__separator",
        panelWrapper: "sd-paneldynamic__panel-wrapper",
        footer: "sd-paneldynamic__footer",
        footerButtonsContainer: "sd-paneldynamic__buttons-container",
        panelWrapperInRow: "sd-paneldynamic__panel-wrapper--in-row",
        progressBtnIcon: "icon-progressbuttonv2",
        noEntriesPlaceholder: "sd-paneldynamic__placeholder sd-question__placeholder"
    },
    progress: "sd-progress sd-body__progress",
    progressBar: "sd-progress__bar",
    progressText: "sd-progress__text",
    progressButtonsContainerCenter: "sd-progress-buttons__container-center",
    progressButtonsContainer: "sd-progress-buttons__container",
    progressButtonsImageButtonLeft: "sd-progress-buttons__image-button-left",
    progressButtonsImageButtonRight: "sd-progress-buttons__image-button-right",
    progressButtonsImageButtonHidden: "sd-progress-buttons__image-button--hidden",
    progressButtonsListContainer: "sd-progress-buttons__list-container",
    progressButtonsList: "sd-progress-buttons__list",
    progressButtonsListElementPassed: "sd-progress-buttons__list-element--passed",
    progressButtonsListElementCurrent: "sd-progress-buttons__list-element--current",
    progressButtonsListElementNonClickable: "sd-progress-buttons__list-element--nonclickable",
    progressButtonsPageTitle: "sd-progress-buttons__page-title",
    progressButtonsPageDescription: "sd-progress-buttons__page-description",
    progressTextInBar: "sd-hidden",
    page: {
        root: "sd-page sd-body__page",
        emptyHeaderRoot: "sd-page__empty-header",
        title: "sd-title sd-page__title",
        description: "sd-description sd-page__description"
    },
    pageTitle: "sd-title sd-page__title",
    pageDescription: "sd-description sd-page__description",
    row: "sd-row sd-clearfix",
    rowMultiple: "sd-row--multiple",
    pageRow: "sd-page__row",
    question: {
        mainRoot: "sd-element sd-question sd-row__question",
        flowRoot: "sd-element sd-question sd-row__question sd-row__question--flow",
        withFrame: "sd-element--with-frame",
        asCell: "sd-table__cell",
        answered: "sd-question--answered",
        header: "sd-question__header sd-element__header",
        headerLeft: "sd-question__header--location--left",
        headerTop: "sd-question__header--location-top sd-element__header--location-top",
        headerBottom: "sd-question__header--location--bottom",
        content: "sd-question__content",
        contentLeft: "sd-question__content--left",
        titleLeftRoot: "sd-question--left",
        titleOnAnswer: "sd-question__title--answer",
        titleOnError: "sd-question__title--error",
        title: "sd-title sd-element__title sd-question__title",
        titleExpandable: "sd-element__title--expandable",
        titleExpanded: "sd-element__title--expanded",
        titleCollapsed: "sd-element__title--collapsed",
        titleDisabled: "sd-element__title--disabled",
        titleBar: "sd-action-title-bar",
        requiredText: "sd-question__required-text",
        number: "sd-element__num",
        description: "sd-description sd-question__description",
        descriptionUnderInput: "sd-description sd-question__description",
        comment: "sd-input sd-comment",
        other: "sd-input sd-comment",
        required: "sd-question--required",
        titleRequired: "sd-question__title--required",
        indent: 20,
        footer: "sd-question__footer",
        formGroup: "sd-question__form-group",
        hasError: "sd-question--error",
        collapsed: "sd-element--collapsed",
        expanded: "sd-element--expanded",
        nested: "sd-element--nested",
        invisible: "sd-element--invisible",
        composite: "sd-element--complex",
        disabled: "sd-question--disabled",
    },
    image: {
        mainRoot: "sd-question sd-question--image",
        root: "sd-image",
        image: "sd-image__image",
        adaptive: "sd-image__image--adaptive",
        withFrame: ""
    },
    html: {
        mainRoot: "sd-question sd-row__question sd-question--html",
        root: "sd-html",
        withFrame: ""
    },
    error: {
        root: "sd-question__erbox",
        icon: "",
        item: "",
        tooltip: "sd-question__erbox--tooltip",
        outsideQuestion: "sd-question__erbox--outside-question",
        aboveQuestion: "sd-question__erbox--above-question",
        belowQuestion: "sd-question__erbox--below-question",
        locationTop: "sd-question__erbox--location--top",
        locationBottom: "sd-question__erbox--location--bottom"
    },
    checkbox: {
        root: "sd-selectbase",
        rootRow: "sd-selectbase--row",
        rootMultiColumn: "sd-selectbase--multi-column",
        item: "sd-item sd-checkbox sd-selectbase__item",
        itemOnError: "sd-item--error",
        itemSelectAll: "sd-checkbox--selectall",
        itemNone: "sd-checkbox--none",
        itemDisabled: "sd-item--disabled sd-checkbox--disabled",
        itemChecked: "sd-item--checked sd-checkbox--checked",
        itemHover: "sd-item--allowhover sd-checkbox--allowhover",
        itemInline: "sd-selectbase__item--inline",
        label: "sd-selectbase__label",
        labelChecked: "",
        itemControl: "sd-visuallyhidden sd-item__control sd-checkbox__control",
        itemDecorator: "sd-item__svg sd-checkbox__svg",
        itemSvgIconId: "#icon-v2check",
        controlLabel: "sd-item__control-label",
        materialDecorator: "sd-item__decorator sd-checkbox__decorator",
        other: "sd-input sd-comment sd-selectbase__other",
        column: "sd-selectbase__column",
    },
    radiogroup: {
        root: "sd-selectbase",
        rootRow: "sd-selectbase--row",
        rootMultiColumn: "sd-selectbase--multi-column",
        item: "sd-item sd-radio sd-selectbase__item",
        itemOnError: "sd-item--error",
        itemInline: "sd-selectbase__item--inline",
        label: "sd-selectbase__label",
        labelChecked: "",
        itemDisabled: "sd-item--disabled sd-radio--disabled",
        itemChecked: "sd-item--checked sd-radio--checked",
        itemHover: "sd-item--allowhover sd-radio--allowhover",
        itemControl: "sd-visuallyhidden sd-item__control sd-radio__control",
        itemDecorator: "sd-item__svg sd-radio__svg",
        controlLabel: "sd-item__control-label",
        materialDecorator: "sd-item__decorator sd-radio__decorator",
        other: "sd-input sd-comment sd-selectbase__other",
        clearButton: "",
        column: "sd-selectbase__column"
    },
    boolean: {
        mainRoot: "sd-element sd-question sd-row__question sd-question--boolean",
        root: "sv_qcbc sv_qbln sd-scrollable-container",
        rootRadio: "sv_qcbc sv_qbln sd-scrollable-container sd-scrollable-container--compact",
        item: "sd-boolean",
        itemOnError: "sd-boolean--error",
        control: "sd-boolean__control sd-visuallyhidden",
        itemChecked: "sd-boolean--checked",
        itemIndeterminate: "sd-boolean--indeterminate",
        itemDisabled: "sd-boolean--disabled",
        label: "sd-boolean__label",
        switch: "sd-boolean__switch",
        disabledLabel: "sd-checkbox__label--disabled",
        sliderText: "sd-boolean__thumb-text",
        slider: "sd-boolean__thumb",
        //radio
        radioItem: "sd-item",
        radioItemChecked: "sd-item--checked sd-radio--checked",
        radioLabel: "sd-selectbase__label",
        radioControlLabel: "sd-item__control-label",
        radioFieldset: "sd-selectbase",
        itemRadioDecorator: "sd-item__svg sd-radio__svg",
        materialRadioDecorator: "sd-item__decorator sd-radio__decorator",
        itemRadioControl: "sd-visuallyhidden sd-item__control sd-radio__control",
        //end radio
        //checkbox
        rootCheckbox: "sd-selectbase",
        checkboxItem: "sd-item sd-selectbase__item sd-checkbox",
        checkboxLabel: "sd-selectbase__label",
        checkboxItemOnError: "sd-item--error",
        checkboxItemIndeterminate: "sd-checkbox--intermediate",
        checkboxItemChecked: "sd-item--checked sd-checkbox--checked",
        checkboxItemDecorator: "sd-item__svg sd-checkbox__svg",
        checkboxItemDisabled: "sd-checkbox--disabled",
        controlCheckbox: "sd-visuallyhidden sd-item__control sd-checkbox__control",
        checkboxMaterialDecorator: "sd-item__decorator sd-checkbox__decorator",
        checkboxControlLabel: "sd-item__control-label",
        svgIconCheckedId: "#icon-v2check",
    },
    text: {
        root: "sd-input sd-text",
        small: "sd-row__question--small",
        controlDisabled: "sd-input--disabled",
        onError: "sd-input--error"
    },
    multipletext: {
        root: "sd-multipletext",
        itemLabel: "sd-multipletext__item-container sd-input",
        itemLabelOnError: "sd-multipletext__item-container--error",
        item: "sd-multipletext__item",
        itemTitle: "sd-multipletext__item-title",
        row: "sd-multipletext__row",
        cell: "sd-multipletext__cell"
    },
    dropdown: {
        root: "sd-selectbase",
        small: "sd-row__question--small",
        selectWrapper: "",
        other: "sd-input sd-comment sd-selectbase__other",
        onError: "sd-input--error",
        label: "sd-selectbase__label",
        item: "sd-item sd-radio sd-selectbase__item",
        itemDisabled: "sd-item--disabled sd-radio--disabled",
        itemChecked: "sd-item--checked sd-radio--checked",
        itemHover: "sd-item--allowhover sd-radio--allowhover",
        itemControl: "sd-visuallyhidden sd-item__control sd-radio__control",
        itemDecorator: "sd-item__svg sd-radio__svg",
        cleanButton: "sd-dropdown_clean-button",
        cleanButtonSvg: "sd-dropdown_clean-button-svg",
        cleanButtonIconId: "icon-clear",
        control: "sd-input sd-dropdown",
        controlInputFieldComponent: "sd-dropdown__input-field-component",
        controlValue: "sd-dropdown__value",
        controlDisabled: "sd-input--disabled",
        controlEmpty: "sd-dropdown--empty",
        controlLabel: "sd-item__control-label",
        filterStringInput: "sd-dropdown__filter-string-input",
        materialDecorator: "sd-item__decorator sd-radio__decorator"
    },
    imagepicker: {
        mainRoot: "sd-element sd-question sd-row__question",
        root: "sd-selectbase sd-imagepicker",
        rootColumn: "sd-imagepicker--column",
        item: "sd-imagepicker__item",
        itemOnError: "sd-imagepicker__item--error",
        itemInline: "sd-imagepicker__item--inline",
        itemChecked: "sd-imagepicker__item--checked",
        itemDisabled: "sd-imagepicker__item--disabled",
        itemHover: "sd-imagepicker__item--allowhover",
        label: "sd-imagepicker__label",
        itemDecorator: "sd-imagepicker__item-decorator",
        imageContainer: "sd-imagepicker__image-container",
        itemControl: "sd-imagepicker__control sd-visuallyhidden",
        image: "sd-imagepicker__image",
        itemText: "sd-imagepicker__text",
        other: "sd-input sd-comment",
        itemNoImage: "sd-imagepicker__no-image",
        itemNoImageSvgIcon: "sd-imagepicker__no-image-svg",
        itemNoImageSvgIconId: "#icon-no-image",
        column: "sd-selectbase__column sd-imagepicker__column",
    },
    matrix: {
        mainRoot: "sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",
        tableWrapper: "sd-matrix",
        root: "sd-table sd-matrix__table",
        rootVerticalAlignTop: "sd-table--align-top",
        rootVerticalAlignMiddle: "sd-table--align-middle",
        rootAlternateRows: "sd-table--alternate-rows",
        rowError: "sd-matrix__row--error",
        cell: "sd-table__cell sd-matrix__cell",
        row: "sd-table__row",
        headerCell: "sd-table__cell sd-table__cell--header",
        rowTextCell: "sd-table__cell sd-matrix__cell sd-table__cell--row-text",
        label: "sd-item sd-radio sd-matrix__label",
        itemOnError: "sd-item--error",
        itemValue: "sd-visuallyhidden sd-item__control sd-radio__control",
        itemChecked: "sd-item--checked sd-radio--checked",
        itemDisabled: "sd-item--disabled sd-radio--disabled",
        itemHover: "sd-radio--allowhover",
        materialDecorator: "sd-item__decorator sd-radio__decorator",
        itemDecorator: "sd-item__svg sd-radio__svg",
        cellText: "sd-matrix__text",
        cellTextSelected: "sd-matrix__text--checked",
        cellTextDisabled: "sd-matrix__text--disabled",
        cellResponsiveTitle: "sd-matrix__responsive-title"
    },
    matrixdropdown: {
        mainRoot: "sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",
        rootScroll: "sd-question--scroll",
        root: "sd-table sd-matrixdropdown",
        rootVerticalAlignTop: "sd-table--align-top",
        rootVerticalAlignMiddle: "sd-table--align-middle",
        rootAlternateRows: "sd-table--alternate-rows",
        cell: "sd-table__cell",
        row: "sd-table__row",
        headerCell: "sd-table__cell sd-table__cell--header",
        rowTextCell: "sd-table__cell sd-table__cell--row-text",
        cellRequiredText: "sd-question__required-text",
        detailButton: "sd-table__cell--detail-button",
        detailButtonExpanded: "sd-table__cell--detail-button--expanded",
        detailIcon: "sd-detail-panel__icon",
        detailIconExpanded: "sd-detail-panel__icon--expanded",
        detailIconId: "icon-expanddetail",
        detailIconExpandedId: "icon-collapsedetail",
        actionsCell: "sd-table__cell sd-table__cell--actions",
        emptyCell: "sd-table__cell--empty",
        verticalCell: "sd-table__cell--vertical",
        cellQuestionWrapper: "sd-table__question-wrapper"
    },
    matrixdynamic: {
        mainRoot: "sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",
        rootScroll: "sd-question--scroll",
        empty: "sd-question--empty",
        root: "sd-table sd-matrixdynamic",
        cell: "sd-table__cell",
        row: "sd-table__row",
        headerCell: "sd-table__cell sd-table__cell--header",
        rowTextCell: "sd-table__cell sd-table__cell--row-text",
        cellRequiredText: "sd-question__required-text",
        button: "sd-action sd-matrixdynamic__btn",
        detailRow: "sd-table__row sd-table__row--detail",
        detailButton: "sd-table__cell--detail-button",
        detailButtonExpanded: "sd-table__cell--detail-button--expanded",
        detailIcon: "sd-detail-panel__icon",
        detailIconExpanded: "sd-detail-panel__icon--expanded",
        detailIconId: "icon-expanddetail",
        detailIconExpandedId: "icon-collapsedetail",
        detailPanelCell: "sd-table__cell--detail-panel",
        actionsCell: "sd-table__cell sd-table__cell--actions",
        buttonAdd: "sd-matrixdynamic__add-btn",
        buttonRemove: "sd-action--negative sd-matrixdynamic__remove-btn",
        iconAdd: "",
        iconRemove: "",
        dragElementDecorator: "sd-drag-element__svg",
        iconDragElement: "#icon-v2dragelement_16x16",
        footer: "sd-matrixdynamic__footer",
        emptyRowsSection: "sd-matrixdynamic__placeholder sd-question__placeholder",
        iconDrag: "sv-matrixdynamic__drag-icon",
        ghostRow: "sv-matrix-row--drag-drop-ghost-mod",
        emptyCell: "sd-table__cell--empty",
        verticalCell: "sd-table__cell--vertical",
        cellQuestionWrapper: "sd-table__question-wrapper"
    },
    rating: {
        rootDropdown: "sd-scrollable-container sd-scrollable-container--compact sd-selectbase",
        root: "sd-scrollable-container sd-rating",
        rootWrappable: "sd-scrollable-container sd-rating sd-rating--wrappable",
        item: "sd-rating__item",
        itemOnError: "sd-rating__item--error",
        itemHover: "sd-rating__item--allowhover",
        selected: "sd-rating__item--selected",
        minText: "sd-rating__item-text sd-rating__min-text",
        itemText: "sd-rating__item-text",
        maxText: "sd-rating__item-text sd-rating__max-text",
        itemDisabled: "sd-rating__item--disabled",
        control: "sd-input sd-dropdown",
        controlValue: "sd-dropdown__value",
        controlDisabled: "sd-input--disabled",
        controlEmpty: "sd-dropdown--empty",
        filterStringInput: "sd-dropdown__filter-string-input",
        onError: "sd-input--error",
    },
    comment: {
        root: "sd-input sd-comment",
        small: "sd-row__question--small",
        controlDisabled: "sd-input--disabled",
        onError: "sd-input--error"
    },
    expression: "",
    file: {
        root: "sd-file",
        other: "sd-input sd-comment",
        placeholderInput: "sd-visuallyhidden",
        preview: "sd-file__preview",
        fileSign: "",
        fileList: "sd-file__list",
        fileSignBottom: "sd-file__sign",
        dragArea: "sd-file__drag-area",
        dragAreaActive: "sd-file__drag-area--active",
        fileDecorator: "sd-file__decorator",
        onError: "sd-file__decorator--error",
        fileDecoratorDrag: "sd-file__decorator--drag",
        fileInput: "sd-visuallyhidden",
        noFileChosen: "sd-description sd-file__no-file-chosen",
        chooseFile: "sd-file__choose-btn",
        chooseFileAsText: "sd-action sd-file__choose-btn--text",
        chooseFileAsTextDisabled: "sd-action--disabled",
        chooseFileAsIcon: "sd-context-btn sd-file__choose-btn--icon",
        chooseFileIconId: "icon-choosefile",
        disabled: "sd-file__choose-btn--disabled",
        removeButton: "sd-context-btn sd-context-btn--negative sd-file__btn sd-file__clean-btn",
        removeButtonBottom: "",
        removeButtonIconId: "icon-clear",
        removeFile: "sd-hidden",
        removeFileSvg: "",
        removeFileSvgIconId: "icon-delete",
        wrapper: "sd-file__wrapper",
        defaultImage: "sd-file__default-image",
        defaultImageIconId: "icon-defaultfile",
        leftIconId: "icon-arrowleft",
        rightIconId: "icon-arrowright",
        removeFileButton: "sd-context-btn sd-context-btn--negative sd-file__remove-file-button",
        dragAreaPlaceholder: "sd-file__drag-area-placeholder",
        imageWrapper: "sd-file__image-wrapper",
        single: "sd-file--single",
        singleImage: "sd-file--single-image",
        mobile: "sd-file--mobile",
    },
    signaturepad: {
        mainRoot: "sd-element sd-question sd-question--signature sd-row__question",
        root: "sd-signaturepad sjs_sp_container",
        small: "sd-row__question--small",
        controls: "sjs_sp_controls sd-signaturepad__controls",
        placeholder: "sjs_sp_placeholder",
        clearButton: "sjs_sp_clear sd-context-btn sd-context-btn--negative sd-signaturepad__clear",
        clearButtonIconId: "icon-clear"
    },
    saveData: {
        root: "",
        saving: "",
        error: "",
        success: "",
        saveAgainButton: ""
    },
    window: {
        root: "sv_window",
        body: "sv_window_content",
        header: {
            root: "sv_window_title",
            title: "",
            button: "",
            buttonExpanded: "",
            buttonCollapsed: ""
        }
    },
    ranking: {
        root: "sv-ranking",
        rootMobileMod: "sv-ranking--mobile",
        rootDragMod: "sv-ranking--drag",
        rootDisabled: "sd-ranking--disabled",
        rootDesignMode: "sv-ranking--design-mode",
        item: "sv-ranking-item",
        itemContent: "sv-ranking-item__content sd-ranking-item__content",
        itemIndex: "sv-ranking-item__index",
        // itemText: "sv-ranking-item__text",
        controlLabel: "sv-ranking-item__text",
        itemGhostNode: "sv-ranking-item__ghost",
        itemIconContainer: "sv-ranking-item__icon-container",
        itemIcon: "sv-ranking-item__icon",
        itemIconHoverMod: "sv-ranking-item__icon--hover",
        itemIconFocusMod: "sv-ranking-item__icon--focus",
        itemGhostMod: "sv-ranking-item--ghost",
        itemDragMod: "sv-ranking--drag",
        itemOnError: "sv-ranking-item--error",
    },
    buttongroup: {
        root: "sv-button-group",
        item: "sv-button-group__item",
        itemIcon: "sv-button-group__item-icon",
        itemDecorator: "sv-button-group__item-decorator",
        itemCaption: "sv-button-group__item-caption",
        itemHover: "sv-button-group__item--hover",
        itemSelected: "sv-button-group__item--selected",
        itemDisabled: "sv-button-group__item--disabled",
        itemControl: "sv-visuallyhidden",
    },
    list: {
        root: "sv-list__container sd-list",
        item: "sv-list__item sd-list__item",
        itemBody: "sv-list__item-body sd-list__item-body",
        itemSelected: "sv-list__item--selected sd-list__item--selected"
    },
    actionBar: {
        root: "sd-action-bar",
        item: "sd-action",
        defaultSizeMode: "",
        smallSizeMode: "",
        itemPressed: "sd-action--pressed",
        itemAsIcon: "sd-action--icon",
        itemIcon: "sd-action__icon",
        itemTitle: "sd-action__title",
    },
    variables: {
        mobileWidth: "--sd-mobile-width",
        imagepickerGapBetweenItems: "--sd-imagepicker-gap",
        themeMark: "--sv-defaultV2-mark"
    },
    tagbox: {
        root: "sd-selectbase",
        small: "sd-row__question--small",
        selectWrapper: "",
        other: "sd-input sd-comment sd-selectbase__other",
        onError: "sd-input--error",
        label: "sd-selectbase__label",
        item: "sd-item sd-radio sd-selectbase__item",
        itemDisabled: "sd-item--disabled sd-radio--disabled",
        itemChecked: "sd-item--checked sd-radio--checked",
        itemHover: "sd-item--allowhover sd-radio--allowhover",
        itemControl: "sd-visuallyhidden sd-item__control sd-radio__control",
        itemDecorator: "sd-item__svg sd-radio__svg",
        cleanButton: "sd-tagbox_clean-button sd-dropdown_clean-button",
        cleanButtonSvg: "sd-tagbox_clean-button-svg sd-dropdown_clean-button-svg",
        cleanButtonIconId: "icon-clear",
        cleanItemButton: "sd-tagbox-item_clean-button",
        cleanItemButtonSvg: "sd-tagbox-item_clean-button-svg",
        cleanItemButtonIconId: "icon-clear_16x16",
        control: "sd-input sd-tagbox sd-dropdown",
        controlValue: "sd-tagbox__value sd-dropdown__value",
        controlValueItems: "sd-tagbox__value-items",
        placeholderInput: "sd-tagbox__placeholder",
        controlDisabled: "sd-input--disabled",
        controlEmpty: "sd-dropdown--empty sd-tagbox--empty",
        controlLabel: "sd-item__control-label",
        filterStringInput: "sd-tagbox__filter-string-input sd-dropdown__filter-string-input",
        materialDecorator: "sd-item__decorator sd-checkbox__decorator"
    },
};
_cssstandard__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]["defaultV2"] = defaultV2Css;


/***/ }),

/***/ "./src/defaultTitle.ts":
/*!*****************************!*\
  !*** ./src/defaultTitle.ts ***!
  \*****************************/
/*! exports provided: DefaultTitleModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultTitleModel", function() { return DefaultTitleModel; });
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");

var DefaultTitleModel = /** @class */ (function () {
    function DefaultTitleModel() {
    }
    DefaultTitleModel.getIconCss = function (cssClasses, isCollapsed) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]()
            .append(cssClasses.icon)
            .append(cssClasses.iconExpanded, !isCollapsed)
            .toString();
    };
    return DefaultTitleModel;
}());



/***/ }),

/***/ "./src/dragdrop/choices.ts":
/*!*********************************!*\
  !*** ./src/dragdrop/choices.ts ***!
  \*********************************/
/*! exports provided: DragDropChoices */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropChoices", function() { return DragDropChoices; });
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ "./src/dragdrop/core.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

var DragDropChoices = /** @class */ (function (_super) {
    __extends(DragDropChoices, _super);
    function DragDropChoices() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.doDragOver = function () {
            if (_this.parentElement.getType() === "imagepicker")
                return;
            var node = _this.draggedElementShortcut.querySelector(".svc-item-value-controls__button");
            node.style.cursor = "grabbing";
        };
        _this.doBanDropHere = function () {
            if (_this.parentElement.getType() === "imagepicker")
                return;
            var node = _this.draggedElementShortcut.querySelector(".svc-item-value-controls__button");
            node.style.cursor = "not-allowed";
        };
        return _this;
    }
    Object.defineProperty(DragDropChoices.prototype, "draggedElementType", {
        get: function () {
            return "item-value";
        },
        enumerable: false,
        configurable: true
    });
    DragDropChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
        if (this.parentElement.getType() === "imagepicker") {
            return this.createImagePickerShortcut(this.draggedElement, text, draggedElementNode, event);
        }
        var draggedElementShortcut = document.createElement("div");
        // draggedElementShortcut.innerText = text;
        draggedElementShortcut.style.cssText = " \n          cursor: grabbing;\n          position: absolute;\n          z-index: 1000;\n          font-family: \"Open Sans\";\n        ";
        var isDeepClone = true;
        var clone = (draggedElementNode
            .closest("[data-sv-drop-target-item-value]")
            .cloneNode(isDeepClone));
        clone.style.cssText = "\n      min-width: 100px;\n      box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n      background-color: var(--background, white);\n      border-radius: 36px;\n      padding-right: 16px;\n      margin-left: 0;\n    ";
        var dragIcon = clone.querySelector(".svc-item-value-controls__drag-icon");
        dragIcon.style.visibility = "visible";
        var removeIcon = clone.querySelector(".svc-item-value-controls__remove");
        removeIcon.style.backgroundColor = "transparent";
        clone.classList.remove("svc-item-value--moveup");
        clone.classList.remove("svc-item-value--movedown");
        this.draggedElement.isDragDropMoveDown = false;
        this.draggedElement.isDragDropMoveUp = false;
        draggedElementShortcut.appendChild(clone);
        var rect = draggedElementNode.getBoundingClientRect();
        draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
        draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
        this.isBottom = null;
        return draggedElementShortcut;
    };
    DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
        var draggedElementShortcut = document.createElement("div");
        draggedElementShortcut.style.cssText = " \n      cursor: grabbing;\n      position: absolute;\n      z-index: 1000;\n      box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n      padding: 4px;\n      border-radius: 4px;\n      background: white;\n    ";
        var itemValueNode = draggedElementNode.closest("[data-sv-drop-target-item-value]");
        var controlsNode = itemValueNode.querySelector(".svc-image-item-value-controls");
        var imageContainerNode = itemValueNode.querySelector(".sd-imagepicker__image-container");
        var imageNode = itemValueNode.querySelector(item.imageLink ? "img" : ".sd-imagepicker__no-image").cloneNode(true);
        controlsNode.style.display = "none";
        imageContainerNode.style.width = imageNode.width + "px";
        imageContainerNode.style.height = imageNode.height + "px";
        imageNode.style.objectFit = "cover";
        imageNode.style.borderRadius = "4px";
        draggedElementShortcut.appendChild(imageNode);
        return draggedElementShortcut;
    };
    DragDropChoices.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
        var result = dragOverNode.closest(this.dropTargetDataAttributeName);
        return result;
    };
    DragDropChoices.prototype.getDropTargetByDataAttributeValue = function (dataAttributeValue) {
        var dragOverChoice;
        dragOverChoice = this.parentElement.choices.filter(function (choice) { return "" + choice.value == dataAttributeValue; })[0];
        return dragOverChoice;
    };
    DragDropChoices.prototype.getVisibleChoices = function () {
        var parent = this.parentElement;
        if (parent.getType() === "ranking")
            return parent.rankingChoices;
        return parent.visibleChoices;
    };
    DragDropChoices.prototype.isDropTargetValid = function (dropTarget) {
        var choices = this.getVisibleChoices();
        if (this.parentElement.getType() !== "imagepicker") {
            var dropTargetIndex = choices.indexOf(this.dropTarget);
            var draggedElementIndex = choices.indexOf(this.draggedElement);
            if (draggedElementIndex > dropTargetIndex && this.dropTarget.isDragDropMoveUp) {
                this.dropTarget.isDragDropMoveUp = false;
                return false;
            }
            if (draggedElementIndex < dropTargetIndex && this.dropTarget.isDragDropMoveDown) {
                this.dropTarget.isDragDropMoveDown = false;
                return false;
            }
        }
        // shouldn't allow to drop on "adorners" (selectall, none, other)
        if (choices.indexOf(dropTarget) === -1)
            return false;
        return true;
    };
    DragDropChoices.prototype.calculateIsBottom = function (clientY) {
        var choices = this.getVisibleChoices();
        return (choices.indexOf(this.dropTarget) - choices.indexOf(this.draggedElement) >
            0);
    };
    DragDropChoices.prototype.afterDragOver = function (dropTargetNode) {
        if (this.isDropTargetDoesntChanged(this.isBottom))
            return;
        if (this.dropTarget === this.draggedElement)
            return;
        var choices = this.getVisibleChoices();
        var dropTargetIndex = choices.indexOf(this.dropTarget);
        var draggedElementIndex = choices.indexOf(this.draggedElement);
        choices.splice(draggedElementIndex, 1);
        choices.splice(dropTargetIndex, 0, this.draggedElement);
        if (this.parentElement.getType() === "imagepicker")
            return;
        if (draggedElementIndex !== dropTargetIndex) {
            dropTargetNode.classList.remove("svc-item-value--moveup");
            dropTargetNode.classList.remove("svc-item-value--movedown");
            this.dropTarget.isDragDropMoveDown = false;
            this.dropTarget.isDragDropMoveUp = false;
        }
        if (draggedElementIndex > dropTargetIndex) {
            this.dropTarget.isDragDropMoveDown = true;
        }
        if (draggedElementIndex < dropTargetIndex) {
            this.dropTarget.isDragDropMoveUp = true;
        }
        _super.prototype.ghostPositionChanged.call(this);
    };
    DragDropChoices.prototype.doDrop = function () {
        var choices = this.parentElement.choices;
        var filteredChoices = this.getVisibleChoices().filter(function (item) {
            return choices.indexOf(item) !== -1;
        });
        var oldIndex = choices.indexOf(this.draggedElement);
        var newIndex = filteredChoices.indexOf(this.draggedElement);
        choices.splice(oldIndex, 1);
        choices.splice(newIndex, 0, this.draggedElement);
        return this.parentElement;
    };
    DragDropChoices.prototype.doClear = function () {
        this.updateVisibleChoices();
    };
    DragDropChoices.prototype.updateVisibleChoices = function () {
        var parent = this.parentElement;
        this.parentElement.getType() === "ranking" ?
            parent.updateRankingChoices() :
            parent["updateVisibleChoices"]();
    };
    return DragDropChoices;
}(_core__WEBPACK_IMPORTED_MODULE_0__["DragDropCore"]));



/***/ }),

/***/ "./src/dragdrop/core.ts":
/*!******************************!*\
  !*** ./src/dragdrop/core.ts ***!
  \******************************/
/*! exports provided: DragDropCore */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropCore", function() { return DragDropCore; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base */ "./src/base.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




// WebKit requires cancelable `touchmove` events to be added as early as possible
// see https://bugs.webkit.org/show_bug.cgi?id=184250
if (typeof window !== "undefined") {
    window.addEventListener("touchmove", function (event) {
        if (!DragDropCore.PreventScrolling) {
            return;
        }
        // Prevent scrolling
        event.preventDefault();
    }, { passive: false });
}
var DragDropCore = /** @class */ (function (_super) {
    __extends(DragDropCore, _super);
    function DragDropCore(surveyValue, creator, longTap) {
        var _this = _super.call(this) || this;
        _this.surveyValue = surveyValue;
        _this.creator = creator;
        _this.longTap = longTap;
        _this.onGhostPositionChanged = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
        _this.onBeforeDrop = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
        _this.onAfterDrop = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
        _this.draggedElement = null;
        _this.dropTarget = null;
        _this.prevDropTarget = null;
        _this.draggedElementShortcut = null;
        _this.scrollIntervalId = null;
        _this.allowDropHere = false;
        _this.stopLongTapIfMoveEnough = function (pointerMoveEvent) {
            pointerMoveEvent.preventDefault();
            _this.currentX = pointerMoveEvent.pageX;
            _this.currentY = pointerMoveEvent.pageY;
            if (_this.isMicroMovement)
                return;
            document.body.style.setProperty("touch-action", "");
            document.body.style.setProperty("user-select", "");
            document.body.style.setProperty("-webkit-user-select", "");
            _this.stopLongTap();
        };
        _this.stopLongTap = function (e) {
            clearTimeout(_this.timeoutID);
            _this.timeoutID = null;
            document.removeEventListener("pointerup", _this.stopLongTap);
            document.removeEventListener("pointermove", _this.stopLongTapIfMoveEnough);
        };
        _this.onContextMenu = function (event) {
            event.preventDefault();
            event.stopPropagation();
        };
        _this.dragOver = function (event) {
            _this.moveShortcutElement(event);
            _this.draggedElementShortcut.style.cursor = "grabbing";
            var dropTargetNode = _this.findDropTargetNodeFromPoint(event.clientX, event.clientY);
            if (!dropTargetNode) {
                _this.banDropHere();
                return;
            }
            _this.dropTarget = _this.getDropTargetByNode(dropTargetNode, event);
            var isDropTargetValid = _this.isDropTargetValid(_this.dropTarget, dropTargetNode);
            _this.doDragOver(dropTargetNode, event);
            if (!isDropTargetValid) {
                _this.banDropHere();
                return;
            }
            var isBottom = _this.calculateIsBottom(event.clientY, dropTargetNode);
            _this.allowDropHere = true;
            if (_this.isDropTargetDoesntChanged(isBottom))
                return;
            _this.isBottom = null; //TODO need for property change trigger with guarantee but it would be better not to watch on isBottom property but have some event like onValidTargetDragOver
            _this.isBottom = isBottom;
            _this.afterDragOver(dropTargetNode, event);
            _this.prevDropTarget = _this.dropTarget;
        };
        _this.drop = function () {
            if (_this.allowDropHere) {
                _this.onBeforeDrop.fire(_this, null);
                var newElement = _this.doDrop();
                _this.onAfterDrop.fire(_this, { draggedElement: newElement });
            }
            _this.clear();
        };
        _this.handlePointerCancel = function (event) {
            _this.clear();
        };
        _this.handleEscapeButton = function (event) {
            if (event.keyCode == 27) {
                _this.clear();
            }
        };
        _this.banDropHere = function () {
            _this.allowDropHere = false;
            _this.doBanDropHere();
            _this.dropTarget = null;
            _this.draggedElementShortcut.style.cursor = "not-allowed";
            _this.isBottom = null;
        };
        _this.doBanDropHere = function () { };
        _this.clear = function () {
            cancelAnimationFrame(_this.scrollIntervalId);
            document.removeEventListener("pointermove", _this.dragOver);
            document.removeEventListener("pointercancel", _this.handlePointerCancel);
            document.removeEventListener("keydown", _this.handleEscapeButton);
            document.removeEventListener("pointerup", _this.drop);
            _this.draggedElementShortcut.removeEventListener("pointerup", _this.drop);
            if (_utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
                _this.draggedElementShortcut.removeEventListener("contextmenu", _this.onContextMenu);
            }
            document.body.removeChild(_this.draggedElementShortcut);
            _this.doClear();
            _this.dropTarget = null;
            _this.draggedElementShortcut = null;
            _this.draggedElement = null;
            _this.isBottom = null;
            _this.parentElement = null;
            _this.scrollIntervalId = null;
            if (_utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
                _this.savedTargetNode && document.body.removeChild(_this.savedTargetNode);
                DragDropCore.PreventScrolling = false;
            }
            document.body.style.setProperty("touch-action", "");
            document.body.style.setProperty("user-select", "");
            document.body.style.setProperty("-webkit-user-select", "");
        };
        return _this;
    }
    DragDropCore.prototype.ghostPositionChanged = function () {
        this.onGhostPositionChanged.fire({}, {});
    };
    Object.defineProperty(DragDropCore.prototype, "dropTargetDataAttributeName", {
        get: function () {
            return "[data-sv-drop-target-".concat(this.draggedElementType, "]");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DragDropCore.prototype, "survey", {
        get: function () {
            return this.surveyValue || this.creator.survey;
        },
        enumerable: false,
        configurable: true
    });
    DragDropCore.prototype.startDrag = function (event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode) {
        if (preventSaveTargetNode === void 0) { preventSaveTargetNode = false; }
        if (_utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
            this.startLongTapProcessing(event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode);
            return;
        }
        this.doStartDrag(event, draggedElement, parentElement, draggedElementNode);
    };
    DragDropCore.prototype.startLongTapProcessing = function (event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode) {
        var _this = this;
        if (preventSaveTargetNode === void 0) { preventSaveTargetNode = false; }
        this.startX = event.pageX;
        this.startY = event.pageY;
        document.body.style.setProperty("touch-action", "none", "important");
        document.body.style.setProperty("user-select", "none", "important");
        document.body.style.setProperty("-webkit-user-select", "none", "important");
        this.timeoutID = setTimeout(function () {
            _this.doStartDrag(event, draggedElement, parentElement, draggedElementNode);
            if (!preventSaveTargetNode) {
                _this.savedTargetNode = event.target;
                _this.savedTargetNode.style.cssText =
                    "\n          position: absolute;\n          height: 1px!important;\n          width: 1px!important;\n          overflow: hidden;\n          clip: rect(1px 1px 1px 1px);\n          clip: rect(1px, 1px, 1px, 1px);\n        ";
                document.body.appendChild(_this.savedTargetNode);
            }
            _this.stopLongTap();
        }, this.longTap ? 500 : 0);
        document.addEventListener("pointerup", this.stopLongTap);
        document.addEventListener("pointermove", this.stopLongTapIfMoveEnough);
    };
    Object.defineProperty(DragDropCore.prototype, "isMicroMovement", {
        // see https://stackoverflow.com/questions/6042202/how-to-distinguish-mouse-click-and-drag
        get: function () {
            var delta = 5;
            var diffX = Math.abs(this.currentX - this.startX);
            var diffY = Math.abs(this.currentY - this.startY);
            return diffX < delta && diffY < delta;
        },
        enumerable: false,
        configurable: true
    });
    // EO long tap
    DragDropCore.prototype.doStartDrag = function (event, draggedElement, parentElement, draggedElementNode) {
        if (_utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
            DragDropCore.PreventScrolling = true;
        }
        if (event.which === 3)
            return; //right mouse btn
        this.draggedElement = draggedElement;
        this.parentElement = parentElement;
        this.onStartDrag();
        var shortcutText = this.getShortcutText(this.draggedElement);
        this.draggedElementShortcut = this.createDraggedElementShortcut(shortcutText, draggedElementNode, event);
        document.body.append(this.draggedElementShortcut);
        this.moveShortcutElement(event);
        document.addEventListener("pointermove", this.dragOver);
        document.addEventListener("pointercancel", this.handlePointerCancel);
        document.addEventListener("keydown", this.handleEscapeButton);
        document.addEventListener("pointerup", this.drop);
        if (!_utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
            this.draggedElementShortcut.addEventListener("pointerup", this.drop);
        }
        else {
            this.draggedElementShortcut.addEventListener("contextmenu", this.onContextMenu);
        }
    };
    DragDropCore.prototype.isDropTargetDoesntChanged = function (newIsBottom) {
        return (this.dropTarget === this.prevDropTarget && newIsBottom === this.isBottom);
    };
    DragDropCore.prototype.onStartDrag = function () { };
    DragDropCore.prototype.getShortcutText = function (draggedElement) {
        return draggedElement.shortcutText;
    };
    DragDropCore.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
        var draggedElementShortcut = document.createElement("div");
        draggedElementShortcut.innerText = text;
        draggedElementShortcut.className = this.getDraggedElementClass();
        return draggedElementShortcut;
    };
    DragDropCore.prototype.getDraggedElementClass = function () {
        return "sv-dragged-element-shortcut";
    };
    DragDropCore.prototype.doDragOver = function (dropTargetNode, event) { };
    DragDropCore.prototype.afterDragOver = function (dropTargetNode, event) { };
    DragDropCore.prototype.getGhostPosition = function (item) {
        if (this.dropTarget !== item)
            return null;
        if (this.isBottom)
            return "bottom";
        return "top";
    };
    DragDropCore.prototype.moveShortcutElement = function (event) {
        this.doScroll(event.clientY, event.clientX);
        var shortcutHeight = this.draggedElementShortcut.offsetHeight;
        var shortcutWidth = this.draggedElementShortcut.offsetWidth;
        var shortcutXOffset = this.draggedElementShortcut.shortcutXOffset || shortcutWidth / 2;
        var shortcutYOffset = this.draggedElementShortcut.shortcutYOffset || shortcutHeight / 2;
        // TODO this is hot fix for RTL support. Probably we need better global strategy for it. https://github.com/surveyjs/survey-library/issues/4554
        if (document.querySelectorAll("[dir='rtl']").length !== 0) {
            shortcutXOffset = shortcutWidth / 2;
            shortcutYOffset = shortcutHeight / 2;
        }
        var documentBottom = document.documentElement.clientHeight;
        var documentRight = document.documentElement.clientWidth;
        var shortcutBottomCoordinate = this.getShortcutBottomCoordinate(event.clientY, shortcutHeight, shortcutYOffset);
        var shortcutRightCoordinate = this.getShortcutRightCoordinate(event.clientX, shortcutWidth, shortcutXOffset);
        if (shortcutRightCoordinate >= documentRight) {
            this.draggedElementShortcut.style.left =
                event.pageX -
                    event.clientX +
                    documentRight -
                    shortcutWidth +
                    "px";
            this.draggedElementShortcut.style.top =
                event.pageY - shortcutYOffset + "px";
            return;
        }
        if (event.clientX - shortcutXOffset <= 0) {
            this.draggedElementShortcut.style.left =
                event.pageX - event.clientX + "px";
            this.draggedElementShortcut.style.top =
                event.pageY - shortcutYOffset + "px";
            return;
        }
        if (shortcutBottomCoordinate >= documentBottom) {
            this.draggedElementShortcut.style.left =
                event.pageX - shortcutXOffset + "px";
            this.draggedElementShortcut.style.top =
                event.pageY -
                    event.clientY +
                    documentBottom -
                    shortcutHeight +
                    "px";
            return;
        }
        if (event.clientY - shortcutYOffset <= 0) {
            this.draggedElementShortcut.style.left =
                event.pageX - shortcutXOffset + "px";
            this.draggedElementShortcut.style.top =
                event.pageY - event.clientY + "px";
            return;
        }
        this.draggedElementShortcut.style.left =
            event.pageX - shortcutXOffset + "px";
        this.draggedElementShortcut.style.top =
            event.pageY - shortcutYOffset + "px";
    };
    DragDropCore.prototype.getShortcutBottomCoordinate = function (currentY, shortcutHeight, shortcutYOffset) {
        return currentY + shortcutHeight - shortcutYOffset;
    };
    DragDropCore.prototype.getShortcutRightCoordinate = function (currentX, shortcutWidth, shortcutXOffset) {
        return currentX + shortcutWidth - shortcutXOffset;
    };
    DragDropCore.prototype.doScroll = function (clientY, clientX) {
        var _this = this;
        cancelAnimationFrame(this.scrollIntervalId);
        var startScrollBoundary = 50;
        this.draggedElementShortcut.hidden = true;
        var dragOverNode = document.elementFromPoint(clientX, clientY);
        this.draggedElementShortcut.hidden = false;
        var scrollableParentNode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["findScrollableParent"])(dragOverNode);
        var top;
        var bottom;
        var left;
        var right;
        if (scrollableParentNode.tagName === "HTML") {
            top = 0;
            bottom = document.documentElement.clientHeight;
            left = 0;
            right = document.documentElement.clientWidth;
        }
        else {
            top = scrollableParentNode.getBoundingClientRect().top;
            bottom = scrollableParentNode.getBoundingClientRect().bottom;
            left = scrollableParentNode.getBoundingClientRect().left;
            right = scrollableParentNode.getBoundingClientRect().right;
        }
        var repeat = function () {
            if (clientY - top <= startScrollBoundary) {
                scrollableParentNode.scrollTop -= 15;
            }
            else if (bottom - clientY <= startScrollBoundary) {
                scrollableParentNode.scrollTop += 15;
            }
            else if (right - clientX <= startScrollBoundary) {
                scrollableParentNode.scrollLeft += 15;
            }
            else if (clientX - left <= startScrollBoundary) {
                scrollableParentNode.scrollLeft -= 15;
            }
            _this.scrollIntervalId = requestAnimationFrame(repeat);
        };
        this.scrollIntervalId = requestAnimationFrame(repeat);
    };
    DragDropCore.prototype.getDataAttributeValueByNode = function (node) {
        var _this = this;
        var datasetName = "svDropTarget";
        var words = this.draggedElementType.split("-");
        words.forEach(function (word) {
            datasetName += _this.capitalizeFirstLetter(word);
        });
        return node.dataset[datasetName];
    };
    DragDropCore.prototype.getDropTargetByNode = function (dropTargetNode, event) {
        var dataAttributeValue = this.getDataAttributeValueByNode(dropTargetNode);
        return this.getDropTargetByDataAttributeValue(dataAttributeValue, dropTargetNode, event);
    };
    DragDropCore.prototype.capitalizeFirstLetter = function (string) {
        return string.charAt(0).toUpperCase() + string.slice(1);
    };
    DragDropCore.prototype.calculateVerticalMiddleOfHTMLElement = function (HTMLElement) {
        var rect = HTMLElement.getBoundingClientRect();
        return rect.y + rect.height / 2;
    };
    DragDropCore.prototype.calculateHorizontalMiddleOfHTMLElement = function (HTMLElement) {
        var rect = HTMLElement.getBoundingClientRect();
        return rect.x + rect.width / 2;
    };
    DragDropCore.prototype.findDropTargetNodeFromPoint = function (clientX, clientY) {
        this.draggedElementShortcut.hidden = true;
        var dragOverNode = document.elementFromPoint(clientX, clientY);
        this.draggedElementShortcut.hidden = false;
        if (!dragOverNode)
            return null;
        return this.findDropTargetNodeByDragOverNode(dragOverNode);
    };
    DragDropCore.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
        var result = dragOverNode.querySelector(this.dropTargetDataAttributeName) ||
            dragOverNode.closest(this.dropTargetDataAttributeName);
        return result;
    };
    DragDropCore.prototype.doClear = function () { };
    DragDropCore.PreventScrolling = false;
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
            defaultValue: null,
            onSet: function (val, target) {
                target.ghostPositionChanged();
            },
        })
    ], DragDropCore.prototype, "isBottom", void 0);
    return DragDropCore;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));



/***/ }),

/***/ "./src/dragdrop/matrix-rows.ts":
/*!*************************************!*\
  !*** ./src/dragdrop/matrix-rows.ts ***!
  \*************************************/
/*! exports provided: DragDropMatrixRows */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropMatrixRows", function() { return DragDropMatrixRows; });
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ "./src/dragdrop/core.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

var DragDropMatrixRows = /** @class */ (function (_super) {
    __extends(DragDropMatrixRows, _super);
    function DragDropMatrixRows() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.fromIndex = null;
        _this.toIndex = null;
        _this.doDrop = function () {
            _this.parentElement.moveRowByIndex(_this.fromIndex, _this.toIndex);
            return _this.parentElement;
        };
        return _this;
    }
    Object.defineProperty(DragDropMatrixRows.prototype, "draggedElementType", {
        get: function () {
            return "matrix-row";
        },
        enumerable: false,
        configurable: true
    });
    DragDropMatrixRows.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
        var _this = this;
        var draggedElementShortcut = document.createElement("div");
        // draggedElementShortcut.innerText = text;
        draggedElementShortcut.style.cssText = " \n          cursor: grabbing;\n          position: absolute;\n          z-index: 1000;\n          font-family: \"Open Sans\";\n        ";
        var isDeepClone = true;
        var row = (draggedElementNode
            .closest("[data-sv-drop-target-matrix-row]"));
        var clone = (row.cloneNode(isDeepClone));
        clone.style.cssText = "\n      box-shadow: rgb(0 0 0 / 10%) 0px 8px 16px;\n      background-color: white;\n      display: flex;\n      flex-grow: 0;\n      flex-shrink: 0;\n      align-items: center;\n      line-height: 0;\n      width: ".concat(row.offsetWidth, "px;\n    ");
        clone.classList.remove("sv-matrix__drag-drop--moveup");
        clone.classList.remove("sv-matrix__drag-drop--movedown");
        this.draggedElement.isDragDropMoveDown = false;
        this.draggedElement.isDragDropMoveUp = false;
        draggedElementShortcut.appendChild(clone);
        var rect = draggedElementNode.getBoundingClientRect();
        draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
        draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
        //this.isBottom = null;
        var renderedRows = this.parentElement.renderedTable.rows;
        renderedRows.forEach(function (renderedRow, index) {
            if (renderedRow.row === _this.draggedElement) {
                renderedRow.isGhostRow = true;
            }
        });
        this.fromIndex = this.parentElement.visibleRows.indexOf(this.draggedElement);
        return draggedElementShortcut;
    };
    // protected ghostPositionChanged(): void {
    //   let ghostPosition;
    //   this.parentElement.renderedTable.rows.forEach(
    //     (renderedRow: QuestionMatrixDropdownRenderedRow) => {
    //       ghostPosition = this.getGhostPosition(
    //         renderedRow.row
    //       );
    //       renderedRow.isGhostRow = !ghostPosition;
    //     }
    //   );
    //   super.ghostPositionChanged();
    // }
    DragDropMatrixRows.prototype.getDropTargetByDataAttributeValue = function (dataAttributeValue) {
        var matrix = this.parentElement;
        var dropTargetRenderedRow;
        dropTargetRenderedRow = matrix.renderedTable.rows.filter(function (renderedRow) { return renderedRow.row.id === dataAttributeValue; })[0];
        return dropTargetRenderedRow.row;
    };
    DragDropMatrixRows.prototype.isDropTargetValid = function (dropTarget) {
        return true;
    };
    DragDropMatrixRows.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
        var result = dragOverNode.closest(this.dropTargetDataAttributeName);
        return result;
    };
    DragDropMatrixRows.prototype.calculateIsBottom = function (clientY) {
        var rendreredRows = this.parentElement.renderedTable.rows;
        var rows = rendreredRows.map(function (rendredRow) { return rendredRow.row; });
        return (rows.indexOf(this.dropTarget) - rows.indexOf(this.draggedElement) > 0);
    };
    DragDropMatrixRows.prototype.afterDragOver = function (dropTargetNode) {
        var _this = this;
        if (this.isDropTargetDoesntChanged(this.isBottom))
            return;
        if (this.dropTarget === this.draggedElement)
            return;
        var dropTargetIndex;
        var draggedElementIndex;
        var draggedRenderedRow;
        var renderedRows = this.parentElement.renderedTable.rows;
        renderedRows.forEach(function (renderedRow, index) {
            if (renderedRow.row === _this.dropTarget) {
                // renderedRow.isGhostRow = true;
                dropTargetIndex = index;
            }
            if (renderedRow.row === _this.draggedElement) {
                draggedRenderedRow = renderedRow;
                draggedElementIndex = index;
                draggedRenderedRow.isGhostRow = true;
            }
        });
        renderedRows.splice(draggedElementIndex, 1);
        renderedRows.splice(dropTargetIndex, 0, draggedRenderedRow);
        this.toIndex = dropTargetIndex;
        // const matrix = this.parentElement;
        // const fromIndex = matrix.visibleRows.indexOf(this.draggedElement);
        // const toIndex = matrix.visibleRows.indexOf(this.dropTarget);
        // matrix.moveRowByIndex(fromIndex, toIndex);
        // if (draggedElementIndex !== dropTargetIndex) {
        //   dropTargetNode.classList.remove("sv-matrix__drag-drop--moveup");
        //   dropTargetNode.classList.remove("sv-matrix__drag-drop--movedown");
        //   this.dropTarget.isDragDropMoveDown = false;
        //   this.dropTarget.isDragDropMoveUp = false;
        // }
        // if (draggedElementIndex > dropTargetIndex) {
        //   this.dropTarget.isDragDropMoveDown = true;
        // }
        // if (draggedElementIndex < dropTargetIndex) {
        //   this.dropTarget.isDragDropMoveUp = true;
        // }
        _super.prototype.ghostPositionChanged.call(this);
    };
    DragDropMatrixRows.prototype.doClear = function () {
        this.parentElement["resetRenderedTable"]();
        this.fromIndex = null;
        this.toIndex = null;
    };
    return DragDropMatrixRows;
}(_core__WEBPACK_IMPORTED_MODULE_0__["DragDropCore"]));



/***/ }),

/***/ "./src/dragdrop/ranking-choices.ts":
/*!*****************************************!*\
  !*** ./src/dragdrop/ranking-choices.ts ***!
  \*****************************************/
/*! exports provided: DragDropRankingChoices */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingChoices", function() { return DragDropRankingChoices; });
/* harmony import */ var _choices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./choices */ "./src/dragdrop/choices.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var DragDropRankingChoices = /** @class */ (function (_super) {
    __extends(DragDropRankingChoices, _super);
    function DragDropRankingChoices() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.isDragOverRootNode = false;
        _this.doDragOver = function () {
            var node = _this.draggedElementShortcut.querySelector(".sv-ranking-item");
            node.style.cursor = "grabbing";
        };
        _this.doBanDropHere = function () {
            if (_this.isDragOverRootNode) {
                _this.allowDropHere = true;
                return;
            }
            var node = _this.draggedElementShortcut.querySelector(".sv-ranking-item");
            node.style.cursor = "not-allowed";
        };
        _this.doDrop = function () {
            _this.parentElement.setValue();
            return _this.parentElement;
        };
        _this.doClear = function () {
            _this.parentElement.dropTargetNodeMove = null;
            _this.parentElement.updateRankingChoices(true);
        };
        return _this;
    }
    Object.defineProperty(DragDropRankingChoices.prototype, "draggedElementType", {
        get: function () {
            return "ranking-item";
        },
        enumerable: false,
        configurable: true
    });
    DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
        var draggedElementShortcut = document.createElement("div");
        draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
        draggedElementShortcut.style.cssText = " \n          cursor: grabbing;\n          position: absolute;\n          z-index: 1000;\n          border-radius: 36px;\n          min-width: 100px;\n          box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n          background-color: var(--background, white);\n          padding-right: 16px;\n          padding-left: 20px;\n          font-family: \"Open Sans\";\n        ";
        var isDeepClone = true;
        var clone = draggedElementNode.cloneNode(isDeepClone);
        draggedElementShortcut.appendChild(clone);
        var rect = draggedElementNode.getBoundingClientRect();
        draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
        draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
        return draggedElementShortcut;
    };
    Object.defineProperty(DragDropRankingChoices.prototype, "shortcutClass", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
                .append(this.parentElement.cssClasses.root)
                .append(this.parentElement.cssClasses.rootMobileMod, _utils_devices__WEBPACK_IMPORTED_MODULE_2__["IsMobile"])
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    DragDropRankingChoices.prototype.getDropTargetByDataAttributeValue = function (dataAttributeValue) {
        return this.parentElement.rankingChoices[dataAttributeValue];
    };
    DragDropRankingChoices.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
        this.isDragOverRootNode = this.getIsDragOverRootNode(dragOverNode);
        return dragOverNode.closest(this.dropTargetDataAttributeName);
    };
    DragDropRankingChoices.prototype.getIsDragOverRootNode = function (dragOverNode) {
        // dragOverNode might be <path></path> for example and the className prop is obj
        return typeof dragOverNode.className === "string" &&
            dragOverNode.className.indexOf("sv-ranking") !== -1;
    };
    DragDropRankingChoices.prototype.isDropTargetValid = function (dropTarget, dropTargetNode) {
        var choices = this.parentElement.rankingChoices;
        var dropTargetIndex = choices.indexOf(this.dropTarget);
        var draggedElementIndex = choices.indexOf(this.draggedElement);
        if (draggedElementIndex > dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-moveup")) {
            this.parentElement.dropTargetNodeMove = null;
            return false;
        }
        if (draggedElementIndex < dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-movedown")) {
            this.parentElement.dropTargetNodeMove = null;
            return false;
        }
        if (choices.indexOf(dropTarget) === -1)
            // shouldn't allow to drop on "adorners" (selectall, none, other)
            return false;
        return true;
    };
    DragDropRankingChoices.prototype.calculateIsBottom = function (clientY) {
        var choices = this.parentElement.rankingChoices;
        return (choices.indexOf(this.dropTarget) - choices.indexOf(this.draggedElement) >
            0);
    };
    DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
        var choices = this.parentElement.rankingChoices;
        var dropTargetIndex = choices.indexOf(this.dropTarget);
        var draggedElementIndex = choices.indexOf(this.draggedElement);
        choices.splice(draggedElementIndex, 1);
        choices.splice(dropTargetIndex, 0, this.draggedElement);
        this.parentElement.setPropertyValue("rankingChoices", choices);
        //return;
        this.updateDraggedElementShortcut(dropTargetIndex + 1);
        if (draggedElementIndex !== dropTargetIndex) {
            dropTargetNode.classList.remove("sv-dragdrop-moveup");
            dropTargetNode.classList.remove("sv-dragdrop-movedown");
            this.parentElement.dropTargetNodeMove = null;
        }
        if (draggedElementIndex > dropTargetIndex) {
            this.parentElement.dropTargetNodeMove = "down";
        }
        if (draggedElementIndex < dropTargetIndex) {
            this.parentElement.dropTargetNodeMove = "up";
        }
    };
    DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
        var newIndexText = newIndex + "";
        // TODO should avoid direct DOM manipulation, do through the frameworks instead
        var indexNode = this.draggedElementShortcut.querySelector(".sv-ranking-item__index");
        indexNode.innerText = newIndexText;
    };
    DragDropRankingChoices.prototype.ghostPositionChanged = function () {
        this.parentElement.currentDropTarget = this.draggedElement;
        _super.prototype.ghostPositionChanged.call(this);
    };
    return DragDropRankingChoices;
}(_choices__WEBPACK_IMPORTED_MODULE_0__["DragDropChoices"]));



/***/ }),

/***/ "./src/dragdrop/survey-elements.ts":
/*!*****************************************!*\
  !*** ./src/dragdrop/survey-elements.ts ***!
  \*****************************************/
/*! exports provided: DragDropSurveyElements */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropSurveyElements", function() { return DragDropSurveyElements; });
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../survey-element */ "./src/survey-element.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core */ "./src/dragdrop/core.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var DragDropSurveyElements = /** @class */ (function (_super) {
    __extends(DragDropSurveyElements, _super);
    function DragDropSurveyElements() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.isEdge = false;
        _this.prevIsEdge = null;
        _this.ghostSurveyElement = null;
        _this.isDraggedElementSelected = false;
        _this.doBanDropHere = function () {
            _this.removeGhostElementFromSurvey();
            _this.isEdge = null;
        };
        _this.doDrop = function () {
            if (_this.dropTarget) {
                document.activeElement.blur();
                return _this.insertRealElementIntoSurvey();
            }
            return null;
        };
        _this.doClear = function () {
            _this.removeGhostElementFromSurvey();
            _this.isEdge = null;
            _this.ghostSurveyElement = null;
            if (!!_this.draggedElement) {
                _this.draggedElement.isDragMe = false;
            }
            _this.isRight = null;
        };
        return _this;
    }
    Object.defineProperty(DragDropSurveyElements.prototype, "draggedElementType", {
        get: function () {
            return "survey-element";
        },
        enumerable: false,
        configurable: true
    });
    DragDropSurveyElements.prototype.startDragToolboxItem = function (event, draggedElementJson, toolboxItemTitle) {
        var preventSaveTargetNode = true;
        var draggedElement = this.createElementFromJson(draggedElementJson);
        draggedElement.toolboxItemTitle = toolboxItemTitle;
        this.startDrag(event, draggedElement, null, null, preventSaveTargetNode);
    };
    DragDropSurveyElements.prototype.startDragSurveyElement = function (event, draggedElement, isElementSelected) {
        this.isDraggedElementSelected = isElementSelected;
        this.startDrag(event, draggedElement);
    };
    DragDropSurveyElements.prototype.getShortcutText = function (draggedElement) {
        return draggedElement.toolboxItemTitle || _super.prototype.getShortcutText.call(this, draggedElement);
    };
    DragDropSurveyElements.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
        var draggedElementShortcut = document.createElement("div");
        var textSpan = document.createElement("span");
        textSpan.className = "svc-dragged-element-shortcut__text";
        textSpan.innerText = text;
        draggedElementShortcut.appendChild(this.createDraggedElementIcon());
        draggedElementShortcut.appendChild(textSpan);
        draggedElementShortcut.className = this.getDraggedElementClass();
        return draggedElementShortcut;
    };
    DragDropSurveyElements.prototype.createDraggedElementIcon = function () {
        var span = document.createElement("span");
        var type = this.draggedElement.getType();
        var svgString = "<svg class=\"sv-svg-icon\" role=\"img\" style=\"width: 24px; height: 24px;\"><use xlink:href=\"#icon-".concat(type, "\"></use></svg>");
        span.className = "svc-dragged-element-shortcut__icon";
        span.innerHTML = svgString;
        return span;
    };
    DragDropSurveyElements.prototype.getDraggedElementClass = function () {
        var result = "svc-dragged-element-shortcut";
        if (this.isDraggedElementSelected)
            result += " svc-dragged-element-shortcut--selected";
        return result;
    };
    DragDropSurveyElements.prototype.createElementFromJson = function (json) {
        var element = this.createNewElement(json);
        if (element["setSurveyImpl"]) {
            element["setSurveyImpl"](this.survey);
        }
        else {
            element["setData"](this.survey);
        }
        element.renderWidth = "100%";
        return element;
    };
    DragDropSurveyElements.prototype.createNewElement = function (json) {
        var newElement = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(json["type"]);
        new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toObject(json, newElement);
        return newElement;
    };
    DragDropSurveyElements.prototype.getDropTargetByDataAttributeValue = function (dataAttributeValue, dropTargetNode, event) {
        this.isEdge = this.calculateIsEdge(dropTargetNode, event.clientY);
        if (!dataAttributeValue) {
            // panel dynamic
            var nearestDropTargetElement = dropTargetNode.parentElement.closest(this.dropTargetDataAttributeName);
            dataAttributeValue = this.getDataAttributeValueByNode(nearestDropTargetElement);
        }
        if (!dataAttributeValue) {
            throw new Error("Can't find drop target survey element name");
        }
        if (dataAttributeValue === DragDropSurveyElements.ghostSurveyElementName) {
            return this.prevDropTarget;
        }
        // drop to new page
        if (dataAttributeValue === "newGhostPage") {
            return DragDropSurveyElements.newGhostPage;
        }
        // drop to page
        var page = this.survey.getPageByName(dataAttributeValue);
        if (page) {
            if (
            // TODO we can't drop on not empty page directly for now
            page.elements.length !== 0) {
                return null;
            }
            return page;
        }
        // drop to question or panel
        var dropTarget;
        var question;
        this.survey.pages.forEach(function (page) {
            question = page.getElementByName(dataAttributeValue);
            if (question)
                dropTarget = question;
        });
        // drop to paneldynamic
        if (dropTarget.getType() === "paneldynamic" && !this.isEdge) {
            dropTarget = dropTarget.template;
        }
        // drop to matrix detail panel
        if ((dropTarget.getType() === "matrixdropdown" || dropTarget.getType() === "matrixdynamic") && dropTarget.detailPanelMode !== "none" && !this.isEdge) {
            dropTarget = dropTarget.detailPanel;
        }
        // drop to panel
        else if (dropTarget.isPanel) {
            dropTarget = this.getPanelDropTarget(dropTargetNode, dropTarget, event);
        }
        // drop to question
        //question inside paneldymanic
        if (!dropTarget.page) {
            var nearestDropTargetPageElement = dropTargetNode.parentElement.closest("[data-sv-drop-target-page]");
            dataAttributeValue = nearestDropTargetPageElement.dataset.svDropTargetPage;
            var page_1 = this.survey.getPageByName(dataAttributeValue);
            dropTarget.__page = page_1;
        }
        return dropTarget;
        // EO drop to question or panel
    };
    DragDropSurveyElements.prototype.isDropTargetValid = function () {
        if (!this.dropTarget)
            return false;
        if (this.dropTarget === this.draggedElement)
            return false;
        if (this.draggedElement.getType() === "paneldynamic" &&
            this.dropTarget === this.draggedElement.template)
            return false;
        if (DragDropSurveyElements.restrictDragQuestionBetweenPages &&
            this.shouldRestricDragQuestionBetweenPages(this.dropTarget)) {
            return false;
        }
        return true;
    };
    DragDropSurveyElements.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
        // we shouldn't reculc isBottom if drag over ghost survey element
        if (this.getDataAttributeValueByNode(dropTargetNode) === DragDropSurveyElements.ghostSurveyElementName) {
            return this.isBottom;
        }
        var middle = this.calculateVerticalMiddleOfHTMLElement(dropTargetNode);
        return clientY >= middle;
    };
    DragDropSurveyElements.prototype.calculateIsRight = function (clientX, dropTargetNode) {
        // we shouldn't reculc isBottom if drag over ghost survey element
        if (this.getDataAttributeValueByNode(dropTargetNode) === DragDropSurveyElements.ghostSurveyElementName) {
            return this.isRight;
        }
        var middle = this.calculateHorizontalMiddleOfHTMLElement(dropTargetNode);
        return clientX >= middle;
    };
    DragDropSurveyElements.prototype.isDropTargetDoesntChanged = function (newIsBottom) {
        if (this.dropTarget === this.ghostSurveyElement)
            return true;
        return (this.dropTarget === this.prevDropTarget && newIsBottom === this.isBottom
            && this.isEdge === this.prevIsEdge && this.isRight === this.prevIsRight);
    };
    DragDropSurveyElements.prototype.shouldRestricDragQuestionBetweenPages = function (dropTarget) {
        var oldPage = this.draggedElement["page"];
        var newPage = dropTarget.isPage ? dropTarget : dropTarget["page"];
        // if oldPage === null then it is drop from the toolbox
        return oldPage && oldPage !== newPage;
    };
    DragDropSurveyElements.prototype.getPanelDropTarget = function (HTMLElement, dropTarget, event) {
        var isEdge = this.isEdge;
        if (!isEdge && dropTarget.questions.length !== 0) {
            HTMLElement = this.findDeepestDropTargetChild(HTMLElement);
            dropTarget = this.getDropTargetByNode(HTMLElement, event);
        }
        return dropTarget;
    };
    DragDropSurveyElements.prototype.findDeepestDropTargetChild = function (parent) {
        var selector = this.dropTargetDataAttributeName;
        var result = parent;
        while (!!parent) {
            result = parent;
            parent = parent.querySelector(selector);
        }
        return result;
    };
    DragDropSurveyElements.prototype.calculateIsEdge = function (dropTargetNode, clientY) {
        var rect = dropTargetNode.getBoundingClientRect();
        return clientY - rect.top <= DragDropSurveyElements.edgeHeight || rect.bottom - clientY <= DragDropSurveyElements.edgeHeight;
    };
    // private calculateIsRight(): boolean {
    //   // const dropTarget = this.dropTarget;
    //   // const targetRow = this.getTargetRow(dropTarget);
    //   // if (targetRow.elements.indexOf(this.draggedElement) !== -1) {
    //   //   var pageOrPanel = dropTarget.parent;
    //   //   var srcIndex = pageOrPanel.elements.indexOf(this.draggedElement);
    //   //   var destIndex = pageOrPanel.elements.indexOf(dropTarget);
    //   // } else {
    //   //   if (targetRow.elements.indexOf(dropTarget) === 0) {
    //   //     return false;
    //   //   } else {
    //   //     return true;
    //   //   }
    //   //   // else if (targetRow.elements.indexOf(dropTarget) === targetRow.elements.length -1) {
    //   //   //   return true;
    //   //   // }
    //   // }
    //   // return srcIndex < destIndex;
    //   const middle = this.calculateHorizontalMiddleOfHTMLElement(this.dropTargetNode);
    //   return clientY >= middle;
    // }
    DragDropSurveyElements.prototype.doDragOver = function (dropTargetNode, event) {
        this.isRight = this.calculateIsRight(event.clientX, dropTargetNode);
    };
    DragDropSurveyElements.prototype.afterDragOver = function (dropTargetNode, event) {
        this.prevIsEdge = this.isEdge;
        this.prevIsRight = this.isRight;
        this.insertGhostElementIntoSurvey();
    };
    DragDropSurveyElements.prototype.onStartDrag = function () {
        this.ghostSurveyElement = this.createGhostSurveyElement();
        this.draggedElement.isDragMe = true;
    };
    DragDropSurveyElements.prototype.insertGhostElementIntoSurvey = function () {
        this.removeGhostElementFromSurvey();
        var isTargetRowMultiple = this.calcTargetRowMultiple();
        this.ghostSurveyElement = this.createGhostSurveyElement(isTargetRowMultiple);
        this.ghostSurveyElement.name =
            DragDropSurveyElements.ghostSurveyElementName; // TODO why do we need setup it manually see createGhostSurveyElement method
        this.parentElement = this.dropTarget.isPage
            ? this.dropTarget
            : (this.dropTarget.page || this.dropTarget.__page);
        if (this.isDragOverInsideEmptyPanel()) {
            this.dropTarget.dragTypeOverMe = _survey_element__WEBPACK_IMPORTED_MODULE_0__["DragTypeOverMeEnum"].InsideEmptyPanel;
            return;
        }
        if (!this.isEdge && isTargetRowMultiple) {
            this.dropTarget.dragTypeOverMe = this.isRight ?
                _survey_element__WEBPACK_IMPORTED_MODULE_0__["DragTypeOverMeEnum"].MultilineRight :
                _survey_element__WEBPACK_IMPORTED_MODULE_0__["DragTypeOverMeEnum"].MultilineLeft;
            return;
        }
        this.parentElement.dragDropStart(this.draggedElement, this.ghostSurveyElement, DragDropSurveyElements.nestedPanelDepth);
        var result = this.parentElement.dragDropMoveTo(this.dropTarget, isTargetRowMultiple ? this.isRight : this.isBottom, this.isEdge);
        return result;
    };
    DragDropSurveyElements.prototype.calcTargetRowMultiple = function () {
        var targetParent = this.getTargetParent(this.dropTarget);
        var targetRow = this.getTargetRow(this.dropTarget);
        var isTargetRowMultiple = targetRow && targetRow.elements.length > 1;
        var isTemplatePanelInPanelDynamic = targetParent.isPanel && !targetParent.name;
        if (this.isEdge && isTargetRowMultiple && !isTemplatePanelInPanelDynamic) {
            targetParent.__page = this.dropTarget.page || this.dropTarget.__page;
            this.dropTarget = targetParent;
            return false;
        }
        return isTargetRowMultiple;
    };
    DragDropSurveyElements.prototype.getTargetParent = function (dropTarget) {
        var targetParent = dropTarget.isPage || dropTarget.isPanel ? dropTarget : dropTarget.parent;
        if (dropTarget.getType() === "paneldynamic") {
            targetParent = dropTarget.templateValue;
        }
        return targetParent;
    };
    DragDropSurveyElements.prototype.getTargetRow = function (dropTarget) {
        var targetParent = this.getTargetParent(dropTarget);
        var targetRow;
        targetParent.rows.forEach(function (row) {
            if (row.elements.indexOf(dropTarget) !== -1) {
                targetRow = row;
            }
        });
        return targetRow;
    };
    DragDropSurveyElements.prototype.isDragOverInsideEmptyPanel = function () {
        var isEmptyPanel = this.dropTarget.isPanel && this.dropTarget.questions.length === 0;
        var isDragOverInside = !this.isEdge;
        return isEmptyPanel && isDragOverInside;
    };
    DragDropSurveyElements.prototype.removeGhostElementFromSurvey = function () {
        var dropTarget = this.prevDropTarget || this.dropTarget;
        if (!!dropTarget) {
            dropTarget.dragTypeOverMe = null;
        }
        if (!!this.parentElement)
            this.parentElement.dragDropFinish(true);
    };
    DragDropSurveyElements.prototype.insertRealElementIntoSurvey = function () {
        this.removeGhostElementFromSurvey();
        var isTargetRowMultiple = this.calcTargetRowMultiple();
        // ghost new page
        if (this.dropTarget.isPage && this.dropTarget["_isGhost"]) {
            this.dropTarget["_addGhostPageViewModel"]();
        }
        // EO ghost new page
        //TODO need for dragDrop helper in library
        var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toJsonObject(this.draggedElement);
        json["type"] = this.draggedElement.getType();
        var fakeTargetElement = this.createFakeTargetElement(this.draggedElement.name, json);
        //
        this.parentElement.dragDropStart(this.draggedElement, fakeTargetElement, DragDropSurveyElements.nestedPanelDepth);
        this.parentElement.dragDropMoveTo(this.dropTarget, isTargetRowMultiple ? this.isRight : this.isBottom, this.isEdge);
        var newElement = this.parentElement.dragDropFinish();
        return newElement;
    };
    DragDropSurveyElements.prototype.createFakeTargetElement = function (elementName, json) {
        if (!elementName || !json)
            return null;
        var targetElement = null;
        targetElement = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(json["type"]);
        new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toObject(json, targetElement);
        targetElement.name = elementName;
        if (targetElement["setSurveyImpl"]) {
            targetElement["setSurveyImpl"](this.survey);
        }
        else {
            targetElement["setData"](this.survey);
        }
        targetElement.renderWidth = "100%";
        return targetElement;
    };
    DragDropSurveyElements.prototype.createGhostSurveyElement = function (isMultipleRowDrag) {
        if (isMultipleRowDrag === void 0) { isMultipleRowDrag = false; }
        var className = "sv-drag-drop-ghost";
        var minWidth = "300px";
        if (isMultipleRowDrag) {
            minWidth = "4px";
            className += " sv-drag-drop-ghost--vertical";
        }
        var json = {
            type: "html",
            minWidth: minWidth,
            name: DragDropSurveyElements.ghostSurveyElementName,
            html: "<div class=\"".concat(className, "\"></div>"),
        };
        var element = this.createElementFromJson(json);
        element.startWithNewLine = !isMultipleRowDrag;
        if (isMultipleRowDrag) {
            element.maxWidth = "4px";
            element.renderWidth = "0px";
            element.paddingRight = "0px";
            element.paddingLeft = "0px";
        }
        return element;
    };
    DragDropSurveyElements.newGhostPage = null;
    DragDropSurveyElements.restrictDragQuestionBetweenPages = false;
    DragDropSurveyElements.edgeHeight = 30;
    DragDropSurveyElements.nestedPanelDepth = -1;
    DragDropSurveyElements.ghostSurveyElementName = "sv-drag-drop-ghost-survey-element-name"; // before renaming use globa search (we have also css selectors)
    return DragDropSurveyElements;
}(_core__WEBPACK_IMPORTED_MODULE_2__["DragDropCore"]));



/***/ }),

/***/ "./src/dropdownListModel.ts":
/*!**********************************!*\
  !*** ./src/dropdownListModel.ts ***!
  \**********************************/
/*! exports provided: DropdownListModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownListModel", function() { return DropdownListModel; });
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./list */ "./src/list.ts");
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};






var DropdownListModel = /** @class */ (function (_super) {
    __extends(DropdownListModel, _super);
    function DropdownListModel(question, onSelectionChanged) {
        var _this = _super.call(this) || this;
        _this.question = question;
        _this.onSelectionChanged = onSelectionChanged;
        _this.minPageSize = 25;
        _this.loadingItemHeight = 40;
        _this.focusFirstInputSelector = ".sv-list__item--selected";
        _this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
        _this.isRunningLoadQuestionChoices = false;
        _this.popupCssClasses = "sv-single-select-list";
        _this.listModel = _this.createListModel();
        _this.updateAfterListModelCreated(_this.listModel);
        _this.setSearchEnabled(_this.question.searchEnabled);
        _this.createPopup();
        _this.resetItemsSettings();
        return _this;
    }
    DropdownListModel.prototype.resetItemsSettings = function () {
        this.itemsSettings.skip = 0;
        this.itemsSettings.take = Math.max(this.minPageSize, this.question.choicesLazyLoadPageSize);
        this.itemsSettings.totalCount = 0;
        this.itemsSettings.items = [];
    };
    DropdownListModel.prototype.updateListItems = function () {
        this.listModel.setItems(this.getAvailableItems());
    };
    DropdownListModel.prototype.setItems = function (items, totalCount) {
        this.itemsSettings.items = [].concat(this.itemsSettings.items, items);
        this.question.choices = this.itemsSettings.items;
        this.itemsSettings.totalCount = totalCount;
        this.listModel.isAllDataLoaded = this.question.choicesLazyLoadEnabled && this.question.choices.length == this.itemsSettings.totalCount;
        this.updateListItems();
    };
    DropdownListModel.prototype.updateQuestionChoices = function (callbackAfterItemsLoaded) {
        var _this = this;
        if (this.isRunningLoadQuestionChoices)
            return;
        var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
        if (!this.itemsSettings.skip || isUpdate) {
            this.isRunningLoadQuestionChoices = true;
            this.question.survey.loadQuestionChoices({
                question: this.question,
                filter: this.filterString,
                skip: this.itemsSettings.skip,
                take: this.itemsSettings.take,
                setItems: function (items, totalCount) {
                    _this.isRunningLoadQuestionChoices = false;
                    _this.setItems(items || [], totalCount || 0);
                    _this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
                    if (!!callbackAfterItemsLoaded) {
                        callbackAfterItemsLoaded();
                    }
                }
            });
            this.itemsSettings.skip += this.itemsSettings.take;
        }
    };
    DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
        this._popupModel.focusFirstInputSelector = (!this.listModel.showFilter && !!this.question.value) ? this.focusFirstInputSelector : "";
    };
    DropdownListModel.prototype.createPopup = function () {
        var _this = this;
        this._popupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: this.listModel, }, "bottom", "center", false);
        this._popupModel.positionMode = "fixed";
        this._popupModel.isFocusedContent = false;
        this._popupModel.setWidthByTarget = true;
        this.updatePopupFocusFirstInputSelector();
        this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
            _this.updatePopupFocusFirstInputSelector();
        });
        this._popupModel.cssClass = this.popupCssClasses;
        this._popupModel.onVisibilityChanged.add(function (_, option) {
            if (option.isVisible && _this.question.choicesLazyLoadEnabled) {
                _this.listModel.actions = [];
                _this.updateQuestionChoices();
            }
            if (option.isVisible && !!_this.question.onOpenedCallBack) {
                _this.updatePopupFocusFirstInputSelector();
                _this.question.onOpenedCallBack();
            }
            if (!option.isVisible) {
                _this.onHidePopup();
                if (_this.question.choicesLazyLoadEnabled) {
                    _this.resetItemsSettings();
                }
            }
        });
    };
    DropdownListModel.prototype.setFilterStringToListModel = function (newValue) {
        this.listModel.filterString = newValue;
        if (!this.listModel.focusedItem || !this.listModel.isItemVisible(this.listModel.focusedItem)) {
            this.listModel.focusFirstVisibleItem();
        }
    };
    DropdownListModel.prototype.popupRecalculatePosition = function (isResetHeight) {
        var _this = this;
        setTimeout(function () {
            _this.popupModel.recalculatePosition(isResetHeight);
        }, 1);
    };
    DropdownListModel.prototype.onHidePopup = function () {
        this.resetFilterString();
        this.listModel.refresh();
    };
    DropdownListModel.prototype.getAvailableItems = function () {
        var _this = this;
        return this.question.visibleChoices.map(function (choice) { return new _actions_action__WEBPACK_IMPORTED_MODULE_0__["Action"]({
            id: choice.value,
            data: choice,
            locTitle: choice.locText,
            component: new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.question.itemComponent; }),
            visible: new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return choice.isVisible; }),
            enabled: new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return choice.isEnabled; }),
        }); });
    };
    DropdownListModel.prototype.createListModel = function () {
        var _this = this;
        var visibleItems = this.getAvailableItems();
        var _onSelectionChanged = this.onSelectionChanged;
        if (!_onSelectionChanged) {
            _onSelectionChanged = function (item) {
                _this.question.value = item.id;
                _this._popupModel.toggleVisibility();
            };
        }
        return new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](visibleItems, _onSelectionChanged, true, this.question.selectedItem);
    };
    DropdownListModel.prototype.updateAfterListModelCreated = function (model) {
        var _this = this;
        var _a;
        model.locOwner = this.question;
        model.onPropertyChanged.add(function (sender, options) {
            if (options.name == "hasVerticalScroller") {
                _this.hasScroll = options.newValue;
            }
        });
        model.isAllDataLoaded = !this.question.choicesLazyLoadEnabled;
        model.cssClasses = (_a = this.question.survey) === null || _a === void 0 ? void 0 : _a.getCss().list;
    };
    DropdownListModel.prototype.resetFilterString = function () {
        if (!!this.filterString) {
            this.filterString = undefined;
        }
    };
    DropdownListModel.prototype.onSetFilterString = function () {
        var _this = this;
        if (!!this.filterString && !this.popupModel.isVisible) {
            this.popupModel.isVisible = true;
        }
        this.setInputHasValue(!!this.filterString);
        var updateAfterFilterStringChanged = function () {
            _this.setFilterStringToListModel(_this.filterString);
            _this.popupRecalculatePosition(true);
        };
        if (this.question.choicesLazyLoadEnabled) {
            this.resetItemsSettings();
            this.updateQuestionChoices(updateAfterFilterStringChanged);
        }
        else {
            updateAfterFilterStringChanged();
        }
    };
    DropdownListModel.prototype.setInputHasValue = function (newValue) {
        this.question.inputHasValue = newValue;
    };
    Object.defineProperty(DropdownListModel.prototype, "popupModel", {
        get: function () {
            return this._popupModel;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DropdownListModel.prototype, "inputReadOnly", {
        get: function () {
            return this.question.isInputReadOnly || this.searchEnabled;
        },
        enumerable: false,
        configurable: true
    });
    DropdownListModel.prototype.setSearchEnabled = function (newValue) {
        this.listModel.searchEnabled = false;
        this.searchEnabled = newValue;
    };
    DropdownListModel.prototype.updateItems = function () {
        this.updateListItems();
    };
    DropdownListModel.prototype.onClick = function (event) {
        this._popupModel.toggleVisibility();
        this.listModel.focusNextVisibleItem();
        if (this.searchEnabled && !!event && !!event.target) {
            var input = event.target.querySelector("input");
            if (!!input) {
                input.focus();
            }
        }
    };
    DropdownListModel.prototype.onClear = function (event) {
        this.question.clearValue();
        this.resetFilterString();
        this.listModel.selectedItem = undefined;
        event.preventDefault();
        event.stopPropagation();
    };
    DropdownListModel.prototype.getSelectedAction = function () {
        var _this = this;
        if (!!this.question.selectedItem) {
            return this.listModel.actions.filter(function (action) { return (_this.question.selectedItem.value === action.id); })[0];
        }
        else {
            return null;
        }
    };
    DropdownListModel.prototype.keyHandler = function (event) {
        var char = event.which || event.keyCode;
        if (this.popupModel.isVisible && event.keyCode === 38) {
            this.listModel.focusPrevVisibleItem();
            this.scrollToFocusedItem();
            event.preventDefault();
            event.stopPropagation();
        }
        else if (event.keyCode === 40) {
            if (!this.popupModel.isVisible) {
                this.popupModel.toggleVisibility();
            }
            this.listModel.focusNextVisibleItem();
            this.scrollToFocusedItem();
            event.preventDefault();
            event.stopPropagation();
        }
        else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32)) {
            this.listModel.selectFocusedItem();
            event.preventDefault();
            event.stopPropagation();
        }
        else if (char === 46) {
            this.onClear(event);
        }
        else if (event.keyCode === 27) {
            this.popupModel.isVisible = false;
        }
        else {
            if (event.keyCode === 38 || event.keyCode === 40 || event.keyCode === 32) {
                event.preventDefault();
                event.stopPropagation();
            }
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["doKey2ClickUp"])(event, { processEsc: false, disableTabStop: this.question.isInputReadOnly });
        }
    };
    DropdownListModel.prototype.onScroll = function (event) {
        var target = event.target;
        if ((target.scrollHeight - (target.scrollTop + target.offsetHeight)) <= this.loadingItemHeight) {
            this.updateQuestionChoices();
        }
    };
    DropdownListModel.prototype.onBlur = function (event) {
        if (this.popupModel.isVisible) {
            this.listModel.selectFocusedItem();
        }
        this.resetFilterString();
        this._popupModel.isVisible = false;
        this.setInputHasValue(false);
        Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["doKey2ClickBlur"])(event);
    };
    DropdownListModel.prototype.scrollToFocusedItem = function () {
        this.listModel.scrollToFocusedItem();
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
    ], DropdownListModel.prototype, "searchEnabled", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
            defaultValue: "",
            onSet: function (_, target) {
                target.onSetFilterString();
            }
        })
    ], DropdownListModel.prototype, "filterString", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
            defaultValue: false,
            onSet: function (newVal, target) {
                if (newVal) {
                    target.listModel.addScrollEventListener(function (e) { target.onScroll(e); });
                }
                else {
                    target.listModel.removeScrollEventListener();
                }
            }
        })
    ], DropdownListModel.prototype, "hasScroll", void 0);
    return DropdownListModel;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));



/***/ }),

/***/ "./src/dropdownMultiSelectListModel.ts":
/*!*********************************************!*\
  !*** ./src/dropdownMultiSelectListModel.ts ***!
  \*********************************************/
/*! exports provided: DropdownMultiSelectListModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownMultiSelectListModel", function() { return DropdownMultiSelectListModel; });
/* harmony import */ var _dropdownListModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdownListModel */ "./src/dropdownListModel.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./multiSelectListModel */ "./src/multiSelectListModel.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




var DropdownMultiSelectListModel = /** @class */ (function (_super) {
    __extends(DropdownMultiSelectListModel, _super);
    function DropdownMultiSelectListModel(question, onSelectionChanged) {
        var _this = _super.call(this, question, onSelectionChanged) || this;
        _this.setHideSelectedItems(question.hideSelectedItems);
        _this.syncFilterStringPlaceholder();
        _this.closeOnSelect = question.closeOnSelect;
        return _this;
    }
    DropdownMultiSelectListModel.prototype.syncFilterStringPlaceholder = function (actions) {
        var selectedActions = actions || this.getSelectedActions();
        if (selectedActions.length || this.question.selectedItems.length) {
            this.filterStringPlaceholder = undefined;
        }
        else {
            this.filterStringPlaceholder = this.question.placeholder;
        }
    };
    DropdownMultiSelectListModel.prototype.getSelectedActions = function (visibleItems) {
        var _this = this;
        return (visibleItems || this.listModel.actions).filter(function (item) { return (_this.question.isAllSelected && item.id === "selectall") || !!_itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(_this.question.selectedItems, item.id); });
    };
    DropdownMultiSelectListModel.prototype.syncSelectedItemsFromQuestion = function () {
        var selectedActions = this.getSelectedActions();
        this.listModel.setSelectedItems(selectedActions);
        this.syncFilterStringPlaceholder(selectedActions);
    };
    DropdownMultiSelectListModel.prototype.createListModel = function () {
        var _this = this;
        var visibleItems = this.getAvailableItems();
        var _onSelectionChanged = this.onSelectionChanged;
        if (!_onSelectionChanged) {
            _onSelectionChanged = function (item, status) {
                _this.resetFilterString();
                if (item.id === "selectall") {
                    _this.selectAllItems();
                }
                else if (status === "added" && item.id == "none") {
                    _this.selectNoneItem();
                }
                else if (status === "added") {
                    _this.selectItem(item.id);
                }
                else if (status === "removed") {
                    _this.deselectItem(item.id);
                }
                _this.popupRecalculatePosition(false);
                if (_this.closeOnSelect) {
                    _this.popupModel.isVisible = false;
                }
            };
        }
        return new _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"](visibleItems, _onSelectionChanged, true, this.getSelectedActions(visibleItems));
    };
    DropdownMultiSelectListModel.prototype.selectAllItems = function () {
        this.question.toggleSelectAll();
        this.syncSelectedItemsFromQuestion();
    };
    DropdownMultiSelectListModel.prototype.selectNoneItem = function () {
        this.question.renderedValue = ["none"];
        this.syncSelectedItemsFromQuestion();
    };
    DropdownMultiSelectListModel.prototype.selectItem = function (id) {
        var newValue = [].concat(this.question.renderedValue || []);
        newValue.push(id);
        this.question.renderedValue = newValue;
        this.syncSelectedItemsFromQuestion();
    };
    DropdownMultiSelectListModel.prototype.deselectItem = function (id) {
        var newValue = [].concat(this.question.renderedValue || []);
        newValue.splice(newValue.indexOf(id), 1);
        this.question.renderedValue = newValue;
        this.syncSelectedItemsFromQuestion();
    };
    DropdownMultiSelectListModel.prototype.onClear = function (event) {
        _super.prototype.onClear.call(this, event);
        this.syncSelectedItemsFromQuestion();
    };
    DropdownMultiSelectListModel.prototype.setHideSelectedItems = function (newValue) {
        this.listModel.hideSelectedItems = newValue;
        this.syncSelectedItemsFromQuestion();
    };
    DropdownMultiSelectListModel.prototype.removeLastSelectedItem = function () {
        this.deselectItem(this.question.renderedValue[this.question.renderedValue.length - 1]);
        this.popupRecalculatePosition(false);
    };
    DropdownMultiSelectListModel.prototype.inputKeyHandler = function (event) {
        if (event.keyCode === 8 && !this.filterString) {
            this.removeLastSelectedItem();
            event.preventDefault();
            event.stopPropagation();
        }
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "" })
    ], DropdownMultiSelectListModel.prototype, "filterStringPlaceholder", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
    ], DropdownMultiSelectListModel.prototype, "closeOnSelect", void 0);
    return DropdownMultiSelectListModel;
}(_dropdownListModel__WEBPACK_IMPORTED_MODULE_0__["DropdownListModel"]));



/***/ }),

/***/ "./src/dxSurveyService.ts":
/*!********************************!*\
  !*** ./src/dxSurveyService.ts ***!
  \********************************/
/*! exports provided: dxSurveyService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dxSurveyService", function() { return dxSurveyService; });
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");

/**
 * The class contains methods to work with api.surveyjs.io service.
 */
var dxSurveyService = /** @class */ (function () {
    function dxSurveyService() {
    }
    Object.defineProperty(dxSurveyService, "serviceUrl", {
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].surveyServiceUrl;
        },
        set: function (val) {
            _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].surveyServiceUrl = val;
        },
        enumerable: false,
        configurable: true
    });
    dxSurveyService.prototype.loadSurvey = function (surveyId, onLoad) {
        var xhr = new XMLHttpRequest();
        xhr.open("GET", dxSurveyService.serviceUrl + "/getSurvey?surveyId=" + surveyId);
        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xhr.onload = function () {
            var result = JSON.parse(xhr.response);
            onLoad(xhr.status == 200, result, xhr.response);
        };
        xhr.send();
    };
    dxSurveyService.prototype.getSurveyJsonAndIsCompleted = function (surveyId, clientId, onLoad) {
        var xhr = new XMLHttpRequest();
        xhr.open("GET", dxSurveyService.serviceUrl +
            "/getSurveyAndIsCompleted?surveyId=" +
            surveyId +
            "&clientId=" +
            clientId);
        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xhr.onload = function () {
            var result = JSON.parse(xhr.response);
            var surveyJson = result ? result.survey : null;
            var isCompleted = result ? result.isCompleted : null;
            onLoad(xhr.status == 200, surveyJson, isCompleted, xhr.response);
        };
        xhr.send();
    };
    dxSurveyService.prototype.sendResult = function (postId, result, onSendResult, clientId, isPartialCompleted) {
        if (clientId === void 0) { clientId = null; }
        if (isPartialCompleted === void 0) { isPartialCompleted = false; }
        var xhr = new XMLHttpRequest();
        xhr.open("POST", dxSurveyService.serviceUrl + "/post/");
        xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        var data = { postId: postId, surveyResult: JSON.stringify(result) };
        if (clientId)
            data["clientId"] = clientId;
        if (isPartialCompleted)
            data["isPartialCompleted"] = true;
        var dataStringify = JSON.stringify(data);
        var self = this;
        xhr.onload = xhr.onerror = function () {
            if (!onSendResult)
                return;
            onSendResult(xhr.status === 200, xhr.response, xhr);
        };
        xhr.send(dataStringify);
    };
    dxSurveyService.prototype.sendFile = function (postId, file, onSendFile) {
        var xhr = new XMLHttpRequest();
        xhr.onload = xhr.onerror = function () {
            if (!onSendFile)
                return;
            onSendFile(xhr.status == 200, JSON.parse(xhr.response));
        };
        xhr.open("POST", dxSurveyService.serviceUrl + "/upload/", true);
        var formData = new FormData();
        formData.append("file", file);
        formData.append("postId", postId);
        xhr.send(formData);
    };
    dxSurveyService.prototype.getResult = function (resultId, name, onGetResult) {
        var xhr = new XMLHttpRequest();
        var data = "resultId=" + resultId + "&name=" + name;
        xhr.open("GET", dxSurveyService.serviceUrl + "/getResult?" + data);
        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        var self = this;
        xhr.onload = function () {
            var result = null;
            var list = null;
            if (xhr.status == 200) {
                result = JSON.parse(xhr.response);
                list = [];
                for (var key in result.QuestionResult) {
                    var el = { name: key, value: result.QuestionResult[key] };
                    list.push(el);
                }
            }
            onGetResult(xhr.status == 200, result, list, xhr.response);
        };
        xhr.send();
    };
    dxSurveyService.prototype.isCompleted = function (resultId, clientId, onIsCompleted) {
        var xhr = new XMLHttpRequest();
        var data = "resultId=" + resultId + "&clientId=" + clientId;
        xhr.open("GET", dxSurveyService.serviceUrl + "/isCompleted?" + data);
        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        var self = this;
        xhr.onload = function () {
            var result = null;
            if (xhr.status == 200) {
                result = JSON.parse(xhr.response);
            }
            onIsCompleted(xhr.status == 200, result, xhr.response);
        };
        xhr.send();
    };
    return dxSurveyService;
}());



/***/ }),

/***/ "./src/element-helper.ts":
/*!*******************************!*\
  !*** ./src/element-helper.ts ***!
  \*******************************/
/*! exports provided: ElementHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementHelper", function() { return ElementHelper; });
var ElementHelper = /** @class */ (function () {
    function ElementHelper() {
    }
    ElementHelper.focusElement = function (element) {
        element && element.focus();
    };
    ElementHelper.visibility = function (node) {
        var style = window.getComputedStyle(node);
        if (style.display === "none" || style.visibility === "hidden")
            return false;
        return node.parentElement ? this.visibility(node.parentElement) : true;
    };
    ElementHelper.getNextElementPreorder = function (element) {
        var result = !!element.nextElementSibling ? element.nextElementSibling : element.parentElement.firstElementChild;
        if (this.visibility(result)) {
            return result;
        }
        else {
            return this.getNextElementPreorder(result);
        }
    };
    ElementHelper.getNextElementPostorder = function (element) {
        var result = !!element.previousElementSibling ? element.previousElementSibling : element.parentElement.lastElementChild;
        if (this.visibility(result)) {
            return result;
        }
        else {
            return this.getNextElementPostorder(result);
        }
    };
    ElementHelper.hasHorizontalScroller = function (element) {
        if (!!element) {
            return element.scrollWidth > element.offsetWidth;
        }
        return false;
    };
    ElementHelper.hasVerticalScroller = function (element) {
        if (!!element) {
            return element.scrollHeight > element.offsetHeight;
        }
        return false;
    };
    return ElementHelper;
}());



/***/ }),

/***/ "./src/entries/chunks/localization.ts":
/*!********************************************!*\
  !*** ./src/entries/chunks/localization.ts ***!
  \********************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _localization_arabic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../localization/arabic */ "./src/localization/arabic.ts");
/* harmony import */ var _localization_basque__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../localization/basque */ "./src/localization/basque.ts");
/* harmony import */ var _localization_bulgarian__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../localization/bulgarian */ "./src/localization/bulgarian.ts");
/* harmony import */ var _localization_catalan__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../localization/catalan */ "./src/localization/catalan.ts");
/* harmony import */ var _localization_croatian__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../localization/croatian */ "./src/localization/croatian.ts");
/* harmony import */ var _localization_czech__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../localization/czech */ "./src/localization/czech.ts");
/* harmony import */ var _localization_danish__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../localization/danish */ "./src/localization/danish.ts");
/* harmony import */ var _localization_dutch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../localization/dutch */ "./src/localization/dutch.ts");
/* harmony import */ var _localization_nl_BE__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../localization/nl-BE */ "./src/localization/nl-BE.ts");
/* harmony import */ var _localization_estonian__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../localization/estonian */ "./src/localization/estonian.ts");
/* harmony import */ var _localization_finnish__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../localization/finnish */ "./src/localization/finnish.ts");
/* harmony import */ var _localization_french__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../localization/french */ "./src/localization/french.ts");
/* harmony import */ var _localization_georgian__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../localization/georgian */ "./src/localization/georgian.ts");
/* harmony import */ var _localization_german__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../localization/german */ "./src/localization/german.ts");
/* harmony import */ var _localization_greek__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../localization/greek */ "./src/localization/greek.ts");
/* harmony import */ var _localization_hebrew__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../localization/hebrew */ "./src/localization/hebrew.ts");
/* harmony import */ var _localization_hindi__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../localization/hindi */ "./src/localization/hindi.ts");
/* harmony import */ var _localization_hungarian__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../localization/hungarian */ "./src/localization/hungarian.ts");
/* harmony import */ var _localization_icelandic__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../localization/icelandic */ "./src/localization/icelandic.ts");
/* harmony import */ var _localization_indonesian__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../localization/indonesian */ "./src/localization/indonesian.ts");
/* harmony import */ var _localization_italian__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../localization/italian */ "./src/localization/italian.ts");
/* harmony import */ var _localization_japanese__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../localization/japanese */ "./src/localization/japanese.ts");
/* harmony import */ var _localization_kazakh__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../localization/kazakh */ "./src/localization/kazakh.ts");
/* harmony import */ var _localization_korean__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../localization/korean */ "./src/localization/korean.ts");
/* harmony import */ var _localization_latvian__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../localization/latvian */ "./src/localization/latvian.ts");
/* harmony import */ var _localization_lithuanian__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../localization/lithuanian */ "./src/localization/lithuanian.ts");
/* harmony import */ var _localization_macedonian__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../localization/macedonian */ "./src/localization/macedonian.ts");
/* harmony import */ var _localization_malay__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../localization/malay */ "./src/localization/malay.ts");
/* harmony import */ var _localization_norwegian__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../localization/norwegian */ "./src/localization/norwegian.ts");
/* harmony import */ var _localization_persian__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../localization/persian */ "./src/localization/persian.ts");
/* harmony import */ var _localization_polish__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../localization/polish */ "./src/localization/polish.ts");
/* harmony import */ var _localization_portuguese__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../localization/portuguese */ "./src/localization/portuguese.ts");
/* harmony import */ var _localization_portuguese_br__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../localization/portuguese-br */ "./src/localization/portuguese-br.ts");
/* harmony import */ var _localization_romanian__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../localization/romanian */ "./src/localization/romanian.ts");
/* harmony import */ var _localization_russian__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../localization/russian */ "./src/localization/russian.ts");
/* harmony import */ var _localization_serbian__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../localization/serbian */ "./src/localization/serbian.ts");
/* harmony import */ var _localization_simplified_chinese__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../localization/simplified-chinese */ "./src/localization/simplified-chinese.ts");
/* harmony import */ var _localization_slovak__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../localization/slovak */ "./src/localization/slovak.ts");
/* harmony import */ var _localization_spanish__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../localization/spanish */ "./src/localization/spanish.ts");
/* harmony import */ var _localization_swahili__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../localization/swahili */ "./src/localization/swahili.ts");
/* harmony import */ var _localization_swedish__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../localization/swedish */ "./src/localization/swedish.ts");
/* harmony import */ var _localization_tajik__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../localization/tajik */ "./src/localization/tajik.ts");
/* harmony import */ var _localization_thai__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../localization/thai */ "./src/localization/thai.ts");
/* harmony import */ var _localization_traditional_chinese__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../localization/traditional-chinese */ "./src/localization/traditional-chinese.ts");
/* harmony import */ var _localization_turkish__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../localization/turkish */ "./src/localization/turkish.ts");
/* harmony import */ var _localization_ukrainian__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../localization/ukrainian */ "./src/localization/ukrainian.ts");
/* harmony import */ var _localization_vietnamese__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../localization/vietnamese */ "./src/localization/vietnamese.ts");
/* harmony import */ var _localization_welsh__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../localization/welsh */ "./src/localization/welsh.ts");
/* harmony import */ var _localization_telugu__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../localization/telugu */ "./src/localization/telugu");



















































/***/ }),

/***/ "./src/entries/chunks/model.ts":
/*!*************************************!*\
  !*** ./src/entries/chunks/model.ts ***!
  \*************************************/
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, DragDropSurveyElements, DragDropChoices */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return Version; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkLibraryVersion", function() { return checkLibraryVersion; });
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../settings */ "./src/settings.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return _settings__WEBPACK_IMPORTED_MODULE_0__["settings"]; });

/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers */ "./src/helpers.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Helpers", function() { return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"]; });

/* harmony import */ var _validator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../validator */ "./src/validator.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerCountValidator", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["AnswerCountValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmailValidator", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["EmailValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericValidator", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["NumericValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegexValidator", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["RegexValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyValidator", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["SurveyValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextValidator", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["TextValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorResult", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["ValidatorResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionValidator", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["ExpressionValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorRunner", function() { return _validator__WEBPACK_IMPORTED_MODULE_2__["ValidatorRunner"]; });

/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../itemvalue */ "./src/itemvalue.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ItemValue", function() { return _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]; });

/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base */ "./src/base.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _base__WEBPACK_IMPORTED_MODULE_4__["Base"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return _base__WEBPACK_IMPORTED_MODULE_4__["Event"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayChanges", function() { return _base__WEBPACK_IMPORTED_MODULE_4__["ArrayChanges"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComputedUpdater", function() { return _base__WEBPACK_IMPORTED_MODULE_4__["ComputedUpdater"]; });

/* harmony import */ var _survey_error__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../survey-error */ "./src/survey-error.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyError", function() { return _survey_error__WEBPACK_IMPORTED_MODULE_5__["SurveyError"]; });

/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../survey-element */ "./src/survey-element.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElementCore", function() { return _survey_element__WEBPACK_IMPORTED_MODULE_6__["SurveyElementCore"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElement", function() { return _survey_element__WEBPACK_IMPORTED_MODULE_6__["SurveyElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragTypeOverMeEnum", function() { return _survey_element__WEBPACK_IMPORTED_MODULE_6__["DragTypeOverMeEnum"]; });

/* harmony import */ var _calculatedValue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../calculatedValue */ "./src/calculatedValue.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CalculatedValue", function() { return _calculatedValue__WEBPACK_IMPORTED_MODULE_7__["CalculatedValue"]; });

/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../error */ "./src/error.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomError", function() { return _error__WEBPACK_IMPORTED_MODULE_8__["CustomError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerRequiredError", function() { return _error__WEBPACK_IMPORTED_MODULE_8__["AnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OneAnswerRequiredError", function() { return _error__WEBPACK_IMPORTED_MODULE_8__["OneAnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RequreNumericError", function() { return _error__WEBPACK_IMPORTED_MODULE_8__["RequreNumericError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExceedSizeError", function() { return _error__WEBPACK_IMPORTED_MODULE_8__["ExceedSizeError"]; });

/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../localizablestring */ "./src/localizablestring.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableString", function() { return _localizablestring__WEBPACK_IMPORTED_MODULE_9__["LocalizableString"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableStrings", function() { return _localizablestring__WEBPACK_IMPORTED_MODULE_9__["LocalizableStrings"]; });

/* harmony import */ var _expressionItems__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../expressionItems */ "./src/expressionItems.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HtmlConditionItem", function() { return _expressionItems__WEBPACK_IMPORTED_MODULE_10__["HtmlConditionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UrlConditionItem", function() { return _expressionItems__WEBPACK_IMPORTED_MODULE_10__["UrlConditionItem"]; });

/* harmony import */ var _choicesRestful__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../choicesRestful */ "./src/choicesRestful.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestful", function() { return _choicesRestful__WEBPACK_IMPORTED_MODULE_11__["ChoicesRestful"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestfull", function() { return _choicesRestful__WEBPACK_IMPORTED_MODULE_11__["ChoicesRestfull"]; });

/* harmony import */ var _functionsfactory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../functionsfactory */ "./src/functionsfactory.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionFactory", function() { return _functionsfactory__WEBPACK_IMPORTED_MODULE_12__["FunctionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerFunction", function() { return _functionsfactory__WEBPACK_IMPORTED_MODULE_12__["registerFunction"]; });

/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../conditions */ "./src/conditions.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionRunner", function() { return _conditions__WEBPACK_IMPORTED_MODULE_13__["ConditionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionRunner", function() { return _conditions__WEBPACK_IMPORTED_MODULE_13__["ExpressionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionExecutor", function() { return _conditions__WEBPACK_IMPORTED_MODULE_13__["ExpressionExecutor"]; });

/* harmony import */ var _expressions_expressions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../expressions/expressions */ "./src/expressions/expressions.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Operand", function() { return _expressions_expressions__WEBPACK_IMPORTED_MODULE_14__["Operand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Const", function() { return _expressions_expressions__WEBPACK_IMPORTED_MODULE_14__["Const"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BinaryOperand", function() { return _expressions_expressions__WEBPACK_IMPORTED_MODULE_14__["BinaryOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return _expressions_expressions__WEBPACK_IMPORTED_MODULE_14__["Variable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionOperand", function() { return _expressions_expressions__WEBPACK_IMPORTED_MODULE_14__["FunctionOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayOperand", function() { return _expressions_expressions__WEBPACK_IMPORTED_MODULE_14__["ArrayOperand"]; });

/* harmony import */ var _conditionsParser__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../conditionsParser */ "./src/conditionsParser.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionsParser", function() { return _conditionsParser__WEBPACK_IMPORTED_MODULE_15__["ConditionsParser"]; });

/* harmony import */ var _conditionProcessValue__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../conditionProcessValue */ "./src/conditionProcessValue.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProcessValue", function() { return _conditionProcessValue__WEBPACK_IMPORTED_MODULE_16__["ProcessValue"]; });

/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../jsonobject */ "./src/jsonobject.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonError", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonIncorrectTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadata", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonMetadata"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadataClass", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonMetadataClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonMissingTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeErrorBase", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonMissingTypeErrorBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObjectProperty", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonObjectProperty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonRequiredPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonUnknownPropertyError", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["JsonUnknownPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["Serializer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "property", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["property"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propertyArray", function() { return _jsonobject__WEBPACK_IMPORTED_MODULE_17__["propertyArray"]; });

/* harmony import */ var _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../question_matrixdropdownbase */ "./src/question_matrixdropdownbase.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownCell", function() { return _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_18__["MatrixDropdownCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModelBase", function() { return _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_18__["MatrixDropdownRowModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModelBase", function() { return _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_18__["QuestionMatrixDropdownModelBase"]; });

/* harmony import */ var _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../question_matrixdropdowncolumn */ "./src/question_matrixdropdowncolumn.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownColumn", function() { return _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_19__["MatrixDropdownColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matrixDropdownColumnTypes", function() { return _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_19__["matrixDropdownColumnTypes"]; });

/* harmony import */ var _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../question_matrixdropdownrendered */ "./src/question_matrixdropdownrendered.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedCell", function() { return _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_20__["QuestionMatrixDropdownRenderedCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedRow", function() { return _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_20__["QuestionMatrixDropdownRenderedRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedTable", function() { return _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_20__["QuestionMatrixDropdownRenderedTable"]; });

/* harmony import */ var _question_matrixdropdown__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../question_matrixdropdown */ "./src/question_matrixdropdown.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModel", function() { return _question_matrixdropdown__WEBPACK_IMPORTED_MODULE_21__["MatrixDropdownRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModel", function() { return _question_matrixdropdown__WEBPACK_IMPORTED_MODULE_21__["QuestionMatrixDropdownModel"]; });

/* harmony import */ var _question_matrixdynamic__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../question_matrixdynamic */ "./src/question_matrixdynamic.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDynamicRowModel", function() { return _question_matrixdynamic__WEBPACK_IMPORTED_MODULE_22__["MatrixDynamicRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamicModel", function() { return _question_matrixdynamic__WEBPACK_IMPORTED_MODULE_22__["QuestionMatrixDynamicModel"]; });

/* harmony import */ var _question_matrix__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../question_matrix */ "./src/question_matrix.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixRowModel", function() { return _question_matrix__WEBPACK_IMPORTED_MODULE_23__["MatrixRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixCells", function() { return _question_matrix__WEBPACK_IMPORTED_MODULE_23__["MatrixCells"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixModel", function() { return _question_matrix__WEBPACK_IMPORTED_MODULE_23__["QuestionMatrixModel"]; });

/* harmony import */ var _question_multipletext__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../question_multipletext */ "./src/question_multipletext.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultipleTextItemModel", function() { return _question_multipletext__WEBPACK_IMPORTED_MODULE_24__["MultipleTextItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleTextModel", function() { return _question_multipletext__WEBPACK_IMPORTED_MODULE_24__["QuestionMultipleTextModel"]; });

/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../panel */ "./src/panel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModel", function() { return _panel__WEBPACK_IMPORTED_MODULE_25__["PanelModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModelBase", function() { return _panel__WEBPACK_IMPORTED_MODULE_25__["PanelModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRowModel", function() { return _panel__WEBPACK_IMPORTED_MODULE_25__["QuestionRowModel"]; });

/* harmony import */ var _flowpanel__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../flowpanel */ "./src/flowpanel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlowPanelModel", function() { return _flowpanel__WEBPACK_IMPORTED_MODULE_26__["FlowPanelModel"]; });

/* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../page */ "./src/page.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageModel", function() { return _page__WEBPACK_IMPORTED_MODULE_27__["PageModel"]; });

/* harmony import */ var _template_renderer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../template-renderer */ "./src/template-renderer.ts");
/* empty/unused harmony star reexport *//* harmony import */ var _defaultTitle__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../defaultTitle */ "./src/defaultTitle.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultTitleModel", function() { return _defaultTitle__WEBPACK_IMPORTED_MODULE_29__["DefaultTitleModel"]; });

/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../question */ "./src/question.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Question", function() { return _question__WEBPACK_IMPORTED_MODULE_30__["Question"]; });

/* harmony import */ var _questionnonvalue__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../questionnonvalue */ "./src/questionnonvalue.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionNonValue", function() { return _questionnonvalue__WEBPACK_IMPORTED_MODULE_31__["QuestionNonValue"]; });

/* harmony import */ var _question_empty__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../question_empty */ "./src/question_empty.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionEmptyModel", function() { return _question_empty__WEBPACK_IMPORTED_MODULE_32__["QuestionEmptyModel"]; });

/* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../question_baseselect */ "./src/question_baseselect.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxBase", function() { return _question_baseselect__WEBPACK_IMPORTED_MODULE_33__["QuestionCheckboxBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectBase", function() { return _question_baseselect__WEBPACK_IMPORTED_MODULE_33__["QuestionSelectBase"]; });

/* harmony import */ var _question_checkbox__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../question_checkbox */ "./src/question_checkbox.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxModel", function() { return _question_checkbox__WEBPACK_IMPORTED_MODULE_34__["QuestionCheckboxModel"]; });

/* harmony import */ var _question_tagbox__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../question_tagbox */ "./src/question_tagbox.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTagboxModel", function() { return _question_tagbox__WEBPACK_IMPORTED_MODULE_35__["QuestionTagboxModel"]; });

/* harmony import */ var _question_ranking__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../question_ranking */ "./src/question_ranking.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRankingModel", function() { return _question_ranking__WEBPACK_IMPORTED_MODULE_36__["QuestionRankingModel"]; });

/* harmony import */ var _question_comment__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../question_comment */ "./src/question_comment.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCommentModel", function() { return _question_comment__WEBPACK_IMPORTED_MODULE_37__["QuestionCommentModel"]; });

/* harmony import */ var _question_dropdown__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../question_dropdown */ "./src/question_dropdown.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionDropdownModel", function() { return _question_dropdown__WEBPACK_IMPORTED_MODULE_38__["QuestionDropdownModel"]; });

/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../questionfactory */ "./src/questionfactory.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFactory", function() { return _questionfactory__WEBPACK_IMPORTED_MODULE_39__["QuestionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return _questionfactory__WEBPACK_IMPORTED_MODULE_39__["ElementFactory"]; });

/* harmony import */ var _question_file__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../question_file */ "./src/question_file.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return _question_file__WEBPACK_IMPORTED_MODULE_40__["QuestionFileModel"]; });

/* harmony import */ var _question_html__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../question_html */ "./src/question_html.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionHtmlModel", function() { return _question_html__WEBPACK_IMPORTED_MODULE_41__["QuestionHtmlModel"]; });

/* harmony import */ var _question_radiogroup__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../question_radiogroup */ "./src/question_radiogroup.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRadiogroupModel", function() { return _question_radiogroup__WEBPACK_IMPORTED_MODULE_42__["QuestionRadiogroupModel"]; });

/* harmony import */ var _question_rating__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../question_rating */ "./src/question_rating.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRatingModel", function() { return _question_rating__WEBPACK_IMPORTED_MODULE_43__["QuestionRatingModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderedRatingItem", function() { return _question_rating__WEBPACK_IMPORTED_MODULE_43__["RenderedRatingItem"]; });

/* harmony import */ var _question_expression__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../question_expression */ "./src/question_expression.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionExpressionModel", function() { return _question_expression__WEBPACK_IMPORTED_MODULE_44__["QuestionExpressionModel"]; });

/* harmony import */ var _question_text__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../question_text */ "./src/question_text.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTextModel", function() { return _question_text__WEBPACK_IMPORTED_MODULE_45__["QuestionTextModel"]; });

/* harmony import */ var _question_boolean__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../question_boolean */ "./src/question_boolean.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionBooleanModel", function() { return _question_boolean__WEBPACK_IMPORTED_MODULE_46__["QuestionBooleanModel"]; });

/* harmony import */ var _question_imagepicker__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../question_imagepicker */ "./src/question_imagepicker.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImagePickerModel", function() { return _question_imagepicker__WEBPACK_IMPORTED_MODULE_47__["QuestionImagePickerModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageItemValue", function() { return _question_imagepicker__WEBPACK_IMPORTED_MODULE_47__["ImageItemValue"]; });

/* harmony import */ var _question_image__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../question_image */ "./src/question_image.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImageModel", function() { return _question_image__WEBPACK_IMPORTED_MODULE_48__["QuestionImageModel"]; });

/* harmony import */ var _question_signaturepad__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../../question_signaturepad */ "./src/question_signaturepad.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return _question_signaturepad__WEBPACK_IMPORTED_MODULE_49__["QuestionSignaturePadModel"]; });

/* harmony import */ var _question_paneldynamic__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../question_paneldynamic */ "./src/question_paneldynamic.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicModel", function() { return _question_paneldynamic__WEBPACK_IMPORTED_MODULE_50__["QuestionPanelDynamicModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicItem", function() { return _question_paneldynamic__WEBPACK_IMPORTED_MODULE_50__["QuestionPanelDynamicItem"]; });

/* harmony import */ var _surveytimer__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../surveytimer */ "./src/surveytimer.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimer", function() { return _surveytimer__WEBPACK_IMPORTED_MODULE_51__["SurveyTimer"]; });

/* harmony import */ var _surveyTimerModel__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../../surveyTimerModel */ "./src/surveyTimerModel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimerModel", function() { return _surveyTimerModel__WEBPACK_IMPORTED_MODULE_52__["SurveyTimerModel"]; });

/* harmony import */ var _surveyProgress__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../../surveyProgress */ "./src/surveyProgress.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _surveyProgress__WEBPACK_IMPORTED_MODULE_53__["SurveyProgressModel"]; });

/* harmony import */ var _surveyProgressButtons__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../../surveyProgressButtons */ "./src/surveyProgressButtons.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return _surveyProgressButtons__WEBPACK_IMPORTED_MODULE_54__["SurveyProgressButtonsModel"]; });

/* harmony import */ var _survey__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../../survey */ "./src/survey.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyModel", function() { return _survey__WEBPACK_IMPORTED_MODULE_55__["SurveyModel"]; });

/* harmony import */ var _trigger__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../../trigger */ "./src/trigger.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTrigger", function() { return _trigger__WEBPACK_IMPORTED_MODULE_56__["SurveyTrigger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerComplete", function() { return _trigger__WEBPACK_IMPORTED_MODULE_56__["SurveyTriggerComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerSetValue", function() { return _trigger__WEBPACK_IMPORTED_MODULE_56__["SurveyTriggerSetValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerVisible", function() { return _trigger__WEBPACK_IMPORTED_MODULE_56__["SurveyTriggerVisible"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerCopyValue", function() { return _trigger__WEBPACK_IMPORTED_MODULE_56__["SurveyTriggerCopyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerRunExpression", function() { return _trigger__WEBPACK_IMPORTED_MODULE_56__["SurveyTriggerRunExpression"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return _trigger__WEBPACK_IMPORTED_MODULE_56__["Trigger"]; });

/* harmony import */ var _popup_survey__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../../popup-survey */ "./src/popup-survey.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSurveyModel", function() { return _popup_survey__WEBPACK_IMPORTED_MODULE_57__["PopupSurveyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyWindowModel", function() { return _popup_survey__WEBPACK_IMPORTED_MODULE_57__["SurveyWindowModel"]; });

/* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../../textPreProcessor */ "./src/textPreProcessor.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextPreProcessor", function() { return _textPreProcessor__WEBPACK_IMPORTED_MODULE_58__["TextPreProcessor"]; });

/* harmony import */ var _dxSurveyService__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../../dxSurveyService */ "./src/dxSurveyService.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dxSurveyService", function() { return _dxSurveyService__WEBPACK_IMPORTED_MODULE_59__["dxSurveyService"]; });

/* harmony import */ var _localization_english__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../../localization/english */ "./src/localization/english.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "englishStrings", function() { return _localization_english__WEBPACK_IMPORTED_MODULE_60__["englishStrings"]; });

/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../../surveyStrings */ "./src/surveyStrings.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return _surveyStrings__WEBPACK_IMPORTED_MODULE_61__["surveyLocalization"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return _surveyStrings__WEBPACK_IMPORTED_MODULE_61__["surveyStrings"]; });

/* harmony import */ var _questionCustomWidgets__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../../questionCustomWidgets */ "./src/questionCustomWidgets.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return _questionCustomWidgets__WEBPACK_IMPORTED_MODULE_62__["QuestionCustomWidget"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return _questionCustomWidgets__WEBPACK_IMPORTED_MODULE_62__["CustomWidgetCollection"]; });

/* harmony import */ var _question_custom__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../../question_custom */ "./src/question_custom.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomModel", function() { return _question_custom__WEBPACK_IMPORTED_MODULE_63__["QuestionCustomModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCompositeModel", function() { return _question_custom__WEBPACK_IMPORTED_MODULE_63__["QuestionCompositeModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentQuestionJSON", function() { return _question_custom__WEBPACK_IMPORTED_MODULE_63__["ComponentQuestionJSON"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentCollection", function() { return _question_custom__WEBPACK_IMPORTED_MODULE_63__["ComponentCollection"]; });

/* harmony import */ var _stylesmanager__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../../stylesmanager */ "./src/stylesmanager.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesManager", function() { return _stylesmanager__WEBPACK_IMPORTED_MODULE_64__["StylesManager"]; });

/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../../list */ "./src/list.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListModel", function() { return _list__WEBPACK_IMPORTED_MODULE_65__["ListModel"]; });

/* harmony import */ var _multiSelectListModel__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../../multiSelectListModel */ "./src/multiSelectListModel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectListModel", function() { return _multiSelectListModel__WEBPACK_IMPORTED_MODULE_66__["MultiSelectListModel"]; });

/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../../popup */ "./src/popup.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModel", function() { return _popup__WEBPACK_IMPORTED_MODULE_67__["PopupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDialogOptions", function() { return _popup__WEBPACK_IMPORTED_MODULE_67__["createDialogOptions"]; });

/* harmony import */ var _popup_view_model__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../../popup-view-model */ "./src/popup-view-model.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupBaseViewModel", function() { return _popup_view_model__WEBPACK_IMPORTED_MODULE_68__["PopupBaseViewModel"]; });

/* harmony import */ var _popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../../popup-dropdown-view-model */ "./src/popup-dropdown-view-model.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupDropdownViewModel", function() { return _popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_69__["PopupDropdownViewModel"]; });

/* harmony import */ var _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../../popup-modal-view-model */ "./src/popup-modal-view-model.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModalViewModel", function() { return _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_70__["PopupModalViewModel"]; });

/* harmony import */ var _popup_utils__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../../popup-utils */ "./src/popup-utils.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupViewModel", function() { return _popup_utils__WEBPACK_IMPORTED_MODULE_71__["createPopupViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupModalViewModel", function() { return _popup_utils__WEBPACK_IMPORTED_MODULE_71__["createPopupModalViewModel"]; });

/* harmony import */ var _dropdownListModel__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../../dropdownListModel */ "./src/dropdownListModel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownListModel", function() { return _dropdownListModel__WEBPACK_IMPORTED_MODULE_72__["DropdownListModel"]; });

/* harmony import */ var _dropdownMultiSelectListModel__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../../dropdownMultiSelectListModel */ "./src/dropdownMultiSelectListModel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownMultiSelectListModel", function() { return _dropdownMultiSelectListModel__WEBPACK_IMPORTED_MODULE_73__["DropdownMultiSelectListModel"]; });

/* harmony import */ var _question_buttongroup__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../../question_buttongroup */ "./src/question_buttongroup.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionButtonGroupModel", function() { return _question_buttongroup__WEBPACK_IMPORTED_MODULE_74__["QuestionButtonGroupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemModel", function() { return _question_buttongroup__WEBPACK_IMPORTED_MODULE_74__["ButtonGroupItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemValue", function() { return _question_buttongroup__WEBPACK_IMPORTED_MODULE_74__["ButtonGroupItemValue"]; });

/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../../utils/devices */ "./src/utils/devices.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return _utils_devices__WEBPACK_IMPORTED_MODULE_75__["IsMobile"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return _utils_devices__WEBPACK_IMPORTED_MODULE_75__["IsTouch"]; });

/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../../utils/utils */ "./src/utils/utils.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "confirmAction", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["confirmAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detectIEOrEdge", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["detectIEOrEdge"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickUp", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["doKey2ClickUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickDown", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["doKey2ClickDown"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickBlur", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["doKey2ClickBlur"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["loadFileFromBase64"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "increaseHeightByContent", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["increaseHeightByContent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["createSvg"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_76__["sanitizeEditableContent"]; });

/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_77__["CssClassBuilder"]; });

/* harmony import */ var _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../../defaultCss/cssstandard */ "./src/defaultCss/cssstandard.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_78__["surveyCss"]; });

/* harmony import */ var _dragdrop_survey_elements__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../../dragdrop/survey-elements */ "./src/dragdrop/survey-elements.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropSurveyElements", function() { return _dragdrop_survey_elements__WEBPACK_IMPORTED_MODULE_79__["DragDropSurveyElements"]; });

/* harmony import */ var _dragdrop_choices__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../../dragdrop/choices */ "./src/dragdrop/choices.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropChoices", function() { return _dragdrop_choices__WEBPACK_IMPORTED_MODULE_80__["DragDropChoices"]; });

// styles
// import "../../main.scss";
//import "../../modern.scss";
var Version;
Version = "".concat("1.9.60");
function checkLibraryVersion(ver, libraryName) {
    if (Version != ver) {
        var str = "survey-core has version '" + Version + "' and " + libraryName
            + " has version '" + ver + "'. SurveyJS libraries should have the same versions to work correctly.";
        /* eslint no-console: ["error", { allow: ["error"] }] */
        console.error(str);
    }
}






























































// export { cultureInfo } from "../../cultureInfo";

















//Uncomment to include the "date" question type.
//export {default as QuestionDateModel} from "../../plugins/question_date";




/***/ }),

/***/ "./src/entries/core-wo-model.ts":
/*!**************************************!*\
  !*** ./src/entries/core-wo-model.ts ***!
  \**************************************/
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, DragDropSurveyElements, DragDropChoices, defaultStandardCss, defaultBootstrapCss, defaultBootstrapMaterialCss, defaultV2Css, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, createDropdownActionModel, createDropdownActionModelAdvanced, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _chunks_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunks/model */ "./src/entries/chunks/model.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Version"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkLibraryVersion", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["checkLibraryVersion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["settings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Helpers", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Helpers"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerCountValidator", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["AnswerCountValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmailValidator", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["EmailValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericValidator", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["NumericValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegexValidator", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["RegexValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyValidator", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextValidator", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["TextValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorResult", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ValidatorResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionValidator", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ExpressionValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorRunner", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ValidatorRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ItemValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Base"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Event"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayChanges", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ArrayChanges"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComputedUpdater", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ComputedUpdater"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElementCore", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyElementCore"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElement", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragTypeOverMeEnum", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["DragTypeOverMeEnum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CalculatedValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["CalculatedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["CustomError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerRequiredError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["AnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OneAnswerRequiredError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["OneAnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RequreNumericError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["RequreNumericError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExceedSizeError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ExceedSizeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableString", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableStrings", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["LocalizableStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HtmlConditionItem", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["HtmlConditionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UrlConditionItem", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["UrlConditionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestful", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ChoicesRestful"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestfull", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ChoicesRestfull"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionFactory", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["FunctionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerFunction", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["registerFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionRunner", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ConditionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionRunner", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ExpressionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionExecutor", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ExpressionExecutor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Operand", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Operand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Const", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Const"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BinaryOperand", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["BinaryOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Variable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionOperand", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["FunctionOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayOperand", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ArrayOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionsParser", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ConditionsParser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProcessValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ProcessValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonIncorrectTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadata", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonMetadata"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadataClass", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonMetadataClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonMissingTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeErrorBase", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonMissingTypeErrorBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObjectProperty", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonObjectProperty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonRequiredPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonUnknownPropertyError", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["JsonUnknownPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Serializer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "property", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["property"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propertyArray", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["propertyArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownCell", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModelBase", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModelBase", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownColumn", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matrixDropdownColumnTypes", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["matrixDropdownColumnTypes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedCell", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownRenderedCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedRow", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownRenderedRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedTable", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownRenderedTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDynamicRowModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDynamicRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamicModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDynamicModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixRowModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MatrixRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixCells", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MatrixCells"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultipleTextItemModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MultipleTextItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleTextModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMultipleTextModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PanelModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModelBase", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PanelModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRowModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlowPanelModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["FlowPanelModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PageModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultTitleModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["DefaultTitleModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Question", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Question"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionNonValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionEmptyModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionEmptyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxBase", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCheckboxBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectBase", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionSelectBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCheckboxModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTagboxModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionTagboxModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRankingModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRankingModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCommentModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCommentModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionDropdownModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionDropdownModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFactory", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ElementFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionFileModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionHtmlModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionHtmlModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRadiogroupModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRadiogroupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRatingModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRatingModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderedRatingItem", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["RenderedRatingItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionExpressionModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionExpressionModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTextModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionTextModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionBooleanModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionBooleanModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImagePickerModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionImagePickerModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageItemValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ImageItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImageModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionImageModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionSignaturePadModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionPanelDynamicModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicItem", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionPanelDynamicItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimer", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTimer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimerModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTimerModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressButtonsModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTrigger", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTrigger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerComplete", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerSetValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerSetValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerVisible", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerVisible"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerCopyValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerCopyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerRunExpression", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerRunExpression"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["Trigger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSurveyModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PopupSurveyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyWindowModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyWindowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextPreProcessor", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["TextPreProcessor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dxSurveyService", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["dxSurveyService"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "englishStrings", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["englishStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["surveyStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCustomWidget"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["CustomWidgetCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCustomModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCompositeModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCompositeModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentQuestionJSON", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ComponentQuestionJSON"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentCollection", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesManager", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["StylesManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectListModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["MultiSelectListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PopupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDialogOptions", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["createDialogOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupBaseViewModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PopupBaseViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupDropdownViewModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PopupDropdownViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModalViewModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["PopupModalViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupViewModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["createPopupViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupModalViewModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["createPopupModalViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownListModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["DropdownListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownMultiSelectListModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["DropdownMultiSelectListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionButtonGroupModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["QuestionButtonGroupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ButtonGroupItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemValue", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["ButtonGroupItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["IsMobile"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["IsTouch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "confirmAction", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["confirmAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detectIEOrEdge", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["detectIEOrEdge"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickUp", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["doKey2ClickUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickDown", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["doKey2ClickDown"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickBlur", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["doKey2ClickBlur"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["loadFileFromBase64"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "increaseHeightByContent", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["increaseHeightByContent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["createSvg"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["sanitizeEditableContent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropSurveyElements", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["DragDropSurveyElements"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropChoices", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["DragDropChoices"]; });

/* harmony import */ var _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../defaultCss/cssstandard */ "./src/defaultCss/cssstandard.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStandardCss", function() { return _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_1__["defaultStandardCss"]; });

/* harmony import */ var _defaultCss_cssbootstrap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../defaultCss/cssbootstrap */ "./src/defaultCss/cssbootstrap.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapCss", function() { return _defaultCss_cssbootstrap__WEBPACK_IMPORTED_MODULE_2__["defaultBootstrapCss"]; });

/* harmony import */ var _defaultCss_cssbootstrapmaterial__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../defaultCss/cssbootstrapmaterial */ "./src/defaultCss/cssbootstrapmaterial.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapMaterialCss", function() { return _defaultCss_cssbootstrapmaterial__WEBPACK_IMPORTED_MODULE_3__["defaultBootstrapMaterialCss"]; });

/* harmony import */ var _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaultCss/defaultV2Css */ "./src/defaultCss/defaultV2Css.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_4__["defaultV2Css"]; });

/* harmony import */ var _defaultCss_cssmodern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../defaultCss/cssmodern */ "./src/defaultCss/cssmodern.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modernCss", function() { return _defaultCss_cssmodern__WEBPACK_IMPORTED_MODULE_5__["modernCss"]; });

/* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../svgbundle */ "./src/svgbundle.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIconRegistry", function() { return _svgbundle__WEBPACK_IMPORTED_MODULE_6__["SvgIconRegistry"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgRegistry", function() { return _svgbundle__WEBPACK_IMPORTED_MODULE_6__["SvgRegistry"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgBundleViewModel", function() { return _svgbundle__WEBPACK_IMPORTED_MODULE_6__["SvgBundleViewModel"]; });

/* harmony import */ var _rendererFactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../rendererFactory */ "./src/rendererFactory.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RendererFactory", function() { return _rendererFactory__WEBPACK_IMPORTED_MODULE_7__["RendererFactory"]; });

/* harmony import */ var _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/responsivity-manager */ "./src/utils/responsivity-manager.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResponsivityManager", function() { return _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_8__["ResponsivityManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VerticalResponsivityManager", function() { return _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_8__["VerticalResponsivityManager"]; });

/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unwrap", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_9__["unwrap"]; });

/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../actions/action */ "./src/actions/action.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_10__["createDropdownActionModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_10__["createDropdownActionModelAdvanced"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_10__["ActionDropdownViewModel"]; });

/* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../actions/adaptive-container */ "./src/actions/adaptive-container.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_11__["AdaptiveActionContainer"]; });

/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../actions/container */ "./src/actions/container.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_12__["defaultActionBarCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_12__["ActionContainer"]; });

/* harmony import */ var _utils_tooltip__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/tooltip */ "./src/utils/tooltip.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipManager", function() { return _utils_tooltip__WEBPACK_IMPORTED_MODULE_13__["TooltipManager"]; });

/* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_14__["DragOrClickHelper"]; });

// model

// css standard classes

// css bootstrap classes

// css bootstrap + material classes


// css modern classes


// utils










/***/ }),

/***/ "./src/entries/core.ts":
/*!*****************************!*\
  !*** ./src/entries/core.ts ***!
  \*****************************/
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, DragDropSurveyElements, DragDropChoices, defaultStandardCss, defaultBootstrapCss, defaultBootstrapMaterialCss, defaultV2Css, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, createDropdownActionModel, createDropdownActionModelAdvanced, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _core_wo_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core-wo-model */ "./src/entries/core-wo-model.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Version"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkLibraryVersion", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["checkLibraryVersion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["settings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Helpers", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Helpers"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerCountValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnswerCountValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmailValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["EmailValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["NumericValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegexValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["RegexValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["TextValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorResult", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ValidatorResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ExpressionValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorRunner", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ValidatorRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ItemValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Base"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Event"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayChanges", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ArrayChanges"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComputedUpdater", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ComputedUpdater"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElementCore", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyElementCore"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElement", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragTypeOverMeEnum", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["DragTypeOverMeEnum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CalculatedValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["CalculatedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["CustomError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerRequiredError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OneAnswerRequiredError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["OneAnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RequreNumericError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["RequreNumericError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExceedSizeError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ExceedSizeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableString", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableStrings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["LocalizableStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HtmlConditionItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["HtmlConditionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UrlConditionItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["UrlConditionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestful", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ChoicesRestful"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestfull", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ChoicesRestfull"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["FunctionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerFunction", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["registerFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionRunner", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ConditionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionRunner", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ExpressionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionExecutor", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ExpressionExecutor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Operand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Operand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Const", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Const"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BinaryOperand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["BinaryOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Variable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionOperand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["FunctionOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayOperand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ArrayOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionsParser", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ConditionsParser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProcessValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ProcessValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonIncorrectTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadata", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonMetadata"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadataClass", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonMetadataClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonMissingTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeErrorBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonMissingTypeErrorBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObjectProperty", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonObjectProperty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonRequiredPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonUnknownPropertyError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["JsonUnknownPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Serializer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "property", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["property"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propertyArray", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["propertyArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownCell", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModelBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModelBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownColumn", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matrixDropdownColumnTypes", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["matrixDropdownColumnTypes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedCell", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownRenderedCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedRow", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownRenderedRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedTable", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownRenderedTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDynamicRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MatrixDynamicRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamicModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDynamicModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MatrixRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixCells", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MatrixCells"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultipleTextItemModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MultipleTextItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleTextModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionMultipleTextModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PanelModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModelBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PanelModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlowPanelModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["FlowPanelModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PageModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultTitleModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["DefaultTitleModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Question", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Question"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionNonValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionEmptyModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionEmptyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCheckboxBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionSelectBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCheckboxModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTagboxModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionTagboxModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRankingModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRankingModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCommentModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCommentModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionDropdownModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionDropdownModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ElementFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionFileModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionHtmlModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionHtmlModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRadiogroupModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRadiogroupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRatingModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionRatingModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderedRatingItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["RenderedRatingItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionExpressionModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionExpressionModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTextModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionTextModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionBooleanModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionBooleanModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImagePickerModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionImagePickerModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageItemValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ImageItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImageModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionImageModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionSignaturePadModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionPanelDynamicModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionPanelDynamicItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTimer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimerModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTimerModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressButtonsModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTrigger", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTrigger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerComplete", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerSetValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerSetValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerVisible", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerVisible"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerCopyValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerCopyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerRunExpression", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyTriggerRunExpression"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Trigger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSurveyModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PopupSurveyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyWindowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyWindowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextPreProcessor", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["TextPreProcessor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dxSurveyService", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["dxSurveyService"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "englishStrings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["englishStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["surveyStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCustomWidget"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["CustomWidgetCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCustomModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCompositeModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionCompositeModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentQuestionJSON", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ComponentQuestionJSON"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentCollection", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["StylesManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["MultiSelectListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PopupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDialogOptions", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createDialogOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupBaseViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PopupBaseViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupDropdownViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PopupDropdownViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModalViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["PopupModalViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createPopupViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupModalViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createPopupModalViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["DropdownListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownMultiSelectListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["DropdownMultiSelectListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionButtonGroupModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["QuestionButtonGroupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ButtonGroupItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ButtonGroupItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["IsMobile"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["IsTouch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "confirmAction", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["confirmAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detectIEOrEdge", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["detectIEOrEdge"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickUp", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["doKey2ClickUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickDown", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["doKey2ClickDown"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickBlur", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["doKey2ClickBlur"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["loadFileFromBase64"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "increaseHeightByContent", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["increaseHeightByContent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createSvg"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["sanitizeEditableContent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropSurveyElements", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["DragDropSurveyElements"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropChoices", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["DragDropChoices"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStandardCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultStandardCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultBootstrapCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapMaterialCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultBootstrapMaterialCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultV2Css"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modernCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["modernCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIconRegistry", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SvgIconRegistry"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgRegistry", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SvgRegistry"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgBundleViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SvgBundleViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RendererFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["RendererFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResponsivityManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VerticalResponsivityManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["VerticalResponsivityManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unwrap", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["unwrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createDropdownActionModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createDropdownActionModelAdvanced"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["Action"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ActionDropdownViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AdaptiveActionContainer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultActionBarCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ActionContainer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["TooltipManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["DragOrClickHelper"]; });

/* harmony import */ var _survey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../survey */ "./src/survey.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return _survey__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"]; });

// model




/***/ }),

/***/ "./src/entries/jquery.ts":
/*!*******************************!*\
  !*** ./src/entries/jquery.ts ***!
  \*******************************/
/*! exports provided: Model, Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, DragDropSurveyElements, DragDropChoices, defaultStandardCss, defaultBootstrapCss, defaultBootstrapMaterialCss, defaultV2Css, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, createDropdownActionModel, createDropdownActionModelAdvanced, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, ko */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ko", function() { return innerKo; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jquery */ "jquery");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _knockout_ui_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./knockout-ui-model */ "./src/entries/knockout-ui-model.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return _knockout_ui_model__WEBPACK_IMPORTED_MODULE_2__["Model"]; });

/* harmony import */ var _core_wo_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core-wo-model */ "./src/entries/core-wo-model.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Version"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkLibraryVersion", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["checkLibraryVersion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["settings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Helpers", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Helpers"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerCountValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["AnswerCountValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmailValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["EmailValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["NumericValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegexValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["RegexValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["TextValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorResult", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ValidatorResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionValidator", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ExpressionValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValidatorRunner", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ValidatorRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ItemValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Base"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Event"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayChanges", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ArrayChanges"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComputedUpdater", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElementCore", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyElementCore"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyElement", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragTypeOverMeEnum", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["DragTypeOverMeEnum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CalculatedValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["CalculatedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["CustomError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnswerRequiredError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["AnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OneAnswerRequiredError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["OneAnswerRequiredError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RequreNumericError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["RequreNumericError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExceedSizeError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ExceedSizeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableString", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["LocalizableString"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalizableStrings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["LocalizableStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HtmlConditionItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["HtmlConditionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UrlConditionItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["UrlConditionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestful", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ChoicesRestful"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChoicesRestfull", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ChoicesRestfull"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["FunctionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerFunction", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["registerFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionRunner", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionRunner", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ExpressionRunner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionExecutor", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ExpressionExecutor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Operand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Operand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Const", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Const"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BinaryOperand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["BinaryOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Variable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionOperand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["FunctionOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArrayOperand", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ArrayOperand"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConditionsParser", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ConditionsParser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProcessValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ProcessValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonIncorrectTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadata", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonMetadata"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMetadataClass", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonMetadataClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonMissingTypeError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeErrorBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonMissingTypeErrorBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonObjectProperty", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonObjectProperty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonRequiredPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonUnknownPropertyError", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["JsonUnknownPropertyError"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Serializer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "property", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["property"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propertyArray", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["propertyArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownCell", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MatrixDropdownCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModelBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MatrixDropdownRowModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModelBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMatrixDropdownModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownColumn", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MatrixDropdownColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matrixDropdownColumnTypes", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["matrixDropdownColumnTypes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedCell", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMatrixDropdownRenderedCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedRow", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMatrixDropdownRenderedRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedTable", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMatrixDropdownRenderedTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MatrixDropdownRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMatrixDropdownModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixDynamicRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MatrixDynamicRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamicModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMatrixDynamicModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MatrixRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixCells", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MatrixCells"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMatrixModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultipleTextItemModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MultipleTextItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleTextModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionMultipleTextModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PanelModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelModelBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PanelModelBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionRowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlowPanelModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["FlowPanelModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PageModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultTitleModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["DefaultTitleModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Question", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Question"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionNonValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionNonValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionEmptyModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionEmptyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionCheckboxBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionSelectBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionCheckboxModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTagboxModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionTagboxModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRankingModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionRankingModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCommentModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionCommentModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionDropdownModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionDropdownModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ElementFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionFileModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionHtmlModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionHtmlModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRadiogroupModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionRadiogroupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRatingModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionRatingModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderedRatingItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["RenderedRatingItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionExpressionModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionExpressionModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTextModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionTextModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionBooleanModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionBooleanModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImagePickerModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionImagePickerModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageItemValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ImageItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImageModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionImageModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionSignaturePadModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionPanelDynamicModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicItem", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionPanelDynamicItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTimer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTimerModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTimerModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyProgressModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyProgressButtonsModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTrigger", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTrigger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerComplete", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTriggerComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerSetValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTriggerSetValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerVisible", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTriggerVisible"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerCopyValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTriggerCopyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerRunExpression", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyTriggerRunExpression"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Trigger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSurveyModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PopupSurveyModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyWindowModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SurveyWindowModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextPreProcessor", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["TextPreProcessor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dxSurveyService", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["dxSurveyService"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "englishStrings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["englishStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["surveyLocalization"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["surveyStrings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionCustomWidget"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["CustomWidgetCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionCustomModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCompositeModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionCompositeModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentQuestionJSON", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ComponentQuestionJSON"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentCollection", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ComponentCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["StylesManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PopupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDialogOptions", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["createDialogOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupBaseViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PopupBaseViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupDropdownViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PopupDropdownViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupModalViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["PopupModalViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["createPopupViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupModalViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["createPopupModalViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["DropdownListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownMultiSelectListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["DropdownMultiSelectListModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionButtonGroupModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["QuestionButtonGroupModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ButtonGroupItemModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemValue", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ButtonGroupItemValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["IsMobile"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "confirmAction", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["confirmAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detectIEOrEdge", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["detectIEOrEdge"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickUp", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["doKey2ClickUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickDown", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["doKey2ClickDown"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickBlur", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["doKey2ClickBlur"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["loadFileFromBase64"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "increaseHeightByContent", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["increaseHeightByContent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["createSvg"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["sanitizeEditableContent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["surveyCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropSurveyElements", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["DragDropSurveyElements"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropChoices", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["DragDropChoices"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStandardCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["defaultStandardCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["defaultBootstrapCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultBootstrapMaterialCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["defaultBootstrapMaterialCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["defaultV2Css"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modernCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["modernCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIconRegistry", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SvgIconRegistry"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgRegistry", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SvgRegistry"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgBundleViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["SvgBundleViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RendererFactory", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["RendererFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResponsivityManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ResponsivityManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VerticalResponsivityManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["VerticalResponsivityManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unwrap", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["unwrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["createDropdownActionModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["createDropdownActionModelAdvanced"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["Action"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ActionDropdownViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["AdaptiveActionContainer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["defaultActionBarCss"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["ActionContainer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipManager", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["TooltipManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_3__["DragOrClickHelper"]; });

/* harmony import */ var _chunks_localization__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./chunks/localization */ "./src/entries/chunks/localization.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./core */ "./src/entries/core.ts");
/* harmony import */ var _knockout_kosurvey__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../knockout/kosurvey */ "./src/knockout/kosurvey.ts");





// localization

var innerKo = knockout__WEBPACK_IMPORTED_MODULE_0__;



jquery__WEBPACK_IMPORTED_MODULE_1___default.a["fn"].extend({
    Survey: function (props) {
        return this.each(function () {
            var model = props.model;
            model.updateSurvey(props);
            model.render(this);
        });
    },
    PopupSurvey: doPopupSurvey,
    SurveyWindow: doPopupSurvey
});
function doPopupSurvey(props) {
    return this.each(function () {
        var model = props.model;
        model.updateSurvey(props);
        var survey = new _knockout_ui_model__WEBPACK_IMPORTED_MODULE_2__["PopupSurvey"](null, model);
        if (props.expanded !== undefined) {
            survey.isExpanded = props.expanded;
        }
        if (props.isExpanded !== undefined) {
            survey.isExpanded = props.isExpanded;
        }
        if (props.closeOnCompleteTimeout !== undefined) {
            survey.closeOnCompleteTimeout = props.closeOnCompleteTimeout;
        }
        survey.show();
    });
}
_core__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform = "jquery";
Object(_knockout_kosurvey__WEBPACK_IMPORTED_MODULE_6__["registerTemplateEngine"])(knockout__WEBPACK_IMPORTED_MODULE_0__, _core__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform);


/***/ }),

/***/ "./src/entries/knockout-ui-model.ts":
/*!******************************************!*\
  !*** ./src/entries/knockout-ui-model.ts ***!
  \******************************************/
/*! exports provided: Survey, Model, PopupSurvey, SurveyWindow, ImplementorBase, QuestionRow, Page, Panel, FlowPanel, QuestionImplementor, QuestionSelectBaseImplementor, QuestionCheckboxBaseImplementor, QuestionCheckbox, QuestionTagbox, QuestionRanking, QuestionComment, QuestionDropdown, QuestionFile, QuestionHtml, QuestionMatrix, QuestionMatrixDropdown, QuestionMatrixDynamicImplementor, QuestionMatrixDynamic, QuestionPanelDynamic, MultipleTextItem, QuestionMultipleText, QuestionRadiogroup, QuestionRating, QuestionRatingImplementor, QuestionText, QuestionBoolean, QuestionEmpty, QuestionExpression, QuestionImagePicker, PopupSurveyImplementor, SurveyTemplateText, QuestionImage, QuestionSignaturePad, QuestionCustom, QuestionButtonGroup, ActionBarItemViewModel, ActionBarItemDropdownViewModel, ActionBarSeparatorViewModel, ActionContainerImplementor, CheckboxViewModel, BooleanRadioItemViewModel, BooleanRadioViewModel, PanelViewModel, PopupViewModel, showModal, showDialog, ProgressButtonsViewModel, ProgressViewModel, TitleElementViewModel, TitleContentViewModel, TitleActionViewModel, StringEditorViewModel, StringViewerViewModel, LogoImageViewModel, Skeleton, RatingDropdownViewModel, DropdownViewModel, DropdownSelectViewModel, TagboxViewComponent, TagboxViewModel, ListItemViewComponent, ListViewComponent, SvgIconViewModel, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, ButtonGroupItemViewModel, TooltipErrorViewModel, SurveyNavigationButton, SurveyQuestionPaneldynamicActioons, BrandInfoComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _knockout_kosurvey__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../knockout/kosurvey */ "./src/knockout/kosurvey.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Survey", function() { return _knockout_kosurvey__WEBPACK_IMPORTED_MODULE_0__["Survey"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return _knockout_kosurvey__WEBPACK_IMPORTED_MODULE_0__["Survey"]; });

/* harmony import */ var _knockout_koPopupSurvey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../knockout/koPopupSurvey */ "./src/knockout/koPopupSurvey.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSurvey", function() { return _knockout_koPopupSurvey__WEBPACK_IMPORTED_MODULE_1__["PopupSurvey"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyWindow", function() { return _knockout_koPopupSurvey__WEBPACK_IMPORTED_MODULE_1__["SurveyWindow"]; });

/* harmony import */ var _knockout_kobase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../knockout/kobase */ "./src/knockout/kobase.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImplementorBase", function() { return _knockout_kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"]; });

/* harmony import */ var _knockout_kopage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../knockout/kopage */ "./src/knockout/kopage.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRow", function() { return _knockout_kopage__WEBPACK_IMPORTED_MODULE_3__["QuestionRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return _knockout_kopage__WEBPACK_IMPORTED_MODULE_3__["Page"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Panel", function() { return _knockout_kopage__WEBPACK_IMPORTED_MODULE_3__["Panel"]; });

/* harmony import */ var _knockout_koflowpanel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../knockout/koflowpanel */ "./src/knockout/koflowpanel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlowPanel", function() { return _knockout_koflowpanel__WEBPACK_IMPORTED_MODULE_4__["FlowPanel"]; });

/* harmony import */ var _knockout_koquestion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../knockout/koquestion */ "./src/knockout/koquestion.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImplementor", function() { return _knockout_koquestion__WEBPACK_IMPORTED_MODULE_5__["QuestionImplementor"]; });

/* harmony import */ var _knockout_koquestion_baseselect__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../knockout/koquestion_baseselect */ "./src/knockout/koquestion_baseselect.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectBaseImplementor", function() { return _knockout_koquestion_baseselect__WEBPACK_IMPORTED_MODULE_6__["QuestionSelectBaseImplementor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxBaseImplementor", function() { return _knockout_koquestion_baseselect__WEBPACK_IMPORTED_MODULE_6__["QuestionCheckboxBaseImplementor"]; });

/* harmony import */ var _knockout_koquestion_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../knockout/koquestion_checkbox */ "./src/knockout/koquestion_checkbox.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckbox", function() { return _knockout_koquestion_checkbox__WEBPACK_IMPORTED_MODULE_7__["QuestionCheckbox"]; });

/* harmony import */ var _knockout_koquestion_tagbox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../knockout/koquestion_tagbox */ "./src/knockout/koquestion_tagbox.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionTagbox", function() { return _knockout_koquestion_tagbox__WEBPACK_IMPORTED_MODULE_8__["QuestionTagbox"]; });

/* harmony import */ var _knockout_koquestion_ranking__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../knockout/koquestion_ranking */ "./src/knockout/koquestion_ranking.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRanking", function() { return _knockout_koquestion_ranking__WEBPACK_IMPORTED_MODULE_9__["QuestionRanking"]; });

/* harmony import */ var _knockout_koquestion_comment__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../knockout/koquestion_comment */ "./src/knockout/koquestion_comment.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionComment", function() { return _knockout_koquestion_comment__WEBPACK_IMPORTED_MODULE_10__["QuestionComment"]; });

/* harmony import */ var _knockout_koquestion_dropdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../knockout/koquestion_dropdown */ "./src/knockout/koquestion_dropdown.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionDropdown", function() { return _knockout_koquestion_dropdown__WEBPACK_IMPORTED_MODULE_11__["QuestionDropdown"]; });

/* harmony import */ var _knockout_koquestion_file__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../knockout/koquestion_file */ "./src/knockout/koquestion_file.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionFile", function() { return _knockout_koquestion_file__WEBPACK_IMPORTED_MODULE_12__["QuestionFile"]; });

/* harmony import */ var _knockout_koquestion_html__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../knockout/koquestion_html */ "./src/knockout/koquestion_html.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionHtml", function() { return _knockout_koquestion_html__WEBPACK_IMPORTED_MODULE_13__["QuestionHtml"]; });

/* harmony import */ var _knockout_koquestion_matrix__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../knockout/koquestion_matrix */ "./src/knockout/koquestion_matrix.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrix", function() { return _knockout_koquestion_matrix__WEBPACK_IMPORTED_MODULE_14__["QuestionMatrix"]; });

/* harmony import */ var _knockout_koquestion_matrixdropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../knockout/koquestion_matrixdropdown */ "./src/knockout/koquestion_matrixdropdown.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdown", function() { return _knockout_koquestion_matrixdropdown__WEBPACK_IMPORTED_MODULE_15__["QuestionMatrixDropdown"]; });

/* harmony import */ var _knockout_koquestion_matrixdynamic__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../knockout/koquestion_matrixdynamic */ "./src/knockout/koquestion_matrixdynamic.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamicImplementor", function() { return _knockout_koquestion_matrixdynamic__WEBPACK_IMPORTED_MODULE_16__["QuestionMatrixDynamicImplementor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamic", function() { return _knockout_koquestion_matrixdynamic__WEBPACK_IMPORTED_MODULE_16__["QuestionMatrixDynamic"]; });

/* harmony import */ var _knockout_koquestion_paneldynamic__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../knockout/koquestion_paneldynamic */ "./src/knockout/koquestion_paneldynamic.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamic", function() { return _knockout_koquestion_paneldynamic__WEBPACK_IMPORTED_MODULE_17__["QuestionPanelDynamic"]; });

/* harmony import */ var _knockout_koquestion_multipletext__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../knockout/koquestion_multipletext */ "./src/knockout/koquestion_multipletext.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultipleTextItem", function() { return _knockout_koquestion_multipletext__WEBPACK_IMPORTED_MODULE_18__["MultipleTextItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleText", function() { return _knockout_koquestion_multipletext__WEBPACK_IMPORTED_MODULE_18__["QuestionMultipleText"]; });

/* harmony import */ var _knockout_koquestion_radiogroup__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../knockout/koquestion_radiogroup */ "./src/knockout/koquestion_radiogroup.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRadiogroup", function() { return _knockout_koquestion_radiogroup__WEBPACK_IMPORTED_MODULE_19__["QuestionRadiogroup"]; });

/* harmony import */ var _knockout_koquestion_rating__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../knockout/koquestion_rating */ "./src/knockout/koquestion_rating.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRating", function() { return _knockout_koquestion_rating__WEBPACK_IMPORTED_MODULE_20__["QuestionRating"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionRatingImplementor", function() { return _knockout_koquestion_rating__WEBPACK_IMPORTED_MODULE_20__["QuestionRatingImplementor"]; });

/* harmony import */ var _knockout_koquestion_text__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../knockout/koquestion_text */ "./src/knockout/koquestion_text.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionText", function() { return _knockout_koquestion_text__WEBPACK_IMPORTED_MODULE_21__["QuestionText"]; });

/* harmony import */ var _knockout_koquestion_boolean__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../knockout/koquestion_boolean */ "./src/knockout/koquestion_boolean.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionBoolean", function() { return _knockout_koquestion_boolean__WEBPACK_IMPORTED_MODULE_22__["QuestionBoolean"]; });

/* harmony import */ var _knockout_koquestion_empty__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../knockout/koquestion_empty */ "./src/knockout/koquestion_empty.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionEmpty", function() { return _knockout_koquestion_empty__WEBPACK_IMPORTED_MODULE_23__["QuestionEmpty"]; });

/* harmony import */ var _knockout_koquestion_expression__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../knockout/koquestion_expression */ "./src/knockout/koquestion_expression.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionExpression", function() { return _knockout_koquestion_expression__WEBPACK_IMPORTED_MODULE_24__["QuestionExpression"]; });

/* harmony import */ var _knockout_koquestion_imagepicker__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../knockout/koquestion_imagepicker */ "./src/knockout/koquestion_imagepicker.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImagePicker", function() { return _knockout_koquestion_imagepicker__WEBPACK_IMPORTED_MODULE_25__["QuestionImagePicker"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSurveyImplementor", function() { return _knockout_koPopupSurvey__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyImplementor"]; });

/* harmony import */ var _knockout_templateText__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../knockout/templateText */ "./src/knockout/templateText.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyTemplateText", function() { return _knockout_templateText__WEBPACK_IMPORTED_MODULE_26__["SurveyTemplateText"]; });

/* harmony import */ var _knockout_koquestion_image__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../knockout/koquestion_image */ "./src/knockout/koquestion_image.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionImage", function() { return _knockout_koquestion_image__WEBPACK_IMPORTED_MODULE_27__["QuestionImage"]; });

/* harmony import */ var _knockout_koquestion_signaturepad__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../knockout/koquestion_signaturepad */ "./src/knockout/koquestion_signaturepad.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePad", function() { return _knockout_koquestion_signaturepad__WEBPACK_IMPORTED_MODULE_28__["QuestionSignaturePad"]; });

/* harmony import */ var _knockout_koquestion_custom__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../knockout/koquestion_custom */ "./src/knockout/koquestion_custom.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionCustom", function() { return _knockout_koquestion_custom__WEBPACK_IMPORTED_MODULE_29__["QuestionCustom"]; });

/* harmony import */ var _knockout_koquestion_buttongroup__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../knockout/koquestion_buttongroup */ "./src/knockout/koquestion_buttongroup.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionButtonGroup", function() { return _knockout_koquestion_buttongroup__WEBPACK_IMPORTED_MODULE_30__["QuestionButtonGroup"]; });

/* harmony import */ var _knockout_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../knockout/components/action-bar/action-bar */ "./src/knockout/components/action-bar/action-bar.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionBarItemViewModel", function() { return _knockout_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_31__["ActionBarItemViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionBarItemDropdownViewModel", function() { return _knockout_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_31__["ActionBarItemDropdownViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionBarSeparatorViewModel", function() { return _knockout_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_31__["ActionBarSeparatorViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainerImplementor", function() { return _knockout_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_31__["ActionContainerImplementor"]; });

/* harmony import */ var _knockout_components_boolean_checkbox_boolean_checkbox__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../knockout/components/boolean-checkbox/boolean-checkbox */ "./src/knockout/components/boolean-checkbox/boolean-checkbox.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxViewModel", function() { return _knockout_components_boolean_checkbox_boolean_checkbox__WEBPACK_IMPORTED_MODULE_32__["CheckboxViewModel"]; });

/* harmony import */ var _knockout_components_boolean_radio_boolean_radio__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../knockout/components/boolean-radio/boolean-radio */ "./src/knockout/components/boolean-radio/boolean-radio.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanRadioItemViewModel", function() { return _knockout_components_boolean_radio_boolean_radio__WEBPACK_IMPORTED_MODULE_33__["BooleanRadioItemViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanRadioViewModel", function() { return _knockout_components_boolean_radio_boolean_radio__WEBPACK_IMPORTED_MODULE_33__["BooleanRadioViewModel"]; });

/* harmony import */ var _knockout_components_panel_panel__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../knockout/components/panel/panel */ "./src/knockout/components/panel/panel.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelViewModel", function() { return _knockout_components_panel_panel__WEBPACK_IMPORTED_MODULE_34__["PanelViewModel"]; });

/* harmony import */ var _knockout_components_popup_popup__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../knockout/components/popup/popup */ "./src/knockout/components/popup/popup.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupViewModel", function() { return _knockout_components_popup_popup__WEBPACK_IMPORTED_MODULE_35__["PopupViewModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showModal", function() { return _knockout_components_popup_popup__WEBPACK_IMPORTED_MODULE_35__["showModal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showDialog", function() { return _knockout_components_popup_popup__WEBPACK_IMPORTED_MODULE_35__["showDialog"]; });

/* harmony import */ var _knockout_components_progress_buttons__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../knockout/components/progress/buttons */ "./src/knockout/components/progress/buttons.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressButtonsViewModel", function() { return _knockout_components_progress_buttons__WEBPACK_IMPORTED_MODULE_36__["ProgressButtonsViewModel"]; });

/* harmony import */ var _knockout_components_progress_progress__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../knockout/components/progress/progress */ "./src/knockout/components/progress/progress.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressViewModel", function() { return _knockout_components_progress_progress__WEBPACK_IMPORTED_MODULE_37__["ProgressViewModel"]; });

/* harmony import */ var _knockout_components_template_renderer_template_renderer__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../knockout/components/template-renderer/template-renderer */ "./src/knockout/components/template-renderer/template-renderer.ts");
/* empty/unused harmony star reexport *//* harmony import */ var _knockout_components_title_title_element__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../knockout/components/title/title-element */ "./src/knockout/components/title/title-element.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleElementViewModel", function() { return _knockout_components_title_title_element__WEBPACK_IMPORTED_MODULE_39__["TitleElementViewModel"]; });

/* harmony import */ var _knockout_components_title_title_content__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../knockout/components/title/title-content */ "./src/knockout/components/title/title-content.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleContentViewModel", function() { return _knockout_components_title_title_content__WEBPACK_IMPORTED_MODULE_40__["TitleContentViewModel"]; });

/* harmony import */ var _knockout_components_title_title_actions__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../knockout/components/title/title-actions */ "./src/knockout/components/title/title-actions.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleActionViewModel", function() { return _knockout_components_title_title_actions__WEBPACK_IMPORTED_MODULE_41__["TitleActionViewModel"]; });

/* harmony import */ var _knockout_components_string_editor_string_editor__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../knockout/components/string-editor/string-editor */ "./src/knockout/components/string-editor/string-editor.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringEditorViewModel", function() { return _knockout_components_string_editor_string_editor__WEBPACK_IMPORTED_MODULE_42__["StringEditorViewModel"]; });

/* harmony import */ var _knockout_components_string_viewer_string_viewer__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../knockout/components/string-viewer/string-viewer */ "./src/knockout/components/string-viewer/string-viewer.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringViewerViewModel", function() { return _knockout_components_string_viewer_string_viewer__WEBPACK_IMPORTED_MODULE_43__["StringViewerViewModel"]; });

/* harmony import */ var _knockout_components_logo_image_logo_image__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../knockout/components/logo-image/logo-image */ "./src/knockout/components/logo-image/logo-image.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LogoImageViewModel", function() { return _knockout_components_logo_image_logo_image__WEBPACK_IMPORTED_MODULE_44__["LogoImageViewModel"]; });

/* harmony import */ var _knockout_components_skeleton_skeleton__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../knockout/components/skeleton/skeleton */ "./src/knockout/components/skeleton/skeleton.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Skeleton", function() { return _knockout_components_skeleton_skeleton__WEBPACK_IMPORTED_MODULE_45__["Skeleton"]; });

/* harmony import */ var _knockout_components_rating_dropdown_rating_dropdown__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../knockout/components/rating-dropdown/rating-dropdown */ "./src/knockout/components/rating-dropdown/rating-dropdown.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingDropdownViewModel", function() { return _knockout_components_rating_dropdown_rating_dropdown__WEBPACK_IMPORTED_MODULE_46__["RatingDropdownViewModel"]; });

/* harmony import */ var _knockout_components_dropdown_dropdown__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../knockout/components/dropdown/dropdown */ "./src/knockout/components/dropdown/dropdown.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownViewModel", function() { return _knockout_components_dropdown_dropdown__WEBPACK_IMPORTED_MODULE_47__["DropdownViewModel"]; });

/* harmony import */ var _knockout_components_dropdown_select_dropdown_select__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../knockout/components/dropdown-select/dropdown-select */ "./src/knockout/components/dropdown-select/dropdown-select.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropdownSelectViewModel", function() { return _knockout_components_dropdown_select_dropdown_select__WEBPACK_IMPORTED_MODULE_48__["DropdownSelectViewModel"]; });

/* harmony import */ var _knockout_components_tagbox_tagbox_item__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../knockout/components/tagbox/tagbox-item */ "./src/knockout/components/tagbox/tagbox-item.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TagboxViewComponent", function() { return _knockout_components_tagbox_tagbox_item__WEBPACK_IMPORTED_MODULE_49__["TagboxViewComponent"]; });

/* harmony import */ var _knockout_components_tagbox_tagbox__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../knockout/components/tagbox/tagbox */ "./src/knockout/components/tagbox/tagbox.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TagboxViewModel", function() { return _knockout_components_tagbox_tagbox__WEBPACK_IMPORTED_MODULE_50__["TagboxViewModel"]; });

/* harmony import */ var _knockout_components_list_list__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../knockout/components/list/list */ "./src/knockout/components/list/list.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemViewComponent", function() { return _knockout_components_list_list__WEBPACK_IMPORTED_MODULE_51__["ListItemViewComponent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListViewComponent", function() { return _knockout_components_list_list__WEBPACK_IMPORTED_MODULE_51__["ListViewComponent"]; });

/* harmony import */ var _knockout_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../knockout/components/svg-icon/svg-icon */ "./src/knockout/components/svg-icon/svg-icon.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIconViewModel", function() { return _knockout_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_52__["SvgIconViewModel"]; });

/* harmony import */ var _knockout_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../knockout/components/matrix-actions/remove-button/remove-button */ "./src/knockout/components/matrix-actions/remove-button/remove-button.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicRemoveButton", function() { return _knockout_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_53__["SurveyQuestionMatrixDynamicRemoveButton"]; });

/* harmony import */ var _knockout_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../knockout/components/matrix-actions/detail-button/detail-button */ "./src/knockout/components/matrix-actions/detail-button/detail-button.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDetailButton", function() { return _knockout_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_54__["SurveyQuestionMatrixDetailButton"]; });

/* harmony import */ var _knockout_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../knockout/components/matrix-actions/drag-drop-icon/drag-drop-icon */ "./src/knockout/components/matrix-actions/drag-drop-icon/drag-drop-icon.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicDragDropIcon", function() { return _knockout_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_55__["SurveyQuestionMatrixDynamicDragDropIcon"]; });

/* harmony import */ var _knockout_components_button_group_button_group_item__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../knockout/components/button-group/button-group-item */ "./src/knockout/components/button-group/button-group-item.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemViewModel", function() { return _knockout_components_button_group_button_group_item__WEBPACK_IMPORTED_MODULE_56__["ButtonGroupItemViewModel"]; });

/* harmony import */ var _knockout_components_tooltip_error_tooltip_error__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../knockout/components/tooltip-error/tooltip-error */ "./src/knockout/components/tooltip-error/tooltip-error.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipErrorViewModel", function() { return _knockout_components_tooltip_error_tooltip_error__WEBPACK_IMPORTED_MODULE_57__["TooltipErrorViewModel"]; });

/* harmony import */ var _knockout_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../knockout/components/survey-actions/survey-nav-button */ "./src/knockout/components/survey-actions/survey-nav-button.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyNavigationButton", function() { return _knockout_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_58__["SurveyNavigationButton"]; });

/* harmony import */ var _knockout_components_paneldynamic_actions_paneldynamic_actions__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../knockout/components/paneldynamic-actions/paneldynamic-actions */ "./src/knockout/components/paneldynamic-actions/paneldynamic-actions.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPaneldynamicActioons", function() { return _knockout_components_paneldynamic_actions_paneldynamic_actions__WEBPACK_IMPORTED_MODULE_59__["SurveyQuestionPaneldynamicActioons"]; });

/* harmony import */ var _knockout_components_brand_info_brand_info__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../knockout/components/brand-info/brand-info */ "./src/knockout/components/brand-info/brand-info.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrandInfoComponent", function() { return _knockout_components_brand_info_brand_info__WEBPACK_IMPORTED_MODULE_60__["BrandInfoComponent"]; });

/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_61___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_61__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


































































Object(_knockout_kosurvey__WEBPACK_IMPORTED_MODULE_0__["registerTemplateEngine"])(knockout__WEBPACK_IMPORTED_MODULE_61__, survey_core__WEBPACK_IMPORTED_MODULE_62__["SurveyModel"].platform);


/***/ }),

/***/ "./src/error.ts":
/*!**********************!*\
  !*** ./src/error.ts ***!
  \**********************/
/*! exports provided: AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, WebRequestError, WebRequestEmptyError, OtherEmptyError, UploadingFileError, RequiredInAllRowsError, MinRowCountError, KeyDuplicationError, CustomError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnswerRequiredError", function() { return AnswerRequiredError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OneAnswerRequiredError", function() { return OneAnswerRequiredError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RequreNumericError", function() { return RequreNumericError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExceedSizeError", function() { return ExceedSizeError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WebRequestError", function() { return WebRequestError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WebRequestEmptyError", function() { return WebRequestEmptyError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OtherEmptyError", function() { return OtherEmptyError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UploadingFileError", function() { return UploadingFileError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RequiredInAllRowsError", function() { return RequiredInAllRowsError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinRowCountError", function() { return MinRowCountError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyDuplicationError", function() { return KeyDuplicationError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomError", function() { return CustomError; });
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _survey_error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey-error */ "./src/survey-error.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var AnswerRequiredError = /** @class */ (function (_super) {
    __extends(AnswerRequiredError, _super);
    function AnswerRequiredError(text, errorOwner) {
        if (text === void 0) { text = null; }
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    AnswerRequiredError.prototype.getErrorType = function () {
        return "required";
    };
    AnswerRequiredError.prototype.getDefaultText = function () {
        return this.getLocalizationString("requiredError");
    };
    return AnswerRequiredError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var OneAnswerRequiredError = /** @class */ (function (_super) {
    __extends(OneAnswerRequiredError, _super);
    function OneAnswerRequiredError(text, errorOwner) {
        if (text === void 0) { text = null; }
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    OneAnswerRequiredError.prototype.getErrorType = function () {
        return "requireoneanswer";
    };
    OneAnswerRequiredError.prototype.getDefaultText = function () {
        return this.getLocalizationString("requiredErrorInPanel");
    };
    return OneAnswerRequiredError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var RequreNumericError = /** @class */ (function (_super) {
    __extends(RequreNumericError, _super);
    function RequreNumericError(text, errorOwner) {
        if (text === void 0) { text = null; }
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    RequreNumericError.prototype.getErrorType = function () {
        return "requirenumeric";
    };
    RequreNumericError.prototype.getDefaultText = function () {
        return this.getLocalizationString("numericError");
    };
    return RequreNumericError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var ExceedSizeError = /** @class */ (function (_super) {
    __extends(ExceedSizeError, _super);
    function ExceedSizeError(maxSize, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, null, errorOwner) || this;
        _this.maxSize = maxSize;
        _this.locText.text = _this.getText();
        return _this;
    }
    ExceedSizeError.prototype.getErrorType = function () {
        return "exceedsize";
    };
    ExceedSizeError.prototype.getDefaultText = function () {
        return _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"]
            .getString("exceedMaxSize")["format"](this.getTextSize());
    };
    ExceedSizeError.prototype.getTextSize = function () {
        var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
        var fixed = [0, 0, 2, 3, 3];
        if (this.maxSize === 0) {
            return "0 Byte";
        }
        var i = Math.floor(Math.log(this.maxSize) / Math.log(1024));
        var value = this.maxSize / Math.pow(1024, i);
        return value.toFixed(fixed[i]) + " " + sizes[i];
    };
    return ExceedSizeError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var WebRequestError = /** @class */ (function (_super) {
    __extends(WebRequestError, _super);
    function WebRequestError(status, response, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, null, errorOwner) || this;
        _this.status = status;
        _this.response = response;
        return _this;
    }
    WebRequestError.prototype.getErrorType = function () {
        return "webrequest";
    };
    WebRequestError.prototype.getDefaultText = function () {
        var str = this.getLocalizationString("urlRequestError");
        return !!str ? str["format"](this.status, this.response) : "";
    };
    return WebRequestError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var WebRequestEmptyError = /** @class */ (function (_super) {
    __extends(WebRequestEmptyError, _super);
    function WebRequestEmptyError(text, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    WebRequestEmptyError.prototype.getErrorType = function () {
        return "webrequestempty";
    };
    WebRequestEmptyError.prototype.getDefaultText = function () {
        return this.getLocalizationString("urlGetChoicesError");
    };
    return WebRequestEmptyError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var OtherEmptyError = /** @class */ (function (_super) {
    __extends(OtherEmptyError, _super);
    function OtherEmptyError(text, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    OtherEmptyError.prototype.getErrorType = function () {
        return "otherempty";
    };
    OtherEmptyError.prototype.getDefaultText = function () {
        return this.getLocalizationString("otherRequiredError");
    };
    return OtherEmptyError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var UploadingFileError = /** @class */ (function (_super) {
    __extends(UploadingFileError, _super);
    function UploadingFileError(text, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    UploadingFileError.prototype.getErrorType = function () {
        return "uploadingfile";
    };
    UploadingFileError.prototype.getDefaultText = function () {
        return this.getLocalizationString("uploadingFile");
    };
    return UploadingFileError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var RequiredInAllRowsError = /** @class */ (function (_super) {
    __extends(RequiredInAllRowsError, _super);
    function RequiredInAllRowsError(text, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    RequiredInAllRowsError.prototype.getErrorType = function () {
        return "requiredinallrowserror";
    };
    RequiredInAllRowsError.prototype.getDefaultText = function () {
        return this.getLocalizationString("requiredInAllRowsError");
    };
    return RequiredInAllRowsError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var MinRowCountError = /** @class */ (function (_super) {
    __extends(MinRowCountError, _super);
    function MinRowCountError(minRowCount, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, null, errorOwner) || this;
        _this.minRowCount = minRowCount;
        return _this;
    }
    MinRowCountError.prototype.getErrorType = function () {
        return "minrowcounterror";
    };
    MinRowCountError.prototype.getDefaultText = function () {
        return _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"]
            .getString("minRowCountError")["format"](this.minRowCount);
    };
    return MinRowCountError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var KeyDuplicationError = /** @class */ (function (_super) {
    __extends(KeyDuplicationError, _super);
    function KeyDuplicationError(text, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    KeyDuplicationError.prototype.getErrorType = function () {
        return "keyduplicationerror";
    };
    KeyDuplicationError.prototype.getDefaultText = function () {
        return this.getLocalizationString("keyDuplicationError");
    };
    return KeyDuplicationError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));

var CustomError = /** @class */ (function (_super) {
    __extends(CustomError, _super);
    function CustomError(text, errorOwner) {
        if (errorOwner === void 0) { errorOwner = null; }
        var _this = _super.call(this, text, errorOwner) || this;
        _this.text = text;
        return _this;
    }
    CustomError.prototype.getErrorType = function () {
        return "custom";
    };
    return CustomError;
}(_survey_error__WEBPACK_IMPORTED_MODULE_1__["SurveyError"]));



/***/ }),

/***/ "./src/expressionItems.ts":
/*!********************************!*\
  !*** ./src/expressionItems.ts ***!
  \********************************/
/*! exports provided: ExpressionItem, HtmlConditionItem, UrlConditionItem */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionItem", function() { return ExpressionItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HtmlConditionItem", function() { return HtmlConditionItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlConditionItem", function() { return UrlConditionItem; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * Base class for HtmlConditionItem and UrlConditionItem classes.
 */
var ExpressionItem = /** @class */ (function (_super) {
    __extends(ExpressionItem, _super);
    function ExpressionItem(expression) {
        if (expression === void 0) { expression = null; }
        var _this = _super.call(this) || this;
        _this.createLocalizableString("html", _this);
        _this.expression = expression;
        return _this;
    }
    ExpressionItem.prototype.getType = function () {
        return "expressionitem";
    };
    ExpressionItem.prototype.runCondition = function (values, properties) {
        if (!this.expression)
            return false;
        return new _conditions__WEBPACK_IMPORTED_MODULE_2__["ConditionRunner"](this.expression).run(values, properties);
    };
    Object.defineProperty(ExpressionItem.prototype, "expression", {
        /**
         * The expression property. If this expression returns true, then survey will use html property to show on complete page.
         */
        get: function () {
            return this.getPropertyValue("expression", "");
        },
        set: function (val) {
            this.setPropertyValue("expression", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ExpressionItem.prototype, "locHtml", {
        get: function () {
            return this.getLocalizableString("html");
        },
        enumerable: false,
        configurable: true
    });
    ExpressionItem.prototype.getLocale = function () {
        return !!this.locOwner ? this.locOwner.getLocale() : "";
    };
    ExpressionItem.prototype.getMarkdownHtml = function (text, name) {
        return !!this.locOwner ? this.locOwner.getMarkdownHtml(text, name) : undefined;
    };
    ExpressionItem.prototype.getRenderer = function (name) {
        return !!this.locOwner ? this.locOwner.getRenderer(name) : null;
    };
    ExpressionItem.prototype.getRendererContext = function (locStr) {
        return !!this.locOwner ? this.locOwner.getRendererContext(locStr) : locStr;
    };
    ExpressionItem.prototype.getProcessedText = function (text) {
        return this.locOwner ? this.locOwner.getProcessedText(text) : text;
    };
    ExpressionItem.prototype.getSurvey = function (isLive) {
        if (isLive === void 0) { isLive = false; }
        return this.locOwner;
    };
    return ExpressionItem;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));

/**
 * A class that contains expression and html propeties. It uses in survey.completedHtmlOnCondition array.
 * If the expression returns true then html of this item uses instead of survey.completedHtml property
 * @see SurveyModel.completedHtmlOnCondition
 * @see SurveyModel.completedHtml
 */
var HtmlConditionItem = /** @class */ (function (_super) {
    __extends(HtmlConditionItem, _super);
    function HtmlConditionItem(expression, html) {
        if (expression === void 0) { expression = null; }
        if (html === void 0) { html = null; }
        var _this = _super.call(this, expression) || this;
        _this.createLocalizableString("html", _this);
        _this.html = html;
        return _this;
    }
    HtmlConditionItem.prototype.getType = function () {
        return "htmlconditionitem";
    };
    Object.defineProperty(HtmlConditionItem.prototype, "html", {
        /**
         * The html that shows on completed ('Thank you') page. The expression should return true
         * @see expression
         */
        get: function () {
            return this.getLocalizableStringText("html");
        },
        set: function (value) {
            this.setLocalizableStringText("html", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(HtmlConditionItem.prototype, "locHtml", {
        get: function () {
            return this.getLocalizableString("html");
        },
        enumerable: false,
        configurable: true
    });
    return HtmlConditionItem;
}(ExpressionItem));

/**
 * A class that contains expression and url propeties. It uses in survey.navigateToUrlOnCondition array.
 * If the expression returns true then url of this item uses instead of survey.navigateToUrl property
 * @see SurveyModel.navigateToUrl
 */
var UrlConditionItem = /** @class */ (function (_super) {
    __extends(UrlConditionItem, _super);
    function UrlConditionItem(expression, url) {
        if (expression === void 0) { expression = null; }
        if (url === void 0) { url = null; }
        var _this = _super.call(this, expression) || this;
        _this.createLocalizableString("url", _this);
        _this.url = url;
        return _this;
    }
    UrlConditionItem.prototype.getType = function () {
        return "urlconditionitem";
    };
    Object.defineProperty(UrlConditionItem.prototype, "url", {
        /**
         * The url that survey navigates to on completing the survey. The expression should return true
         * @see expression
         */
        get: function () {
            return this.getLocalizableStringText("url");
        },
        set: function (value) {
            this.setLocalizableStringText("url", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(UrlConditionItem.prototype, "locUrl", {
        get: function () {
            return this.getLocalizableString("url");
        },
        enumerable: false,
        configurable: true
    });
    return UrlConditionItem;
}(ExpressionItem));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("expressionitem", ["expression:condition"], function () {
    return new ExpressionItem();
}, "base");
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("htmlconditionitem", [{ name: "html:html", serializationProperty: "locHtml" }], function () {
    return new HtmlConditionItem();
}, "expressionitem");
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("urlconditionitem", [{ name: "url:string", serializationProperty: "locUrl" }], function () {
    return new UrlConditionItem();
}, "expressionitem");


/***/ }),

/***/ "./src/expressions/expressionParser.ts":
/*!*********************************************!*\
  !*** ./src/expressions/expressionParser.ts ***!
  \*********************************************/
/*! exports provided: SyntaxError, parse */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyntaxError", function() { return SyntaxError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; });
/* harmony import */ var _expressions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./expressions */ "./src/expressions/expressions.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/* eslint-disable */

// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.3.1 )
//
// https://pegjs.org/   https://github.com/metadevpro/ts-pegjs
"use strict";
var SyntaxError = /** @class */ (function (_super) {
    __extends(SyntaxError, _super);
    function SyntaxError(message, expected, found, location) {
        var _this = _super.call(this) || this;
        _this.message = message;
        _this.expected = expected;
        _this.found = found;
        _this.location = location;
        _this.name = "SyntaxError";
        if (typeof Error.captureStackTrace === "function") {
            Error.captureStackTrace(_this, SyntaxError);
        }
        return _this;
    }
    SyntaxError.buildMessage = function (expected, found) {
        function hex(ch) {
            return ch.charCodeAt(0).toString(16).toUpperCase();
        }
        function literalEscape(s) {
            return s
                .replace(/\\/g, "\\\\")
                .replace(/"/g, "\\\"")
                .replace(/\0/g, "\\0")
                .replace(/\t/g, "\\t")
                .replace(/\n/g, "\\n")
                .replace(/\r/g, "\\r")
                .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
                .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
        }
        function classEscape(s) {
            return s
                .replace(/\\/g, "\\\\")
                .replace(/\]/g, "\\]")
                .replace(/\^/g, "\\^")
                .replace(/-/g, "\\-")
                .replace(/\0/g, "\\0")
                .replace(/\t/g, "\\t")
                .replace(/\n/g, "\\n")
                .replace(/\r/g, "\\r")
                .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
                .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
        }
        function describeExpectation(expectation) {
            switch (expectation.type) {
                case "literal":
                    return "\"" + literalEscape(expectation.text) + "\"";
                case "class":
                    var escapedParts = expectation.parts.map(function (part) {
                        return Array.isArray(part)
                            ? classEscape(part[0]) + "-" + classEscape(part[1])
                            : classEscape(part);
                    });
                    return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
                case "any":
                    return "any character";
                case "end":
                    return "end of input";
                case "other":
                    return expectation.description;
            }
        }
        function describeExpected(expected1) {
            var descriptions = expected1.map(describeExpectation);
            var i;
            var j;
            descriptions.sort();
            if (descriptions.length > 0) {
                for (i = 1, j = 1; i < descriptions.length; i++) {
                    if (descriptions[i - 1] !== descriptions[i]) {
                        descriptions[j] = descriptions[i];
                        j++;
                    }
                }
                descriptions.length = j;
            }
            switch (descriptions.length) {
                case 1:
                    return descriptions[0];
                case 2:
                    return descriptions[0] + " or " + descriptions[1];
                default:
                    return descriptions.slice(0, -1).join(", ")
                        + ", or "
                        + descriptions[descriptions.length - 1];
            }
        }
        function describeFound(found1) {
            return found1 ? "\"" + literalEscape(found1) + "\"" : "end of input";
        }
        return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
    };
    return SyntaxError;
}(Error));

function peg$parse(input, options) {
    options = options !== undefined ? options : {};
    var peg$FAILED = {};
    var peg$startRuleFunctions = { Expression: peg$parseExpression };
    var peg$startRuleFunction = peg$parseExpression;
    var peg$c0 = function (head, tail) {
        return buildBinaryOperand(head, tail, true);
    };
    var peg$c1 = "||";
    var peg$c2 = peg$literalExpectation("||", false);
    var peg$c3 = "or";
    var peg$c4 = peg$literalExpectation("or", true);
    var peg$c5 = function () { return "or"; };
    var peg$c6 = "&&";
    var peg$c7 = peg$literalExpectation("&&", false);
    var peg$c8 = "and";
    var peg$c9 = peg$literalExpectation("and", true);
    var peg$c10 = function () { return "and"; };
    var peg$c11 = function (head, tail) {
        return buildBinaryOperand(head, tail);
    };
    var peg$c12 = "<=";
    var peg$c13 = peg$literalExpectation("<=", false);
    var peg$c14 = "lessorequal";
    var peg$c15 = peg$literalExpectation("lessorequal", true);
    var peg$c16 = function () { return "lessorequal"; };
    var peg$c17 = ">=";
    var peg$c18 = peg$literalExpectation(">=", false);
    var peg$c19 = "greaterorequal";
    var peg$c20 = peg$literalExpectation("greaterorequal", true);
    var peg$c21 = function () { return "greaterorequal"; };
    var peg$c22 = "==";
    var peg$c23 = peg$literalExpectation("==", false);
    var peg$c24 = "equal";
    var peg$c25 = peg$literalExpectation("equal", true);
    var peg$c26 = function () { return "equal"; };
    var peg$c27 = "=";
    var peg$c28 = peg$literalExpectation("=", false);
    var peg$c29 = "!=";
    var peg$c30 = peg$literalExpectation("!=", false);
    var peg$c31 = "notequal";
    var peg$c32 = peg$literalExpectation("notequal", true);
    var peg$c33 = function () { return "notequal"; };
    var peg$c34 = "<";
    var peg$c35 = peg$literalExpectation("<", false);
    var peg$c36 = "less";
    var peg$c37 = peg$literalExpectation("less", true);
    var peg$c38 = function () { return "less"; };
    var peg$c39 = ">";
    var peg$c40 = peg$literalExpectation(">", false);
    var peg$c41 = "greater";
    var peg$c42 = peg$literalExpectation("greater", true);
    var peg$c43 = function () { return "greater"; };
    var peg$c44 = "+";
    var peg$c45 = peg$literalExpectation("+", false);
    var peg$c46 = function () { return "plus"; };
    var peg$c47 = "-";
    var peg$c48 = peg$literalExpectation("-", false);
    var peg$c49 = function () { return "minus"; };
    var peg$c50 = "*";
    var peg$c51 = peg$literalExpectation("*", false);
    var peg$c52 = function () { return "mul"; };
    var peg$c53 = "/";
    var peg$c54 = peg$literalExpectation("/", false);
    var peg$c55 = function () { return "div"; };
    var peg$c56 = "%";
    var peg$c57 = peg$literalExpectation("%", false);
    var peg$c58 = function () { return "mod"; };
    var peg$c59 = "^";
    var peg$c60 = peg$literalExpectation("^", false);
    var peg$c61 = "power";
    var peg$c62 = peg$literalExpectation("power", true);
    var peg$c63 = function () { return "power"; };
    var peg$c64 = "*=";
    var peg$c65 = peg$literalExpectation("*=", false);
    var peg$c66 = "contains";
    var peg$c67 = peg$literalExpectation("contains", true);
    var peg$c68 = "contain";
    var peg$c69 = peg$literalExpectation("contain", true);
    var peg$c70 = function () { return "contains"; };
    var peg$c71 = "notcontains";
    var peg$c72 = peg$literalExpectation("notcontains", true);
    var peg$c73 = "notcontain";
    var peg$c74 = peg$literalExpectation("notcontain", true);
    var peg$c75 = function () { return "notcontains"; };
    var peg$c76 = "anyof";
    var peg$c77 = peg$literalExpectation("anyof", true);
    var peg$c78 = function () { return "anyof"; };
    var peg$c79 = "allof";
    var peg$c80 = peg$literalExpectation("allof", true);
    var peg$c81 = function () { return "allof"; };
    var peg$c82 = "(";
    var peg$c83 = peg$literalExpectation("(", false);
    var peg$c84 = ")";
    var peg$c85 = peg$literalExpectation(")", false);
    var peg$c86 = function (expr) { return expr; };
    var peg$c87 = function (name, params) { return new _expressions__WEBPACK_IMPORTED_MODULE_0__["FunctionOperand"](name, params); };
    var peg$c88 = "!";
    var peg$c89 = peg$literalExpectation("!", false);
    var peg$c90 = "negate";
    var peg$c91 = peg$literalExpectation("negate", true);
    var peg$c92 = function (expr) { return new _expressions__WEBPACK_IMPORTED_MODULE_0__["UnaryOperand"](expr, "negate"); };
    var peg$c93 = function (expr, op) { return new _expressions__WEBPACK_IMPORTED_MODULE_0__["UnaryOperand"](expr, op); };
    var peg$c94 = "empty";
    var peg$c95 = peg$literalExpectation("empty", true);
    var peg$c96 = function () { return "empty"; };
    var peg$c97 = "notempty";
    var peg$c98 = peg$literalExpectation("notempty", true);
    var peg$c99 = function () { return "notempty"; };
    var peg$c100 = "undefined";
    var peg$c101 = peg$literalExpectation("undefined", false);
    var peg$c102 = "null";
    var peg$c103 = peg$literalExpectation("null", false);
    var peg$c104 = function () { return null; };
    var peg$c105 = function (value) { return new _expressions__WEBPACK_IMPORTED_MODULE_0__["Const"](value); };
    var peg$c106 = "{";
    var peg$c107 = peg$literalExpectation("{", false);
    var peg$c108 = "}";
    var peg$c109 = peg$literalExpectation("}", false);
    var peg$c110 = function (value) { return new _expressions__WEBPACK_IMPORTED_MODULE_0__["Variable"](value); };
    var peg$c111 = function (value) { return value; };
    var peg$c112 = "''";
    var peg$c113 = peg$literalExpectation("''", false);
    var peg$c114 = function () { return ""; };
    var peg$c115 = "\"\"";
    var peg$c116 = peg$literalExpectation("\"\"", false);
    var peg$c117 = "'";
    var peg$c118 = peg$literalExpectation("'", false);
    var peg$c119 = function (value) { return "'" + value + "'"; };
    var peg$c120 = "\"";
    var peg$c121 = peg$literalExpectation("\"", false);
    var peg$c122 = "[";
    var peg$c123 = peg$literalExpectation("[", false);
    var peg$c124 = "]";
    var peg$c125 = peg$literalExpectation("]", false);
    var peg$c126 = function (sequence) { return sequence; };
    var peg$c127 = ",";
    var peg$c128 = peg$literalExpectation(",", false);
    var peg$c129 = function (expr, tail) {
        if (expr == null)
            return new _expressions__WEBPACK_IMPORTED_MODULE_0__["ArrayOperand"]([]);
        var array = [expr];
        if (Array.isArray(tail)) {
            var flatten = flattenArray(tail);
            for (var i = 3; i < flatten.length; i += 4) {
                array.push(flatten[i]);
            }
        }
        return new _expressions__WEBPACK_IMPORTED_MODULE_0__["ArrayOperand"](array);
    };
    var peg$c130 = "true";
    var peg$c131 = peg$literalExpectation("true", true);
    var peg$c132 = function () { return true; };
    var peg$c133 = "false";
    var peg$c134 = peg$literalExpectation("false", true);
    var peg$c135 = function () { return false; };
    var peg$c136 = "0x";
    var peg$c137 = peg$literalExpectation("0x", false);
    var peg$c138 = function () { return parseInt(text(), 16); };
    var peg$c139 = /^[\-]/;
    var peg$c140 = peg$classExpectation(["-"], false, false);
    var peg$c141 = function (sign, num) { return sign == null ? num : -num; };
    var peg$c142 = ".";
    var peg$c143 = peg$literalExpectation(".", false);
    var peg$c144 = function () { return parseFloat(text()); };
    var peg$c145 = function () { return parseInt(text(), 10); };
    var peg$c146 = "0";
    var peg$c147 = peg$literalExpectation("0", false);
    var peg$c148 = function () { return 0; };
    var peg$c149 = function (chars) { return chars.join(""); };
    var peg$c150 = "\\'";
    var peg$c151 = peg$literalExpectation("\\'", false);
    var peg$c152 = function () { return "'"; };
    var peg$c153 = "\\\"";
    var peg$c154 = peg$literalExpectation("\\\"", false);
    var peg$c155 = function () { return "\""; };
    var peg$c156 = /^[^"']/;
    var peg$c157 = peg$classExpectation(["\"", "'"], true, false);
    var peg$c158 = function () { return text(); };
    var peg$c159 = /^[^{}]/;
    var peg$c160 = peg$classExpectation(["{", "}"], true, false);
    var peg$c161 = /^[0-9]/;
    var peg$c162 = peg$classExpectation([["0", "9"]], false, false);
    var peg$c163 = /^[1-9]/;
    var peg$c164 = peg$classExpectation([["1", "9"]], false, false);
    var peg$c165 = /^[a-zA-Z_]/;
    var peg$c166 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false);
    var peg$c167 = peg$otherExpectation("whitespace");
    var peg$c168 = /^[ \t\n\r]/;
    var peg$c169 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
    var peg$currPos = 0;
    var peg$savedPos = 0;
    var peg$posDetailsCache = [{ line: 1, column: 1 }];
    var peg$maxFailPos = 0;
    var peg$maxFailExpected = [];
    var peg$silentFails = 0;
    var peg$resultsCache = {};
    var peg$result;
    if (options.startRule !== undefined) {
        if (!(options.startRule in peg$startRuleFunctions)) {
            throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
        }
        peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
    }
    function text() {
        return input.substring(peg$savedPos, peg$currPos);
    }
    function location() {
        return peg$computeLocation(peg$savedPos, peg$currPos);
    }
    function expected(description, location1) {
        location1 = location1 !== undefined
            ? location1
            : peg$computeLocation(peg$savedPos, peg$currPos);
        throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location1);
    }
    function error(message, location1) {
        location1 = location1 !== undefined
            ? location1
            : peg$computeLocation(peg$savedPos, peg$currPos);
        throw peg$buildSimpleError(message, location1);
    }
    function peg$literalExpectation(text1, ignoreCase) {
        return { type: "literal", text: text1, ignoreCase: ignoreCase };
    }
    function peg$classExpectation(parts, inverted, ignoreCase) {
        return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
    }
    function peg$anyExpectation() {
        return { type: "any" };
    }
    function peg$endExpectation() {
        return { type: "end" };
    }
    function peg$otherExpectation(description) {
        return { type: "other", description: description };
    }
    function peg$computePosDetails(pos) {
        var details = peg$posDetailsCache[pos];
        var p;
        if (details) {
            return details;
        }
        else {
            p = pos - 1;
            while (!peg$posDetailsCache[p]) {
                p--;
            }
            details = peg$posDetailsCache[p];
            details = {
                line: details.line,
                column: details.column
            };
            while (p < pos) {
                if (input.charCodeAt(p) === 10) {
                    details.line++;
                    details.column = 1;
                }
                else {
                    details.column++;
                }
                p++;
            }
            peg$posDetailsCache[pos] = details;
            return details;
        }
    }
    function peg$computeLocation(startPos, endPos) {
        var startPosDetails = peg$computePosDetails(startPos);
        var endPosDetails = peg$computePosDetails(endPos);
        return {
            start: {
                offset: startPos,
                line: startPosDetails.line,
                column: startPosDetails.column
            },
            end: {
                offset: endPos,
                line: endPosDetails.line,
                column: endPosDetails.column
            }
        };
    }
    function peg$fail(expected1) {
        if (peg$currPos < peg$maxFailPos) {
            return;
        }
        if (peg$currPos > peg$maxFailPos) {
            peg$maxFailPos = peg$currPos;
            peg$maxFailExpected = [];
        }
        peg$maxFailExpected.push(expected1);
    }
    function peg$buildSimpleError(message, location1) {
        return new SyntaxError(message, [], "", location1);
    }
    function peg$buildStructuredError(expected1, found, location1) {
        return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);
    }
    function peg$parseExpression() {
        var s0, s1, s2, s3, s4, s5, s6, s7, s8;
        var key = peg$currPos * 34 + 0;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parse_();
        if (s1 !== peg$FAILED) {
            s2 = peg$parseLogicOr();
            if (s2 !== peg$FAILED) {
                s3 = [];
                s4 = peg$currPos;
                s5 = peg$parse_();
                if (s5 !== peg$FAILED) {
                    s6 = peg$parseOrSign();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parse_();
                        if (s7 !== peg$FAILED) {
                            s8 = peg$parseLogicOr();
                            if (s8 !== peg$FAILED) {
                                s5 = [s5, s6, s7, s8];
                                s4 = s5;
                            }
                            else {
                                peg$currPos = s4;
                                s4 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s4;
                            s4 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s4;
                        s4 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s4;
                    s4 = peg$FAILED;
                }
                while (s4 !== peg$FAILED) {
                    s3.push(s4);
                    s4 = peg$currPos;
                    s5 = peg$parse_();
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parseOrSign();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parse_();
                            if (s7 !== peg$FAILED) {
                                s8 = peg$parseLogicOr();
                                if (s8 !== peg$FAILED) {
                                    s5 = [s5, s6, s7, s8];
                                    s4 = s5;
                                }
                                else {
                                    peg$currPos = s4;
                                    s4 = peg$FAILED;
                                }
                            }
                            else {
                                peg$currPos = s4;
                                s4 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s4;
                            s4 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s4;
                        s4 = peg$FAILED;
                    }
                }
                if (s3 !== peg$FAILED) {
                    s4 = peg$parse_();
                    if (s4 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c0(s2, s3);
                        s0 = s1;
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseOrSign() {
        var s0, s1;
        var key = peg$currPos * 34 + 1;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c1) {
            s1 = peg$c1;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c2);
            }
        }
        if (s1 === peg$FAILED) {
            if (input.substr(peg$currPos, 2).toLowerCase() === peg$c3) {
                s1 = input.substr(peg$currPos, 2);
                peg$currPos += 2;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c4);
                }
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c5();
        }
        s0 = s1;
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseLogicOr() {
        var s0, s1, s2, s3, s4, s5, s6, s7;
        var key = peg$currPos * 34 + 2;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseLogicAnd();
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parse_();
            if (s4 !== peg$FAILED) {
                s5 = peg$parseAndSign();
                if (s5 !== peg$FAILED) {
                    s6 = peg$parse_();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parseLogicAnd();
                        if (s7 !== peg$FAILED) {
                            s4 = [s4, s5, s6, s7];
                            s3 = s4;
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parse_();
                if (s4 !== peg$FAILED) {
                    s5 = peg$parseAndSign();
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parse_();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parseLogicAnd();
                            if (s7 !== peg$FAILED) {
                                s4 = [s4, s5, s6, s7];
                                s3 = s4;
                            }
                            else {
                                peg$currPos = s3;
                                s3 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c0(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseAndSign() {
        var s0, s1;
        var key = peg$currPos * 34 + 3;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c6) {
            s1 = peg$c6;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c7);
            }
        }
        if (s1 === peg$FAILED) {
            if (input.substr(peg$currPos, 3).toLowerCase() === peg$c8) {
                s1 = input.substr(peg$currPos, 3);
                peg$currPos += 3;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c9);
                }
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c10();
        }
        s0 = s1;
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseLogicAnd() {
        var s0, s1, s2, s3, s4, s5, s6, s7;
        var key = peg$currPos * 34 + 4;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseCompOps();
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parse_();
            if (s4 !== peg$FAILED) {
                s5 = peg$parseComparableOperators();
                if (s5 !== peg$FAILED) {
                    s6 = peg$parse_();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parseCompOps();
                        if (s7 !== peg$FAILED) {
                            s4 = [s4, s5, s6, s7];
                            s3 = s4;
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parse_();
                if (s4 !== peg$FAILED) {
                    s5 = peg$parseComparableOperators();
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parse_();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parseCompOps();
                            if (s7 !== peg$FAILED) {
                                s4 = [s4, s5, s6, s7];
                                s3 = s4;
                            }
                            else {
                                peg$currPos = s3;
                                s3 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c11(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseComparableOperators() {
        var s0, s1;
        var key = peg$currPos * 34 + 5;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c12) {
            s1 = peg$c12;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c13);
            }
        }
        if (s1 === peg$FAILED) {
            if (input.substr(peg$currPos, 11).toLowerCase() === peg$c14) {
                s1 = input.substr(peg$currPos, 11);
                peg$currPos += 11;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c15);
                }
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c16();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.substr(peg$currPos, 2) === peg$c17) {
                s1 = peg$c17;
                peg$currPos += 2;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c18);
                }
            }
            if (s1 === peg$FAILED) {
                if (input.substr(peg$currPos, 14).toLowerCase() === peg$c19) {
                    s1 = input.substr(peg$currPos, 14);
                    peg$currPos += 14;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c20);
                    }
                }
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c21();
            }
            s0 = s1;
            if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                if (input.substr(peg$currPos, 2) === peg$c22) {
                    s1 = peg$c22;
                    peg$currPos += 2;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c23);
                    }
                }
                if (s1 === peg$FAILED) {
                    if (input.substr(peg$currPos, 5).toLowerCase() === peg$c24) {
                        s1 = input.substr(peg$currPos, 5);
                        peg$currPos += 5;
                    }
                    else {
                        s1 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c25);
                        }
                    }
                }
                if (s1 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c26();
                }
                s0 = s1;
                if (s0 === peg$FAILED) {
                    s0 = peg$currPos;
                    if (input.charCodeAt(peg$currPos) === 61) {
                        s1 = peg$c27;
                        peg$currPos++;
                    }
                    else {
                        s1 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c28);
                        }
                    }
                    if (s1 === peg$FAILED) {
                        if (input.substr(peg$currPos, 5).toLowerCase() === peg$c24) {
                            s1 = input.substr(peg$currPos, 5);
                            peg$currPos += 5;
                        }
                        else {
                            s1 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c25);
                            }
                        }
                    }
                    if (s1 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c26();
                    }
                    s0 = s1;
                    if (s0 === peg$FAILED) {
                        s0 = peg$currPos;
                        if (input.substr(peg$currPos, 2) === peg$c29) {
                            s1 = peg$c29;
                            peg$currPos += 2;
                        }
                        else {
                            s1 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c30);
                            }
                        }
                        if (s1 === peg$FAILED) {
                            if (input.substr(peg$currPos, 8).toLowerCase() === peg$c31) {
                                s1 = input.substr(peg$currPos, 8);
                                peg$currPos += 8;
                            }
                            else {
                                s1 = peg$FAILED;
                                if (peg$silentFails === 0) {
                                    peg$fail(peg$c32);
                                }
                            }
                        }
                        if (s1 !== peg$FAILED) {
                            peg$savedPos = s0;
                            s1 = peg$c33();
                        }
                        s0 = s1;
                        if (s0 === peg$FAILED) {
                            s0 = peg$currPos;
                            if (input.charCodeAt(peg$currPos) === 60) {
                                s1 = peg$c34;
                                peg$currPos++;
                            }
                            else {
                                s1 = peg$FAILED;
                                if (peg$silentFails === 0) {
                                    peg$fail(peg$c35);
                                }
                            }
                            if (s1 === peg$FAILED) {
                                if (input.substr(peg$currPos, 4).toLowerCase() === peg$c36) {
                                    s1 = input.substr(peg$currPos, 4);
                                    peg$currPos += 4;
                                }
                                else {
                                    s1 = peg$FAILED;
                                    if (peg$silentFails === 0) {
                                        peg$fail(peg$c37);
                                    }
                                }
                            }
                            if (s1 !== peg$FAILED) {
                                peg$savedPos = s0;
                                s1 = peg$c38();
                            }
                            s0 = s1;
                            if (s0 === peg$FAILED) {
                                s0 = peg$currPos;
                                if (input.charCodeAt(peg$currPos) === 62) {
                                    s1 = peg$c39;
                                    peg$currPos++;
                                }
                                else {
                                    s1 = peg$FAILED;
                                    if (peg$silentFails === 0) {
                                        peg$fail(peg$c40);
                                    }
                                }
                                if (s1 === peg$FAILED) {
                                    if (input.substr(peg$currPos, 7).toLowerCase() === peg$c41) {
                                        s1 = input.substr(peg$currPos, 7);
                                        peg$currPos += 7;
                                    }
                                    else {
                                        s1 = peg$FAILED;
                                        if (peg$silentFails === 0) {
                                            peg$fail(peg$c42);
                                        }
                                    }
                                }
                                if (s1 !== peg$FAILED) {
                                    peg$savedPos = s0;
                                    s1 = peg$c43();
                                }
                                s0 = s1;
                            }
                        }
                    }
                }
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseCompOps() {
        var s0, s1, s2, s3, s4, s5, s6, s7;
        var key = peg$currPos * 34 + 6;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parsePlusMinusOps();
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parse_();
            if (s4 !== peg$FAILED) {
                s5 = peg$parsePlusMinusSigns();
                if (s5 !== peg$FAILED) {
                    s6 = peg$parse_();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parsePlusMinusOps();
                        if (s7 !== peg$FAILED) {
                            s4 = [s4, s5, s6, s7];
                            s3 = s4;
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parse_();
                if (s4 !== peg$FAILED) {
                    s5 = peg$parsePlusMinusSigns();
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parse_();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parsePlusMinusOps();
                            if (s7 !== peg$FAILED) {
                                s4 = [s4, s5, s6, s7];
                                s3 = s4;
                            }
                            else {
                                peg$currPos = s3;
                                s3 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c0(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parsePlusMinusSigns() {
        var s0, s1;
        var key = peg$currPos * 34 + 7;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 43) {
            s1 = peg$c44;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c45);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c46();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.charCodeAt(peg$currPos) === 45) {
                s1 = peg$c47;
                peg$currPos++;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c48);
                }
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c49();
            }
            s0 = s1;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parsePlusMinusOps() {
        var s0, s1, s2, s3, s4, s5, s6, s7;
        var key = peg$currPos * 34 + 8;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseMulDivOps();
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parse_();
            if (s4 !== peg$FAILED) {
                s5 = peg$parseMulDivSigns();
                if (s5 !== peg$FAILED) {
                    s6 = peg$parse_();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parseMulDivOps();
                        if (s7 !== peg$FAILED) {
                            s4 = [s4, s5, s6, s7];
                            s3 = s4;
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parse_();
                if (s4 !== peg$FAILED) {
                    s5 = peg$parseMulDivSigns();
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parse_();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parseMulDivOps();
                            if (s7 !== peg$FAILED) {
                                s4 = [s4, s5, s6, s7];
                                s3 = s4;
                            }
                            else {
                                peg$currPos = s3;
                                s3 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c0(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseMulDivSigns() {
        var s0, s1;
        var key = peg$currPos * 34 + 9;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 42) {
            s1 = peg$c50;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c51);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c52();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.charCodeAt(peg$currPos) === 47) {
                s1 = peg$c53;
                peg$currPos++;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c54);
                }
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c55();
            }
            s0 = s1;
            if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                if (input.charCodeAt(peg$currPos) === 37) {
                    s1 = peg$c56;
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c57);
                    }
                }
                if (s1 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c58();
                }
                s0 = s1;
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseMulDivOps() {
        var s0, s1, s2, s3, s4, s5, s6, s7;
        var key = peg$currPos * 34 + 10;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseBinaryFuncOp();
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parse_();
            if (s4 !== peg$FAILED) {
                s5 = peg$parsePowerSigns();
                if (s5 !== peg$FAILED) {
                    s6 = peg$parse_();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parseBinaryFuncOp();
                        if (s7 !== peg$FAILED) {
                            s4 = [s4, s5, s6, s7];
                            s3 = s4;
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parse_();
                if (s4 !== peg$FAILED) {
                    s5 = peg$parsePowerSigns();
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parse_();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parseBinaryFuncOp();
                            if (s7 !== peg$FAILED) {
                                s4 = [s4, s5, s6, s7];
                                s3 = s4;
                            }
                            else {
                                peg$currPos = s3;
                                s3 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c0(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parsePowerSigns() {
        var s0, s1;
        var key = peg$currPos * 34 + 11;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 94) {
            s1 = peg$c59;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c60);
            }
        }
        if (s1 === peg$FAILED) {
            if (input.substr(peg$currPos, 5).toLowerCase() === peg$c61) {
                s1 = input.substr(peg$currPos, 5);
                peg$currPos += 5;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c62);
                }
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c63();
        }
        s0 = s1;
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseBinaryFuncOp() {
        var s0, s1, s2, s3, s4, s5, s6, s7;
        var key = peg$currPos * 34 + 12;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseFactor();
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parse_();
            if (s4 !== peg$FAILED) {
                s5 = peg$parseBinFunctions();
                if (s5 !== peg$FAILED) {
                    s6 = peg$parse_();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parseFactor();
                        if (s7 === peg$FAILED) {
                            s7 = null;
                        }
                        if (s7 !== peg$FAILED) {
                            s4 = [s4, s5, s6, s7];
                            s3 = s4;
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parse_();
                if (s4 !== peg$FAILED) {
                    s5 = peg$parseBinFunctions();
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parse_();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parseFactor();
                            if (s7 === peg$FAILED) {
                                s7 = null;
                            }
                            if (s7 !== peg$FAILED) {
                                s4 = [s4, s5, s6, s7];
                                s3 = s4;
                            }
                            else {
                                peg$currPos = s3;
                                s3 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c11(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseBinFunctions() {
        var s0, s1;
        var key = peg$currPos * 34 + 13;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c64) {
            s1 = peg$c64;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c65);
            }
        }
        if (s1 === peg$FAILED) {
            if (input.substr(peg$currPos, 8).toLowerCase() === peg$c66) {
                s1 = input.substr(peg$currPos, 8);
                peg$currPos += 8;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c67);
                }
            }
            if (s1 === peg$FAILED) {
                if (input.substr(peg$currPos, 7).toLowerCase() === peg$c68) {
                    s1 = input.substr(peg$currPos, 7);
                    peg$currPos += 7;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c69);
                    }
                }
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c70();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.substr(peg$currPos, 11).toLowerCase() === peg$c71) {
                s1 = input.substr(peg$currPos, 11);
                peg$currPos += 11;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c72);
                }
            }
            if (s1 === peg$FAILED) {
                if (input.substr(peg$currPos, 10).toLowerCase() === peg$c73) {
                    s1 = input.substr(peg$currPos, 10);
                    peg$currPos += 10;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c74);
                    }
                }
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c75();
            }
            s0 = s1;
            if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                if (input.substr(peg$currPos, 5).toLowerCase() === peg$c76) {
                    s1 = input.substr(peg$currPos, 5);
                    peg$currPos += 5;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c77);
                    }
                }
                if (s1 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c78();
                }
                s0 = s1;
                if (s0 === peg$FAILED) {
                    s0 = peg$currPos;
                    if (input.substr(peg$currPos, 5).toLowerCase() === peg$c79) {
                        s1 = input.substr(peg$currPos, 5);
                        peg$currPos += 5;
                    }
                    else {
                        s1 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c80);
                        }
                    }
                    if (s1 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c81();
                    }
                    s0 = s1;
                }
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseFactor() {
        var s0, s1, s2, s3, s4, s5;
        var key = peg$currPos * 34 + 14;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 40) {
            s1 = peg$c82;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c83);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parse_();
            if (s2 !== peg$FAILED) {
                s3 = peg$parseExpression();
                if (s3 !== peg$FAILED) {
                    s4 = peg$parse_();
                    if (s4 !== peg$FAILED) {
                        if (input.charCodeAt(peg$currPos) === 41) {
                            s5 = peg$c84;
                            peg$currPos++;
                        }
                        else {
                            s5 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c85);
                            }
                        }
                        if (s5 === peg$FAILED) {
                            s5 = null;
                        }
                        if (s5 !== peg$FAILED) {
                            peg$savedPos = s0;
                            s1 = peg$c86(s3);
                            s0 = s1;
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$parseFunctionOp();
            if (s0 === peg$FAILED) {
                s0 = peg$parseUnaryFunctionOp();
                if (s0 === peg$FAILED) {
                    s0 = peg$parseAtom();
                    if (s0 === peg$FAILED) {
                        s0 = peg$parseArrayOp();
                    }
                }
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseFunctionOp() {
        var s0, s1, s2, s3, s4;
        var key = peg$currPos * 34 + 15;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseLettersAndDigits();
        if (s1 !== peg$FAILED) {
            if (input.charCodeAt(peg$currPos) === 40) {
                s2 = peg$c82;
                peg$currPos++;
            }
            else {
                s2 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c83);
                }
            }
            if (s2 !== peg$FAILED) {
                s3 = peg$parseSequence();
                if (s3 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 41) {
                        s4 = peg$c84;
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c85);
                        }
                    }
                    if (s4 === peg$FAILED) {
                        s4 = null;
                    }
                    if (s4 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c87(s1, s3);
                        s0 = s1;
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseUnaryFunctionOp() {
        var s0, s1, s2, s3;
        var key = peg$currPos * 34 + 16;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 33) {
            s1 = peg$c88;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c89);
            }
        }
        if (s1 === peg$FAILED) {
            if (input.substr(peg$currPos, 6).toLowerCase() === peg$c90) {
                s1 = input.substr(peg$currPos, 6);
                peg$currPos += 6;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c91);
                }
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parse_();
            if (s2 !== peg$FAILED) {
                s3 = peg$parseExpression();
                if (s3 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c92(s3);
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$parseAtom();
            if (s1 !== peg$FAILED) {
                s2 = peg$parse_();
                if (s2 !== peg$FAILED) {
                    s3 = peg$parseUnFunctions();
                    if (s3 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c93(s1, s3);
                        s0 = s1;
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseUnFunctions() {
        var s0, s1;
        var key = peg$currPos * 34 + 17;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 5).toLowerCase() === peg$c94) {
            s1 = input.substr(peg$currPos, 5);
            peg$currPos += 5;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c95);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c96();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.substr(peg$currPos, 8).toLowerCase() === peg$c97) {
                s1 = input.substr(peg$currPos, 8);
                peg$currPos += 8;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c98);
                }
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c99();
            }
            s0 = s1;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseAtom() {
        var s0, s1, s2, s3, s4;
        var key = peg$currPos * 34 + 18;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parse_();
        if (s1 !== peg$FAILED) {
            if (input.substr(peg$currPos, 9) === peg$c100) {
                s2 = peg$c100;
                peg$currPos += 9;
            }
            else {
                s2 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c101);
                }
            }
            if (s2 === peg$FAILED) {
                if (input.substr(peg$currPos, 4) === peg$c102) {
                    s2 = peg$c102;
                    peg$currPos += 4;
                }
                else {
                    s2 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c103);
                    }
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c104();
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$parse_();
            if (s1 !== peg$FAILED) {
                s2 = peg$parseConstValue();
                if (s2 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c105(s2);
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
            if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                s1 = peg$parse_();
                if (s1 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 123) {
                        s2 = peg$c106;
                        peg$currPos++;
                    }
                    else {
                        s2 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c107);
                        }
                    }
                    if (s2 !== peg$FAILED) {
                        s3 = peg$parseValueInput();
                        if (s3 !== peg$FAILED) {
                            if (input.charCodeAt(peg$currPos) === 125) {
                                s4 = peg$c108;
                                peg$currPos++;
                            }
                            else {
                                s4 = peg$FAILED;
                                if (peg$silentFails === 0) {
                                    peg$fail(peg$c109);
                                }
                            }
                            if (s4 !== peg$FAILED) {
                                peg$savedPos = s0;
                                s1 = peg$c110(s3);
                                s0 = s1;
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseConstValue() {
        var s0, s1, s2, s3;
        var key = peg$currPos * 34 + 19;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseLogicValue();
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c111(s1);
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$parseArithmeticValue();
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c111(s1);
            }
            s0 = s1;
            if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                s1 = peg$parseLettersAndDigits();
                if (s1 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c111(s1);
                }
                s0 = s1;
                if (s0 === peg$FAILED) {
                    s0 = peg$currPos;
                    if (input.substr(peg$currPos, 2) === peg$c112) {
                        s1 = peg$c112;
                        peg$currPos += 2;
                    }
                    else {
                        s1 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c113);
                        }
                    }
                    if (s1 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c114();
                    }
                    s0 = s1;
                    if (s0 === peg$FAILED) {
                        s0 = peg$currPos;
                        if (input.substr(peg$currPos, 2) === peg$c115) {
                            s1 = peg$c115;
                            peg$currPos += 2;
                        }
                        else {
                            s1 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c116);
                            }
                        }
                        if (s1 !== peg$FAILED) {
                            peg$savedPos = s0;
                            s1 = peg$c114();
                        }
                        s0 = s1;
                        if (s0 === peg$FAILED) {
                            s0 = peg$currPos;
                            if (input.charCodeAt(peg$currPos) === 39) {
                                s1 = peg$c117;
                                peg$currPos++;
                            }
                            else {
                                s1 = peg$FAILED;
                                if (peg$silentFails === 0) {
                                    peg$fail(peg$c118);
                                }
                            }
                            if (s1 !== peg$FAILED) {
                                s2 = peg$parseAnyInput();
                                if (s2 !== peg$FAILED) {
                                    if (input.charCodeAt(peg$currPos) === 39) {
                                        s3 = peg$c117;
                                        peg$currPos++;
                                    }
                                    else {
                                        s3 = peg$FAILED;
                                        if (peg$silentFails === 0) {
                                            peg$fail(peg$c118);
                                        }
                                    }
                                    if (s3 !== peg$FAILED) {
                                        peg$savedPos = s0;
                                        s1 = peg$c119(s2);
                                        s0 = s1;
                                    }
                                    else {
                                        peg$currPos = s0;
                                        s0 = peg$FAILED;
                                    }
                                }
                                else {
                                    peg$currPos = s0;
                                    s0 = peg$FAILED;
                                }
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                            if (s0 === peg$FAILED) {
                                s0 = peg$currPos;
                                if (input.charCodeAt(peg$currPos) === 34) {
                                    s1 = peg$c120;
                                    peg$currPos++;
                                }
                                else {
                                    s1 = peg$FAILED;
                                    if (peg$silentFails === 0) {
                                        peg$fail(peg$c121);
                                    }
                                }
                                if (s1 !== peg$FAILED) {
                                    s2 = peg$parseAnyInput();
                                    if (s2 !== peg$FAILED) {
                                        if (input.charCodeAt(peg$currPos) === 34) {
                                            s3 = peg$c120;
                                            peg$currPos++;
                                        }
                                        else {
                                            s3 = peg$FAILED;
                                            if (peg$silentFails === 0) {
                                                peg$fail(peg$c121);
                                            }
                                        }
                                        if (s3 !== peg$FAILED) {
                                            peg$savedPos = s0;
                                            s1 = peg$c119(s2);
                                            s0 = s1;
                                        }
                                        else {
                                            peg$currPos = s0;
                                            s0 = peg$FAILED;
                                        }
                                    }
                                    else {
                                        peg$currPos = s0;
                                        s0 = peg$FAILED;
                                    }
                                }
                                else {
                                    peg$currPos = s0;
                                    s0 = peg$FAILED;
                                }
                            }
                        }
                    }
                }
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseArrayOp() {
        var s0, s1, s2, s3;
        var key = peg$currPos * 34 + 20;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 91) {
            s1 = peg$c122;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c123);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parseSequence();
            if (s2 !== peg$FAILED) {
                if (input.charCodeAt(peg$currPos) === 93) {
                    s3 = peg$c124;
                    peg$currPos++;
                }
                else {
                    s3 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c125);
                    }
                }
                if (s3 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c126(s2);
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseSequence() {
        var s0, s1, s2, s3, s4, s5, s6, s7;
        var key = peg$currPos * 34 + 21;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseExpression();
        if (s1 === peg$FAILED) {
            s1 = null;
        }
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parse_();
            if (s4 !== peg$FAILED) {
                if (input.charCodeAt(peg$currPos) === 44) {
                    s5 = peg$c127;
                    peg$currPos++;
                }
                else {
                    s5 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c128);
                    }
                }
                if (s5 !== peg$FAILED) {
                    s6 = peg$parse_();
                    if (s6 !== peg$FAILED) {
                        s7 = peg$parseExpression();
                        if (s7 !== peg$FAILED) {
                            s4 = [s4, s5, s6, s7];
                            s3 = s4;
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parse_();
                if (s4 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 44) {
                        s5 = peg$c127;
                        peg$currPos++;
                    }
                    else {
                        s5 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c128);
                        }
                    }
                    if (s5 !== peg$FAILED) {
                        s6 = peg$parse_();
                        if (s6 !== peg$FAILED) {
                            s7 = peg$parseExpression();
                            if (s7 !== peg$FAILED) {
                                s4 = [s4, s5, s6, s7];
                                s3 = s4;
                            }
                            else {
                                peg$currPos = s3;
                                s3 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s3;
                            s3 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c129(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseLogicValue() {
        var s0, s1;
        var key = peg$currPos * 34 + 22;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 4).toLowerCase() === peg$c130) {
            s1 = input.substr(peg$currPos, 4);
            peg$currPos += 4;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c131);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c132();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.substr(peg$currPos, 5).toLowerCase() === peg$c133) {
                s1 = input.substr(peg$currPos, 5);
                peg$currPos += 5;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c134);
                }
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c135();
            }
            s0 = s1;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseArithmeticValue() {
        var s0, s1, s2;
        var key = peg$currPos * 34 + 23;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c136) {
            s1 = peg$c136;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c137);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parseDigits();
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c138();
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (peg$c139.test(input.charAt(peg$currPos))) {
                s1 = input.charAt(peg$currPos);
                peg$currPos++;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c140);
                }
            }
            if (s1 === peg$FAILED) {
                s1 = null;
            }
            if (s1 !== peg$FAILED) {
                s2 = peg$parseNumber();
                if (s2 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c141(s1, s2);
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseNumber() {
        var s0, s1, s2, s3;
        var key = peg$currPos * 34 + 24;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseDigits();
        if (s1 !== peg$FAILED) {
            if (input.charCodeAt(peg$currPos) === 46) {
                s2 = peg$c142;
                peg$currPos++;
            }
            else {
                s2 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c143);
                }
            }
            if (s2 !== peg$FAILED) {
                s3 = peg$parseDigits();
                if (s3 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c144();
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$parseNonZeroDigits();
            if (s1 !== peg$FAILED) {
                s2 = peg$parseDigits();
                if (s2 === peg$FAILED) {
                    s2 = null;
                }
                if (s2 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c145();
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
            if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                if (input.charCodeAt(peg$currPos) === 48) {
                    s1 = peg$c146;
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c147);
                    }
                }
                if (s1 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c148();
                }
                s0 = s1;
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseValueInput() {
        var s0, s1, s2;
        var key = peg$currPos * 34 + 25;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = [];
        s2 = peg$parseValueCharacters();
        if (s2 !== peg$FAILED) {
            while (s2 !== peg$FAILED) {
                s1.push(s2);
                s2 = peg$parseValueCharacters();
            }
        }
        else {
            s1 = peg$FAILED;
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c149(s1);
        }
        s0 = s1;
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseAnyInput() {
        var s0, s1, s2;
        var key = peg$currPos * 34 + 26;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = [];
        s2 = peg$parseAnyCharacters();
        if (s2 !== peg$FAILED) {
            while (s2 !== peg$FAILED) {
                s1.push(s2);
                s2 = peg$parseAnyCharacters();
            }
        }
        else {
            s1 = peg$FAILED;
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c149(s1);
        }
        s0 = s1;
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseAnyCharacters() {
        var s0, s1;
        var key = peg$currPos * 34 + 27;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c150) {
            s1 = peg$c150;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c151);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c152();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.substr(peg$currPos, 2) === peg$c153) {
                s1 = peg$c153;
                peg$currPos += 2;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c154);
                }
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c155();
            }
            s0 = s1;
            if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                if (peg$c156.test(input.charAt(peg$currPos))) {
                    s1 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c157);
                    }
                }
                if (s1 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c158();
                }
                s0 = s1;
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseValueCharacters() {
        var s0, s1;
        var key = peg$currPos * 34 + 28;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        if (peg$c159.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c160);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c158();
        }
        s0 = s1;
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseLettersAndDigits() {
        var s0, s1, s2, s3, s4, s5, s6;
        var key = peg$currPos * 34 + 29;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = peg$currPos;
        s1 = peg$parseLetters();
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parseDigits();
            if (s4 !== peg$FAILED) {
                s5 = [];
                s6 = peg$parseLetters();
                while (s6 !== peg$FAILED) {
                    s5.push(s6);
                    s6 = peg$parseLetters();
                }
                if (s5 !== peg$FAILED) {
                    s4 = [s4, s5];
                    s3 = s4;
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s3;
                s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$currPos;
                s4 = peg$parseDigits();
                if (s4 !== peg$FAILED) {
                    s5 = [];
                    s6 = peg$parseLetters();
                    while (s6 !== peg$FAILED) {
                        s5.push(s6);
                        s6 = peg$parseLetters();
                    }
                    if (s5 !== peg$FAILED) {
                        s4 = [s4, s5];
                        s3 = s4;
                    }
                    else {
                        peg$currPos = s3;
                        s3 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
            }
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c158();
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseDigits() {
        var s0, s1;
        var key = peg$currPos * 34 + 30;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = [];
        if (peg$c161.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c162);
            }
        }
        if (s1 !== peg$FAILED) {
            while (s1 !== peg$FAILED) {
                s0.push(s1);
                if (peg$c161.test(input.charAt(peg$currPos))) {
                    s1 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c162);
                    }
                }
            }
        }
        else {
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseNonZeroDigits() {
        var s0, s1;
        var key = peg$currPos * 34 + 31;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = [];
        if (peg$c163.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c164);
            }
        }
        if (s1 !== peg$FAILED) {
            while (s1 !== peg$FAILED) {
                s0.push(s1);
                if (peg$c163.test(input.charAt(peg$currPos))) {
                    s1 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c164);
                    }
                }
            }
        }
        else {
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parseLetters() {
        var s0, s1;
        var key = peg$currPos * 34 + 32;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        s0 = [];
        if (peg$c165.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c166);
            }
        }
        if (s1 !== peg$FAILED) {
            while (s1 !== peg$FAILED) {
                s0.push(s1);
                if (peg$c165.test(input.charAt(peg$currPos))) {
                    s1 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c166);
                    }
                }
            }
        }
        else {
            s0 = peg$FAILED;
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function peg$parse_() {
        var s0, s1;
        var key = peg$currPos * 34 + 33;
        var cached = peg$resultsCache[key];
        if (cached) {
            peg$currPos = cached.nextPos;
            return cached.result;
        }
        peg$silentFails++;
        s0 = [];
        if (peg$c168.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c169);
            }
        }
        while (s1 !== peg$FAILED) {
            s0.push(s1);
            if (peg$c168.test(input.charAt(peg$currPos))) {
                s1 = input.charAt(peg$currPos);
                peg$currPos++;
            }
            else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c169);
                }
            }
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c167);
            }
        }
        peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
        return s0;
    }
    function buildBinaryOperand(head, tail, isArithmeticOp) {
        if (isArithmeticOp === void 0) { isArithmeticOp = false; }
        return tail.reduce(function (result, elements) {
            return new _expressions__WEBPACK_IMPORTED_MODULE_0__["BinaryOperand"](elements[1], result, elements[3], isArithmeticOp);
        }, head);
    }
    function flattenArray(array) {
        return [].concat.apply([], array);
    }
    peg$result = peg$startRuleFunction();
    if (peg$result !== peg$FAILED && peg$currPos === input.length) {
        return peg$result;
    }
    else {
        if (peg$result !== peg$FAILED && peg$currPos < input.length) {
            peg$fail(peg$endExpectation());
        }
        throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length
            ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
            : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
    }
}
var parse = peg$parse;


/***/ }),

/***/ "./src/expressions/expressions.ts":
/*!****************************************!*\
  !*** ./src/expressions/expressions.ts ***!
  \****************************************/
/*! exports provided: Operand, BinaryOperand, UnaryOperand, ArrayOperand, Const, Variable, FunctionOperand, OperandMaker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Operand", function() { return Operand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BinaryOperand", function() { return BinaryOperand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnaryOperand", function() { return UnaryOperand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayOperand", function() { return ArrayOperand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Const", function() { return Const; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return Variable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionOperand", function() { return FunctionOperand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OperandMaker", function() { return OperandMaker; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers */ "./src/helpers.ts");
/* harmony import */ var _functionsfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../functionsfactory */ "./src/functionsfactory.ts");
/* harmony import */ var _conditionProcessValue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../conditionProcessValue */ "./src/conditionProcessValue.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var Operand = /** @class */ (function () {
    function Operand() {
    }
    Operand.prototype.toString = function (func) {
        if (func === void 0) { func = undefined; }
        return "";
    };
    Operand.prototype.hasFunction = function () {
        return false;
    };
    Operand.prototype.hasAsyncFunction = function () {
        return false;
    };
    Operand.prototype.addToAsyncList = function (list) { };
    Operand.prototype.isEqual = function (op) {
        return !!op && op.getType() === this.getType() && this.isContentEqual(op);
    };
    Operand.prototype.areOperatorsEquals = function (op1, op2) {
        return !op1 && !op2 || !!op1 && op1.isEqual(op2);
    };
    return Operand;
}());

var BinaryOperand = /** @class */ (function (_super) {
    __extends(BinaryOperand, _super);
    function BinaryOperand(operatorName, left, right, isArithmeticOp) {
        if (left === void 0) { left = null; }
        if (right === void 0) { right = null; }
        if (isArithmeticOp === void 0) { isArithmeticOp = false; }
        var _this = _super.call(this) || this;
        _this.operatorName = operatorName;
        _this.left = left;
        _this.right = right;
        _this.isArithmeticValue = isArithmeticOp;
        if (isArithmeticOp) {
            _this.consumer = OperandMaker.binaryFunctions["arithmeticOp"](operatorName);
        }
        else {
            _this.consumer = OperandMaker.binaryFunctions[operatorName];
        }
        if (_this.consumer == null) {
            OperandMaker.throwInvalidOperatorError(operatorName);
        }
        return _this;
    }
    BinaryOperand.prototype.getType = function () {
        return "binary";
    };
    Object.defineProperty(BinaryOperand.prototype, "isArithmetic", {
        get: function () {
            return this.isArithmeticValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(BinaryOperand.prototype, "isConjunction", {
        get: function () {
            return this.operatorName == "or" || this.operatorName == "and";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(BinaryOperand.prototype, "conjunction", {
        get: function () {
            return this.isConjunction ? this.operatorName : "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(BinaryOperand.prototype, "operator", {
        get: function () {
            return this.operatorName;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(BinaryOperand.prototype, "leftOperand", {
        get: function () {
            return this.left;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(BinaryOperand.prototype, "rightOperand", {
        get: function () {
            return this.right;
        },
        enumerable: false,
        configurable: true
    });
    BinaryOperand.prototype.isContentEqual = function (op) {
        var bOp = op;
        return bOp.operator === this.operator &&
            this.areOperatorsEquals(this.left, bOp.left) &&
            this.areOperatorsEquals(this.right, bOp.right);
    };
    BinaryOperand.prototype.evaluateParam = function (x, processValue) {
        return x == null ? null : x.evaluate(processValue);
    };
    BinaryOperand.prototype.evaluate = function (processValue) {
        return this.consumer.call(this, this.evaluateParam(this.left, processValue), this.evaluateParam(this.right, processValue));
    };
    BinaryOperand.prototype.toString = function (func) {
        if (func === void 0) { func = undefined; }
        if (!!func) {
            var res = func(this);
            if (!!res)
                return res;
        }
        return ("(" +
            OperandMaker.safeToString(this.left, func) +
            " " +
            OperandMaker.operatorToString(this.operatorName) +
            " " +
            OperandMaker.safeToString(this.right, func) +
            ")");
    };
    BinaryOperand.prototype.setVariables = function (variables) {
        if (this.left != null)
            this.left.setVariables(variables);
        if (this.right != null)
            this.right.setVariables(variables);
    };
    BinaryOperand.prototype.hasFunction = function () {
        return ((!!this.left && this.left.hasFunction()) ||
            (!!this.right && this.right.hasFunction()));
    };
    BinaryOperand.prototype.hasAsyncFunction = function () {
        return ((!!this.left && this.left.hasAsyncFunction()) ||
            (!!this.right && this.right.hasAsyncFunction()));
    };
    BinaryOperand.prototype.addToAsyncList = function (list) {
        if (!!this.left)
            this.left.addToAsyncList(list);
        if (!!this.right)
            this.right.addToAsyncList(list);
    };
    return BinaryOperand;
}(Operand));

var UnaryOperand = /** @class */ (function (_super) {
    __extends(UnaryOperand, _super);
    function UnaryOperand(expressionValue, operatorName) {
        var _this = _super.call(this) || this;
        _this.expressionValue = expressionValue;
        _this.operatorName = operatorName;
        _this.consumer = OperandMaker.unaryFunctions[operatorName];
        if (_this.consumer == null) {
            OperandMaker.throwInvalidOperatorError(operatorName);
        }
        return _this;
    }
    Object.defineProperty(UnaryOperand.prototype, "operator", {
        get: function () {
            return this.operatorName;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(UnaryOperand.prototype, "expression", {
        get: function () {
            return this.expressionValue;
        },
        enumerable: false,
        configurable: true
    });
    UnaryOperand.prototype.getType = function () {
        return "unary";
    };
    UnaryOperand.prototype.toString = function (func) {
        if (func === void 0) { func = undefined; }
        if (!!func) {
            var res = func(this);
            if (!!res)
                return res;
        }
        return (OperandMaker.operatorToString(this.operatorName) +
            " " +
            this.expression.toString(func));
    };
    UnaryOperand.prototype.isContentEqual = function (op) {
        var uOp = op;
        return uOp.operator == this.operator && this.areOperatorsEquals(this.expression, uOp.expression);
    };
    UnaryOperand.prototype.evaluate = function (processValue) {
        var value = this.expression.evaluate(processValue);
        return this.consumer.call(this, value);
    };
    UnaryOperand.prototype.setVariables = function (variables) {
        this.expression.setVariables(variables);
    };
    return UnaryOperand;
}(Operand));

var ArrayOperand = /** @class */ (function (_super) {
    __extends(ArrayOperand, _super);
    function ArrayOperand(values) {
        var _this = _super.call(this) || this;
        _this.values = values;
        return _this;
    }
    ArrayOperand.prototype.getType = function () {
        return "array";
    };
    ArrayOperand.prototype.toString = function (func) {
        if (func === void 0) { func = undefined; }
        if (!!func) {
            var res = func(this);
            if (!!res)
                return res;
        }
        return ("[" +
            this.values
                .map(function (el) {
                return el.toString(func);
            })
                .join(", ") +
            "]");
    };
    ArrayOperand.prototype.evaluate = function (processValue) {
        return this.values.map(function (el) {
            return el.evaluate(processValue);
        });
    };
    ArrayOperand.prototype.setVariables = function (variables) {
        this.values.forEach(function (el) {
            el.setVariables(variables);
        });
    };
    ArrayOperand.prototype.hasFunction = function () {
        return this.values.some(function (operand) { return operand.hasFunction(); });
    };
    ArrayOperand.prototype.hasAsyncFunction = function () {
        return this.values.some(function (operand) { return operand.hasAsyncFunction(); });
    };
    ArrayOperand.prototype.addToAsyncList = function (list) {
        this.values.forEach(function (operand) { return operand.addToAsyncList(list); });
    };
    ArrayOperand.prototype.isContentEqual = function (op) {
        var aOp = op;
        if (aOp.values.length !== this.values.length)
            return false;
        for (var i = 0; i < this.values.length; i++) {
            if (!aOp.values[i].isEqual(this.values[i]))
                return false;
        }
        return true;
    };
    return ArrayOperand;
}(Operand));

var Const = /** @class */ (function (_super) {
    __extends(Const, _super);
    function Const(value) {
        var _this = _super.call(this) || this;
        _this.value = value;
        return _this;
    }
    Const.prototype.getType = function () {
        return "const";
    };
    Const.prototype.toString = function (func) {
        if (func === void 0) { func = undefined; }
        if (!!func) {
            var res = func(this);
            if (!!res)
                return res;
        }
        return this.value.toString();
    };
    Object.defineProperty(Const.prototype, "correctValue", {
        get: function () {
            return this.getCorrectValue(this.value);
        },
        enumerable: false,
        configurable: true
    });
    Const.prototype.evaluate = function () {
        return this.getCorrectValue(this.value);
    };
    Const.prototype.setVariables = function (variables) { };
    Const.prototype.getCorrectValue = function (value) {
        if (!value || typeof value != "string")
            return value;
        if (this.isBooleanValue(value))
            return value.toLowerCase() === "true";
        if (value.length > 1 &&
            this.isQuote(value[0]) &&
            this.isQuote(value[value.length - 1]))
            return value.substring(1, value.length - 1);
        if (OperandMaker.isNumeric(value)) {
            if (value.indexOf("0x") == 0)
                return parseInt(value);
            if (value.length > 1 && value[0] == "0")
                return value;
            return parseFloat(value);
        }
        return value;
    };
    Const.prototype.isContentEqual = function (op) {
        var cOp = op;
        return cOp.value == this.value;
    };
    Const.prototype.isQuote = function (ch) {
        return ch == "'" || ch == '"';
    };
    Const.prototype.isBooleanValue = function (value) {
        return (value &&
            (value.toLowerCase() === "true" || value.toLowerCase() === "false"));
    };
    return Const;
}(Operand));

var Variable = /** @class */ (function (_super) {
    __extends(Variable, _super);
    function Variable(variableName) {
        var _this = _super.call(this, variableName) || this;
        _this.variableName = variableName;
        _this.valueInfo = {};
        _this.useValueAsItIs = false;
        if (!!_this.variableName &&
            _this.variableName.length > 1 &&
            _this.variableName[0] === Variable.DisableConversionChar) {
            _this.variableName = _this.variableName.substring(1);
            _this.useValueAsItIs = true;
        }
        return _this;
    }
    Object.defineProperty(Variable, "DisableConversionChar", {
        get: function () { return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].expressionDisableConversionChar; },
        set: function (val) { _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].expressionDisableConversionChar = val; },
        enumerable: false,
        configurable: true
    });
    Variable.prototype.getType = function () {
        return "variable";
    };
    Variable.prototype.toString = function (func) {
        if (func === void 0) { func = undefined; }
        if (!!func) {
            var res = func(this);
            if (!!res)
                return res;
        }
        var prefix = this.useValueAsItIs ? Variable.DisableConversionChar : "";
        return "{" + prefix + this.variableName + "}";
    };
    Object.defineProperty(Variable.prototype, "variable", {
        get: function () {
            return this.variableName;
        },
        enumerable: false,
        configurable: true
    });
    Variable.prototype.evaluate = function (processValue) {
        this.valueInfo.name = this.variableName;
        processValue.getValueInfo(this.valueInfo);
        return this.valueInfo.hasValue
            ? this.getCorrectValue(this.valueInfo.value)
            : null;
    };
    Variable.prototype.setVariables = function (variables) {
        variables.push(this.variableName);
    };
    Variable.prototype.getCorrectValue = function (value) {
        if (this.useValueAsItIs)
            return value;
        return _super.prototype.getCorrectValue.call(this, value);
    };
    Variable.prototype.isContentEqual = function (op) {
        var vOp = op;
        return vOp.variable == this.variable;
    };
    return Variable;
}(Const));

var FunctionOperand = /** @class */ (function (_super) {
    __extends(FunctionOperand, _super);
    function FunctionOperand(originalValue, parameters) {
        var _this = _super.call(this) || this;
        _this.originalValue = originalValue;
        _this.parameters = parameters;
        _this.isReadyValue = false;
        if (Array.isArray(parameters) && parameters.length === 0) {
            _this.parameters = new ArrayOperand([]);
        }
        return _this;
    }
    FunctionOperand.prototype.getType = function () {
        return "function";
    };
    FunctionOperand.prototype.evaluateAsync = function (processValue) {
        var _this = this;
        this.isReadyValue = false;
        var asyncProcessValue = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_2__["ProcessValue"]();
        asyncProcessValue.values = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].createCopy(processValue.values);
        asyncProcessValue.properties = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].createCopy(processValue.properties);
        asyncProcessValue.properties.returnResult = function (result) {
            _this.asynResult = result;
            _this.isReadyValue = true;
            _this.onAsyncReady();
        };
        this.evaluateCore(asyncProcessValue);
    };
    FunctionOperand.prototype.evaluate = function (processValue) {
        if (this.isReady)
            return this.asynResult;
        return this.evaluateCore(processValue);
    };
    FunctionOperand.prototype.evaluateCore = function (processValue) {
        return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.run(this.originalValue, this.parameters.evaluate(processValue), processValue.properties);
    };
    FunctionOperand.prototype.toString = function (func) {
        if (func === void 0) { func = undefined; }
        if (!!func) {
            var res = func(this);
            if (!!res)
                return res;
        }
        return this.originalValue + "(" + this.parameters.toString(func) + ")";
    };
    FunctionOperand.prototype.setVariables = function (variables) {
        this.parameters.setVariables(variables);
    };
    Object.defineProperty(FunctionOperand.prototype, "isReady", {
        get: function () {
            return this.isReadyValue;
        },
        enumerable: false,
        configurable: true
    });
    FunctionOperand.prototype.hasFunction = function () {
        return true;
    };
    FunctionOperand.prototype.hasAsyncFunction = function () {
        return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.isAsyncFunction(this.originalValue);
    };
    FunctionOperand.prototype.addToAsyncList = function (list) {
        if (this.hasAsyncFunction()) {
            list.push(this);
        }
    };
    FunctionOperand.prototype.isContentEqual = function (op) {
        var fOp = op;
        return fOp.originalValue == this.originalValue && this.areOperatorsEquals(fOp.parameters, this.parameters);
    };
    return FunctionOperand;
}(Operand));

var OperandMaker = /** @class */ (function () {
    function OperandMaker() {
    }
    OperandMaker.throwInvalidOperatorError = function (op) {
        throw new Error("Invalid operator: '" + op + "'");
    };
    OperandMaker.safeToString = function (operand, func) {
        return operand == null ? "" : operand.toString(func);
    };
    OperandMaker.toOperandString = function (value) {
        if (!!value &&
            !OperandMaker.isNumeric(value) &&
            !OperandMaker.isBooleanValue(value))
            value = "'" + value + "'";
        return value;
    };
    OperandMaker.isSpaceString = function (str) {
        return !!str && !str.replace(" ", "");
    };
    OperandMaker.isNumeric = function (value) {
        if (!!value &&
            (value.indexOf("-") > -1 ||
                value.indexOf("+") > 1 ||
                value.indexOf("*") > -1 ||
                value.indexOf("^") > -1 ||
                value.indexOf("/") > -1 ||
                value.indexOf("%") > -1))
            return false;
        if (OperandMaker.isSpaceString(value))
            return false;
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(value);
    };
    OperandMaker.isBooleanValue = function (value) {
        return (!!value &&
            (value.toLowerCase() === "true" || value.toLowerCase() === "false"));
    };
    OperandMaker.countDecimals = function (value) {
        if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(value) && Math.floor(value) !== value) {
            var strs = value.toString().split(".");
            return strs.length > 1 && strs[1].length || 0;
        }
        return 0;
    };
    OperandMaker.plusMinus = function (a, b, res) {
        var digitsA = OperandMaker.countDecimals(a);
        var digitsB = OperandMaker.countDecimals(b);
        if (digitsA > 0 || digitsB > 0) {
            var digits = Math.max(digitsA, digitsB);
            res = parseFloat(res.toFixed(digits));
        }
        return res;
    };
    OperandMaker.isTwoValueEquals = function (x, y) {
        if (x === "undefined")
            x = undefined;
        if (y === "undefined")
            y = undefined;
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(x, y, true);
    };
    OperandMaker.operatorToString = function (operatorName) {
        var opStr = OperandMaker.signs[operatorName];
        return opStr == null ? operatorName : opStr;
    };
    OperandMaker.unaryFunctions = {
        empty: function (value) {
            return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(value);
        },
        notempty: function (value) {
            return !OperandMaker.unaryFunctions.empty(value);
        },
        negate: function (value) {
            return !value;
        },
    };
    OperandMaker.binaryFunctions = {
        arithmeticOp: function (operatorName) {
            return function (a, b) {
                if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(a) && !OperandMaker.isSpaceString(a)) {
                    a = typeof b === "string" ? "" : 0;
                }
                if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(b) && !OperandMaker.isSpaceString(b)) {
                    b = typeof a === "string" ? "" : 0;
                }
                var consumer = OperandMaker.binaryFunctions[operatorName];
                return consumer == null ? null : consumer.call(this, a, b);
            };
        },
        and: function (a, b) {
            return a && b;
        },
        or: function (a, b) {
            return a || b;
        },
        plus: function (a, b) {
            if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(a) || !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(b)) {
                return a + b;
            }
            return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].correctAfterPlusMinis(a, b, a + b);
        },
        minus: function (a, b) {
            return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].correctAfterPlusMinis(a, b, a - b);
        },
        mul: function (a, b) {
            return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].correctAfterMultiple(a, b, a * b);
        },
        div: function (a, b) {
            if (!b)
                return null;
            return a / b;
        },
        mod: function (a, b) {
            if (!b)
                return null;
            return a % b;
        },
        power: function (a, b) {
            return Math.pow(a, b);
        },
        greater: function (left, right) {
            if (left == null || right == null)
                return false;
            return left > right;
        },
        less: function (left, right) {
            if (left == null || right == null)
                return false;
            return left < right;
        },
        greaterorequal: function (left, right) {
            if (OperandMaker.binaryFunctions.equal(left, right))
                return true;
            return OperandMaker.binaryFunctions.greater(left, right);
        },
        lessorequal: function (left, right) {
            if (OperandMaker.binaryFunctions.equal(left, right))
                return true;
            return OperandMaker.binaryFunctions.less(left, right);
        },
        equal: function (left, right) {
            return OperandMaker.isTwoValueEquals(left, right);
        },
        notequal: function (left, right) {
            return !OperandMaker.binaryFunctions.equal(left, right);
        },
        contains: function (left, right) {
            return OperandMaker.binaryFunctions.containsCore(left, right, true);
        },
        notcontains: function (left, right) {
            if (!left && !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(right))
                return true;
            return OperandMaker.binaryFunctions.containsCore(left, right, false);
        },
        anyof: function (left, right) {
            if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(left) && _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(right))
                return true;
            if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(left) ||
                (!Array.isArray(left) && left.length === 0))
                return false;
            if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(right))
                return true;
            if (!Array.isArray(left))
                return OperandMaker.binaryFunctions.contains(right, left);
            if (!Array.isArray(right))
                return OperandMaker.binaryFunctions.contains(left, right);
            for (var i = 0; i < right.length; i++) {
                if (OperandMaker.binaryFunctions.contains(left, right[i]))
                    return true;
            }
            return false;
        },
        allof: function (left, right) {
            if (!left && !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(right))
                return false;
            if (!Array.isArray(right))
                return OperandMaker.binaryFunctions.contains(left, right);
            for (var i = 0; i < right.length; i++) {
                if (!OperandMaker.binaryFunctions.contains(left, right[i]))
                    return false;
            }
            return true;
        },
        containsCore: function (left, right, isContains) {
            if (!left && left !== 0 && left !== false)
                return false;
            if (!left.length) {
                left = left.toString();
                if (typeof right === "string" || right instanceof String) {
                    left = left.toUpperCase();
                    right = right.toUpperCase();
                }
            }
            if (typeof left === "string" || left instanceof String) {
                if (!right)
                    return false;
                right = right.toString();
                var found = left.indexOf(right) > -1;
                return isContains ? found : !found;
            }
            var rightArray = Array.isArray(right) ? right : [right];
            for (var rIndex = 0; rIndex < rightArray.length; rIndex++) {
                var i = 0;
                right = rightArray[rIndex];
                for (; i < left.length; i++) {
                    if (OperandMaker.isTwoValueEquals(left[i], right))
                        break;
                }
                if (i == left.length)
                    return !isContains;
            }
            return isContains;
        },
    };
    OperandMaker.signs = {
        less: "<",
        lessorequal: "<=",
        greater: ">",
        greaterorequal: ">=",
        equal: "==",
        notequal: "!=",
        plus: "+",
        minus: "-",
        mul: "*",
        div: "/",
        and: "and",
        or: "or",
        power: "^",
        mod: "%",
        negate: "!",
    };
    return OperandMaker;
}());



/***/ }),

/***/ "./src/flowpanel.ts":
/*!**************************!*\
  !*** ./src/flowpanel.ts ***!
  \**************************/
/*! exports provided: FlowPanelModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlowPanelModel", function() { return FlowPanelModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./panel */ "./src/panel.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * The flow panel object. It is a container with flow layout where you can mix questions with markdown text.
 *
 */
var FlowPanelModel = /** @class */ (function (_super) {
    __extends(FlowPanelModel, _super);
    function FlowPanelModel(name) {
        if (name === void 0) { name = ""; }
        var _this = _super.call(this, name) || this;
        _this.createLocalizableString("content", _this, true);
        _this.registerPropertyChangedHandlers(["content"], function () {
            _this.onContentChanged();
        });
        return _this;
    }
    FlowPanelModel.prototype.getType = function () {
        return "flowpanel";
    };
    FlowPanelModel.prototype.getChildrenLayoutType = function () {
        return "flow";
    };
    FlowPanelModel.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        this.onContentChanged();
    };
    Object.defineProperty(FlowPanelModel.prototype, "content", {
        get: function () {
            return this.getLocalizableStringText("content");
        },
        set: function (val) {
            this.setLocalizableStringText("content", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FlowPanelModel.prototype, "locContent", {
        get: function () {
            return this.getLocalizableString("content");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FlowPanelModel.prototype, "html", {
        get: function () {
            return this.getPropertyValue("html", "");
        },
        set: function (val) {
            this.setPropertyValue("html", val);
        },
        enumerable: false,
        configurable: true
    });
    FlowPanelModel.prototype.onContentChanged = function () {
        var html = "";
        if (!!this.onCustomHtmlProducing) {
            html = this.onCustomHtmlProducing();
        }
        else {
            html = this.produceHtml();
        }
        this.html = html;
        if (!!this.contentChangedCallback)
            this.contentChangedCallback();
    };
    FlowPanelModel.prototype.produceHtml = function () {
        var html = [];
        //contentElementNamePrefix
        var regEx = /{(.*?(element:)[^$].*?)}/g;
        var str = this.content;
        var startIndex = 0;
        var res = null;
        while ((res = regEx.exec(str)) !== null) {
            if (res.index > startIndex) {
                html.push(str.substring(startIndex, res.index));
                startIndex = res.index;
            }
            var question = this.getQuestionFromText(res[0]);
            if (!!question) {
                html.push(this.getHtmlForQuestion(question));
            }
            else {
                html.push(str.substring(startIndex, res.index + res[0].length));
            }
            startIndex = res.index + res[0].length;
        }
        if (startIndex < str.length) {
            html.push(str.substring(startIndex, str.length));
        }
        return html.join("").replace(new RegExp("<br>", "g"), "<br/>");
    };
    FlowPanelModel.prototype.getQuestionFromText = function (str) {
        str = str.substring(1, str.length - 1);
        str = str.replace(FlowPanelModel.contentElementNamePrefix, "").trim();
        return this.getQuestionByName(str);
    };
    FlowPanelModel.prototype.getHtmlForQuestion = function (question) {
        if (!!this.onGetHtmlForQuestion)
            return this.onGetHtmlForQuestion(question);
        return "";
    };
    FlowPanelModel.prototype.getQuestionHtmlId = function (question) {
        return this.name + "_" + question.id;
    };
    FlowPanelModel.prototype.onAddElement = function (element, index) {
        _super.prototype.onAddElement.call(this, element, index);
        this.addElementToContent(element);
        element.renderWidth = "";
    };
    FlowPanelModel.prototype.onRemoveElement = function (element) {
        var searchStr = this.getElementContentText(element);
        this.content = this.content.replace(searchStr, "");
        _super.prototype.onRemoveElement.call(this, element);
    };
    FlowPanelModel.prototype.dragDropMoveElement = function (src, target, targetIndex) { };
    FlowPanelModel.prototype.addElementToContent = function (element) {
        if (this.isLoadingFromJson)
            return;
        var text = this.getElementContentText(element);
        if (!this.insertTextAtCursor(text)) {
            this.content = this.content + text;
        }
    };
    FlowPanelModel.prototype.insertTextAtCursor = function (text, prevName) {
        if (prevName === void 0) { prevName = null; }
        if (!this.isDesignMode ||
            typeof document === "undefined" ||
            !window.getSelection)
            return false;
        var sel = window.getSelection();
        if (sel.getRangeAt && sel.rangeCount) {
            var range = sel.getRangeAt(0);
            range.deleteContents();
            range.insertNode(document.createTextNode(text));
            var self = this;
            if (self.getContent) {
                var str = self.getContent(prevName);
                this.content = str;
            }
            return true;
        }
        return false;
    };
    FlowPanelModel.prototype.getElementContentText = function (element) {
        return "{" + FlowPanelModel.contentElementNamePrefix + element.name + "}";
    };
    FlowPanelModel.contentElementNamePrefix = "element:";
    return FlowPanelModel;
}(_panel__WEBPACK_IMPORTED_MODULE_1__["PanelModel"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("flowpanel", [{ name: "content:html", serializationProperty: "locContent" }], function () {
    return new FlowPanelModel();
}, "panel");


/***/ }),

/***/ "./src/functionsfactory.ts":
/*!*********************************!*\
  !*** ./src/functionsfactory.ts ***!
  \*********************************/
/*! exports provided: FunctionFactory, registerFunction */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionFactory", function() { return FunctionFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerFunction", function() { return registerFunction; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");


var FunctionFactory = /** @class */ (function () {
    function FunctionFactory() {
        this.functionHash = {};
        this.isAsyncHash = {};
    }
    FunctionFactory.prototype.register = function (name, func, isAsync) {
        if (isAsync === void 0) { isAsync = false; }
        this.functionHash[name] = func;
        if (isAsync)
            this.isAsyncHash[name] = true;
    };
    FunctionFactory.prototype.unregister = function (name) {
        delete this.functionHash[name];
        delete this.isAsyncHash[name];
    };
    FunctionFactory.prototype.hasFunction = function (name) {
        return !!this.functionHash[name];
    };
    FunctionFactory.prototype.isAsyncFunction = function (name) {
        return !!this.isAsyncHash[name];
    };
    FunctionFactory.prototype.clear = function () {
        this.functionHash = {};
    };
    FunctionFactory.prototype.getAll = function () {
        var result = [];
        for (var key in this.functionHash) {
            result.push(key);
        }
        return result.sort();
    };
    FunctionFactory.prototype.run = function (name, params, properties) {
        if (properties === void 0) { properties = null; }
        var func = this.functionHash[name];
        if (!func)
            return null;
        var classRunner = {
            func: func,
        };
        if (properties) {
            for (var key in properties) {
                classRunner[key] = properties[key];
            }
        }
        return classRunner.func(params);
    };
    FunctionFactory.Instance = new FunctionFactory();
    return FunctionFactory;
}());

var registerFunction = FunctionFactory.Instance.register;
function getParamsAsArray(value, arr) {
    if (value === undefined || value === null)
        return;
    if (Array.isArray(value)) {
        for (var i = 0; i < value.length; i++) {
            getParamsAsArray(value[i], arr);
        }
    }
    else {
        if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(value)) {
            value = parseFloat(value);
        }
        arr.push(value);
    }
}
function sum(params) {
    var arr = [];
    getParamsAsArray(params, arr);
    var res = 0;
    for (var i = 0; i < arr.length; i++) {
        res = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].correctAfterPlusMinis(res, arr[i], res + arr[i]);
    }
    return res;
}
FunctionFactory.Instance.register("sum", sum);
function min_max(params, isMin) {
    var arr = [];
    getParamsAsArray(params, arr);
    var res = undefined;
    for (var i = 0; i < arr.length; i++) {
        if (res === undefined) {
            res = arr[i];
        }
        if (isMin) {
            if (res > arr[i])
                res = arr[i];
        }
        else {
            if (res < arr[i])
                res = arr[i];
        }
    }
    return res;
}
function min(params) {
    return min_max(params, true);
}
FunctionFactory.Instance.register("min", min);
function max(params) {
    return min_max(params, false);
}
FunctionFactory.Instance.register("max", max);
function count(params) {
    var arr = [];
    getParamsAsArray(params, arr);
    return arr.length;
}
FunctionFactory.Instance.register("count", count);
function avg(params) {
    var arr = [];
    getParamsAsArray(params, arr);
    var res = sum(params);
    return arr.length > 0 ? res / arr.length : 0;
}
FunctionFactory.Instance.register("avg", avg);
function getInArrayParams(params) {
    if (params.length != 2)
        return null;
    var arr = params[0];
    if (!arr)
        return null;
    if (!Array.isArray(arr) && !Array.isArray(Object.keys(arr)))
        return null;
    var name = params[1];
    if (typeof name !== "string" && !(name instanceof String))
        return null;
    return { data: arr, name: name };
}
function convertToNumber(val) {
    if (typeof val === "string")
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val) ? parseFloat(val) : undefined;
    return val;
}
function processItemInArray(item, name, res, func, needToConvert) {
    if (!item || _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(item[name]))
        return res;
    var val = needToConvert ? convertToNumber(item[name]) : 1;
    return func(res, val);
}
function calcInArray(params, func, needToConvert) {
    if (needToConvert === void 0) { needToConvert = true; }
    var v = getInArrayParams(params);
    if (!v)
        return undefined;
    var res = undefined;
    if (Array.isArray(v.data)) {
        for (var i = 0; i < v.data.length; i++) {
            res = processItemInArray(v.data[i], v.name, res, func, needToConvert);
        }
    }
    else {
        for (var key in v.data) {
            res = processItemInArray(v.data[key], v.name, res, func, needToConvert);
        }
    }
    return res;
}
function sumInArray(params) {
    var res = calcInArray(params, function (res, val) {
        if (res == undefined)
            res = 0;
        if (val == undefined || val == null)
            return res;
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].correctAfterPlusMinis(res, val, res + val);
    });
    return res !== undefined ? res : 0;
}
FunctionFactory.Instance.register("sumInArray", sumInArray);
function minInArray(params) {
    return calcInArray(params, function (res, val) {
        if (res == undefined)
            return val;
        if (val == undefined || val == null)
            return res;
        return res < val ? res : val;
    });
}
FunctionFactory.Instance.register("minInArray", minInArray);
function maxInArray(params) {
    return calcInArray(params, function (res, val) {
        if (res == undefined)
            return val;
        if (val == undefined || val == null)
            return res;
        return res > val ? res : val;
    });
}
FunctionFactory.Instance.register("maxInArray", maxInArray);
function countInArray(params) {
    var res = calcInArray(params, function (res, val) {
        if (res == undefined)
            res = 0;
        if (val == undefined || val == null)
            return res;
        return res + 1;
    }, false);
    return res !== undefined ? res : 0;
}
FunctionFactory.Instance.register("countInArray", countInArray);
function avgInArray(params) {
    var count = countInArray(params);
    if (count == 0)
        return 0;
    return sumInArray(params) / count;
}
FunctionFactory.Instance.register("avgInArray", avgInArray);
function iif(params) {
    if (!params && params.length !== 3)
        return "";
    return params[0] ? params[1] : params[2];
}
FunctionFactory.Instance.register("iif", iif);
function getDate(params) {
    if (!params && params.length < 1)
        return null;
    if (!params[0])
        return null;
    return new Date(params[0]);
}
FunctionFactory.Instance.register("getDate", getDate);
function age(params) {
    if (!params && params.length < 1)
        return null;
    if (!params[0])
        return null;
    var birthDate = new Date(params[0]);
    var today = new Date();
    var age = today.getFullYear() - birthDate.getFullYear();
    var m = today.getMonth() - birthDate.getMonth();
    if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
        age -= age > 0 ? 1 : 0;
    }
    return age;
}
FunctionFactory.Instance.register("age", age);
function isContainerReadyCore(container) {
    if (!container)
        return false;
    var questions = container.questions;
    for (var i = 0; i < questions.length; i++) {
        if (questions[i].hasErrors(false))
            return false;
    }
    return true;
}
function isContainerReady(params) {
    if (!params && params.length < 1)
        return false;
    if (!params[0] || !this.survey)
        return false;
    var name = params[0];
    var container = this.survey.getPageByName(name);
    if (!container)
        container = this.survey.getPanelByName(name);
    if (!container) {
        var question = this.survey.getQuestionByName(name);
        if (!question || !Array.isArray(question.panels))
            return false;
        if (params.length > 1) {
            if (params[1] < question.panels.length) {
                container = question.panels[params[1]];
            }
        }
        else {
            for (var i = 0; i < question.panels.length; i++) {
                if (!isContainerReadyCore(question.panels[i]))
                    return false;
            }
            return true;
        }
    }
    return isContainerReadyCore(container);
}
FunctionFactory.Instance.register("isContainerReady", isContainerReady);
function isDisplayMode() {
    return this.survey && this.survey.isDisplayMode;
}
FunctionFactory.Instance.register("isDisplayMode", isDisplayMode);
function currentDate() {
    return new Date();
}
FunctionFactory.Instance.register("currentDate", currentDate);
function today(params) {
    var res = new Date();
    if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].useLocalTimeZone) {
        res.setHours(0, 0, 0, 0);
    }
    else {
        res.setUTCHours(0, 0, 0, 0);
    }
    if (Array.isArray(params) && params.length == 1) {
        res.setDate(res.getDate() + params[0]);
    }
    return res;
}
FunctionFactory.Instance.register("today", today);
function getYear(params) {
    if (params.length !== 1 || !params[0])
        return undefined;
    return new Date(params[0]).getFullYear();
}
FunctionFactory.Instance.register("getYear", getYear);
function currentYear() {
    return new Date().getFullYear();
}
FunctionFactory.Instance.register("currentYear", currentYear);
function diffDays(params) {
    if (!Array.isArray(params) || params.length !== 2)
        return 0;
    if (!params[0] || !params[1])
        return 0;
    var date1 = new Date(params[0]);
    var date2 = new Date(params[1]);
    var diffTime = Math.abs(date2 - date1);
    return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
}
FunctionFactory.Instance.register("diffDays", diffDays);


/***/ }),

/***/ "./src/helpers.ts":
/*!************************!*\
  !*** ./src/helpers.ts ***!
  \************************/
/*! exports provided: Helpers */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Helpers", function() { return Helpers; });
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");

var Helpers = /** @class */ (function () {
    function Helpers() {
    }
    /**
     * A static methods that returns true if a value undefined, null, empty string or empty array.
     * @param value
     */
    Helpers.isValueEmpty = function (value) {
        if (Array.isArray(value) && value.length === 0)
            return true;
        if (!!value && typeof value === "object" && value.constructor === Object) {
            for (var key in value) {
                if (!Helpers.isValueEmpty(value[key]))
                    return false;
            }
            return true;
        }
        return !value && value !== 0 && value !== false;
    };
    Helpers.isArrayContainsEqual = function (x, y) {
        if (!Array.isArray(x) || !Array.isArray(y))
            return false;
        if (x.length !== y.length)
            return false;
        for (var i = 0; i < x.length; i++) {
            var j = 0;
            for (; j < y.length; j++) {
                if (Helpers.isTwoValueEquals(x[i], y[j]))
                    break;
            }
            if (j === y.length)
                return false;
        }
        return true;
    };
    Helpers.isArraysEqual = function (x, y, ignoreOrder, caseSensitive, trimStrings) {
        if (ignoreOrder === void 0) { ignoreOrder = false; }
        if (!Array.isArray(x) || !Array.isArray(y))
            return false;
        if (x.length !== y.length)
            return false;
        if (ignoreOrder) {
            var xSorted = [];
            var ySorted = [];
            for (var i = 0; i < x.length; i++) {
                xSorted.push(x[i]);
                ySorted.push(y[i]);
            }
            xSorted.sort();
            ySorted.sort();
            x = xSorted;
            y = ySorted;
        }
        for (var i = 0; i < x.length; i++) {
            if (!Helpers.isTwoValueEquals(x[i], y[i], ignoreOrder, caseSensitive, trimStrings))
                return false;
        }
        return true;
    };
    Helpers.isTwoValueEquals = function (x, y, ignoreOrder, caseSensitive, trimStrings) {
        if (ignoreOrder === void 0) { ignoreOrder = false; }
        if (x === y)
            return true;
        if (Array.isArray(x) && x.length === 0 && typeof y === "undefined")
            return true;
        if (Array.isArray(y) && y.length === 0 && typeof x === "undefined")
            return true;
        if ((x === undefined || x === null) && y === "")
            return true;
        if ((y === undefined || y === null) && x === "")
            return true;
        if (trimStrings === undefined)
            trimStrings = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].comparator.trimStrings;
        if (caseSensitive === undefined)
            caseSensitive = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].comparator.caseSensitive;
        if (typeof x === "string" && typeof y === "string") {
            if (trimStrings) {
                x = x.trim();
                y = y.trim();
            }
            if (!caseSensitive) {
                x = x.toLowerCase();
                y = y.toLowerCase();
            }
            return x === y;
        }
        if (x instanceof Date && y instanceof Date)
            return x.getTime() == y.getTime();
        if (Helpers.isConvertibleToNumber(x) && Helpers.isConvertibleToNumber(y)) {
            if (parseInt(x) === parseInt(y) && parseFloat(x) === parseFloat(y)) {
                return true;
            }
        }
        if ((!Helpers.isValueEmpty(x) && Helpers.isValueEmpty(y)) ||
            (Helpers.isValueEmpty(x) && !Helpers.isValueEmpty(y)))
            return false;
        if ((x === true || x === false) && typeof y == "string") {
            return x.toString() === y.toLocaleLowerCase();
        }
        if ((y === true || y === false) && typeof x == "string") {
            return y.toString() === x.toLocaleLowerCase();
        }
        if (!(x instanceof Object) && !(y instanceof Object))
            return x == y;
        if (!(x instanceof Object) || !(y instanceof Object))
            return false;
        if (x["equals"])
            return x.equals(y);
        if (!!x.toJSON && !!y.toJSON && !!x.getType && !!y.getType) {
            if (x.isDiposed || y.isDiposed)
                return false;
            if (x.getType() !== y.getType())
                return false;
            if (!!x.name && x.name !== y.name)
                return false;
            return this.isTwoValueEquals(x.toJSON(), y.toJSON(), ignoreOrder, caseSensitive, trimStrings);
        }
        if (Array.isArray(x) && Array.isArray(y))
            return Helpers.isArraysEqual(x, y, ignoreOrder, caseSensitive, trimStrings);
        if (!!x.equalsTo && y.equalsTo)
            return x.equalsTo(y);
        for (var p in x) {
            if (!x.hasOwnProperty(p))
                continue;
            if (!y.hasOwnProperty(p))
                return false;
            if (!this.isTwoValueEquals(x[p], y[p], ignoreOrder, caseSensitive, trimStrings))
                return false;
        }
        for (p in y) {
            if (y.hasOwnProperty(p) && !x.hasOwnProperty(p))
                return false;
        }
        return true;
    };
    Helpers.randomizeArray = function (array) {
        for (var i = array.length - 1; i > 0; i--) {
            var j = Math.floor(Math.random() * (i + 1));
            var temp = array[i];
            array[i] = array[j];
            array[j] = temp;
        }
        return array;
    };
    Helpers.getUnbindValue = function (value) {
        if (!!value && value instanceof Object && !(value instanceof Date)) {
            //do not return the same object instance!!!
            return JSON.parse(JSON.stringify(value));
        }
        return value;
    };
    Helpers.createCopy = function (obj) {
        var res = {};
        if (!obj)
            return res;
        for (var key in obj) {
            res[key] = obj[key];
        }
        return res;
    };
    Helpers.isConvertibleToNumber = function (value) {
        return (value !== undefined &&
            value !== null &&
            !Array.isArray(value) &&
            !isNaN(value));
    };
    Helpers.isNumber = function (value) {
        if (typeof value == "string" &&
            !!value &&
            value.indexOf("0x") == 0 &&
            value.length > 32)
            return false;
        return !isNaN(parseFloat(value)) && isFinite(value);
    };
    Helpers.getMaxLength = function (maxLength, surveyLength) {
        if (maxLength < 0) {
            maxLength = surveyLength;
        }
        return maxLength > 0 ? maxLength : null;
    };
    Helpers.getNumberByIndex = function (index, startIndexStr) {
        if (index < 0)
            return "";
        var startIndex = 1;
        var prefix = "";
        var postfix = ".";
        var isNumeric = true;
        var strIndex = "A";
        var str = "";
        if (!!startIndexStr) {
            str = startIndexStr;
            var ind = str.length - 1;
            var hasDigit = false;
            for (var i = 0; i < str.length; i++) {
                if (Helpers.isCharDigit(str[i])) {
                    hasDigit = true;
                    break;
                }
            }
            var checkLetter = function () {
                return ((hasDigit && !Helpers.isCharDigit(str[ind])) ||
                    Helpers.isCharNotLetterAndDigit(str[ind]));
            };
            while (ind >= 0 && checkLetter())
                ind--;
            var newPostfix = "";
            if (ind < str.length - 1) {
                newPostfix = str.substring(ind + 1);
                str = str.substring(0, ind + 1);
            }
            ind = str.length - 1;
            while (ind >= 0) {
                if (checkLetter())
                    break;
                ind--;
                if (!hasDigit)
                    break;
            }
            strIndex = str.substring(ind + 1);
            prefix = str.substring(0, ind + 1);
            if (parseInt(strIndex))
                startIndex = parseInt(strIndex);
            else if (strIndex.length == 1)
                isNumeric = false;
            if (!!newPostfix || !!prefix) {
                postfix = newPostfix;
            }
        }
        if (isNumeric)
            return prefix + (index + startIndex).toString() + postfix;
        return (prefix + String.fromCharCode(strIndex.charCodeAt(0) + index) + postfix);
    };
    Helpers.isCharNotLetterAndDigit = function (ch) {
        return ch.toUpperCase() == ch.toLowerCase() && !Helpers.isCharDigit(ch);
    };
    Helpers.isCharDigit = function (ch) {
        return ch >= "0" && ch <= "9";
    };
    Helpers.countDecimals = function (value) {
        if (Helpers.isNumber(value) && Math.floor(value) !== value) {
            var strs = value.toString().split(".");
            return strs.length > 1 && strs[1].length || 0;
        }
        return 0;
    };
    Helpers.correctAfterPlusMinis = function (a, b, res) {
        var digitsA = Helpers.countDecimals(a);
        var digitsB = Helpers.countDecimals(b);
        if (digitsA > 0 || digitsB > 0) {
            var digits = Math.max(digitsA, digitsB);
            res = parseFloat(res.toFixed(digits));
        }
        return res;
    };
    Helpers.correctAfterMultiple = function (a, b, res) {
        var digits = Helpers.countDecimals(a) + Helpers.countDecimals(b);
        if (digits > 0) {
            res = parseFloat(res.toFixed(digits));
        }
        return res;
    };
    Helpers.convertArrayValueToObject = function (src, propName, dest) {
        if (dest === void 0) { dest = undefined; }
        var res = new Array();
        if (!src || !Array.isArray(src))
            return res;
        for (var i = 0; i < src.length; i++) {
            var item = void 0;
            if (Array.isArray(dest)) {
                item = Helpers.findObjByPropValue(dest, propName, src[i]);
            }
            if (!item) {
                item = {};
                item[propName] = src[i];
            }
            res.push(item);
        }
        return res;
    };
    Helpers.findObjByPropValue = function (arr, propName, val) {
        for (var i = 0; i < arr.length; i++) {
            if (Helpers.isTwoValueEquals(arr[i][propName], val))
                return arr[i];
        }
        return undefined;
    };
    Helpers.convertArrayObjectToValue = function (src, propName) {
        var res = new Array();
        if (!src || !Array.isArray(src))
            return res;
        for (var i = 0; i < src.length; i++) {
            var itemVal = !!src[i] ? src[i][propName] : undefined;
            if (!Helpers.isValueEmpty(itemVal))
                res.push(itemVal);
        }
        return res;
    };
    Helpers.convertDateToString = function (date) {
        var toStr = function (val) {
            if (val < 10)
                return "0" + val.toString();
            return val.toString();
        };
        return date.getFullYear() + "-" + toStr(date.getMonth() + 1) + "-" + toStr(date.getDate());
    };
    Helpers.convertValToQuestionVal = function (val) {
        if (val instanceof Date) {
            return Helpers.convertDateToString(val);
        }
        return val;
    };
    return Helpers;
}());

if (!String.prototype["format"]) {
    String.prototype["format"] = function () {
        var args = arguments;
        return this.replace(/{(\d+)}/g, function (match, number) {
            return typeof args[number] != "undefined" ? args[number] : match;
        });
    };
}


/***/ }),

/***/ "./src/images sync \\.svg$":
/*!*********************************************!*\
  !*** ./src/images sync nonrecursive \.svg$ ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./ArrowDown_34x34.svg": "./src/images/ArrowDown_34x34.svg",
	"./ArrowLeft.svg": "./src/images/ArrowLeft.svg",
	"./ArrowRight.svg": "./src/images/ArrowRight.svg",
	"./Arrow_downGREY_10x10.svg": "./src/images/Arrow_downGREY_10x10.svg",
	"./ChooseFile.svg": "./src/images/ChooseFile.svg",
	"./Clear.svg": "./src/images/Clear.svg",
	"./DefaultFile.svg": "./src/images/DefaultFile.svg",
	"./Delete.svg": "./src/images/Delete.svg",
	"./Down_34x34.svg": "./src/images/Down_34x34.svg",
	"./Left.svg": "./src/images/Left.svg",
	"./ModernBooleanCheckChecked.svg": "./src/images/ModernBooleanCheckChecked.svg",
	"./ModernBooleanCheckInd.svg": "./src/images/ModernBooleanCheckInd.svg",
	"./ModernBooleanCheckUnchecked.svg": "./src/images/ModernBooleanCheckUnchecked.svg",
	"./ModernCheck.svg": "./src/images/ModernCheck.svg",
	"./ModernRadio.svg": "./src/images/ModernRadio.svg",
	"./More.svg": "./src/images/More.svg",
	"./ProgressButton.svg": "./src/images/ProgressButton.svg",
	"./ProgressButtonV2.svg": "./src/images/ProgressButtonV2.svg",
	"./RemoveFile.svg": "./src/images/RemoveFile.svg",
	"./Right.svg": "./src/images/Right.svg",
	"./TimerCircle.svg": "./src/images/TimerCircle.svg",
	"./V2Check.svg": "./src/images/V2Check.svg",
	"./V2DragElement_16x16.svg": "./src/images/V2DragElement_16x16.svg",
	"./clear_16x16.svg": "./src/images/clear_16x16.svg",
	"./collapseDetail.svg": "./src/images/collapseDetail.svg",
	"./expandDetail.svg": "./src/images/expandDetail.svg",
	"./no-image.svg": "./src/images/no-image.svg",
	"./search.svg": "./src/images/search.svg"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./src/images sync \\.svg$";

/***/ }),

/***/ "./src/images/ArrowDown_34x34.svg":
/*!****************************************!*\
  !*** ./src/images/ArrowDown_34x34.svg ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 34 34\" xml:space=\"preserve\"><polygon class=\"st0\" points=\"12,16 14,14 17,17 20,14 22,16 17,21 \"></polygon></svg>"

/***/ }),

/***/ "./src/images/ArrowLeft.svg":
/*!**********************************!*\
  !*** ./src/images/ArrowLeft.svg ***!
  \**********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999Z\"></path></svg>"

/***/ }),

/***/ "./src/images/ArrowRight.svg":
/*!***********************************!*\
  !*** ./src/images/ArrowRight.svg ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1 6.99999H11.6L7.3 2.69999L8.7 1.29999L15.4 7.99999L8.7 14.7L7.3 13.3L11.6 8.99999H1V6.99999Z\"></path></svg>"

/***/ }),

/***/ "./src/images/Arrow_downGREY_10x10.svg":
/*!*********************************************!*\
  !*** ./src/images/Arrow_downGREY_10x10.svg ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 10 10\" xml:space=\"preserve\"><polygon class=\"st0\" points=\"2,2 0,4 5,9 10,4 8,2 5,5 \"></polygon></svg>"

/***/ }),

/***/ "./src/images/ChooseFile.svg":
/*!***********************************!*\
  !*** ./src/images/ChooseFile.svg ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M22 9V7C22 5.9 21.1 5 20 5H12L10 3H4C2.9 3 2 3.9 2 5V9V10V21H22L24 9H22ZM4 5H9.2L10.6 6.4L11.2 7H12H20V9H4V5ZM20.3 19H4V11H21.6L20.3 19Z\"></path></svg>"

/***/ }),

/***/ "./src/images/Clear.svg":
/*!******************************!*\
  !*** ./src/images/Clear.svg ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M22.6 8.6L16.4 2.4C16 2 15.5 1.8 15 1.8C14.5 1.8 14 2 13.6 2.4L1.4 14.6C0.600003 15.4 0.600003 16.6 1.4 17.4L6 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.8L2.8 16L6.2 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.6 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z\"></path></svg>"

/***/ }),

/***/ "./src/images/DefaultFile.svg":
/*!************************************!*\
  !*** ./src/images/DefaultFile.svg ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 56 68\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_9011_41219)\"><path d=\"M54.83 10.83L45.17 1.17C44.7982 0.798664 44.357 0.504208 43.8714 0.303455C43.3858 0.102703 42.8654 -0.000411943 42.34 1.2368e-06H6C4.4087 1.2368e-06 2.88257 0.632142 1.75735 1.75736C0.632136 2.88258 0 4.4087 0 6V62C0 63.5913 0.632136 65.1174 1.75735 66.2426C2.88257 67.3679 4.4087 68 6 68H50C51.5913 68 53.1174 67.3679 54.2426 66.2426C55.3679 65.1174 56 63.5913 56 62V13.66C56.0004 13.1346 55.8973 12.6142 55.6965 12.1286C55.4958 11.643 55.2013 11.2018 54.83 10.83ZM44 2.83L53.17 12H48C46.9391 12 45.9217 11.5786 45.1716 10.8284C44.4214 10.0783 44 9.06087 44 8V2.83ZM54 62C54 63.0609 53.5786 64.0783 52.8284 64.8284C52.0783 65.5786 51.0609 66 50 66H6C4.93913 66 3.92172 65.5786 3.17157 64.8284C2.42142 64.0783 2 63.0609 2 62V6C2 4.93914 2.42142 3.92172 3.17157 3.17157C3.92172 2.42143 4.93913 2 6 2H42V8C42 9.5913 42.6321 11.1174 43.7574 12.2426C44.8826 13.3679 46.4087 14 48 14H54V62ZM14 24H42V26H14V24ZM14 30H42V32H14V30ZM14 36H42V38H14V36ZM14 42H42V44H14V42Z\" fill=\"#909090\"></path></g><defs><clipPath id=\"clip0_9011_41219\"><rect width=\"56\" height=\"68\" fill=\"white\"></rect></clipPath></defs></svg>"

/***/ }),

/***/ "./src/images/Delete.svg":
/*!*******************************!*\
  !*** ./src/images/Delete.svg ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M22 4H20H16V2C16 0.9 15.1 0 14 0H10C8.9 0 8 0.9 8 2V4H4H2V6H4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V6H22V4ZM10 2H14V4H10V2ZM18 20H6V6H8H16H18V20ZM14 8H16V18H14V8ZM11 8H13V18H11V8ZM8 8H10V18H8V8Z\"></path></svg>"

/***/ }),

/***/ "./src/images/Down_34x34.svg":
/*!***********************************!*\
  !*** ./src/images/Down_34x34.svg ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 34 34\" xml:space=\"preserve\"><g><path class=\"st0\" d=\"M33,34H0V0h33c0.6,0,1,0.4,1,1v32C34,33.6,33.6,34,33,34z\"></path><polygon class=\"st1\" points=\"12,16 14,14 17,17 20,14 22,16 17,21 \"></polygon></g></svg>"

/***/ }),

/***/ "./src/images/Left.svg":
/*!*****************************!*\
  !*** ./src/images/Left.svg ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 16 16\" xml:space=\"preserve\"><polygon points=\"11,12 9,14 3,8 9,2 11,4 7,8 \"></polygon></svg>"

/***/ }),

/***/ "./src/images/ModernBooleanCheckChecked.svg":
/*!**************************************************!*\
  !*** ./src/images/ModernBooleanCheckChecked.svg ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 24 24\"><polygon points=\"19,10 14,10 14,5 10,5 10,10 5,10 5,14 10,14 10,19 14,19 14,14 19,14 \"></polygon></svg>"

/***/ }),

/***/ "./src/images/ModernBooleanCheckInd.svg":
/*!**********************************************!*\
  !*** ./src/images/ModernBooleanCheckInd.svg ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 24 24\"><path d=\"M22,0H2C0.9,0,0,0.9,0,2v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z M21,18L6,3h15V18z M3,6l15,15H3V6z\"></path></svg>"

/***/ }),

/***/ "./src/images/ModernBooleanCheckUnchecked.svg":
/*!****************************************************!*\
  !*** ./src/images/ModernBooleanCheckUnchecked.svg ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 24 24\"><rect x=\"5\" y=\"10\" width=\"14\" height=\"4\"></rect></svg>"

/***/ }),

/***/ "./src/images/ModernCheck.svg":
/*!************************************!*\
  !*** ./src/images/ModernCheck.svg ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 24 24\"><path d=\"M5,13l2-2l3,3l7-7l2,2l-9,9L5,13z\"></path></svg>"

/***/ }),

/***/ "./src/images/ModernRadio.svg":
/*!************************************!*\
  !*** ./src/images/ModernRadio.svg ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"-12 -12 24 24\"><circle r=\"6\" cx=\"0\" cy=\"0\"></circle></svg>"

/***/ }),

/***/ "./src/images/More.svg":
/*!*****************************!*\
  !*** ./src/images/More.svg ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 12C6 13.1 5.1 14 4 14C2.9 14 2 13.1 2 12C2 10.9 2.9 10 4 10C5.1 10 6 10.9 6 12ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM20 10C18.9 10 18 10.9 18 12C18 13.1 18.9 14 20 14C21.1 14 22 13.1 22 12C22 10.9 21.1 10 20 10Z\"></path></svg>"

/***/ }),

/***/ "./src/images/ProgressButton.svg":
/*!***************************************!*\
  !*** ./src/images/ProgressButton.svg ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 10 10\"><polygon points=\"2,2 0,4 5,9 10,4 8,2 5,5 \"></polygon></svg>"

/***/ }),

/***/ "./src/images/ProgressButtonV2.svg":
/*!*****************************************!*\
  !*** ./src/images/ProgressButtonV2.svg ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\"><path d=\"M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999Z\"></path></svg>"

/***/ }),

/***/ "./src/images/RemoveFile.svg":
/*!***********************************!*\
  !*** ./src/images/RemoveFile.svg ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\"><path d=\"M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M11,10l-1,1L8,9l-2,2l-1-1l2-2L5,6l1-1l2,2l2-2l1,1L9,8 L11,10z\"></path></svg>"

/***/ }),

/***/ "./src/images/Right.svg":
/*!******************************!*\
  !*** ./src/images/Right.svg ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 16 16\" xml:space=\"preserve\"><polygon points=\"5,4 7,2 13,8 7,14 5,12 9,8 \"></polygon></svg>"

/***/ }),

/***/ "./src/images/TimerCircle.svg":
/*!************************************!*\
  !*** ./src/images/TimerCircle.svg ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 160 160\"><circle cx=\"80\" cy=\"80\" r=\"70\" style=\"stroke: var(--sd-timer-stroke-background-color); stroke-width: var(--sd-timer-stroke-background-width)\" stroke-dasharray=\"none\" stroke-dashoffset=\"none\"></circle><circle cx=\"80\" cy=\"80\" r=\"70\"></circle></svg>"

/***/ }),

/***/ "./src/images/V2Check.svg":
/*!********************************!*\
  !*** ./src/images/V2Check.svg ***!
  \********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.00001 15.8L2.60001 10.4L4.00001 9L8.00001 13L16 5L17.4 6.4L8.00001 15.8Z\"></path></svg>"

/***/ }),

/***/ "./src/images/V2DragElement_16x16.svg":
/*!********************************************!*\
  !*** ./src/images/V2DragElement_16x16.svg ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4C2 3.73478 2.10536 3.48043 2.29289 3.29289C2.48043 3.10536 2.73478 3 3 3H13C13.2652 3 13.5196 3.10536 13.7071 3.29289C13.8946 3.48043 14 3.73478 14 4C14 4.26522 13.8946 4.51957 13.7071 4.70711C13.5196 4.89464 13.2652 5 13 5H3C2.73478 5 2.48043 4.89464 2.29289 4.70711C2.10536 4.51957 2 4.26522 2 4ZM13 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H13C13.2652 9 13.5196 8.89464 13.7071 8.70711C13.8946 8.51957 14 8.26522 14 8C14 7.73478 13.8946 7.48043 13.7071 7.29289C13.5196 7.10536 13.2652 7 13 7ZM13 11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H13C13.2652 13 13.5196 12.8946 13.7071 12.7071C13.8946 12.5196 14 12.2652 14 12C14 11.7348 13.8946 11.4804 13.7071 11.2929C13.5196 11.1054 13.2652 11 13 11Z\"></path></svg>"

/***/ }),

/***/ "./src/images/clear_16x16.svg":
/*!************************************!*\
  !*** ./src/images/clear_16x16.svg ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.35 3.34999L12.65 2.64999L8.05002 7.24999L3.35002 2.64999L2.65002 3.34999L7.25002 8.04999L2.65002 12.65L3.35002 13.35L8.05002 8.74999L12.65 13.35L13.35 12.65L8.75002 8.04999L13.35 3.34999Z\"></path></svg>"

/***/ }),

/***/ "./src/images/collapseDetail.svg":
/*!***************************************!*\
  !*** ./src/images/collapseDetail.svg ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 7H3V9H13V7Z\"></path></svg>"

/***/ }),

/***/ "./src/images/expandDetail.svg":
/*!*************************************!*\
  !*** ./src/images/expandDetail.svg ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z\"></path></svg>"

/***/ }),

/***/ "./src/images/no-image.svg":
/*!*********************************!*\
  !*** ./src/images/no-image.svg ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 48 48\"><g opacity=\"0.5\"><path d=\"M14 17.01C14 16.4167 14.1759 15.8366 14.5056 15.3433C14.8352 14.8499 15.3038 14.4654 15.8519 14.2384C16.4001 14.0113 17.0033 13.9519 17.5853 14.0676C18.1672 14.1834 18.7018 14.4691 19.1213 14.8887C19.5409 15.3082 19.8266 15.8428 19.9424 16.4247C20.0581 17.0067 19.9987 17.6099 19.7716 18.1581C19.5446 18.7062 19.1601 19.1748 18.6667 19.5044C18.1734 19.8341 17.5933 20.01 17 20.01C16.2044 20.01 15.4413 19.6939 14.8787 19.1313C14.3161 18.5687 14 17.8056 14 17.01ZM27.09 24.14L20 36.01H36L27.09 24.14ZM36.72 8.14L35.57 10.01H36C36.5304 10.01 37.0391 10.2207 37.4142 10.5958C37.7893 10.9709 38 11.4796 38 12.01V36.01C38 36.5404 37.7893 37.0491 37.4142 37.4242C37.0391 37.7993 36.5304 38.01 36 38.01H18.77L17.57 40.01H36C37.0609 40.01 38.0783 39.5886 38.8284 38.8384C39.5786 38.0883 40 37.0709 40 36.01V12.01C39.9966 11.0765 39.6668 10.1737 39.0678 9.45778C38.4688 8.74188 37.6382 8.25802 36.72 8.09V8.14ZM36.86 4.5L12.86 44.5L11.14 43.5L13.23 40.01H12C10.9391 40.01 9.92172 39.5886 9.17157 38.8384C8.42143 38.0883 8 37.0709 8 36.01V12.01C8 10.9491 8.42143 9.93172 9.17157 9.18157C9.92172 8.43143 10.9391 8.01 12 8.01H32.43L35.14 3.5L36.86 4.5ZM14.43 38.01L15.63 36.01H12L19 27.01L20.56 27.8L31.23 10.01H12C11.4696 10.01 10.9609 10.2207 10.5858 10.5958C10.2107 10.9709 10 11.4796 10 12.01V36.01C10 36.5404 10.2107 37.0491 10.5858 37.4242C10.9609 37.7993 11.4696 38.01 12 38.01H14.43Z\"></path></g></svg>"

/***/ }),

/***/ "./src/images/search.svg":
/*!*******************************!*\
  !*** ./src/images/search.svg ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14 2C9.6 2 6 5.6 6 10C6 11.8 6.6 13.5 7.7 14.9L2.3 20.3C1.9 20.7 1.9 21.3 2.3 21.7C2.5 21.9 2.7 22 3 22C3.3 22 3.5 21.9 3.7 21.7L9.1 16.3C10.5 17.4 12.2 18 14 18C18.4 18 22 14.4 22 10C22 5.6 18.4 2 14 2ZM14 16C10.7 16 8 13.3 8 10C8 6.7 10.7 4 14 4C17.3 4 20 6.7 20 10C20 13.3 17.3 16 14 16Z\"></path></svg>"

/***/ }),

/***/ "./src/itemvalue.ts":
/*!**************************!*\
  !*** ./src/itemvalue.ts ***!
  \**************************/
/*! exports provided: ItemValue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ItemValue", function() { return ItemValue; });
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * Array of ItemValue is used in checkox, dropdown and radiogroup choices, matrix columns and rows.
 * It has two main properties: value and text. If text is empty, value is used for displaying.
 * The text property is localizable and support markdown.
 */
var ItemValue = /** @class */ (function (_super) {
    __extends(ItemValue, _super);
    function ItemValue(value, text, typeName) {
        if (text === void 0) { text = null; }
        if (typeName === void 0) { typeName = "itemvalue"; }
        var _this = _super.call(this) || this;
        _this.typeName = typeName;
        _this.ownerPropertyName = "";
        _this.locTextValue = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](_this, true, "text");
        _this.locTextValue.onStrChanged = function (oldValue, newValue) {
            if (newValue == _this.value) {
                newValue = undefined;
            }
            _this.propertyValueChanged("text", oldValue, newValue);
        };
        _this.locTextValue.onGetTextCallback = function (txt) {
            return txt
                ? txt
                : !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(_this.value)
                    ? _this.value.toString()
                    : null;
        };
        if (text)
            _this.locText.text = text;
        if (!!value && typeof value === "object") {
            _this.setData(value);
        }
        else {
            _this.value = value;
        }
        if (_this.getType() != "itemvalue") {
            _jsonobject__WEBPACK_IMPORTED_MODULE_1__["CustomPropertiesCollection"].createProperties(_this);
        }
        _this.onCreating();
        return _this;
    }
    ItemValue.prototype.getMarkdownHtml = function (text, name) {
        return !!this.locOwner ? this.locOwner.getMarkdownHtml(text, name) : undefined;
    };
    ItemValue.prototype.getRenderer = function (name) {
        return !!this.locOwner ? this.locOwner.getRenderer(name) : null;
    };
    ItemValue.prototype.getRendererContext = function (locStr) {
        return !!this.locOwner ? this.locOwner.getRendererContext(locStr) : locStr;
    };
    ItemValue.prototype.getProcessedText = function (text) {
        return this.locOwner ? this.locOwner.getProcessedText(text) : text;
    };
    Object.defineProperty(ItemValue, "Separator", {
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_5__["settings"].itemValueSeparator;
        },
        set: function (val) {
            _settings__WEBPACK_IMPORTED_MODULE_5__["settings"].itemValueSeparator = val;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Resets the input array and fills it with values from the values array
     */
    ItemValue.setData = function (items, values, type) {
        items.length = 0;
        for (var i = 0; i < values.length; i++) {
            var value = values[i];
            var itemType = !!value && typeof value.getType === "function" ? value.getType() : (type !== null && type !== void 0 ? type : "itemvalue");
            var item = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(itemType);
            item.setData(value);
            if (!!value.originalItem) {
                item.originalItem = value.originalItem;
            }
            items.push(item);
        }
    };
    ItemValue.getData = function (items) {
        var result = [];
        for (var i = 0; i < items.length; i++) {
            result.push(items[i].getData());
        }
        return result;
    };
    ItemValue.getItemByValue = function (items, val) {
        if (!Array.isArray(items))
            return null;
        var valIsEmpty = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(val);
        for (var i = 0; i < items.length; i++) {
            if (valIsEmpty && _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(items[i].value))
                return items[i];
            if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(items[i].value, val, false, true, false))
                return items[i];
        }
        return null;
    };
    ItemValue.getTextOrHtmlByValue = function (items, val) {
        var item = ItemValue.getItemByValue(items, val);
        return item !== null ? item.locText.textOrHtml : "";
    };
    ItemValue.locStrsChanged = function (items) {
        for (var i = 0; i < items.length; i++) {
            items[i].locStrsChanged();
        }
    };
    ItemValue.runConditionsForItems = function (items, filteredItems, runner, values, properties, useItemExpression, onItemCallBack) {
        if (useItemExpression === void 0) { useItemExpression = true; }
        return ItemValue.runConditionsForItemsCore(items, filteredItems, runner, values, properties, true, useItemExpression, onItemCallBack);
    };
    ItemValue.runEnabledConditionsForItems = function (items, runner, values, properties, onItemCallBack) {
        return ItemValue.runConditionsForItemsCore(items, null, runner, values, properties, false, true, onItemCallBack);
    };
    ItemValue.runConditionsForItemsCore = function (items, filteredItems, runner, values, properties, isVisible, useItemExpression, onItemCallBack) {
        if (useItemExpression === void 0) { useItemExpression = true; }
        if (!values) {
            values = {};
        }
        var itemValue = values["item"];
        var choiceValue = values["choice"];
        var hasChanded = false;
        for (var i = 0; i < items.length; i++) {
            var item = items[i];
            values["item"] = item.value;
            values["choice"] = item.value;
            var itemRunner = useItemExpression && !!item.getConditionRunner
                ? item.getConditionRunner(isVisible)
                : false;
            if (!itemRunner) {
                itemRunner = runner;
            }
            var newValue = true;
            if (itemRunner) {
                newValue = itemRunner.run(values, properties);
            }
            if (!!onItemCallBack) {
                newValue = onItemCallBack(item, newValue);
            }
            if (!!filteredItems && newValue) {
                filteredItems.push(item);
            }
            var oldValue = isVisible ? item.isVisible : item.isEnabled;
            if (newValue != oldValue) {
                hasChanded = true;
                if (isVisible) {
                    if (!!item.setIsVisible)
                        item.setIsVisible(newValue);
                }
                else {
                    if (!!item.setIsEnabled)
                        item.setIsEnabled(newValue);
                }
            }
        }
        if (itemValue) {
            values["item"] = itemValue;
        }
        else {
            delete values["item"];
        }
        if (choiceValue) {
            values["choice"] = choiceValue;
        }
        else {
            delete values["choice"];
        }
        return hasChanded;
    };
    ItemValue.prototype.onCreating = function () { };
    ItemValue.prototype.getType = function () {
        return !!this.typeName ? this.typeName : "itemvalue";
    };
    ItemValue.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        return !!this.locOwner && !!this.locOwner["getSurvey"]
            ? this.locOwner.getSurvey()
            : null;
    };
    ItemValue.prototype.getLocale = function () {
        return !!this.locOwner && this.locOwner.getLocale ? this.locOwner.getLocale() : "";
    };
    Object.defineProperty(ItemValue.prototype, "locText", {
        get: function () {
            return this.locTextValue;
        },
        enumerable: false,
        configurable: true
    });
    ItemValue.prototype.setLocText = function (locText) {
        this.locTextValue = locText;
    };
    Object.defineProperty(ItemValue.prototype, "locOwner", {
        get: function () {
            return this._locOwner;
        },
        set: function (value) {
            this._locOwner = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "value", {
        get: function () {
            return this.getPropertyValue("value");
        },
        set: function (newValue) {
            var text = undefined;
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(newValue)) {
                var str = newValue.toString();
                var index = str.indexOf(_settings__WEBPACK_IMPORTED_MODULE_5__["settings"].itemValueSeparator);
                if (index > -1) {
                    newValue = str.slice(0, index);
                    text = str.slice(index + 1);
                }
            }
            this.setPropertyValue("value", newValue);
            if (!!text) {
                this.text = text;
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "hasText", {
        get: function () {
            return this.locText.pureText ? true : false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "pureText", {
        get: function () {
            return this.locText.pureText;
        },
        set: function (val) {
            this.text = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "text", {
        get: function () {
            return this.locText.calculatedText; //TODO: it will be correct to use this.locText.text, however it would require a lot of rewriting in Creator
        },
        set: function (newText) {
            this.locText.text = newText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "calculatedText", {
        get: function () {
            return this.locText.calculatedText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "shortcutText", {
        get: function () {
            return this.text;
        },
        enumerable: false,
        configurable: true
    });
    ItemValue.prototype.canSerializeValue = function () {
        var val = this.value;
        if (val === undefined || val === null)
            return false;
        return !Array.isArray(val) && typeof val !== "object";
    };
    ItemValue.prototype.getData = function () {
        var json = this.toJSON();
        if (!!json["value"] && !!json["value"]["pos"]) {
            delete json["value"]["pos"];
        }
        if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(json.value))
            return json;
        var canSerializeVal = this.canSerializeValue();
        var canSerializeAsContant = !canSerializeVal || !_settings__WEBPACK_IMPORTED_MODULE_5__["settings"].itemValueAlwaysSerializeAsObject && !_settings__WEBPACK_IMPORTED_MODULE_5__["settings"].itemValueAlwaysSerializeText;
        if (canSerializeAsContant && Object.keys(json).length == 1)
            return this.value;
        if (_settings__WEBPACK_IMPORTED_MODULE_5__["settings"].itemValueAlwaysSerializeText && json.text === undefined && canSerializeVal) {
            json.text = this.value.toString();
        }
        return json;
    };
    ItemValue.prototype.toJSON = function () {
        var res = {};
        var properties = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getProperties(this.getType());
        if (!properties || properties.length == 0) {
            properties = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getProperties("itemvalue");
        }
        var jsoObj = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]();
        for (var i = 0; i < properties.length; i++) {
            var prop = properties[i];
            if (prop.name === "text" && !this.locText.hasNonDefaultText() &&
                _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(this.value, this.text, false, true, false))
                continue;
            jsoObj.valueToJson(this, res, prop);
        }
        return res;
    };
    ItemValue.prototype.setData = function (value) {
        if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value))
            return;
        if (typeof value.value === "undefined" && typeof value.text !== "undefined" && Object.keys(value).length === 1) {
            value.value = value.text;
        }
        if (typeof value.value !== "undefined") {
            var json = void 0;
            if (typeof value.toJSON === "function") {
                json = value.toJSON();
            }
            else {
                json = value;
            }
            new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toObject(json, this);
        }
        else {
            this.value = value;
        }
        this.locText.strChanged();
    };
    Object.defineProperty(ItemValue.prototype, "visibleIf", {
        get: function () {
            return this.getPropertyValue("visibleIf", "");
        },
        set: function (val) {
            this.setPropertyValue("visibleIf", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "enableIf", {
        get: function () {
            return this.getPropertyValue("enableIf", "");
        },
        set: function (val) {
            this.setPropertyValue("enableIf", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ItemValue.prototype, "isVisible", {
        get: function () {
            return this.getPropertyValue("isVisible", true);
        },
        enumerable: false,
        configurable: true
    });
    ItemValue.prototype.setIsVisible = function (val) {
        this.setPropertyValue("isVisible", val);
    };
    Object.defineProperty(ItemValue.prototype, "isEnabled", {
        get: function () {
            return this.getPropertyValue("isEnabled", true);
        },
        enumerable: false,
        configurable: true
    });
    ItemValue.prototype.setIsEnabled = function (val) {
        this.setPropertyValue("isEnabled", val);
    };
    ItemValue.prototype.addUsedLocales = function (locales) {
        this.AddLocStringToUsedLocales(this.locTextValue, locales);
    };
    ItemValue.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        this.locText.strChanged();
    };
    ItemValue.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
        if (name === "value" && !this.hasText) {
            this.locText.strChanged();
        }
        var funcName = "itemValuePropertyChanged";
        if (!this.locOwner || !this.locOwner[funcName])
            return;
        this.locOwner[funcName](this, name, oldValue, newValue);
    };
    ItemValue.prototype.getConditionRunner = function (isVisible) {
        if (isVisible)
            return this.getVisibleConditionRunner();
        return this.getEnableConditionRunner();
    };
    ItemValue.prototype.getVisibleConditionRunner = function () {
        if (!this.visibleIf)
            return null;
        if (!this.visibleConditionRunner)
            this.visibleConditionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](this.visibleIf);
        this.visibleConditionRunner.expression = this.visibleIf;
        return this.visibleConditionRunner;
    };
    ItemValue.prototype.getEnableConditionRunner = function () {
        if (!this.enableIf)
            return null;
        if (!this.enableConditionRunner)
            this.enableConditionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](this.enableIf);
        this.enableConditionRunner.expression = this.enableIf;
        return this.enableConditionRunner;
    };
    return ItemValue;
}(_base__WEBPACK_IMPORTED_MODULE_4__["Base"]));

_base__WEBPACK_IMPORTED_MODULE_4__["Base"].createItemValue = function (source, type) {
    var item = null;
    if (!!type) {
        item = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"].metaData.createClass(type, {});
    }
    else if (typeof source.getType === "function") {
        item = new ItemValue(null, undefined, source.getType());
    }
    else {
        item = new ItemValue(null);
    }
    item.setData(source);
    return item;
};
_base__WEBPACK_IMPORTED_MODULE_4__["Base"].itemValueLocStrChanged = function (arr) {
    ItemValue.locStrsChanged(arr);
};
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObjectProperty"].getItemValuesDefaultValue = function (val, type) {
    var res = new Array();
    ItemValue.setData(res, Array.isArray(val) ? val : [], type);
    return res;
};
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
    "!value",
    {
        name: "text",
        serializationProperty: "locText",
    },
    { name: "visibleIf:condition", showMode: "form" },
    {
        name: "enableIf:condition",
        showMode: "form",
        visibleIf: function (obj) {
            return !obj || obj.ownerPropertyName !== "rateValues";
        },
    },
], function (value) { return new ItemValue(value); });


/***/ }),

/***/ "./src/jsonobject.ts":
/*!***************************!*\
  !*** ./src/jsonobject.ts ***!
  \***************************/
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonObject, Serializer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "property", function() { return property; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propertyArray", function() { return propertyArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObjectProperty", function() { return JsonObjectProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomPropertiesCollection", function() { return CustomPropertiesCollection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonMetadataClass", function() { return JsonMetadataClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonMetadata", function() { return JsonMetadata; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonError", function() { return JsonError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonUnknownPropertyError", function() { return JsonUnknownPropertyError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeErrorBase", function() { return JsonMissingTypeErrorBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return JsonMissingTypeError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};



function ensureLocString(target, options, key) {
    var locString = target.getLocalizableString(key);
    if (!locString) {
        locString = target.createLocalizableString(key, target, true);
        if (typeof options.localizable === "object" &&
            typeof options.localizable.onGetTextCallback === "function") {
            locString.onGetTextCallback = options.localizable.onGetTextCallback;
        }
    }
}
function getLocStringValue(target, options, key) {
    ensureLocString(target, options, key);
    var res = target.getLocalizableStringText(key);
    if (!!res)
        return res;
    if (typeof options.localizable === "object" && options.localizable.defaultStr) {
        var loc = !!target.getLocale ? target.getLocale() : "";
        return _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].getString(options.localizable.defaultStr, loc);
    }
    return "";
}
function property(options) {
    return function (target, key) {
        var processComputedUpdater = function (obj, val) {
            if (!!val && typeof val === "object" && val.type === _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"].ComputedUpdaterType) {
                _base__WEBPACK_IMPORTED_MODULE_1__["Base"].startCollectDependencies(function () { return obj[key] = val.updater(); }, obj, key);
                var result = val.updater();
                var dependencies = _base__WEBPACK_IMPORTED_MODULE_1__["Base"].finishCollectDependencies();
                val.setDependencies(dependencies);
                return result;
            }
            return val;
        };
        if (!options || !options.localizable) {
            Object.defineProperty(target, key, {
                get: function () {
                    var value = this.getPropertyValue(key);
                    if (value !== undefined) {
                        return value;
                    }
                    if (!!options) {
                        if (typeof options.getDefaultValue === "function") {
                            return options.getDefaultValue(this);
                        }
                        if (options.defaultValue !== undefined) {
                            return options.defaultValue;
                        }
                    }
                    return undefined;
                },
                set: function (val) {
                    var newValue = processComputedUpdater(this, val);
                    this.setPropertyValue(key, newValue);
                    if (!!options && options.onSet) {
                        options.onSet(newValue, this);
                    }
                },
            });
        }
        else {
            Object.defineProperty(target, key, {
                get: function () {
                    return getLocStringValue(this, options, key);
                },
                set: function (val) {
                    ensureLocString(this, options, key);
                    var newValue = processComputedUpdater(this, val);
                    this.setLocalizableStringText(key, newValue);
                    if (!!options && options.onSet) {
                        options.onSet(newValue, this);
                    }
                },
            });
            Object.defineProperty(target, typeof options.localizable === "object" && !!options.localizable.name ?
                options.localizable.name : "loc" + key.charAt(0).toUpperCase() + key.slice(1), {
                get: function () {
                    ensureLocString(this, options, key);
                    return this.getLocalizableString(key);
                },
            });
        }
    };
}
function ensureArray(target, options, key) {
    target.ensureArray(key, function (item, index) {
        var handler = !!options ? options.onPush : null;
        handler && handler(item, index, target);
    }, function (item, index) {
        var handler = !!options ? options.onRemove : null;
        handler && handler(item, index, target);
    });
}
function propertyArray(options) {
    return function (target, key) {
        Object.defineProperty(target, key, {
            get: function () {
                ensureArray(this, options, key);
                return this.getPropertyValue(key);
            },
            set: function (val) {
                ensureArray(this, options, key);
                var arr = this.getPropertyValue(key);
                if (val === arr) {
                    return;
                }
                if (arr) {
                    arr.splice.apply(arr, __spreadArray([0, arr.length], (val || []), false));
                }
                else {
                    this.setPropertyValue(key, val);
                }
                if (!!options && options.onSet) {
                    options.onSet(val, this);
                }
            },
        });
    };
}
/**
 * Contains information about a property of a survey element (page, panel, questions, and etc).
 * @see addProperty
 * @see removeProperty
 * @see [Add Properties](https://surveyjs.io/Documentation/Survey-Creator#addproperties)
 * @see [Remove Properties](https://surveyjs.io/Documentation/Survey-Creator#removeproperties)
 */
var JsonObjectProperty = /** @class */ (function () {
    function JsonObjectProperty(classInfo, name, isRequired) {
        if (isRequired === void 0) { isRequired = false; }
        this.name = name;
        this.isRequiredValue = false;
        this.isUniqueValue = false;
        this.isSerializable = true;
        this.isLightSerializable = true;
        this.isCustom = false;
        this.isDynamicChoices = false; //TODO obsolete, use dependsOn attribute
        this.isBindable = false;
        this.category = "";
        this.categoryIndex = -1;
        this.visibleIndex = -1;
        this.maxLength = -1;
        this.isArray = false;
        this.classInfoValue = classInfo;
        this.isRequiredValue = isRequired;
        this.idValue = JsonObjectProperty.Index++;
    }
    Object.defineProperty(JsonObjectProperty.prototype, "id", {
        get: function () {
            return this.idValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "classInfo", {
        get: function () {
            return this.classInfoValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "type", {
        get: function () {
            return this.typeValue ? this.typeValue : "string";
        },
        set: function (value) {
            if (value === "itemvalues")
                value = "itemvalue[]";
            if (value === "textitems")
                value = "textitem[]";
            this.typeValue = value;
            if (this.typeValue.indexOf("[]") === this.typeValue.length - 2) {
                this.isArray = true;
                this.className = this.typeValue.substring(0, this.typeValue.length - 2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "isRequired", {
        get: function () {
            return this.isRequiredValue;
        },
        set: function (val) {
            this.isRequiredValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "isUnique", {
        get: function () {
            return this.isUniqueValue;
        },
        set: function (val) {
            this.isUniqueValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "uniquePropertyName", {
        get: function () {
            return this.uniquePropertyValue;
        },
        set: function (val) {
            this.uniquePropertyValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "hasToUseGetValue", {
        get: function () {
            return this.onGetValue || this.serializationProperty;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "defaultValue", {
        get: function () {
            var result = this.defaultValueValue;
            if (!!JsonObjectProperty.getItemValuesDefaultValue &&
                JsonObject.metaData.isDescendantOf(this.className, "itemvalue")) {
                result = JsonObjectProperty.getItemValuesDefaultValue(this.defaultValueValue || [], this.className);
            }
            return result;
        },
        set: function (newValue) {
            this.defaultValueValue = newValue;
        },
        enumerable: false,
        configurable: true
    });
    JsonObjectProperty.prototype.isDefaultValue = function (value) {
        if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(this.defaultValue)) {
            return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(value, this.defaultValue, false, true, false);
        }
        return ((value === false && (this.type == "boolean" || this.type == "switch")) ||
            value === "" ||
            _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value));
    };
    JsonObjectProperty.prototype.getValue = function (obj) {
        if (this.onGetValue)
            return this.onGetValue(obj);
        if (this.serializationProperty && !!obj[this.serializationProperty])
            return obj[this.serializationProperty].getJson();
        return obj[this.name];
    };
    JsonObjectProperty.prototype.getPropertyValue = function (obj) {
        if (this.isLocalizable) {
            return !!obj[this.serializationProperty]
                ? obj[this.serializationProperty].text
                : null;
        }
        return this.getValue(obj);
    };
    Object.defineProperty(JsonObjectProperty.prototype, "hasToUseSetValue", {
        get: function () {
            return this.onSetValue || this.serializationProperty;
        },
        enumerable: false,
        configurable: true
    });
    JsonObjectProperty.prototype.settingValue = function (obj, value) {
        if (!this.onSettingValue || obj.isLoadingFromJson)
            return value;
        return this.onSettingValue(obj, value);
    };
    JsonObjectProperty.prototype.setValue = function (obj, value, jsonConv) {
        if (this.onSetValue) {
            this.onSetValue(obj, value, jsonConv);
        }
        else {
            if (this.serializationProperty && !!obj[this.serializationProperty])
                obj[this.serializationProperty].setJson(value);
            else {
                if (value && typeof value === "string") {
                    if (this.type == "number") {
                        value = parseInt(value);
                    }
                    if (this.type == "boolean" || this.type == "switch") {
                        value = value.toLowerCase() === "true";
                    }
                }
                obj[this.name] = value;
            }
        }
    };
    JsonObjectProperty.prototype.getObjType = function (objType) {
        if (!this.classNamePart)
            return objType;
        return objType.replace(this.classNamePart, "");
    };
    JsonObjectProperty.prototype.getClassName = function (className) {
        if (className)
            className = className.toLowerCase();
        return this.classNamePart && className.indexOf(this.classNamePart) < 0
            ? className + this.classNamePart
            : className;
    };
    Object.defineProperty(JsonObjectProperty.prototype, "choices", {
        /**
         * Depricated, please use getChoices
         */
        get: function () {
            return this.getChoices(null);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "hasChoices", {
        get: function () {
            return !!this.choicesValue || !!this.choicesfunc;
        },
        enumerable: false,
        configurable: true
    });
    JsonObjectProperty.prototype.getChoices = function (obj, choicesCallback) {
        if (choicesCallback === void 0) { choicesCallback = null; }
        if (this.choicesValue != null)
            return this.choicesValue;
        if (this.choicesfunc != null)
            return this.choicesfunc(obj, choicesCallback);
        return null;
    };
    JsonObjectProperty.prototype.setChoices = function (value, valueFunc) {
        if (valueFunc === void 0) { valueFunc = null; }
        this.choicesValue = value;
        this.choicesfunc = valueFunc;
    };
    JsonObjectProperty.prototype.getBaseValue = function () {
        if (!this.baseValue)
            return "";
        if (typeof this.baseValue == "function")
            return this.baseValue();
        return this.baseValue;
    };
    JsonObjectProperty.prototype.setBaseValue = function (val) {
        this.baseValue = val;
    };
    Object.defineProperty(JsonObjectProperty.prototype, "readOnly", {
        get: function () {
            return this.readOnlyValue != null ? this.readOnlyValue : false;
        },
        set: function (val) {
            this.readOnlyValue = val;
        },
        enumerable: false,
        configurable: true
    });
    JsonObjectProperty.prototype.isVisible = function (layout, obj) {
        if (obj === void 0) { obj = null; }
        var isLayout = !this.layout || this.layout == layout;
        if (!this.visible || !isLayout)
            return false;
        if (!!this.visibleIf && !!obj)
            return this.visibleIf(obj);
        return true;
    };
    Object.defineProperty(JsonObjectProperty.prototype, "visible", {
        get: function () {
            return this.visibleValue != null ? this.visibleValue : true;
        },
        set: function (val) {
            this.visibleValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "isLocalizable", {
        get: function () {
            return this.isLocalizableValue != null ? this.isLocalizableValue : false;
        },
        set: function (val) {
            this.isLocalizableValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(JsonObjectProperty.prototype, "dataList", {
        get: function () {
            return Array.isArray(this.dataListValue) ? this.dataListValue : [];
        },
        set: function (val) {
            this.dataListValue = val;
        },
        enumerable: false,
        configurable: true
    });
    JsonObjectProperty.prototype.mergeWith = function (prop) {
        var valuesNames = JsonObjectProperty.mergableValues;
        for (var i = 0; i < valuesNames.length; i++) {
            this.mergeValue(prop, valuesNames[i]);
        }
    };
    JsonObjectProperty.prototype.addDependedProperty = function (name) {
        if (!this.dependedProperties) {
            this.dependedProperties = [];
        }
        if (this.dependedProperties.indexOf(name) < 0) {
            this.dependedProperties.push(name);
        }
    };
    JsonObjectProperty.prototype.getDependedProperties = function () {
        return !!this.dependedProperties ? this.dependedProperties : [];
    };
    JsonObjectProperty.prototype.schemaType = function () {
        if (!!this.className)
            return "array";
        if (!!this.baseClassName)
            return "array";
        if (this.type == "boolean" || this.type == "number")
            return this.type;
        return "string";
    };
    JsonObjectProperty.prototype.mergeValue = function (prop, valueName) {
        if (this[valueName] == null && prop[valueName] != null) {
            this[valueName] = prop[valueName];
        }
    };
    JsonObjectProperty.Index = 1;
    JsonObjectProperty.mergableValues = [
        "typeValue",
        "choicesValue",
        "baseValue",
        "readOnlyValue",
        "visibleValue",
        "isSerializable",
        "isLightSerializable",
        "isCustom",
        "isBindable",
        "isUnique",
        "uniquePropertyName",
        "isDynamicChoices",
        "isLocalizableValue",
        "className",
        "alternativeName",
        "layout",
        "classNamePart",
        "baseClassName",
        "defaultValue",
        "serializationProperty",
        "onGetValue",
        "onSetValue",
        "onSettingValue",
        "displayName",
        "category",
        "categoryIndex",
        "visibleIndex",
        "nextToProperty",
        "showMode",
        "dependedProperties",
        "visibleIf",
        "onExecuteExpression",
        "onPropertyEditorUpdate",
        "maxLength",
        "maxValue",
        "minValue",
        "dataListValue",
    ];
    return JsonObjectProperty;
}());

var CustomPropertiesCollection = /** @class */ (function () {
    function CustomPropertiesCollection() {
    }
    CustomPropertiesCollection.addProperty = function (className, property) {
        className = className.toLowerCase();
        var props = CustomPropertiesCollection.properties;
        if (!props[className]) {
            props[className] = [];
        }
        props[className].push(property);
    };
    CustomPropertiesCollection.removeProperty = function (className, propertyName) {
        className = className.toLowerCase();
        var props = CustomPropertiesCollection.properties;
        if (!props[className])
            return;
        var properties = props[className];
        for (var i = 0; i < properties.length; i++) {
            if (properties[i].name == propertyName) {
                props[className].splice(i, 1);
                break;
            }
        }
    };
    CustomPropertiesCollection.removeAllProperties = function (className) {
        className = className.toLowerCase();
        delete CustomPropertiesCollection.properties[className];
    };
    CustomPropertiesCollection.addClass = function (className, parentClassName) {
        className = className.toLowerCase();
        if (parentClassName) {
            parentClassName = parentClassName.toLowerCase();
        }
        CustomPropertiesCollection.parentClasses[className] = parentClassName;
    };
    CustomPropertiesCollection.getProperties = function (className) {
        className = className.toLowerCase();
        var res = [];
        var props = CustomPropertiesCollection.properties;
        while (className) {
            var properties = props[className];
            if (properties) {
                for (var i = 0; i < properties.length; i++) {
                    res.push(properties[i]);
                }
            }
            className = CustomPropertiesCollection.parentClasses[className];
        }
        return res;
    };
    CustomPropertiesCollection.createProperties = function (obj) {
        if (!obj || !obj.getType)
            return;
        CustomPropertiesCollection.createPropertiesCore(obj, obj.getType());
    };
    CustomPropertiesCollection.createPropertiesCore = function (obj, className) {
        var props = CustomPropertiesCollection.properties;
        if (props[className]) {
            CustomPropertiesCollection.createPropertiesInObj(obj, props[className]);
        }
        var parentClass = CustomPropertiesCollection.parentClasses[className];
        if (parentClass) {
            CustomPropertiesCollection.createPropertiesCore(obj, parentClass);
        }
    };
    CustomPropertiesCollection.createPropertiesInObj = function (obj, properties) {
        for (var i = 0; i < properties.length; i++) {
            CustomPropertiesCollection.createPropertyInObj(obj, properties[i]);
        }
    };
    CustomPropertiesCollection.createPropertyInObj = function (obj, prop) {
        if (CustomPropertiesCollection.checkIsPropertyExists(obj, prop.name))
            return;
        if (!!prop.serializationProperty && CustomPropertiesCollection.checkIsPropertyExists(obj, prop.serializationProperty))
            return;
        if (prop.isLocalizable &&
            prop.serializationProperty &&
            obj.createCustomLocalizableObj) {
            obj.createCustomLocalizableObj(prop.name);
            var locDesc = {
                get: function () {
                    return obj.getLocalizableString(prop.name);
                },
            };
            Object.defineProperty(obj, prop.serializationProperty, locDesc);
            var desc = {
                get: function () {
                    return obj.getLocalizableStringText(prop.name, prop.defaultValue);
                },
                set: function (v) {
                    obj.setLocalizableStringText(prop.name, v);
                },
            };
            Object.defineProperty(obj, prop.name, desc);
        }
        else {
            var defaultValue = prop.defaultValue;
            var isArrayProp = prop.isArray || prop.type === "multiplevalues";
            if (typeof obj.createNewArray === "function") {
                if (JsonObject.metaData.isDescendantOf(prop.className, "itemvalue")) {
                    obj.createNewArray(prop.name, function (item) {
                        item.locOwner = obj;
                        item.ownerPropertyName = prop.name;
                    });
                    isArrayProp = true;
                }
                else {
                    //It is a simple array property
                    if (isArrayProp) {
                        obj.createNewArray(prop.name);
                    }
                }
                if (isArrayProp) {
                    if (Array.isArray(defaultValue)) {
                        obj.setPropertyValue(prop.name, defaultValue);
                    }
                    defaultValue = null;
                }
            }
            if (!!obj.getPropertyValue && !!obj.setPropertyValue) {
                var desc = {
                    get: function () {
                        if (!!prop.onGetValue) {
                            return prop.onGetValue(obj);
                        }
                        return obj.getPropertyValue(prop.name, defaultValue);
                    },
                    set: function (v) {
                        if (!!prop.onSetValue) {
                            prop.onSetValue(obj, v, null);
                        }
                        else {
                            obj.setPropertyValue(prop.name, v);
                        }
                    },
                };
                Object.defineProperty(obj, prop.name, desc);
            }
        }
        if (prop.type === "condition" || prop.type === "expression") {
            if (!!prop.onExecuteExpression) {
                obj.addExpressionProperty(prop.name, prop.onExecuteExpression);
            }
        }
    };
    CustomPropertiesCollection.checkIsPropertyExists = function (obj, name) {
        return obj.hasOwnProperty(name) || obj[name];
    };
    CustomPropertiesCollection.properties = {};
    CustomPropertiesCollection.parentClasses = {};
    return CustomPropertiesCollection;
}());

var JsonMetadataClass = /** @class */ (function () {
    function JsonMetadataClass(name, properties, creator, parentName) {
        if (creator === void 0) { creator = null; }
        if (parentName === void 0) { parentName = null; }
        this.name = name;
        this.creator = creator;
        this.parentName = parentName;
        this.properties = null;
        name = name.toLowerCase();
        this.isCustomValue = !creator && name !== "survey";
        if (this.parentName) {
            this.parentName = this.parentName.toLowerCase();
            CustomPropertiesCollection.addClass(name, this.parentName);
            if (!!creator) {
                this.makeParentRegularClass();
            }
        }
        this.properties = new Array();
        for (var i = 0; i < properties.length; i++) {
            this.createProperty(properties[i], this.isCustom);
        }
    }
    JsonMetadataClass.prototype.find = function (name) {
        for (var i = 0; i < this.properties.length; i++) {
            if (this.properties[i].name == name)
                return this.properties[i];
        }
        return null;
    };
    Object.defineProperty(JsonMetadataClass.prototype, "isCustom", {
        get: function () { return this.isCustomValue; },
        enumerable: false,
        configurable: true
    });
    JsonMetadataClass.prototype.isOverridedProp = function (propName) {
        return !!this.parentName && !!Serializer.findProperty(this.parentName, propName);
    };
    JsonMetadataClass.prototype.hasRegularChildClass = function () {
        if (!this.isCustom)
            return;
        this.isCustomValue = false;
        for (var i = 0; i < this.properties.length; i++) {
            this.properties[i].isCustom = false;
        }
        CustomPropertiesCollection.removeAllProperties(this.name);
        this.makeParentRegularClass();
    };
    JsonMetadataClass.prototype.makeParentRegularClass = function () {
        if (!this.parentName)
            return;
        var parent = Serializer.findClass(this.parentName);
        if (!!parent) {
            parent.hasRegularChildClass();
        }
    };
    JsonMetadataClass.prototype.createProperty = function (propInfo, isCustom) {
        if (isCustom === void 0) { isCustom = false; }
        var propertyName = typeof propInfo === "string" ? propInfo : propInfo.name;
        if (!propertyName)
            return;
        var propertyType = null;
        var typeIndex = propertyName.indexOf(JsonMetadataClass.typeSymbol);
        if (typeIndex > -1) {
            propertyType = propertyName.substring(typeIndex + 1);
            propertyName = propertyName.substring(0, typeIndex);
        }
        var isRequired = this.getIsPropertyNameRequired(propertyName) || !!propInfo.isRequired;
        propertyName = this.getPropertyName(propertyName);
        var prop = new JsonObjectProperty(this, propertyName, isRequired);
        if (propertyType) {
            prop.type = propertyType;
        }
        if (typeof propInfo === "object") {
            if (propInfo.type) {
                prop.type = propInfo.type;
            }
            if (propInfo.default !== undefined) {
                prop.defaultValue = propInfo.default;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.isSerializable)) {
                prop.isSerializable = propInfo.isSerializable;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.isLightSerializable)) {
                prop.isLightSerializable = propInfo.isLightSerializable;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.maxLength)) {
                prop.maxLength = propInfo.maxLength;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.displayName)) {
                prop.displayName = propInfo.displayName;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.category)) {
                prop.category = propInfo.category;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.categoryIndex)) {
                prop.categoryIndex = propInfo.categoryIndex;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.nextToProperty)) {
                prop.nextToProperty = propInfo.nextToProperty;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.visibleIndex)) {
                prop.visibleIndex = propInfo.visibleIndex;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.showMode)) {
                prop.showMode = propInfo.showMode;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.maxValue)) {
                prop.maxValue = propInfo.maxValue;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.minValue)) {
                prop.minValue = propInfo.minValue;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.dataList)) {
                prop.dataList = propInfo.dataList;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.isDynamicChoices)) {
                prop.isDynamicChoices = propInfo.isDynamicChoices;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.isBindable)) {
                prop.isBindable = propInfo.isBindable;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.isUnique)) {
                prop.isUnique = propInfo.isUnique;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.uniqueProperty)) {
                prop.uniquePropertyName = propInfo.uniqueProperty;
            }
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(propInfo.isArray)) {
                prop.isArray = propInfo.isArray;
            }
            if (propInfo.visible === true || propInfo.visible === false) {
                prop.visible = propInfo.visible;
            }
            if (!!propInfo.visibleIf) {
                prop.visibleIf = propInfo.visibleIf;
            }
            if (!!propInfo.onExecuteExpression) {
                prop.onExecuteExpression = propInfo.onExecuteExpression;
            }
            if (!!propInfo.onPropertyEditorUpdate) {
                prop.onPropertyEditorUpdate = propInfo.onPropertyEditorUpdate;
            }
            if (propInfo.readOnly === true) {
                prop.readOnly = true;
            }
            if (propInfo.choices) {
                var choicesFunc = typeof propInfo.choices === "function" ? propInfo.choices : null;
                var choicesValue = typeof propInfo.choices !== "function" ? propInfo.choices : null;
                prop.setChoices(choicesValue, choicesFunc);
            }
            if (!!propInfo.baseValue) {
                prop.setBaseValue(propInfo.baseValue);
            }
            if (propInfo.onGetValue) {
                prop.onGetValue = propInfo.onGetValue;
            }
            if (propInfo.onSetValue) {
                prop.onSetValue = propInfo.onSetValue;
            }
            if (propInfo.onSettingValue) {
                prop.onSettingValue = propInfo.onSettingValue;
            }
            if (propInfo.isLocalizable) {
                propInfo.serializationProperty = "loc" + prop.name;
            }
            if (propInfo.serializationProperty) {
                prop.serializationProperty = propInfo.serializationProperty;
                var s;
                if (prop.serializationProperty &&
                    prop.serializationProperty.indexOf("loc") == 0) {
                    prop.isLocalizable = true;
                }
            }
            if (propInfo.isLocalizable) {
                prop.isLocalizable = propInfo.isLocalizable;
            }
            if (propInfo.className) {
                prop.className = propInfo.className;
            }
            if (propInfo.baseClassName) {
                prop.baseClassName = propInfo.baseClassName;
            }
            if (propInfo.classNamePart) {
                prop.classNamePart = propInfo.classNamePart;
            }
            if (propInfo.alternativeName) {
                prop.alternativeName = propInfo.alternativeName;
            }
            if (propInfo.layout) {
                prop.layout = propInfo.layout;
            }
            if (propInfo.dependsOn) {
                this.addDependsOnProperties(prop, propInfo.dependsOn);
            }
        }
        this.properties.push(prop);
        if (isCustom && !this.isOverridedProp(prop.name)) {
            prop.isCustom = true;
            CustomPropertiesCollection.addProperty(this.name, prop);
        }
        return prop;
    };
    JsonMetadataClass.prototype.addDependsOnProperties = function (prop, dependsOn) {
        if (Array.isArray(dependsOn)) {
            for (var i = 0; i < dependsOn.length; i++) {
                this.addDependsOnProperty(prop, dependsOn[i]);
            }
        }
        else {
            this.addDependsOnProperty(prop, dependsOn);
        }
    };
    JsonMetadataClass.prototype.addDependsOnProperty = function (prop, dependsOn) {
        var property = this.find(dependsOn);
        if (!property) {
            property = Serializer.findProperty(this.parentName, dependsOn);
        }
        if (!property)
            return;
        property.addDependedProperty(prop.name);
    };
    JsonMetadataClass.prototype.getIsPropertyNameRequired = function (propertyName) {
        return (propertyName.length > 0 &&
            propertyName[0] == JsonMetadataClass.requiredSymbol);
    };
    JsonMetadataClass.prototype.getPropertyName = function (propertyName) {
        if (!this.getIsPropertyNameRequired(propertyName))
            return propertyName;
        propertyName = propertyName.slice(1);
        return propertyName;
    };
    JsonMetadataClass.requiredSymbol = "!";
    JsonMetadataClass.typeSymbol = ":";
    return JsonMetadataClass;
}());

/**
 * The metadata object. It contains object properties' runtime information and allows you to modify it.
 */
var JsonMetadata = /** @class */ (function () {
    function JsonMetadata() {
        this.classes = {};
        this.alternativeNames = {};
        this.childrenClasses = {};
        this.classProperties = {};
        this.classHashProperties = {};
    }
    JsonMetadata.prototype.getObjPropertyValue = function (obj, name) {
        if (this.isObjWrapper(obj)) {
            var orignalObj = obj.getOriginalObj();
            var prop = Serializer.findProperty(orignalObj.getType(), name);
            if (!!prop)
                return this.getObjPropertyValueCore(orignalObj, prop);
        }
        var prop = Serializer.findProperty(obj.getType(), name);
        if (!prop)
            return obj[name];
        return this.getObjPropertyValueCore(obj, prop);
    };
    JsonMetadata.prototype.setObjPropertyValue = function (obj, name, val) {
        if (obj[name] === val)
            return;
        if (!!obj[name] && !!obj[name].setJson) {
            obj[name].setJson(val);
        }
        else {
            if (Array.isArray(val)) {
                var newVal = [];
                for (var i = 0; i < val.length; i++)
                    newVal.push(val[i]);
                val = newVal;
            }
            obj[name] = val;
        }
    };
    JsonMetadata.prototype.getObjPropertyValueCore = function (obj, prop) {
        if (!prop.isSerializable)
            return obj[prop.name];
        if (prop.isLocalizable) {
            if (prop.isArray)
                return obj[prop.name];
            if (!!prop.serializationProperty)
                return obj[prop.serializationProperty].text;
        }
        return obj.getPropertyValue(prop.name);
    };
    JsonMetadata.prototype.isObjWrapper = function (obj) {
        return !!obj.getOriginalObj && !!obj.getOriginalObj();
    };
    JsonMetadata.prototype.addClass = function (name, properties, creator, parentName) {
        if (creator === void 0) { creator = null; }
        if (parentName === void 0) { parentName = null; }
        name = name.toLowerCase();
        var metaDataClass = new JsonMetadataClass(name, properties, creator, parentName);
        this.classes[name] = metaDataClass;
        if (parentName) {
            parentName = parentName.toLowerCase();
            var children = this.childrenClasses[parentName];
            if (!children) {
                this.childrenClasses[parentName] = [];
            }
            this.childrenClasses[parentName].push(metaDataClass);
        }
        return metaDataClass;
    };
    JsonMetadata.prototype.removeClass = function (name) {
        var metaClass = this.findClass(name);
        if (!metaClass)
            return;
        delete this.classes[metaClass.name];
        if (!!metaClass.parentName) {
            var index = this.childrenClasses[metaClass.parentName].indexOf(metaClass);
            if (index > -1) {
                this.childrenClasses[metaClass.parentName].splice(index, 1);
            }
        }
    };
    JsonMetadata.prototype.overrideClassCreatore = function (name, creator) {
        this.overrideClassCreator(name, creator);
    };
    JsonMetadata.prototype.overrideClassCreator = function (name, creator) {
        name = name.toLowerCase();
        var metaDataClass = this.findClass(name);
        if (metaDataClass) {
            metaDataClass.creator = creator;
        }
    };
    JsonMetadata.prototype.getProperties = function (className) {
        var metaClass = this.findClass(className);
        if (!metaClass)
            return [];
        var properties = this.classProperties[metaClass.name];
        if (!!properties)
            return properties;
        this.fillPropertiesForClass(metaClass.name);
        return this.classProperties[metaClass.name];
    };
    JsonMetadata.prototype.getHashProperties = function (className) {
        var metaClass = this.findClass(className);
        if (!metaClass)
            return {};
        var properties = this.classHashProperties[metaClass.name];
        if (!!properties)
            return properties;
        this.fillPropertiesForClass(metaClass.name);
        return this.classHashProperties[metaClass.name];
    };
    JsonMetadata.prototype.fillPropertiesForClass = function (className) {
        var properties = new Array();
        var hashProperties = {};
        this.fillProperties(className, properties, hashProperties);
        this.classProperties[className] = properties;
        this.classHashProperties[className] = hashProperties;
    };
    JsonMetadata.prototype.getPropertiesByObj = function (obj) {
        if (!obj || !obj.getType)
            return [];
        var res = {};
        var props = this.getProperties(obj.getType());
        for (var i = 0; i < props.length; i++) {
            res[props[i].name] = props[i];
        }
        var dynamicProps = !!obj.getDynamicType
            ? this.getProperties(obj.getDynamicType())
            : null;
        if (dynamicProps && dynamicProps.length > 0) {
            for (var i = 0; i < dynamicProps.length; i++) {
                var dProp = dynamicProps[i];
                if (!!res[dProp.name])
                    continue;
                res[dProp.name] = dProp;
            }
        }
        return Object.keys(res).map(function (key) { return res[key]; });
    };
    JsonMetadata.prototype.getDynamicPropertiesByObj = function (obj, dynamicType) {
        if (dynamicType === void 0) { dynamicType = null; }
        if (!obj || !obj.getType || (!obj.getDynamicType && !dynamicType))
            return [];
        var dType = !!dynamicType ? dynamicType : obj.getDynamicType();
        if (!dType)
            return [];
        var dynamicProps = this.getProperties(dType);
        if (!dynamicProps || dynamicProps.length == 0)
            return [];
        var hash = {};
        var props = this.getProperties(obj.getType());
        for (var i = 0; i < props.length; i++) {
            hash[props[i].name] = props[i];
        }
        var res = [];
        for (var i = 0; i < dynamicProps.length; i++) {
            var dProp = dynamicProps[i];
            if (!hash[dProp.name]) {
                res.push(dProp);
            }
        }
        return res;
    };
    JsonMetadata.prototype.hasOriginalProperty = function (obj, propName) {
        return !!this.getOriginalProperty(obj, propName);
    };
    JsonMetadata.prototype.getOriginalProperty = function (obj, propName) {
        var res = this.findProperty(obj.getType(), propName);
        if (!!res)
            return res;
        if (this.isObjWrapper(obj))
            return this.findProperty(obj.getOriginalObj().getType(), propName);
        return null;
    };
    JsonMetadata.prototype.getProperty = function (className, propertyName) {
        var prop = this.findProperty(className, propertyName);
        if (!prop)
            return prop;
        var classInfo = this.findClass(className);
        if (prop.classInfo === classInfo)
            return prop;
        var newProp = new JsonObjectProperty(classInfo, prop.name, prop.isRequired);
        newProp.mergeWith(prop);
        newProp.isArray = prop.isArray;
        classInfo.properties.push(newProp);
        this.emptyClassPropertiesHash(classInfo);
        return newProp;
    };
    JsonMetadata.prototype.findProperty = function (className, propertyName) {
        var hash = this.getHashProperties(className);
        var res = hash[propertyName];
        return !!res ? res : null;
    };
    JsonMetadata.prototype.findProperties = function (className, propertyNames) {
        var result = [];
        var hash = this.getHashProperties(className);
        for (var i = 0; i < propertyNames.length; i++) {
            var prop = hash[propertyNames[i]];
            if (prop) {
                result.push(prop);
            }
        }
        return result;
    };
    JsonMetadata.prototype.getAllPropertiesByName = function (propertyName) {
        var res = new Array();
        var classes = this.getAllClasses();
        for (var i = 0; i < classes.length; i++) {
            var classInfo = this.findClass(classes[i]);
            for (var j = 0; j < classInfo.properties.length; j++) {
                if (classInfo.properties[j].name == propertyName) {
                    res.push(classInfo.properties[j]);
                    break;
                }
            }
        }
        return res;
    };
    JsonMetadata.prototype.getAllClasses = function () {
        var res = new Array();
        for (var name in this.classes) {
            res.push(name);
        }
        return res;
    };
    JsonMetadata.prototype.createClass = function (name, json) {
        if (json === void 0) { json = undefined; }
        name = name.toLowerCase();
        var metaDataClass = this.findClass(name);
        if (!metaDataClass)
            return null;
        if (metaDataClass.creator)
            return metaDataClass.creator(json);
        var parentName = metaDataClass.parentName;
        while (parentName) {
            metaDataClass = this.findClass(parentName);
            if (!metaDataClass)
                return null;
            parentName = metaDataClass.parentName;
            if (metaDataClass.creator)
                return this.createCustomType(name, metaDataClass.creator, json);
        }
        return null;
    };
    JsonMetadata.prototype.createCustomType = function (name, creator, json) {
        if (json === void 0) { json = undefined; }
        name = name.toLowerCase();
        var res = creator(json);
        var customTypeName = name;
        var customTemplateName = res.getTemplate
            ? res.getTemplate()
            : res.getType();
        res.getType = function () {
            return customTypeName;
        };
        res.getTemplate = function () {
            return customTemplateName;
        };
        CustomPropertiesCollection.createProperties(res);
        return res;
    };
    JsonMetadata.prototype.getChildrenClasses = function (name, canBeCreated) {
        if (canBeCreated === void 0) { canBeCreated = false; }
        name = name.toLowerCase();
        var result = [];
        this.fillChildrenClasses(name, canBeCreated, result);
        return result;
    };
    JsonMetadata.prototype.getRequiredProperties = function (name) {
        var properties = this.getProperties(name);
        var res = [];
        for (var i = 0; i < properties.length; i++) {
            if (properties[i].isRequired) {
                res.push(properties[i].name);
            }
        }
        return res;
    };
    JsonMetadata.prototype.addProperties = function (className, propertiesInfos) {
        className = className.toLowerCase();
        var metaDataClass = this.findClass(className);
        for (var i = 0; i < propertiesInfos.length; i++) {
            this.addCustomPropertyCore(metaDataClass, propertiesInfos[i]);
        }
    };
    JsonMetadata.prototype.addProperty = function (className, propertyInfo) {
        return this.addCustomPropertyCore(this.findClass(className), propertyInfo);
    };
    JsonMetadata.prototype.addCustomPropertyCore = function (metaDataClass, propertyInfo) {
        if (!metaDataClass)
            return null;
        var property = metaDataClass.createProperty(propertyInfo, true);
        if (property) {
            this.emptyClassPropertiesHash(metaDataClass);
        }
        return property;
    };
    JsonMetadata.prototype.removeProperty = function (className, propertyName) {
        var metaDataClass = this.findClass(className);
        if (!metaDataClass)
            return false;
        var property = metaDataClass.find(propertyName);
        if (property) {
            this.removePropertyFromClass(metaDataClass, property);
            this.emptyClassPropertiesHash(metaDataClass);
            CustomPropertiesCollection.removeProperty(metaDataClass.name, propertyName);
        }
    };
    JsonMetadata.prototype.removePropertyFromClass = function (metaDataClass, property) {
        var index = metaDataClass.properties.indexOf(property);
        if (index < 0)
            return;
        metaDataClass.properties.splice(index, 1);
    };
    JsonMetadata.prototype.emptyClassPropertiesHash = function (metaDataClass) {
        this.classProperties[metaDataClass.name] = null;
        this.classHashProperties[metaDataClass.name] = null;
        var childClasses = this.getChildrenClasses(metaDataClass.name);
        for (var i = 0; i < childClasses.length; i++) {
            this.classProperties[childClasses[i].name] = null;
            this.classHashProperties[childClasses[i].name] = null;
        }
    };
    JsonMetadata.prototype.fillChildrenClasses = function (name, canBeCreated, result) {
        var children = this.childrenClasses[name];
        if (!children)
            return;
        for (var i = 0; i < children.length; i++) {
            if (!canBeCreated || children[i].creator) {
                result.push(children[i]);
            }
            this.fillChildrenClasses(children[i].name, canBeCreated, result);
        }
    };
    JsonMetadata.prototype.findClass = function (name) {
        name = name.toLowerCase();
        var res = this.classes[name];
        if (!res) {
            var newName = this.alternativeNames[name];
            if (!!newName && newName != name)
                return this.findClass(newName);
        }
        return res;
    };
    JsonMetadata.prototype.isDescendantOf = function (className, ancestorClassName) {
        if (!className || !ancestorClassName) {
            return false;
        }
        className = className.toLowerCase();
        ancestorClassName = ancestorClassName.toLowerCase();
        var class_ = this.findClass(className);
        if (!class_) {
            return false;
        }
        var parentClass = class_;
        do {
            if (parentClass.name === ancestorClassName) {
                return true;
            }
            parentClass = this.classes[parentClass.parentName];
        } while (!!parentClass);
        return false;
    };
    JsonMetadata.prototype.addAlterNativeClassName = function (name, alternativeName) {
        this.alternativeNames[alternativeName.toLowerCase()] = name.toLowerCase();
    };
    JsonMetadata.prototype.generateSchema = function (className) {
        if (className === void 0) { className = undefined; }
        if (!className)
            className = "survey";
        var classInfo = this.findClass(className);
        if (!classInfo)
            return null;
        var res = {
            $schema: "http://json-schema.org/draft-07/schema#",
            title: "SurveyJS Library json schema",
            type: "object",
            properties: {},
            definitions: {},
        };
        this.generateSchemaProperties(classInfo, res.properties, res.definitions);
        return res;
    };
    JsonMetadata.prototype.generateSchemaProperties = function (classInfo, schemaProperties, schemaDef) {
        if (!classInfo)
            return;
        for (var i = 0; i < classInfo.properties.length; i++) {
            var prop = classInfo.properties[i];
            schemaProperties[prop.name] = this.generateSchemaProperty(prop, schemaDef);
        }
    };
    JsonMetadata.prototype.generateSchemaProperty = function (prop, schemaDef) {
        var res = { type: prop.schemaType() };
        if (prop.hasChoices) {
            res.enum = prop.getChoices(null);
        }
        if (!!prop.className) {
            res.items = { $ref: "#" + prop.className };
            this.generateChemaClass(prop.className, schemaDef);
        }
        if (!!prop.baseClassName) {
            var usedClasses = this.getChildrenClasses(prop.baseClassName, true);
            if (prop.baseClassName == "question") {
                usedClasses.push(this.findClass("panel"));
            }
            res.items = [];
            for (var i = 0; i < usedClasses.length; i++) {
                var className = usedClasses[i].name;
                res.items.push({ $ref: "#" + className });
                this.generateChemaClass(className, schemaDef);
            }
        }
        return res;
    };
    JsonMetadata.prototype.generateChemaClass = function (className, schemaDef) {
        if (!!schemaDef[className])
            return;
        var classInfo = this.findClass(className);
        if (!classInfo)
            return;
        var hasParent = !!classInfo.parentName && classInfo.parentName != "base";
        if (hasParent) {
            this.generateChemaClass(classInfo.parentName, schemaDef);
        }
        var res = { type: "object", $id: "#" + className };
        schemaDef[className] = res;
        var props = {};
        this.generateSchemaProperties(classInfo, props, schemaDef);
        if (hasParent) {
            res.allOff = [
                { $ref: "#" + classInfo.parentName },
                { properties: props },
            ];
        }
        else {
            res.properties = props;
        }
    };
    JsonMetadata.prototype.fillProperties = function (name, list, hash) {
        var metaDataClass = this.findClass(name);
        if (!metaDataClass)
            return;
        if (metaDataClass.parentName) {
            this.fillProperties(metaDataClass.parentName, list, hash);
        }
        for (var i = 0; i < metaDataClass.properties.length; i++) {
            var prop = metaDataClass.properties[i];
            this.addPropertyCore(prop, list, hash);
            hash[prop.name] = prop;
            if (prop.alternativeName)
                hash[prop.alternativeName] = prop;
        }
    };
    JsonMetadata.prototype.addPropertyCore = function (property, list, hash) {
        if (!hash[property.name]) {
            list.push(property);
            return;
        }
        var index = -1;
        for (var i = 0; i < list.length; i++) {
            if (list[i].name == property.name || list[i].alternativeName == property.name) {
                index = i;
                break;
            }
        }
        property.mergeWith(list[index]);
        list[index] = property;
    };
    return JsonMetadata;
}());

var JsonError = /** @class */ (function () {
    function JsonError(type, message) {
        this.type = type;
        this.message = message;
        this.description = "";
        this.at = -1;
    }
    JsonError.prototype.getFullDescription = function () {
        return this.message + (this.description ? "\n" + this.description : "");
    };
    return JsonError;
}());

var JsonUnknownPropertyError = /** @class */ (function (_super) {
    __extends(JsonUnknownPropertyError, _super);
    function JsonUnknownPropertyError(propertyName, className) {
        var _this = _super.call(this, "unknownproperty", "The property '" +
            propertyName +
            "' in class '" +
            className +
            "' is unknown.") || this;
        _this.propertyName = propertyName;
        _this.className = className;
        var properties = JsonObject.metaData.getProperties(className);
        if (properties) {
            _this.description = "The list of available properties are: ";
            for (var i = 0; i < properties.length; i++) {
                if (i > 0)
                    _this.description += ", ";
                _this.description += properties[i].name;
            }
            _this.description += ".";
        }
        return _this;
    }
    return JsonUnknownPropertyError;
}(JsonError));

var JsonMissingTypeErrorBase = /** @class */ (function (_super) {
    __extends(JsonMissingTypeErrorBase, _super);
    function JsonMissingTypeErrorBase(baseClassName, type, message) {
        var _this = _super.call(this, type, message) || this;
        _this.baseClassName = baseClassName;
        _this.type = type;
        _this.message = message;
        _this.description = "The following types are available: ";
        var types = JsonObject.metaData.getChildrenClasses(baseClassName, true);
        for (var i = 0; i < types.length; i++) {
            if (i > 0)
                _this.description += ", ";
            _this.description += "'" + types[i].name + "'";
        }
        _this.description += ".";
        return _this;
    }
    return JsonMissingTypeErrorBase;
}(JsonError));

var JsonMissingTypeError = /** @class */ (function (_super) {
    __extends(JsonMissingTypeError, _super);
    function JsonMissingTypeError(propertyName, baseClassName) {
        var _this = _super.call(this, baseClassName, "missingtypeproperty", "The property type is missing in the object. Please take a look at property: '" +
            propertyName +
            "'.") || this;
        _this.propertyName = propertyName;
        _this.baseClassName = baseClassName;
        return _this;
    }
    return JsonMissingTypeError;
}(JsonMissingTypeErrorBase));

var JsonIncorrectTypeError = /** @class */ (function (_super) {
    __extends(JsonIncorrectTypeError, _super);
    function JsonIncorrectTypeError(propertyName, baseClassName) {
        var _this = _super.call(this, baseClassName, "incorrecttypeproperty", "The property type is incorrect in the object. Please take a look at property: '" +
            propertyName +
            "'.") || this;
        _this.propertyName = propertyName;
        _this.baseClassName = baseClassName;
        return _this;
    }
    return JsonIncorrectTypeError;
}(JsonMissingTypeErrorBase));

var JsonRequiredPropertyError = /** @class */ (function (_super) {
    __extends(JsonRequiredPropertyError, _super);
    function JsonRequiredPropertyError(propertyName, className) {
        var _this = _super.call(this, "requiredproperty", "The property '" +
            propertyName +
            "' is required in class '" +
            className +
            "'.") || this;
        _this.propertyName = propertyName;
        _this.className = className;
        return _this;
    }
    return JsonRequiredPropertyError;
}(JsonError));

var JsonObject = /** @class */ (function () {
    function JsonObject() {
        this.errors = new Array();
        this.lightSerializing = false;
    }
    Object.defineProperty(JsonObject, "metaData", {
        get: function () {
            return JsonObject.metaDataValue;
        },
        enumerable: false,
        configurable: true
    });
    JsonObject.prototype.toJsonObject = function (obj, storeDefaults) {
        if (storeDefaults === void 0) { storeDefaults = false; }
        return this.toJsonObjectCore(obj, null, storeDefaults);
    };
    JsonObject.prototype.toObject = function (jsonObj, obj) {
        this.toObjectCore(jsonObj, obj);
        var error = this.getRequiredError(obj, jsonObj);
        if (!!error) {
            this.addNewError(error, jsonObj);
        }
    };
    JsonObject.prototype.toObjectCore = function (jsonObj, obj) {
        if (!jsonObj)
            return;
        var properties = null;
        var objType = undefined;
        var needAddErrors = true;
        if (obj.getType) {
            objType = obj.getType();
            properties = JsonObject.metaData.getProperties(objType);
            needAddErrors =
                !!objType && !JsonObject.metaData.isDescendantOf(objType, "itemvalue");
        }
        if (!properties)
            return;
        if (obj.startLoadingFromJson) {
            obj.startLoadingFromJson(jsonObj);
        }
        properties = this.addDynamicProperties(obj, jsonObj, properties);
        for (var key in jsonObj) {
            if (key === JsonObject.typePropertyName)
                continue;
            if (key === JsonObject.positionPropertyName) {
                obj[key] = jsonObj[key];
                continue;
            }
            var property = this.findProperty(properties, key);
            if (!property) {
                if (needAddErrors) {
                    this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj);
                }
                continue;
            }
            this.valueToObj(jsonObj[key], obj, property);
        }
        if (obj.endLoadingFromJson) {
            obj.endLoadingFromJson();
        }
    };
    JsonObject.prototype.toJsonObjectCore = function (obj, property, storeDefaults) {
        if (storeDefaults === void 0) { storeDefaults = false; }
        if (!obj || !obj.getType)
            return obj;
        if (typeof obj.getData === "function")
            return obj.getData();
        var result = {};
        if (property != null && !property.className) {
            result[JsonObject.typePropertyName] = property.getObjType(obj.getType());
        }
        this.propertiesToJson(obj, JsonObject.metaData.getProperties(obj.getType()), result, storeDefaults);
        this.propertiesToJson(obj, this.getDynamicProperties(obj), result, storeDefaults);
        return result;
    };
    JsonObject.prototype.getDynamicProperties = function (obj) {
        return Serializer.getDynamicPropertiesByObj(obj);
    };
    JsonObject.prototype.addDynamicProperties = function (obj, jsonObj, properties) {
        if (!obj.getDynamicPropertyName)
            return properties;
        var dynamicPropName = obj.getDynamicPropertyName();
        if (!dynamicPropName)
            return properties;
        if (jsonObj[dynamicPropName]) {
            obj[dynamicPropName] = jsonObj[dynamicPropName];
        }
        var dynamicProperties = this.getDynamicProperties(obj);
        var res = [];
        for (var i = 0; i < properties.length; i++) {
            res.push(properties[i]);
        }
        for (var i = 0; i < dynamicProperties.length; i++) {
            res.push(dynamicProperties[i]);
        }
        return res;
    };
    JsonObject.prototype.propertiesToJson = function (obj, properties, json, storeDefaults) {
        if (storeDefaults === void 0) { storeDefaults = false; }
        for (var i = 0; i < properties.length; i++) {
            this.valueToJson(obj, json, properties[i], storeDefaults);
        }
    };
    JsonObject.prototype.valueToJson = function (obj, result, property, storeDefaults) {
        if (storeDefaults === void 0) { storeDefaults = false; }
        if (property.isSerializable === false ||
            (property.isLightSerializable === false && this.lightSerializing))
            return;
        var value = property.getValue(obj);
        if (!storeDefaults && property.isDefaultValue(value))
            return;
        if (this.isValueArray(value)) {
            var arrValue = [];
            for (var i = 0; i < value.length; i++) {
                arrValue.push(this.toJsonObjectCore(value[i], property, storeDefaults));
            }
            value = arrValue.length > 0 ? arrValue : null;
        }
        else {
            value = this.toJsonObjectCore(value, property, storeDefaults);
        }
        var hasValue = typeof obj["getPropertyValue"] === "function" &&
            obj["getPropertyValue"](property.name, null) !== null;
        if ((storeDefaults && hasValue) || !property.isDefaultValue(value)) {
            if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, property, value, result)) {
                result[property.name] = value;
            }
        }
    };
    JsonObject.prototype.valueToObj = function (value, obj, property) {
        if (value == null)
            return;
        this.removePos(property, value);
        if (property != null && property.hasToUseSetValue) {
            property.setValue(obj, value, this);
            return;
        }
        if (this.isValueArray(value)) {
            this.valueToArray(value, obj, property.name, property);
            return;
        }
        var newObj = this.createNewObj(value, property);
        if (newObj.newObj) {
            this.toObjectCore(value, newObj.newObj);
            value = newObj.newObj;
        }
        if (!newObj.error) {
            if (property != null) {
                property.setValue(obj, value, this);
            }
            else {
                obj[property.name] = value;
            }
        }
    };
    JsonObject.prototype.removePos = function (property, value) {
        if (!property || !property.type || property.type.indexOf("value") < 0)
            return;
        this.removePosFromObj(value);
    };
    JsonObject.prototype.removePosFromObj = function (obj) {
        if (!obj)
            return;
        if (Array.isArray(obj)) {
            for (var i = 0; i < obj.length; i++) {
                this.removePosFromObj(obj[i]);
            }
        }
        if (!!obj[JsonObject.positionPropertyName]) {
            delete obj[JsonObject.positionPropertyName];
        }
    };
    JsonObject.prototype.isValueArray = function (value) {
        return value && Array.isArray(value);
    };
    JsonObject.prototype.createNewObj = function (value, property) {
        var result = { newObj: null, error: null };
        var className = value[JsonObject.typePropertyName];
        if (!className && property != null && property.className) {
            className = property.className;
        }
        className = property.getClassName(className);
        result.newObj = className
            ? JsonObject.metaData.createClass(className, value)
            : null;
        result.error = this.checkNewObjectOnErrors(result.newObj, value, property, className);
        return result;
    };
    JsonObject.prototype.checkNewObjectOnErrors = function (newObj, value, property, className) {
        var error = null;
        if (newObj) {
            error = this.getRequiredError(newObj, value);
        }
        else {
            if (property.baseClassName) {
                if (!className) {
                    error = new JsonMissingTypeError(property.name, property.baseClassName);
                }
                else {
                    error = new JsonIncorrectTypeError(property.name, property.baseClassName);
                }
            }
        }
        if (error) {
            this.addNewError(error, value);
        }
        return error;
    };
    JsonObject.prototype.getRequiredError = function (obj, jsonValue) {
        if (!obj.getType || typeof obj.getData === "function")
            return null;
        var className = obj.getType();
        var requiredProperties = JsonObject.metaData.getRequiredProperties(className);
        if (!Array.isArray(requiredProperties))
            return null;
        for (var i = 0; i < requiredProperties.length; i++) {
            var prop = Serializer.findProperty(className, requiredProperties[i]);
            if (!prop || !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(prop.defaultValue))
                continue;
            if (!jsonValue[prop.name]) {
                return new JsonRequiredPropertyError(prop.name, className);
            }
        }
        return null;
    };
    JsonObject.prototype.addNewError = function (error, jsonObj) {
        if (jsonObj && jsonObj[JsonObject.positionPropertyName]) {
            error.at = jsonObj[JsonObject.positionPropertyName].start;
        }
        this.errors.push(error);
    };
    JsonObject.prototype.valueToArray = function (value, obj, key, property) {
        if (obj[key] && !this.isValueArray(obj[key]))
            return;
        if (obj[key] && value.length > 0)
            obj[key].splice(0, obj[key].length);
        var valueRes = obj[key] ? obj[key] : [];
        this.addValuesIntoArray(value, valueRes, property);
        if (!obj[key])
            obj[key] = valueRes;
    };
    JsonObject.prototype.addValuesIntoArray = function (value, result, property) {
        for (var i = 0; i < value.length; i++) {
            var newValue = this.createNewObj(value[i], property);
            if (newValue.newObj) {
                if (!!value[i].name) {
                    newValue.newObj.name = value[i].name;
                }
                result.push(newValue.newObj);
                this.toObjectCore(value[i], newValue.newObj);
            }
            else {
                if (!newValue.error) {
                    result.push(value[i]);
                }
            }
        }
    };
    JsonObject.prototype.findProperty = function (properties, key) {
        if (!properties)
            return null;
        for (var i = 0; i < properties.length; i++) {
            var prop = properties[i];
            if (prop.name == key || prop.alternativeName == key)
                return prop;
        }
        return null;
    };
    JsonObject.typePropertyName = "type";
    JsonObject.positionPropertyName = "pos";
    JsonObject.metaDataValue = new JsonMetadata();
    return JsonObject;
}());

/**
 * An alias for the metadata object. It contains object properties' runtime information and allows you to modify it.
 * @see JsonMetadata
 */
var Serializer = JsonObject.metaData;


/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar-item-dropdown.html":
/*!**************************************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar-item-dropdown.html ***!
  \**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko with: $data.item -->\n<button type=\"button\"\n  data-bind=\"click: action, key2click: { processEsc: false }, css: getActionBarItemCss(), attr: { disabled: $data.enabled !== undefined && !ko.unwrap($data.enabled), title: $data.tooltip || $data.title }\">\n  <!-- ko if: $data.iconName -->\n  <sv-svg-icon data-bind=\"css: $data.cssClasses.itemIcon\" params=\"iconName: iconName, size: iconSize, title: $data.tooltip || $data.title\"></sv-svg-icon>\n  <!-- /ko -->\n  <!-- ko if: $data.hasTitle -->\n  <span data-bind=\"text: title, css: getActionBarItemTitleCss()\"></span>\n  <!-- /ko -->\n  <sv-popup params=\"model: popupModel\"></sv-popup>\n</button>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar-item-dropdown.ts":
/*!************************************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar-item-dropdown.ts ***!
  \************************************************************************/
/*! exports provided: ActionBarItemDropdownViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionBarItemDropdownViewModel", function() { return ActionBarItemDropdownViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./action-bar-item-dropdown.html */ "./src/knockout/components/action-bar/action-bar-item-dropdown.html");
var ActionBarItemDropdownViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-action-bar-item-dropdown", {
    viewModel: {
        createViewModel: function (params) {
            return new survey_core__WEBPACK_IMPORTED_MODULE_1__["ActionDropdownViewModel"](params.item);
        }
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar-item.html":
/*!*****************************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar-item.html ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko with: $data.item -->\n<button\n  type=\"button\"\n  data-bind=\"click: action, key2click: { processEsc: false }, disable: $data.disabled, css: getActionBarItemCss(), attr: { title: $data.tooltip || $data.title, 'aria-checked': $data.ariaChecked }\"\n>\n  <!-- ko if: $data.iconName -->\n  <!-- ko component: { name: 'sv-svg-icon', params: { css: $data.cssClasses.itemIcon, iconName: iconName, size: iconSize, title: $data.tooltip || $data.title } } --><!-- /ko -->\n  <!-- /ko -->\n  <!-- ko if: $data.hasTitle -->\n  <span\n    data-bind=\"text: title, css: getActionBarItemTitleCss()\"\n  ></span>\n  <!-- /ko -->\n</button>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar-item.ts":
/*!***************************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar-item.ts ***!
  \***************************************************************/
/*! exports provided: ActionBarItemViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionBarItemViewModel", function() { return ActionBarItemViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./action-bar-item.html */ "./src/knockout/components/action-bar/action-bar-item.html");
var ActionBarItemViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-action-bar-item", {
    viewModel: {
        createViewModel: function (params) {
            return params;
        },
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar-separator.html":
/*!**********************************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar-separator.html ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div class=\"sv-action-bar-separator\" data-bind=\"css: $data.css\"></div>";

/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar-separator.ts":
/*!********************************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar-separator.ts ***!
  \********************************************************************/
/*! exports provided: ActionBarSeparatorViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionBarSeparatorViewModel", function() { return ActionBarSeparatorViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./action-bar-separator.html */ "./src/knockout/components/action-bar/action-bar-separator.html");
var ActionBarSeparatorViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-action-bar-separator", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var item = params.item;
            if (!!item) {
                return {
                    css: item.innerCss,
                };
            }
            return {};
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar.html":
/*!************************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar.html ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko if: model.hasActions -->\n<div\n  data-bind=\"css: model.getRootCss(), click: handleClick ? function() { return true; } : undefined, clickBubble: handleClick ? false : undefined\"\n>\n  <!-- ko foreach: model.renderedActions -->\n  <!-- ko component: { name: 'sv-action', params: { item: $data } } -->\n  <!-- /ko -->\n  <!--/ko-->\n</div>\n<!--/ko-->\n";

/***/ }),

/***/ "./src/knockout/components/action-bar/action-bar.ts":
/*!**********************************************************!*\
  !*** ./src/knockout/components/action-bar/action-bar.ts ***!
  \**********************************************************/
/*! exports provided: ActionBarItemViewModel, ActionBarItemDropdownViewModel, ActionBarSeparatorViewModel, ActionContainerImplementor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionContainerImplementor", function() { return ActionContainerImplementor; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../kobase */ "./src/knockout/kobase.ts");
/* harmony import */ var _action__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./action */ "./src/knockout/components/action-bar/action.ts");
/* empty/unused harmony star reexport *//* harmony import */ var _action_bar_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./action-bar-item */ "./src/knockout/components/action-bar/action-bar-item.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionBarItemViewModel", function() { return _action_bar_item__WEBPACK_IMPORTED_MODULE_3__["ActionBarItemViewModel"]; });

/* harmony import */ var _action_bar_item_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./action-bar-item-dropdown */ "./src/knockout/components/action-bar/action-bar-item-dropdown.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionBarItemDropdownViewModel", function() { return _action_bar_item_dropdown__WEBPACK_IMPORTED_MODULE_4__["ActionBarItemDropdownViewModel"]; });

/* harmony import */ var _action_bar_separator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./action-bar-separator */ "./src/knockout/components/action-bar/action-bar-separator.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionBarSeparatorViewModel", function() { return _action_bar_separator__WEBPACK_IMPORTED_MODULE_5__["ActionBarSeparatorViewModel"]; });

var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var template = __webpack_require__(/*! ./action-bar.html */ "./src/knockout/components/action-bar/action-bar.html");




var ActionContainerImplementor = /** @class */ (function (_super) {
    __extends(ActionContainerImplementor, _super);
    function ActionContainerImplementor(model, handleClick) {
        if (handleClick === void 0) { handleClick = true; }
        var _this = _super.call(this, model) || this;
        _this.model = model;
        _this.handleClick = handleClick;
        _this.itemsSubscription = knockout__WEBPACK_IMPORTED_MODULE_0__["computed"](function () {
            (model.renderedActions || model.items || model.actions).forEach(function (item) {
                if (!!item.stateItem) {
                    new _kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](item.stateItem);
                }
                else {
                    new _kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](item);
                }
            });
        });
        return _this;
    }
    ActionContainerImplementor.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.itemsSubscription.dispose();
        this.model.resetResponsivityManager();
    };
    return ActionContainerImplementor;
}(_kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"]));

knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-action-bar", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var handleClick = params.handleClick !== undefined ? params.handleClick : true;
            var model = params.model;
            var container = componentInfo.element.nextElementSibling;
            params.model.initResponsivityManager(container);
            return new ActionContainerImplementor(model, handleClick);
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/action-bar/action.html":
/*!********************************************************!*\
  !*** ./src/knockout/components/action-bar/action.html ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko with: $data.item -->\r\n<div data-bind=\"class: $data.getActionRootCss(), attr: { id: $data.id }\">\r\n    <!-- ko ifnot: $data.isEmpty -->\r\n    <div class=\"sv-action__content\">\r\n        <!-- ko if: $data.needSeparator -->\r\n        <sv-action-bar-separator></sv-action-bar-separator>\r\n        <!-- /ko -->\r\n        <!-- ko ifnot: $data.template-->\r\n        <!-- ko component: { name: $data.component || 'sv-action-bar-item', params: { item: $data } } -->\r\n        <!-- /ko -->\r\n        <!-- /ko -->\r\n        <!-- ko if: $data.template  -->\r\n        <!-- ko template: { name: $data.template, data: $data.data || $data } -->\r\n        <!-- /ko -->\r\n        <!-- /ko -->\r\n    </div>\r\n    <!-- /ko -->\r\n</div>\r\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/action-bar/action.ts":
/*!******************************************************!*\
  !*** ./src/knockout/components/action-bar/action.ts ***!
  \******************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../kobase */ "./src/knockout/kobase.ts");


var template = __webpack_require__(/*! ./action.html */ "./src/knockout/components/action-bar/action.html");
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-action", {
    viewModel: {
        createViewModel: function (params) {
            var item = params.item;
            new _kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](item);
            return params;
        },
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/boolean-checkbox/boolean-checkbox.html":
/*!************************************************************************!*\
  !*** ./src/knockout/components/boolean-checkbox/boolean-checkbox.html ***!
  \************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: question.koCss().rootCheckbox\">\n  <div data-bind=\"css: question.getCheckboxItemCss()\">\n    <label data-bind=\"css: question.koCss().checkboxLabel\">\n      <input\n        type=\"checkbox\"\n        data-bind=\"value: question.booleanValue, css: question.koCss().controlCheckbox, attr: {name: question.name, id: question.inputId, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy}, checked: question.booleanValue, surveyProp: {indeterminate: question.isIndeterminate}, enable: !question.isInputReadOnly\"\n      />\n      <span data-bind=\"css: question.koCss().checkboxMaterialDecorator\">\n        <!-- ko if: question.svgIcon -->\n        <svg data-bind=\"css:question.koCss().checkboxItemDecorator\">\n          <use data-bind=\"attr:{'xlink:href':question.svgIcon}\" xlink:href=''></use>\n        </svg>\n        <!-- /ko -->\n        <span class=\"check\"></span>\n      </span>\n      <span\n        data-bind=\"if: question.isLabelRendered, css: question.koCss().checkboxControlLabel, attr: {id: question.labelRenderedAriaID}\"\n      >\n        <!-- ko component: { name: 'sv-title-actions', params: {element: question } } --><!-- /ko -->\n      </span>\n    </label>\n    <!-- ko if: question.canRenderLabelDescription -->\n    <div data-bind=\"css: question.cssDescription\">\n      <!-- ko template: { name: 'survey-string', data: question.locDescription } -->\n      <!-- /ko -->\n    </div>\n    <!-- /ko -->\n  </div>\n</div>\n";

/***/ }),

/***/ "./src/knockout/components/boolean-checkbox/boolean-checkbox.ts":
/*!**********************************************************************!*\
  !*** ./src/knockout/components/boolean-checkbox/boolean-checkbox.ts ***!
  \**********************************************************************/
/*! exports provided: CheckboxViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxViewModel", function() { return CheckboxViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./boolean-checkbox.html */ "./src/knockout/components/boolean-checkbox/boolean-checkbox.html");
var CheckboxViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-boolean-checkbox", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return { question: params.question };
        },
    },
    template: template,
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory"].Instance.registerRenderer("boolean", "checkbox", "sv-boolean-checkbox");


/***/ }),

/***/ "./src/knockout/components/boolean-radio/boolean-radio-item.html":
/*!***********************************************************************!*\
  !*** ./src/knockout/components/boolean-radio/boolean-radio-item.html ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "  <div role=\"presentation\" data-bind=\"class: question.getRadioItemClass(question.koCss(), $data.value)\">\n    <label data-bind=\"css: question.koCss().radioLabel\">\n      <input\n        type=\"radio\"\n        data-bind=\"event: { change: handleChange }, attr: { name: question.name, 'aria-describedby': question.ariaDescribedBy, value: $data.value?'true':'false', checked:  $data.value === question.value }, enable: !question.isInputReadOnly, css: question.koCss().itemRadioControl\"\n      />\n      <!-- ko if: question.koCss().materialRadioDecorator -->\n      <span data-bind=\"css: question.koCss().materialRadioDecorator\">\n        <!-- ko if: question.itemSvgIcon -->\n        <svg data-bind=\"css:question.koCss().itemRadioDecorator\">\n          <use data-bind=\"attr:{'xlink:href':question.itemSvgIcon}\" xlink:href=''></use>\n        </svg>\n        <!-- /ko -->\n      </span>\n      <!-- /ko -->\n      <span data-bind=\"css: question.koCss().radioControlLabel\">\n        <!-- ko template: { name: 'survey-string', data: $data.locText } -->\n        <!-- /ko -->\n      </span>\n    </label>\n  </div>\n\n";

/***/ }),

/***/ "./src/knockout/components/boolean-radio/boolean-radio-item.ts":
/*!*********************************************************************!*\
  !*** ./src/knockout/components/boolean-radio/boolean-radio-item.ts ***!
  \*********************************************************************/
/*! exports provided: BooleanRadioItemViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanRadioItemViewModel", function() { return BooleanRadioItemViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./boolean-radio-item.html */ "./src/knockout/components/boolean-radio/boolean-radio-item.html");
var BooleanRadioItemViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-boolean-radio-item", {
    viewModel: {
        createViewModel: function (params) {
            params.handleChange = function () {
                params.question.value = params.value;
            };
            return params;
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/boolean-radio/boolean-radio.html":
/*!******************************************************************!*\
  !*** ./src/knockout/components/boolean-radio/boolean-radio.html ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: question.koCss().rootRadio\">\n  <fieldset role=\"presentation\" data-bind=\"css: question.koCss().radioFieldset\">\n    <!-- ko component: { name: 'sv-boolean-radio-item', params: { value: false, locText: question.locLabelFalse, question: question } } --><!-- /ko -->\n    <!-- ko component: { name: 'sv-boolean-radio-item', params: { value: true, locText: question.locLabelTrue, question: question } } --><!-- /ko -->  \n  </fieldset>\n</div>\n";

/***/ }),

/***/ "./src/knockout/components/boolean-radio/boolean-radio.ts":
/*!****************************************************************!*\
  !*** ./src/knockout/components/boolean-radio/boolean-radio.ts ***!
  \****************************************************************/
/*! exports provided: BooleanRadioItemViewModel, BooleanRadioViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanRadioViewModel", function() { return BooleanRadioViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _boolean_radio_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./boolean-radio-item */ "./src/knockout/components/boolean-radio/boolean-radio-item.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanRadioItemViewModel", function() { return _boolean_radio_item__WEBPACK_IMPORTED_MODULE_2__["BooleanRadioItemViewModel"]; });




var template = __webpack_require__(/*! ./boolean-radio.html */ "./src/knockout/components/boolean-radio/boolean-radio.html");
var BooleanRadioViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-boolean-radio", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return { question: params.question };
        },
    },
    template: template,
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory"].Instance.registerRenderer("boolean", "radio", "sv-boolean-radio");


/***/ }),

/***/ "./src/knockout/components/brand-info/brand-info.html":
/*!************************************************************!*\
  !*** ./src/knockout/components/brand-info/brand-info.html ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div class=\"sv-brand-info\">\n  <a class=\"sv-brand-info__logo\" href=\"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page\"><img src=\"https://surveyjs.io/Content/Images/poweredby.svg\"/></a>\n  <div class=\"sv-brand-info__text\">Try and see how easy it is to <a href=\"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey\">create a survey</a></div>\n  <div class=\"sv-brand-info__terms\"><a href=\"https://surveyjs.io/TermsOfUse\">Terms of Use & Privacy Statement</a></div>\n</div>\n";

/***/ }),

/***/ "./src/knockout/components/brand-info/brand-info.ts":
/*!**********************************************************!*\
  !*** ./src/knockout/components/brand-info/brand-info.ts ***!
  \**********************************************************/
/*! exports provided: BrandInfoComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrandInfoComponent", function() { return BrandInfoComponent; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./brand-info.html */ "./src/knockout/components/brand-info/brand-info.html");
var BrandInfoComponent;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-brand-info", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return {};
        }
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/button-group/button-group-item.html":
/*!*********************************************************************!*\
  !*** ./src/knockout/components/button-group/button-group-item.html ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<label role=\"radio\" data-bind=\"css: model.css.label, attr: { title: model.caption.koRenderedHtml }\">\r\n  <input type=\"radio\"\r\n    data-bind=\"attr: { name: model.name, id: model.id, 'aria-required': model.isRequired, 'aria-label': model.caption.koRenderedHtml, role: 'radio', 'aria-invalid': model.hasErrors, 'aria-describedby': model.describeBy}, checkedValue: model.value, checked: model.question.renderedValue, disable: model.readOnly, css: model.css.control\" />\r\n  <div data-bind=\"css: model.css.decorator\">\r\n    <!-- ko if: !!model.iconName-->\r\n    <sv-svg-icon data-bind=\"css: model.css.icon\" params=\"iconName: model.iconName, size: model.iconSize\"></sv-svg-icon>\r\n    <!-- /ko -->\r\n    <!-- ko if: model.showCaption -->\r\n    <span data-bind=\"css: model.css.caption, attr: { title: model.caption.koRenderedHtml }\">\r\n      <!-- ko template: { name: 'survey-string', data: model.caption } -->\r\n      <!-- /ko -->\r\n    </span>\r\n    <!-- /ko -->\r\n  </div>\r\n</label>";

/***/ }),

/***/ "./src/knockout/components/button-group/button-group-item.ts":
/*!*******************************************************************!*\
  !*** ./src/knockout/components/button-group/button-group-item.ts ***!
  \*******************************************************************/
/*! exports provided: ButtonGroupItemViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemViewModel", function() { return ButtonGroupItemViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./button-group-item.html */ "./src/knockout/components/button-group/button-group-item.html");
var ButtonGroupItemViewModel = /** @class */ (function () {
    function ButtonGroupItemViewModel(model) {
        this.model = model;
    }
    return ButtonGroupItemViewModel;
}());

knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-button-group-item", {
    viewModel: {
        createViewModel: function (params) {
            var model = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ButtonGroupItemModel"](params.question, params.item, params.index());
            var viewModel = new ButtonGroupItemViewModel(model);
            return viewModel;
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/dropdown-select/dropdown-select.html":
/*!**********************************************************************!*\
  !*** ./src/knockout/components/dropdown-select/dropdown-select.html ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: question.renderCssRoot\">\n  <div data-bind=\"css: question.koCss().selectWrapper\">\n    <!-- ko ifnot: question.isReadOnly -->\n    <select data-bind=\"options: question.visibleChoices, \n    optionsValue: 'value', \n    optionsText: 'koText', \n    optionsCaption: question.allowClear ? question.locPlaceholder.koRenderedHtml : undefined, \n    optionsAfterRender: question.koDisableOption, \n    attr: {id: question.inputId, autocomplete: question.autocomplete, required: question.isRequired, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy},\n    click: click,\n    event: { keyup: keyup },\n    disable: question.isInputReadOnly, \n    value: question.renderedValue, \n    valueAllowUnset: true, \n    css: question.getControlClass()\">\n    </select>\n    <!-- /ko -->\n    <!-- ko if: question.isReadOnly -->\n    <div disabled\n      data-bind=\"attr: {id: question.inputId}, text: question.readOnlyText, css: question.getControlClass()\">\n    </div>\n    <!-- /ko -->\n  </div>\n  <!-- ko if: question.isOtherSelected -->\n  <div class=\"form-group\"\n    data-bind=\"template: { name: 'survey-comment', data: {'question': question, 'visible': question.isOtherSelected } }, style: {display: question.isFlowLayout ? 'inline': ''}\">\n  </div>\n  <!-- /ko -->\n</div>";

/***/ }),

/***/ "./src/knockout/components/dropdown-select/dropdown-select.ts":
/*!********************************************************************!*\
  !*** ./src/knockout/components/dropdown-select/dropdown-select.ts ***!
  \********************************************************************/
/*! exports provided: DropdownSelectViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownSelectViewModel", function() { return DropdownSelectViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var src_knockout_kobase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/knockout/kobase */ "./src/knockout/kobase.ts");
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");



var template = __webpack_require__(/*! ./dropdown-select.html */ "./src/knockout/components/dropdown-select/dropdown-select.html");
var DropdownSelectViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-dropdown-select", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            params.question.choices.forEach(function (choice) {
                new src_knockout_kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](choice);
            });
            var keyup = function (_, e) {
                params.question.onKeyUp(e);
            };
            var click = function (_, e) {
                params.question.onClick(e);
            };
            return { question: params.question, click: click, keyup: keyup };
        },
    },
    template: template,
});
survey_core__WEBPACK_IMPORTED_MODULE_2__["RendererFactory"].Instance.registerRenderer("dropdown", "select", "sv-dropdown-select");


/***/ }),

/***/ "./src/knockout/components/dropdown/dropdown.html":
/*!********************************************************!*\
  !*** ./src/knockout/components/dropdown/dropdown.html ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: question.koCss().selectWrapper\">\n  <!-- ko ifnot: question.isReadOnly -->\n  <div data-bind=\"css: question.getControlClass(),\n    click: click, \n    event: { keydown: keyhandler, blur: blur },\n    attr: { \n      id: question.inputId, \n      required: question.isRequired, \n      tabindex: model.inputReadOnly ? undefined : 0,\n      disabled: question.isInputReadOnly,\n      role: question.ariaRole,\n      'aria-required': question.ariaRequired, \n      'aria-label': question.ariaLabel, \n      'aria-invalid': question.ariaInvalid, \n      'aria-describedby': question.ariaDescribedBy \n    },\">\n    <div data-bind=\"css: question.koCss().controlValue\">\n      <!-- ko if: question.showInputFieldComponent -->\n      <!-- ko component: { name: question.inputFieldComponentName, params: { item: model.getSelectedAction(), question: question } } -->\n      <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: question.showSelectedItemLocText -->\n      <!-- ko template: { name: 'survey-string', data: question.selectedItemLocText } -->\n      <!-- /ko -->\n      <!-- /ko -->\n      <input type=\"text\" autocomplete=\"off\" data-bind=\"\n      textInput: model.filterString, \n      css: question.cssClasses.filterStringInput, \n      attr: { \n        'aria-label': question.placeholder, \n        placeholder: question.readOnlyText, \n        readonly: !model.searchEnabled, \n        tabindex: model.inputReadOnly ? undefined : -1,\n        disabled: question.isInputReadOnly,\n        id: question.getInputId() \n      },\n      event: { blur: blur }\"></input>\n    </div>\n    <!-- ko if: (question.allowClear && question.cssClasses.cleanButtonIconId) -->\n    <div data-bind=\"css: question.koCss().cleanButton, click: clear, visible: !question.isEmpty() \">\n      <!-- ko component: { name: 'sv-svg-icon', params: { css: question.cssClasses.cleanButtonSvg, iconName: question.cssClasses.cleanButtonIconId, size: 'auto', title: question.clearCaption } } -->\n      <!-- /ko -->\n    </div>\n    <!-- /ko -->\n  </div>\n  <!-- ko component: { name: \"sv-popup\", params: { model: model.popupModel }} -->\n  <!-- /ko -->\n  <!-- /ko -->\n  <!-- ko if: question.isReadOnly -->\n  <div disabled data-bind=\"css: question.getControlClass(), attr: { id: question.inputId }, \">\n    <!-- ko if: question.selectedItemLocText -->\n    <!-- ko template: { name: 'survey-string', data: question.selectedItemLocText } -->\n    <!-- /ko -->\n    <!-- /ko -->\n    <div data-bind=\"text: question.readOnlyText\"></div>\n  </div>\n  <!-- /ko -->\n</div>";

/***/ }),

/***/ "./src/knockout/components/dropdown/dropdown.ts":
/*!******************************************************!*\
  !*** ./src/knockout/components/dropdown/dropdown.ts ***!
  \******************************************************/
/*! exports provided: DropdownViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownViewModel", function() { return DropdownViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var src_knockout_kobase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/knockout/kobase */ "./src/knockout/kobase.ts");
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");



var template = __webpack_require__(/*! ./dropdown.html */ "./src/knockout/components/dropdown/dropdown.html");
var DropdownViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-dropdown", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var q = params.question;
            var click = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onClick(e);
            };
            var clear = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onClear(e);
            };
            var keyhandler = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.keyHandler(e);
                return true;
            };
            var blur = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(e);
            };
            if (!q.dropdownListModel) {
                q.dropdownListModel = new survey_core__WEBPACK_IMPORTED_MODULE_2__["DropdownListModel"](params.question);
            }
            new src_knockout_kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](q.dropdownListModel);
            return { question: q, model: q.dropdownListModel, click: click, clear: clear, keyhandler: keyhandler, blur: blur };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/list/list-item.html":
/*!*****************************************************!*\
  !*** ./src/knockout/components/list/list-item.html ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "\r\n<li role=\"option\"\r\ndata-bind=\"css: $data.model.getItemClass($data.item), attr: { 'aria-selected': $data.model.isItemSelected($data.item) }, click: itemClick, key2click, visible: $data.model.isItemVisible($data.item), event: { pointerdown: function (model, event) { $data.model.onPointerDown(event, $data.item); } }\">  <!-- ko if: $data.item.needSeparator -->\r\n  <div data-bind=\"css: $data.model.cssClasses.itemSeparator\"></div>\r\n  <!-- /ko -->\r\n  <div data-bind=\"style: { paddingInlineStart: $data.model.getItemIndent($data.item) }, css: $data.model.cssClasses.itemBody\">\r\n  <!-- ko ifnot: $data.item.component -->\r\n  <!-- ko if: $data.item.iconName -->\r\n  <sv-svg-icon data-bind=\"css: $data.model.cssClasses.itemIcon\" params=\"iconName: $data.item.iconName, size: 24\"></sv-svg-icon>\r\n  <!-- /ko -->\r\n  <!-- ko template: { name: 'survey-string', data: $data.item.locTitle } --><!-- /ko -->\r\n  <!-- /ko -->\r\n  <!-- ko if: $data.item.component -->\r\n  <!-- ko component: { name: $data.item.component, params: { item: $data.item } } -->\r\n  <!-- /ko -->\r\n  <!-- /ko -->\r\n  </div>\r\n</li>";

/***/ }),

/***/ "./src/knockout/components/list/list-item.ts":
/*!***************************************************!*\
  !*** ./src/knockout/components/list/list-item.ts ***!
  \***************************************************/
/*! exports provided: ListItemViewComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListItemViewComponent", function() { return ListItemViewComponent; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../kobase */ "./src/knockout/kobase.ts");


var template = __webpack_require__(/*! ./list-item.html */ "./src/knockout/components/list/list-item.html");
var ListItemViewComponent;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-list-item", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            new _kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](params.item);
            return {
                item: params.item,
                model: params.model,
                itemClick: function (data, event) {
                    data.model.onItemClick(data.item);
                    event.stopPropagation();
                }
            };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/list/list.html":
/*!************************************************!*\
  !*** ./src/knockout/components/list/list.html ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: model.cssClasses.root\">\n  <!-- ko if: $data.model.showFilter -->\n  <div data-bind=\"css: model.cssClasses.filter\">\n    <div data-bind=\"css: model.cssClasses.filterIcon\">\n      <sv-svg-icon params=\"iconName: 'icon-search', size: 24\"></sv-svg-icon>\n    </div>\n    <input type=\"text\" \n      data-bind=\"css: model.cssClasses.filterInput, textInput: model.filterString, attr: { placeholder: model.filterStringPlaceholder, 'aria-label': model.filterStringPlaceholder }, event: { keyup: function (model, event) { $data.model.goToItems(event); } }\"></input>\n  </div>\n  <!-- /ko -->\n  <div data-bind=\"css: model.cssClasses.emptyContainer, visible: $data.model.isEmpty\">\n    <div data-bind=\"css: model.cssClasses.emptyText, text: model.emptyMessage, attr: { 'aria-label': model.emptyMessage }\"></div>\n  </div>\n  <ul role=\"listbox\"\n    data-bind=\"css: model.cssClasses.itemsContainer, event: { mousedown: function (data, e) { e.preventDefault(); }, keydown: function(data, e) { $data.model.onKeyDown(event); return true; }, mousemove: function(data, e) { $data.model.onMouseMove(event); return true; } }\">\n    <!-- ko template: { foreach: model.renderedActions, afterRender: $data.afterItemRender } -->\n    <!-- ko component: { name: 'sv-list-item', params: { item: $data, model: $parent.model } } -->\n    <!-- /ko -->\n    <!-- /ko -->\n  </ul>\n</div>";

/***/ }),

/***/ "./src/knockout/components/list/list.ts":
/*!**********************************************!*\
  !*** ./src/knockout/components/list/list.ts ***!
  \**********************************************/
/*! exports provided: ListItemViewComponent, ListViewComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListViewComponent", function() { return ListViewComponent; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../action-bar/action-bar */ "./src/knockout/components/action-bar/action-bar.ts");
/* harmony import */ var _list_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./list-item */ "./src/knockout/components/list/list-item.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemViewComponent", function() { return _list_item__WEBPACK_IMPORTED_MODULE_2__["ListItemViewComponent"]; });



var template = __webpack_require__(/*! ./list.html */ "./src/knockout/components/list/list.html");

var ListViewComponent;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-list", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var model = params.model;
            var _implementor = new _action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["ActionContainerImplementor"](model);
            model.initListContainerHtmlElement(componentInfo.element);
            return {
                model: model,
                dispose: function () { _implementor.dispose(); },
                afterItemRender: function (_, action) {
                    !!knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"] && knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
                    model.onLastItemRended(action);
                }
            };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/logo-image/logo-image.html":
/*!************************************************************!*\
  !*** ./src/knockout/components/logo-image/logo-image.html ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko with: survey -->\n<div data-bind=\"css: logoClassNames\">\n  <img data-bind=\"css: css.logoImage, attr: { src: locLogo.koRenderedHtml, width: logoWidth ? logoWidth : undefined, height: logoHeight ? logoHeight : undefined, alt: locTitle.renderedHtml }, style: { objectFit: logoFit }\">\n</div>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/logo-image/logo-image.ts":
/*!**********************************************************!*\
  !*** ./src/knockout/components/logo-image/logo-image.ts ***!
  \**********************************************************/
/*! exports provided: LogoImageViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LogoImageViewModel", function() { return LogoImageViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./logo-image.html */ "./src/knockout/components/logo-image/logo-image.html");
var LogoImageViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-logo-image", {
    viewModel: {
        createViewModel: function (params) {
            return { survey: params };
        },
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/matrix-actions/detail-button/detail-button.html":
/*!*********************************************************************************!*\
  !*** ./src/knockout/components/matrix-actions/detail-button/detail-button.html ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<button\ntype=\"button\"\ndata-bind=\"css:question.getDetailPanelButtonCss(row), click:row.showHideDetailPanelClick, attr:{ 'aria-expanded': question.getIsDetailPanelShowing($data.row) ? 'true': 'false', 'aria-controls': question.getIsDetailPanelShowing($data.row) ? row.detailPanelId: false}\"\n>\n<span\n  data-bind=\"css: question.getDetailPanelIconCss(row), component: { name: 'sv-svg-icon', params: {iconName: question.getDetailPanelIconId(row)} }\"\n>\n</span>\n</button>\n<!-- ko if: question.detailPanelMode === \"popup\" && question.getKoPopupIsVisible(row) -->\n<sv-popup\nparams=\"contentComponentName: 'sv-panel', contentComponentData: { question: row.detailPanel, onItemSelect: function(){} }, isVisible: question.getKoPopupIsVisible(row), isModal: true, onHide: function() { row.hideDetailPanel() }, verticalPosition: 'top', horizontalPosition: 'right'\"\n></sv-popup>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/matrix-actions/detail-button/detail-button.ts":
/*!*******************************************************************************!*\
  !*** ./src/knockout/components/matrix-actions/detail-button/detail-button.ts ***!
  \*******************************************************************************/
/*! exports provided: SurveyQuestionMatrixDetailButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDetailButton", function() { return SurveyQuestionMatrixDetailButton; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./detail-button.html */ "./src/knockout/components/matrix-actions/detail-button/detail-button.html");
var SurveyQuestionMatrixDetailButton;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-matrix-detail-button", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return params.item.data;
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/matrix-actions/drag-drop-icon/drag-drop-icon.html":
/*!***********************************************************************************!*\
  !*** ./src/knockout/components/matrix-actions/drag-drop-icon/drag-drop-icon.html ***!
  \***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko if: question.iconDragElement -->\n<svg data-bind=\"css: question.koCss().dragElementDecorator\">\n  <use data-bind=\"attr: { 'xlink:href': question.iconDragElement }\" xlink:href=''></use>\n</svg>\n<!-- /ko -->\n<!-- ko ifnot: question.iconDragElement -->\n<span data-bind=\"css: question.koCss().iconDrag\"></span>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/matrix-actions/drag-drop-icon/drag-drop-icon.ts":
/*!*********************************************************************************!*\
  !*** ./src/knockout/components/matrix-actions/drag-drop-icon/drag-drop-icon.ts ***!
  \*********************************************************************************/
/*! exports provided: SurveyQuestionMatrixDynamicDragDropIcon */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicDragDropIcon", function() { return SurveyQuestionMatrixDynamicDragDropIcon; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./drag-drop-icon.html */ "./src/knockout/components/matrix-actions/drag-drop-icon/drag-drop-icon.html");
var SurveyQuestionMatrixDynamicDragDropIcon;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-matrix-drag-drop-icon", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return params.item.data;
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/matrix-actions/remove-button/remove-button.html":
/*!*********************************************************************************!*\
  !*** ./src/knockout/components/matrix-actions/remove-button/remove-button.html ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<button\n  type=\"button\"\n  data-bind=\"click: question.koRemoveRowClick, disable: question.isInputReadOnly, css: question.getRemoveRowButtonCss()\"\n>\n  <!-- ko template: { name: 'survey-string', data: question.locRemoveRowText } --><!-- /ko -->\n  <span data-bind=\"css: question.koCss().iconRemove\"></span>\n</button>\n";

/***/ }),

/***/ "./src/knockout/components/matrix-actions/remove-button/remove-button.ts":
/*!*******************************************************************************!*\
  !*** ./src/knockout/components/matrix-actions/remove-button/remove-button.ts ***!
  \*******************************************************************************/
/*! exports provided: SurveyQuestionMatrixDynamicRemoveButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicRemoveButton", function() { return SurveyQuestionMatrixDynamicRemoveButton; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./remove-button.html */ "./src/knockout/components/matrix-actions/remove-button/remove-button.html");
var SurveyQuestionMatrixDynamicRemoveButton;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-matrix-remove-button", {
    viewModel: {
        createViewModel: function (params) {
            return params.item.data;
        },
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/panel/panel.ts":
/*!************************************************!*\
  !*** ./src/knockout/components/panel/panel.ts ***!
  \************************************************/
/*! exports provided: PanelViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelViewModel", function() { return PanelViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! html-loader?interpolate!val-loader!./panel.html */ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/panel/panel.html");
var PanelViewModel = /** @class */ (function () {
    function PanelViewModel(question, targetElement) {
        this.question = question;
        this.targetElement = targetElement;
    }
    return PanelViewModel;
}());

knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-panel", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var viewModel = new PanelViewModel(params.question, componentInfo.element.parentElement);
            return viewModel;
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/paneldynamic-actions/paneldynamic-actions.ts":
/*!******************************************************************************!*\
  !*** ./src/knockout/components/paneldynamic-actions/paneldynamic-actions.ts ***!
  \******************************************************************************/
/*! exports provided: SurveyQuestionPaneldynamicActioons */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPaneldynamicActioons", function() { return SurveyQuestionPaneldynamicActioons; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var addBtnTemplate = __webpack_require__(/*! ./paneldynamic-add-btn.html */ "./src/knockout/components/paneldynamic-actions/paneldynamic-add-btn.html");
var nextBtnTemplate = __webpack_require__(/*! ./paneldynamic-next-btn.html */ "./src/knockout/components/paneldynamic-actions/paneldynamic-next-btn.html");
var prevBtnTemplate = __webpack_require__(/*! ./paneldynamic-prev-btn.html */ "./src/knockout/components/paneldynamic-actions/paneldynamic-prev-btn.html");
var progressTextTemplate = __webpack_require__(/*! ./paneldynamic-progress-text.html */ "./src/knockout/components/paneldynamic-actions/paneldynamic-progress-text.html");
var SurveyQuestionPaneldynamicActioons;
function getPaneldynamicActionViewModel() {
    return {
        createViewModel: function (params, componentInfo) {
            return (!!params.item && params.item.data) || params;
        },
    };
}
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-paneldynamic-add-btn", {
    viewModel: getPaneldynamicActionViewModel(),
    template: addBtnTemplate,
});
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-paneldynamic-next-btn", {
    viewModel: getPaneldynamicActionViewModel(),
    template: nextBtnTemplate,
});
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-paneldynamic-prev-btn", {
    viewModel: getPaneldynamicActionViewModel(),
    template: prevBtnTemplate,
});
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-paneldynamic-progress-text", {
    viewModel: getPaneldynamicActionViewModel(),
    template: progressTextTemplate,
});


/***/ }),

/***/ "./src/knockout/components/paneldynamic-actions/paneldynamic-add-btn.html":
/*!********************************************************************************!*\
  !*** ./src/knockout/components/paneldynamic-actions/paneldynamic-add-btn.html ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko if: question.koCanAddPanel -->\n<button type=\"button\" data-bind=\"click: question.koAddPanelClick, css: question.koAddButtonCss, visible: question.koCanAddPanel\">\n  <span data-bind=\"css: question.koCss().buttonAddText, text: question.panelAddText\"></span>\n</button>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/paneldynamic-actions/paneldynamic-next-btn.html":
/*!*********************************************************************************!*\
  !*** ./src/knockout/components/paneldynamic-actions/paneldynamic-next-btn.html ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"attr: { title: question.panelNextText }, click: question.koNextPanelClick, css: question.koNextButtonCss\">\n    <!-- ko component: { name: 'sv-svg-icon', params: { iconName: question.koCss().progressBtnIcon, size: 'auto' } } --><!-- /ko -->\n</div>";

/***/ }),

/***/ "./src/knockout/components/paneldynamic-actions/paneldynamic-prev-btn.html":
/*!*********************************************************************************!*\
  !*** ./src/knockout/components/paneldynamic-actions/paneldynamic-prev-btn.html ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"attr: { title: question.panelPrevText }, click: question.koPrevPanelClick, css: question.koPrevButtonCss\">\n    <!-- ko component: { name: 'sv-svg-icon', params: { iconName: question.koCss().progressBtnIcon, size: 'auto' } } --><!-- /ko -->\n</div>";

/***/ }),

/***/ "./src/knockout/components/paneldynamic-actions/paneldynamic-progress-text.html":
/*!**************************************************************************************!*\
  !*** ./src/knockout/components/paneldynamic-actions/paneldynamic-progress-text.html ***!
  \**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"text: question.koProgressText, css: question.koCss().progressText\"></div>";

/***/ }),

/***/ "./src/knockout/components/popup/popup.ts":
/*!************************************************!*\
  !*** ./src/knockout/components/popup/popup.ts ***!
  \************************************************/
/*! exports provided: PopupViewModel, showModal, showDialog */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupViewModel", function() { return PopupViewModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showModal", function() { return showModal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showDialog", function() { return showDialog; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../kobase */ "./src/knockout/kobase.ts");



var template = __webpack_require__(/*! html-loader?interpolate!val-loader!./popup.html */ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/popup/popup.html");
var PopupViewModel = /** @class */ (function () {
    function PopupViewModel(popupViewModel) {
        this.popupViewModel = popupViewModel;
        popupViewModel.initializePopupContainer();
        new _kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"](popupViewModel.model);
        new _kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"](popupViewModel);
        popupViewModel.container.innerHTML = template;
        popupViewModel.model.onVisibilityChanged.add(function (_, option) {
            if (option.isVisible) {
                knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
                popupViewModel.updateOnShowing();
            }
        });
        knockout__WEBPACK_IMPORTED_MODULE_0__["applyBindings"](popupViewModel, popupViewModel.container);
    }
    PopupViewModel.prototype.dispose = function () {
        knockout__WEBPACK_IMPORTED_MODULE_0__["cleanNode"](this.popupViewModel.container);
        this.popupViewModel.dispose();
    };
    return PopupViewModel;
}());

// replace to showDialog then delete
function showModal(componentName, data, onApply, onCancel, cssClass, title, displayMode) {
    if (displayMode === void 0) { displayMode = "popup"; }
    var options = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createDialogOptions"])(componentName, data, onApply, onCancel, undefined, undefined, cssClass, title, displayMode);
    return showDialog(options);
}
function showDialog(dialogOptions) {
    dialogOptions.onHide = function () { viewModel.dispose(); };
    var popupViewModel = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createPopupModalViewModel"])(dialogOptions);
    var viewModel = new PopupViewModel(popupViewModel);
    popupViewModel.model.isVisible = true;
    return popupViewModel;
}
survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].showModal = showModal;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-popup", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var viewModel = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createPopupViewModel"])(knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.model), componentInfo.element.parentElement);
            return new PopupViewModel(viewModel);
        },
    },
    template: "<div></div>",
});


/***/ }),

/***/ "./src/knockout/components/progress/buttons.ts":
/*!*****************************************************!*\
  !*** ./src/knockout/components/progress/buttons.ts ***!
  \*****************************************************/
/*! exports provided: ProgressButtonsViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressButtonsViewModel", function() { return ProgressButtonsViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! html-loader?interpolate!val-loader!./buttons.html */ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/progress/buttons.html");
var ProgressButtonsViewModel = /** @class */ (function () {
    function ProgressButtonsViewModel(survey, element) {
        var _this = this;
        this.survey = survey;
        this.scrollButtonCssKo = undefined;
        this.hasScroller = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](false);
        this.updateScroller = undefined;
        this.progressButtonsModel = new survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressButtonsModel"](survey);
        this.updateScroller = setInterval(function () {
            var listContainerElement = element.querySelector("." + survey.css.progressButtonsListContainer);
            if (!!listContainerElement) {
                _this.hasScroller(listContainerElement.scrollWidth > listContainerElement.offsetWidth);
            }
        }, 100);
    }
    ProgressButtonsViewModel.prototype.isListElementClickable = function (index) {
        return this.progressButtonsModel.isListElementClickable(index());
    };
    ProgressButtonsViewModel.prototype.getListElementCss = function (index) {
        return this.progressButtonsModel.getListElementCss(index());
    };
    ProgressButtonsViewModel.prototype.clickListElement = function (index) {
        this.progressButtonsModel.clickListElement(index());
    };
    ProgressButtonsViewModel.prototype.getScrollButtonCss = function (isLeftScroll) {
        var _this = this;
        this.scrollButtonCssKo = knockout__WEBPACK_IMPORTED_MODULE_0__["computed"](function () {
            return _this.progressButtonsModel.getScrollButtonCss(_this.hasScroller(), isLeftScroll);
        }, this);
        return this.scrollButtonCssKo;
    };
    ProgressButtonsViewModel.prototype.clickScrollButton = function (listContainerElement, isLeftScroll) {
        listContainerElement.scrollLeft += (isLeftScroll ? -1 : 1) * 70;
    };
    ProgressButtonsViewModel.prototype.dispose = function () {
        if (typeof this.updateScroller !== "undefined") {
            clearInterval(this.updateScroller);
            this.updateScroller = undefined;
        }
        if (typeof this.scrollButtonCssKo !== "undefined") {
            this.scrollButtonCssKo.dispose();
            this.scrollButtonCssKo = undefined;
        }
    };
    return ProgressButtonsViewModel;
}());

knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-progress-buttons", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return new ProgressButtonsViewModel(params.model, componentInfo.element.nextElementSibling);
        },
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/progress/progress.ts":
/*!******************************************************!*\
  !*** ./src/knockout/components/progress/progress.ts ***!
  \******************************************************/
/*! exports provided: ProgressViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressViewModel", function() { return ProgressViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! html-loader?interpolate!val-loader!./progress.html */ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/progress/progress.html");
var ProgressViewModel = /** @class */ (function () {
    function ProgressViewModel(model) {
        this.model = model;
    }
    ProgressViewModel.prototype.getProgressTextInBarCss = function (css) {
        return survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextInBarCss(css);
    };
    ProgressViewModel.prototype.getProgressTextUnderBarCss = function (css) {
        return survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextUnderBarCss(css);
    };
    return ProgressViewModel;
}());

knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-progress-progress", {
    viewModel: {
        createViewModel: function (params) {
            return new ProgressViewModel(params.model);
        }
    },
    template: template
});
var templateBridge = "<!-- ko component: { name: 'sv-progress-progress', params: $data } --><!-- /ko -->";
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-progress-pages", {
    viewModel: {
        createViewModel: function (params) {
            return new ProgressViewModel(params.model);
        }
    },
    template: templateBridge
});
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-progress-questions", {
    viewModel: {
        createViewModel: function (params) {
            return new ProgressViewModel(params.model);
        }
    },
    template: templateBridge
});
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-progress-correctQuestions", {
    viewModel: {
        createViewModel: function (params) {
            return new ProgressViewModel(params.model);
        }
    },
    template: templateBridge
});
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-progress-requiredQuestions", {
    viewModel: {
        createViewModel: function (params) {
            return new ProgressViewModel(params.model);
        }
    },
    template: templateBridge
});


/***/ }),

/***/ "./src/knockout/components/rating-dropdown/rating-dropdown.html":
/*!**********************************************************************!*\
  !*** ./src/knockout/components/rating-dropdown/rating-dropdown.html ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: question.cssClasses.rootDropdown\">\n  <!-- ko component: { name: 'sv-dropdown', params: { question: question } } -->\n  <!-- /ko -->\n</div>\n";

/***/ }),

/***/ "./src/knockout/components/rating-dropdown/rating-dropdown.ts":
/*!********************************************************************!*\
  !*** ./src/knockout/components/rating-dropdown/rating-dropdown.ts ***!
  \********************************************************************/
/*! exports provided: RatingDropdownViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RatingDropdownViewModel", function() { return RatingDropdownViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./rating-dropdown.html */ "./src/knockout/components/rating-dropdown/rating-dropdown.html");
var RatingDropdownViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-rating-dropdown", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return { question: params.question };
        },
    },
    template: template,
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory"].Instance.registerRenderer("rating", "dropdown", "sv-rating-dropdown");


/***/ }),

/***/ "./src/knockout/components/skeleton/skeleton.html":
/*!********************************************************!*\
  !*** ./src/knockout/components/skeleton/skeleton.html ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div class=\"sv-skeleton-element\" data-bind=\"attr: { id: element.id }\">\n</div>";

/***/ }),

/***/ "./src/knockout/components/skeleton/skeleton.ts":
/*!******************************************************!*\
  !*** ./src/knockout/components/skeleton/skeleton.ts ***!
  \******************************************************/
/*! exports provided: Skeleton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Skeleton", function() { return Skeleton; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./skeleton.html */ "./src/knockout/components/skeleton/skeleton.html");
var Skeleton;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-skeleton", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return { element: params.element };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/string-editor/string-editor.html":
/*!******************************************************************!*\
  !*** ./src/knockout/components/string-editor/string-editor.html ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- <input class=\"sv-string-editor\" data-bind=\"value: editValue\" /> -->\n\n<!-- ko ifnot: koHasHtml -->\n<span class=\"sv-string-editor\" data-bind=\"text: editValue, event: { blur: onInput, click: onClick, clickBubble: false }\" contenteditable=\"true\"></span>\n<!-- /ko -->\n<!-- ko if: koHasHtml -->\n<span class=\"sv-string-editor\" data-bind=\"html: editValue, event: { blur: onInput, click: onClick, clickBubble: false }\" contenteditable=\"true\"></span>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/string-editor/string-editor.ts":
/*!****************************************************************!*\
  !*** ./src/knockout/components/string-editor/string-editor.ts ***!
  \****************************************************************/
/*! exports provided: StringEditorViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringEditorViewModel", function() { return StringEditorViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./string-editor.html */ "./src/knockout/components/string-editor/string-editor.html");
var StringEditorViewModel = /** @class */ (function () {
    function StringEditorViewModel(locString) {
        this.locString = locString;
    }
    Object.defineProperty(StringEditorViewModel.prototype, "koHasHtml", {
        get: function () {
            return this.locString.koHasHtml();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StringEditorViewModel.prototype, "editValue", {
        get: function () {
            return this.locString.koRenderedHtml();
        },
        set: function (value) {
            this.locString.searchElement = undefined;
            this.locString.text = value;
        },
        enumerable: false,
        configurable: true
    });
    StringEditorViewModel.prototype.onInput = function (sender, event) {
        sender.editValue = event.target.innerText;
    };
    StringEditorViewModel.prototype.onClick = function (sender, event) {
        event.stopPropagation();
    };
    StringEditorViewModel.prototype.dispose = function () {
        this.locString.onSearchChanged = undefined;
    };
    return StringEditorViewModel;
}());

function getSearchElement(element) {
    while (!!element && element.nodeName !== "SPAN") {
        var elements = element.parentElement.getElementsByClassName("sv-string-editor");
        element = elements.length > 0 ? elements[0] : undefined;
    }
    if (!!element && element.childNodes.length > 0)
        return element;
    return null;
}
function resetLocalizationSpan(element, locStr) {
    while (element.childNodes.length > 1) {
        element.removeChild(element.childNodes[1]);
    }
    element.childNodes[0].textContent = locStr.renderedHtml;
}
function applyLocStrOnSearchChanged(element, locStr) {
    locStr.onSearchChanged = function () {
        if (locStr.searchElement == undefined) {
            locStr.searchElement = getSearchElement(element);
        }
        if (locStr.searchElement == null)
            return;
        var el = locStr.searchElement;
        if (!locStr.highlightDiv) {
            locStr.highlightDiv = document.createElement("span");
            locStr.highlightDiv.style.backgroundColor = "lightgray";
        }
        if (locStr.searchIndex != undefined) {
            resetLocalizationSpan(el, locStr);
            var rng = document.createRange();
            rng.setStart(el.childNodes[0], locStr.searchIndex);
            rng.setEnd(el.childNodes[0], locStr.searchIndex + locStr.searchText.length);
            rng.surroundContents(locStr.highlightDiv);
        }
        else {
            resetLocalizationSpan(el, locStr);
            locStr.searchElement = undefined;
        }
    };
}
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register(survey_core__WEBPACK_IMPORTED_MODULE_1__["LocalizableString"].editableRenderer, {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var locStr = params.locString;
            applyLocStrOnSearchChanged(componentInfo.element, locStr);
            return new StringEditorViewModel(locStr);
        },
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/string-viewer/string-viewer.html":
/*!******************************************************************!*\
  !*** ./src/knockout/components/string-viewer/string-viewer.html ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko ifnot: locString.koHasHtml -->\n<span class=\"sv-string-viewer\" data-bind=\"text: locString.koRenderedHtml\"></span>\n<!-- /ko -->\n<!-- ko if: locString.koHasHtml -->\n<span class=\"sv-string-viewer\" data-bind=\"html: locString.koRenderedHtml\"></span>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/string-viewer/string-viewer.ts":
/*!****************************************************************!*\
  !*** ./src/knockout/components/string-viewer/string-viewer.ts ***!
  \****************************************************************/
/*! exports provided: StringViewerViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringViewerViewModel", function() { return StringViewerViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./string-viewer.html */ "./src/knockout/components/string-viewer/string-viewer.html");
var StringViewerViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-string-viewer", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return {
                locString: params.locString
            };
        },
    },
    template: template
});


/***/ }),

/***/ "./src/knockout/components/survey-actions/survey-nav-button.html":
/*!***********************************************************************!*\
  !*** ./src/knockout/components/survey-actions/survey-nav-button.html ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko with: $data.item  -->\n  <input type=\"button\" data-bind=\"event: { mousedown: $data.data && $data.data.mouseDown }, value: $data.title, click: $data.action, visible: $data.visible, css: $data.innerCss, disable: $data.disabled\"/>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/survey-actions/survey-nav-button.ts":
/*!*********************************************************************!*\
  !*** ./src/knockout/components/survey-actions/survey-nav-button.ts ***!
  \*********************************************************************/
/*! exports provided: SurveyNavigationButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyNavigationButton", function() { return SurveyNavigationButton; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./survey-nav-button.html */ "./src/knockout/components/survey-actions/survey-nav-button.html");
var SurveyNavigationButton;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-nav-btn", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return params;
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/svg-icon/svg-icon.html":
/*!********************************************************!*\
  !*** ./src/knockout/components/svg-icon/svg-icon.html ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko if: hasIcon -->\n<svg class=\"sv-svg-icon\" data-bind=\"css: css, attr: { 'aria-label': title }\" role=\"img\"><use></use></svg>\n<!-- /ko -->\n";

/***/ }),

/***/ "./src/knockout/components/svg-icon/svg-icon.ts":
/*!******************************************************!*\
  !*** ./src/knockout/components/svg-icon/svg-icon.ts ***!
  \******************************************************/
/*! exports provided: SvgIconViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgIconViewModel", function() { return SvgIconViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./svg-icon.html */ "./src/knockout/components/svg-icon/svg-icon.html");
var SvgIconViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-svg-icon", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            knockout__WEBPACK_IMPORTED_MODULE_0__["computed"](function () {
                var iconName = knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.iconName);
                var element = componentInfo.element.querySelector && componentInfo.element.querySelector("svg") || componentInfo.element.nextElementSibling;
                if (iconName) {
                    Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createSvg"])(knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.size), knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.width), knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.height), iconName, element, knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.title));
                }
            });
            return {
                hasIcon: params.iconName,
                css: params.css,
                title: params.title
            };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/tagbox/tagbox-item.html":
/*!*********************************************************!*\
  !*** ./src/knockout/components/tagbox/tagbox-item.html ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div class=\"sv-tagbox__item\">\n  <div class=\"sv-tagbox__item-text\">\n    <!-- ko template: { name: 'survey-string', data: item.locText } -->\n    <!-- /ko -->\n  </div>\n  <div data-bind=\"css: question.cssClasses.cleanItemButton, click: removeItem\">\n    <sv-svg-icon params=\"iconName: question.cssClasses.cleanItemButtonIconId, css: question.cssClasses.cleanItemButtonSvg, size: 16\"></sv-svg-icon>\n  </div>\n</div>";

/***/ }),

/***/ "./src/knockout/components/tagbox/tagbox-item.ts":
/*!*******************************************************!*\
  !*** ./src/knockout/components/tagbox/tagbox-item.ts ***!
  \*******************************************************/
/*! exports provided: TagboxViewComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TagboxViewComponent", function() { return TagboxViewComponent; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../kobase */ "./src/knockout/kobase.ts");


var template = __webpack_require__(/*! ./tagbox-item.html */ "./src/knockout/components/tagbox/tagbox-item.html");
var TagboxViewComponent;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-tagbox-item", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var item = params.item;
            new _kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](item);
            return {
                item: item,
                question: params.question,
                removeItem: function (data, event) {
                    data.question.dropdownListModel.deselectItem(data.item.value);
                    event.stopPropagation();
                }
            };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/tagbox/tagbox.html":
/*!****************************************************!*\
  !*** ./src/knockout/components/tagbox/tagbox.html ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<div data-bind=\"css: question.koCss().selectWrapper\">\n  <!-- ko ifnot: question.isReadOnly -->\n  <div data-bind=\"css: question.getControlClass(),\n    click: click, \n    event: { keydown: keyhandler, blur: blur },\n    attr: { \n      id: question.inputId, \n      required: question.isRequired, \n      tabindex: model.inputReadOnly ? undefined : 0,\n      disabled: question.isInputReadOnly,\n      role: question.ariaRole,\n      'aria-required': question.ariaRequired, \n      'aria-label': question.ariaLabel, \n      'aria-invalid': question.ariaInvalid, \n      'aria-describedby': question.ariaDescribedBy \n    },\">\n    <div data-bind=\"css: question.cssClasses.controlValue\">\n      <!-- ko foreach: question.selectedChoices -->\n      <!-- ko component: { name: 'sv-tagbox-item', params: { item: $data, question: question } } -->\n      <!-- /ko -->\n      <!-- /ko -->\n      <input type=\"text\" autocomplete=\"off\" data-bind=\"textInput: model.filterString, \n       css: question.cssClasses.filterStringInput, \n       attr: { \n        size: !model.filterString ? 1 : null, \n        id: question.getInputId(), \n        'aria-label': question.placeholder,\n        placeholder: model.filterStringPlaceholder, \n        disabled: question.isInputReadOnly,\n        readonly: !model.searchEnabled \n      },\n       event: { keydown: inputKeyHandler, blur: blur }\"></input>\n    </div>\n    <!-- ko if: (question.allowClear && question.cssClasses.cleanButtonIconId) -->\n    <div data-bind=\"css: question.koCss().cleanButton, click: clear, visible: !question.isEmpty() \">\n      <!-- ko component: { name: 'sv-svg-icon', params: { css: question.cssClasses.cleanButtonSvg, iconName: question.cssClasses.cleanButtonIconId, size: 'auto', title: question.clearCaption } } -->\n      <!-- /ko -->\n    </div>\n    <!-- /ko -->\n  </div>\n  <!-- ko component: { name: \"sv-popup\", params: { model: model.popupModel }} -->\n  <!-- /ko -->\n  <!-- /ko -->\n  <!-- ko if: question.isReadOnly -->\n  <div disabled data-bind=\"css: question.getControlClass(), attr: { id: question.inputId }, \">\n    <div data-bind=\"text: question.readOnlyText\"></div>\n  </div>\n  <!-- /ko -->\n</div>";

/***/ }),

/***/ "./src/knockout/components/tagbox/tagbox.ts":
/*!**************************************************!*\
  !*** ./src/knockout/components/tagbox/tagbox.ts ***!
  \**************************************************/
/*! exports provided: TagboxViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TagboxViewModel", function() { return TagboxViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var src_knockout_kobase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/knockout/kobase */ "./src/knockout/kobase.ts");
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");



var template = __webpack_require__(/*! ./tagbox.html */ "./src/knockout/components/tagbox/tagbox.html");
var TagboxViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-tagbox", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var q = params.question;
            var click = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onClick(e);
            };
            var clear = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onClear(e);
            };
            var keyhandler = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.keyHandler(e);
                return true;
            };
            var blur = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(e);
            };
            var inputKeyHandler = function (_, e) {
                var _a;
                (_a = q.dropdownListModel) === null || _a === void 0 ? void 0 : _a.inputKeyHandler(e);
                return true;
            };
            if (!q.dropdownListModel) {
                q.dropdownListModel = new survey_core__WEBPACK_IMPORTED_MODULE_2__["DropdownMultiSelectListModel"](q);
            }
            new src_knockout_kobase__WEBPACK_IMPORTED_MODULE_1__["ImplementorBase"](q.dropdownListModel);
            return { question: q, model: q.dropdownListModel, click: click, clear: clear, keyhandler: keyhandler, blur: blur, inputKeyHandler: inputKeyHandler };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/template-renderer/template-renderer.html":
/*!**************************************************************************!*\
  !*** ./src/knockout/components/template-renderer/template-renderer.html ***!
  \**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko if: templateData.name -->\n  <!-- ko template: { name: templateData.name, data: templateData.data, afterRender: templateData.afterRender } -->\n  <!-- /ko -->\n<!-- /ko -->\n<!-- ko ifnot: templateData.name -->\n  <!-- ko template: { nodes: templateData.nodes || $componentTemplateNodes, data: templateData.data, afterRender: templateData.afterRender } -->\n  <!-- /ko -->\n<!-- /ko -->\n";

/***/ }),

/***/ "./src/knockout/components/template-renderer/template-renderer.ts":
/*!************************************************************************!*\
  !*** ./src/knockout/components/template-renderer/template-renderer.ts ***!
  \************************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./template-renderer.html */ "./src/knockout/components/template-renderer/template-renderer.html");
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register(survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"].TemplateRendererComponentName, {
    viewModel: {
        createViewModel: function (params) {
            return params;
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/title/title-actions.html":
/*!**********************************************************!*\
  !*** ./src/knockout/components/title/title-actions.html ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko ifnot: element.hasTitleActions -->\n  <!-- ko component: { name: 'survey-element-title-content', params: {element: element } } --><!-- /ko -->\n<!-- /ko -->\n<!-- ko if: element.hasTitleActions -->\n<div class=\"sv-title-actions\">\n  <span class=\"sv-title-actions__title\">\n    <!-- ko component: { name: 'survey-element-title-content', params: {element: element } } --><!-- /ko -->\n  </span>\n  <!-- ko component: { name: 'sv-action-bar', params: { model: toolbar } } -->\n  <!-- /ko -->\n</div>\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/title/title-actions.ts":
/*!********************************************************!*\
  !*** ./src/knockout/components/title/title-actions.ts ***!
  \********************************************************/
/*! exports provided: TitleActionViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TitleActionViewModel", function() { return TitleActionViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! ./title-actions.html */ "./src/knockout/components/title/title-actions.html");
var TitleActionViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-title-actions", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var element = params.element;
            return {
                element: element,
                toolbar: element.getTitleToolbar(),
            };
        },
    },
    template: template,
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory"].Instance.registerRenderer("element", "title-actions", "sv-title-actions");


/***/ }),

/***/ "./src/knockout/components/title/title-content.html":
/*!**********************************************************!*\
  !*** ./src/knockout/components/title/title-content.html ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<!-- ko if: element.isTitleRenderedAsString -->\n  <!-- ko template: { name: 'survey-string', data: element.locTitle } --><!-- /ko -->\n<!-- /ko -->\n<!-- ko ifnot: element.isTitleRenderedAsString -->\n  <!-- ko if: element.isRequireTextOnStart -->\n  <span\n    data-bind=\"css: element.koCss().requiredText || (element.koCss().panel && element.koCss().panel.requiredText), text: element.requiredText, attr: { 'aria-hidden': true }\"\n  ></span>\n  <!-- /ko -->\n  <!-- ko if: element.no -->\n  <span\n    style=\"position: static;\"\n    data-bind=\"css: element.koCss().number, text: element.no, attr: { 'aria-hidden': true }\"\n  ></span>\n  <span>&nbsp</span>\n  <!-- /ko -->\n  <!-- ko if: element.isRequireTextBeforeTitle -->\n  <span\n    data-bind=\"css: element.koCss().requiredText || (element.koCss().panel && element.koCss().panel.requiredText), text: element.requiredText, attr: { 'aria-hidden': true }\"\n  ></span>\n  <span>&nbsp</span>\n  <!-- /ko -->\n  <!-- ko template: { name: 'survey-string', data: element.locTitle } --><!-- /ko -->\n  <!-- ko if: element.isRequireTextAfterTitle -->\n  <span>&nbsp</span>\n  <span\n    data-bind=\"css: element.koCss().requiredText || (element.koCss().panel && element.koCss().panel.requiredText), text: element.requiredText, attr: { 'aria-hidden': true }\"\n  ></span>\n  <!-- /ko -->\n<!-- /ko -->";

/***/ }),

/***/ "./src/knockout/components/title/title-content.ts":
/*!********************************************************!*\
  !*** ./src/knockout/components/title/title-content.ts ***!
  \********************************************************/
/*! exports provided: TitleContentViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TitleContentViewModel", function() { return TitleContentViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var template = __webpack_require__(/*! ./title-content.html */ "./src/knockout/components/title/title-content.html");
var TitleContentViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("survey-element-title-content", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var element = params.element;
            return { element: element };
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/components/title/title-element.ts":
/*!********************************************************!*\
  !*** ./src/knockout/components/title/title-element.ts ***!
  \********************************************************/
/*! exports provided: TitleElementViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TitleElementViewModel", function() { return TitleElementViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var TitleElementViewModel;
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("survey-element-title", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var element = params.element;
            var rootEl = componentInfo.element;
            var titleEl = document.createElement(element.titleTagName);
            var ariaLabelAttr = !element.titleAriaLabel ? "" : "'aria-label': element.titleAriaLabel,";
            var bindings = "css: element.cssTitle, attr: { ".concat(ariaLabelAttr, " id: element.ariaTitleId, tabindex: element.titleTabIndex, 'aria-expanded': element.titleAriaExpanded, role:'columnheader' }");
            if (element.hasTitleEvents) {
                bindings += ", key2click";
            }
            titleEl.setAttribute("data-bind", bindings);
            titleEl.innerHTML = "<!-- ko component: { name: 'sv-title-actions', params: {element: element } } --><!-- /ko -->";
            var dummyNode = rootEl.nextSibling;
            rootEl.parentNode.insertBefore(document.createComment(" ko if: element.hasTitle "), dummyNode);
            rootEl.parentNode.insertBefore(titleEl, dummyNode);
            rootEl.parentNode.insertBefore(document.createComment(" /ko "), dummyNode);
            rootEl.parentNode.removeChild(dummyNode);
            return { element: element };
        },
    },
    template: "<span></span>",
});


/***/ }),

/***/ "./src/knockout/components/tooltip-error/tooltip-error.ts":
/*!****************************************************************!*\
  !*** ./src/knockout/components/tooltip-error/tooltip-error.ts ***!
  \****************************************************************/
/*! exports provided: TooltipErrorViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipErrorViewModel", function() { return TooltipErrorViewModel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var template = __webpack_require__(/*! html-loader?interpolate!val-loader!./tooltip-error.html */ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/components/tooltip-error/tooltip-error.html");
var TooltipErrorViewModel = /** @class */ (function () {
    function TooltipErrorViewModel(question) {
        var _this = this;
        this.question = question;
        this.afterRender = function (elements) {
            var tooltipElement = elements.filter(function (el) { return el instanceof HTMLElement; })[0];
            _this.tooltipManager = new survey_core__WEBPACK_IMPORTED_MODULE_1__["TooltipManager"](tooltipElement);
            knockout__WEBPACK_IMPORTED_MODULE_0__["utils"].domNodeDisposal.addDisposeCallback(elements[1], function () {
                _this.tooltipManager.dispose();
            });
        };
    }
    return TooltipErrorViewModel;
}());

knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("sv-tooltip-error", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            return new TooltipErrorViewModel(params.question);
        },
    },
    template: template,
});


/***/ }),

/***/ "./src/knockout/koPopupSurvey.ts":
/*!***************************************!*\
  !*** ./src/knockout/koPopupSurvey.ts ***!
  \***************************************/
/*! exports provided: PopupSurveyImplementor, PopupSurvey, SurveyWindow */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupSurveyImplementor", function() { return PopupSurveyImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupSurvey", function() { return PopupSurvey; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyWindow", function() { return SurveyWindow; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kobase */ "./src/knockout/kobase.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var koTemplate = __webpack_require__(/*! html-loader?interpolate!val-loader!./templates/window.html */ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/templates/window.html");
var PopupSurveyImplementor = /** @class */ (function (_super) {
    __extends(PopupSurveyImplementor, _super);
    function PopupSurveyImplementor(window) {
        var _this = _super.call(this, window) || this;
        _this.window = window;
        _this.window.showingChangedCallback = function () {
            _this.doShowingChanged();
        };
        _this.window["doExpand"] = function () {
            _this.window.changeExpandCollapse();
        };
        return _this;
    }
    PopupSurveyImplementor.prototype.doShowingChanged = function () {
        var windowElement = this.window.windowElement;
        if (this.window.isShowing) {
            windowElement.innerHTML = this.template;
            knockout__WEBPACK_IMPORTED_MODULE_0__["cleanNode"](windowElement);
            knockout__WEBPACK_IMPORTED_MODULE_0__["applyBindings"](this.window, windowElement);
            document.body.appendChild(windowElement);
        }
        else {
            document.body.removeChild(windowElement);
            windowElement.innerHTML = "";
        }
    };
    Object.defineProperty(PopupSurveyImplementor.prototype, "template", {
        get: function () {
            return this.window.templateValue ? this.window.templateValue : koTemplate;
        },
        enumerable: false,
        configurable: true
    });
    return PopupSurveyImplementor;
}(_kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyModel"].prototype["onCreating"] = function () {
    this.implementor = new PopupSurveyImplementor(this);
};
var PopupSurvey = /** @class */ (function (_super) {
    __extends(PopupSurvey, _super);
    function PopupSurvey(jsonObj, initialModel) {
        if (initialModel === void 0) { initialModel = null; }
        return _super.call(this, jsonObj, initialModel) || this;
    }
    return PopupSurvey;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyModel"]));

var SurveyWindow = /** @class */ (function (_super) {
    __extends(SurveyWindow, _super);
    function SurveyWindow() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return SurveyWindow;
}(PopupSurvey));



/***/ }),

/***/ "./src/knockout/kobase.ts":
/*!********************************!*\
  !*** ./src/knockout/kobase.ts ***!
  \********************************/
/*! exports provided: ImplementorBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImplementorBase", function() { return ImplementorBase; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);

var ImplementorBase = /** @class */ (function () {
    function ImplementorBase(element) {
        this.element = element;
        this.implementedMark = "__surveyImplementedKo";
        if (element[this.implementedMark]) {
            return;
        }
        element.iteratePropertiesHash(function (hash, key) {
            ImplementorBase.doIterateProperties(element, hash, key);
        });
        element.createArrayCoreHandler = function (hash, key) {
            var res = knockout__WEBPACK_IMPORTED_MODULE_0__["observableArray"]();
            res()["onArrayChanged"] = function () {
                if (element.isLoadingFromJson || element.isDisposed)
                    return;
                res.notifySubscribers();
            };
            hash[key] = res;
            return res();
        };
        element.getPropertyValueCoreHandler = function (hash, key) {
            if (hash[key] === undefined) {
                hash[key] = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]();
            }
            return typeof hash[key] === "function" ? hash[key]() : hash[key];
        };
        element.setPropertyValueCoreHandler = function (hash, key, val) {
            if (hash[key] !== undefined) {
                // if(hash[key]() === val) {
                //   hash[key].notifySubscribers();
                // }
                hash[key](val);
            }
            else {
                hash[key] = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](val);
            }
        };
        element[this.implementedMark] = true;
    }
    ImplementorBase.doIterateProperties = function (element, hash, key) {
        var val = hash[key];
        if (val === "function")
            return;
        if (Array.isArray(val)) {
            hash[key] = knockout__WEBPACK_IMPORTED_MODULE_0__["observableArray"](val);
            val["onArrayChanged"] = function () {
                if (element.isLoadingFromJson || element.isDisposed)
                    return;
                hash[key].notifySubscribers();
            };
        }
        else {
            hash[key] = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](val);
        }
    };
    ImplementorBase.prototype.dispose = function () {
        this.element.iteratePropertiesHash(function (hash, key) {
            hash[key] = knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](hash[key]);
            if (Array.isArray(hash[key])) {
                hash[key]["onArrayChanged"] = undefined;
            }
        });
        this.element.createArrayCoreHandler = undefined;
        this.element.getPropertyValueCoreHandler = undefined;
        this.element.setPropertyValueCoreHandler = undefined;
        delete this.element[this.implementedMark];
    };
    return ImplementorBase;
}());



/***/ }),

/***/ "./src/knockout/koflowpanel.ts":
/*!*************************************!*\
  !*** ./src/knockout/koflowpanel.ts ***!
  \*************************************/
/*! exports provided: FlowPanel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlowPanel", function() { return FlowPanel; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kobase */ "./src/knockout/kobase.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





var FlowPanel = /** @class */ (function (_super) {
    __extends(FlowPanel, _super);
    function FlowPanel(name) {
        if (name === void 0) { name = ""; }
        var _this = _super.call(this, name) || this;
        _this.koElementType = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]("survey-flowpanel");
        new _kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"](_this);
        _this.onCreating();
        var self = _this;
        _this.koElementAfterRender = function (el, con) {
            return self.elementAfterRender(el, con);
        };
        return _this;
    }
    FlowPanel.prototype.onCreating = function () { };
    FlowPanel.prototype.getHtmlForQuestion = function (question) {
        return ('<span question="true" contenteditable="false" id="flowpanel_' +
            question.name +
            '"><!-- ko template: { name: "survey-flowpanel-question", data: "' +
            question.name +
            '"} --><!-- /ko --></span>');
    };
    FlowPanel.prototype.elementAfterRender = function (elements, con) {
        if (!this.survey)
            return;
        var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
        if (!!el) {
            this.survey.afterRenderQuestion(con, el);
        }
    };
    return FlowPanel;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["FlowPanelModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("flowpanel", function () {
    return new FlowPanel();
});
/*
ElementFactory.Instance.registerElement("flowpanel", name => {
  return new FlowPanel(name);
});
*/
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("f-panel", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var self = this;
            var question = knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.question);
            self.element = componentInfo.element;
            self.element.innerHTML = question.html;
            self.isOnFocus = false;
            self.wasChanged = false;
            self.isContentUpdating = false;
            question.contentChangedCallback = function () {
                if (self.isContentUpdating)
                    return;
                knockout__WEBPACK_IMPORTED_MODULE_0__["cleanNode"](self.element);
                self.element.innerHTML = question.html;
                knockout__WEBPACK_IMPORTED_MODULE_0__["applyBindings"]({ question: question }, self.element);
                !!knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"] && knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
            };
            self.element.onfocus = function () {
                self.isOnFocus = true;
            };
            self.element.onblur = function () {
                if (self.wasChanged)
                    self.updateContent();
                self.isOnFocus = false;
                self.wasChanged = false;
            };
            self.element.ondragend = function (event) {
                var regEx = /{(.*?(element:)[^$].*?)}/g;
                var str = self.element.innerHTML;
                var res = regEx.exec(str);
                if (res !== null) {
                    var q = question.getQuestionFromText(res[0]);
                    if (!!q) {
                        question.content = self.getContent(q.name);
                    }
                }
            };
            self.updateContent = function () {
                self.isContentUpdating = true;
                question.content = self.getContent();
                self.isContentUpdating = false;
            };
            question.getContent = self.getContent = function (deletedName) {
                var content = document.createElement("DIV");
                content.innerHTML = self.element.innerHTML;
                var cps = content.querySelectorAll('span[question="true"]');
                for (var i = 0; i < cps.length; i++) {
                    var name = cps[i].id.replace("flowpanel_", "");
                    var html = "";
                    if (name !== deletedName) {
                        var el = question.getQuestionByName(name);
                        html = !!el ? question.getElementContentText(el) : "";
                    }
                    cps[i].outerHTML = html;
                }
                return content.innerHTML;
            };
            var config = {
                characterData: true,
                attributes: true,
                childList: true,
                subtree: true,
            };
            var callback = function (mutationsList, observer) {
                if (!self.isOnFocus)
                    return;
                self.wasChanged = true;
            };
            var observer = new MutationObserver(callback);
            observer.observe(self.element, config);
            return { question: question };
        },
    },
    template: "<div></div>",
});


/***/ }),

/***/ "./src/knockout/kopage.ts":
/*!********************************!*\
  !*** ./src/knockout/kopage.ts ***!
  \********************************/
/*! exports provided: QuestionRow, PanelImplementorBase, Panel, Page */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRow", function() { return QuestionRow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelImplementorBase", function() { return PanelImplementorBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Panel", function() { return Panel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return Page; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kobase */ "./src/knockout/kobase.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







var QuestionRow = /** @class */ (function (_super) {
    __extends(QuestionRow, _super);
    function QuestionRow(panel) {
        var _this = _super.call(this, panel) || this;
        _this.panel = panel;
        new _kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"](_this);
        var self = _this;
        _this.koElementAfterRender = function (el, con) {
            return self.elementAfterRender(el, con);
        };
        return _this;
    }
    QuestionRow.prototype.getElementType = function (el) {
        return el.isPanel ? "survey-panel" : "survey-question";
    };
    QuestionRow.prototype.koAfterRender = function (el, con) {
        for (var i = 0; i < el.length; i++) {
            var tEl = el[i];
            var nName = tEl.nodeName;
            if (nName == "#text")
                tEl.data = "";
        }
    };
    QuestionRow.prototype.elementAfterRender = function (elements, con) {
        var _this = this;
        if (!this.panel || !this.panel.survey)
            return;
        setTimeout(function () {
            !!knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"] && knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
            var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
            if (!el)
                return;
            var element = con;
            if (element.isDisposed)
                return;
            if (element.isPanel && _this.panel.survey) {
                _this.panel.survey.afterRenderPanel(con, el);
            }
            else {
                element.afterRender(el);
            }
        }, 0);
    };
    QuestionRow.prototype.rowAfterRender = function (elements, model) {
        if (!model.isNeedRender) {
            var rowContainerDiv_1 = elements[0].parentElement;
            var timer_1 = setTimeout(function () { return model.startLazyRendering(rowContainerDiv_1); }, 1);
            knockout__WEBPACK_IMPORTED_MODULE_0__["utils"].domNodeDisposal.addDisposeCallback(rowContainerDiv_1, function () {
                clearTimeout(timer_1);
                model.stopLazyRendering();
                model.isNeedRender = !model.isLazyRendering();
            });
        }
    };
    QuestionRow.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.koElementAfterRender = undefined;
    };
    return QuestionRow;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionRowModel"]));

var PanelImplementorBase = /** @class */ (function (_super) {
    __extends(PanelImplementorBase, _super);
    function PanelImplementorBase(panel) {
        var _this = _super.call(this, panel) || this;
        _this.panel = panel;
        return _this;
    }
    return PanelImplementorBase;
}(_kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"]));

var Panel = /** @class */ (function (_super) {
    __extends(Panel, _super);
    function Panel(name) {
        if (name === void 0) { name = ""; }
        var _this = _super.call(this, name) || this;
        _this.onCreating();
        var self = _this;
        _this.koElementType = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]("survey-panel");
        _this.koCss = knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            return self.cssClasses;
        });
        _this.koErrorClass = knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            return self.cssError;
        });
        return _this;
    }
    Panel.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new PanelImplementorBase(this);
    };
    Panel.prototype.createRow = function () {
        return new QuestionRow(this);
    };
    Panel.prototype.onCreating = function () { };
    Panel.prototype.onNumChanged = function (value) {
        this.locTitle.strChanged();
    };
    Panel.prototype.dispose = function () {
        this.koCss.dispose();
        this.koErrorClass.dispose();
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return Panel;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["PanelModel"]));

var Page = /** @class */ (function (_super) {
    __extends(Page, _super);
    function Page(name) {
        if (name === void 0) { name = ""; }
        var _this = _super.call(this, name) || this;
        _this.onCreating();
        return _this;
    }
    Page.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"](this);
    };
    Page.prototype.createRow = function () {
        return new QuestionRow(this);
    };
    Page.prototype.onCreating = function () { };
    Page.prototype.onNumChanged = function (value) {
        this.locTitle.strChanged();
    };
    Page.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this._implementor.dispose();
        this._implementor = undefined;
    };
    return Page;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["PageModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("panel", function () {
    return new Panel();
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("page", function () {
    return new Page();
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["ElementFactory"].Instance.registerElement("panel", function (name) {
    return new Panel(name);
});


/***/ }),

/***/ "./src/knockout/koquestion.ts":
/*!************************************!*\
  !*** ./src/knockout/koquestion.ts ***!
  \************************************/
/*! exports provided: QuestionImplementor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionImplementor", function() { return QuestionImplementor; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kobase */ "./src/knockout/kobase.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var QuestionImplementor = /** @class */ (function (_super) {
    __extends(QuestionImplementor, _super);
    function QuestionImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.question = question;
        _this._koValue = knockout__WEBPACK_IMPORTED_MODULE_0__["observableArray"]();
        _this.disposedObjects = [];
        _this.callBackFunctions = [];
        var isSynchronizing = false;
        _this._koValue.subscribe(function (newValue) {
            if (!isSynchronizing) {
                _this.setKoValue(newValue);
            }
        });
        Object.defineProperty(_this.question, "koValue", {
            get: function () {
                if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this._koValue(), _this.getKoValue(), false, true, false)) {
                    try {
                        isSynchronizing = true;
                        _this._koValue(_this.getKoValue());
                    }
                    finally {
                        isSynchronizing = false;
                    }
                }
                return _this._koValue;
            },
            enumerable: true,
            configurable: true,
        });
        question.surveyLoadCallback = function () {
            _this.onSurveyLoad();
        };
        _this.setObservaleObj("koTemplateName", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            return _this.getTemplateName();
        }));
        _this.setObservaleObj("koElementType", knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]("survey-question"));
        _this.setObservaleObj("koCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            return _this.question.cssClasses;
        }));
        _this.setObservaleObj("koRootCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            return _this.question.getRootCss();
        }));
        _this.setObservaleObj("koErrorClass", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            return _this.question.cssError;
        }));
        _this.koDummy = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](0);
        _this.setCallbackFunc("koQuestionAfterRender", function (el, con) {
            _this.koQuestionAfterRender(el, con);
        });
        return _this;
    }
    QuestionImplementor.prototype.setObservaleObj = function (name, obj, addToQuestion) {
        if (addToQuestion === void 0) { addToQuestion = true; }
        this.disposedObjects.push(name);
        if (addToQuestion) {
            this.question[name] = obj;
        }
        return obj;
    };
    QuestionImplementor.prototype.setCallbackFunc = function (name, func) {
        this.callBackFunctions.push(name);
        this.question[name] = func;
    };
    QuestionImplementor.prototype.getKoValue = function () {
        return this.question.value;
    };
    QuestionImplementor.prototype.setKoValue = function (val) {
        this.question.value = val;
    };
    QuestionImplementor.prototype.onSurveyLoad = function () { };
    QuestionImplementor.prototype.getQuestionTemplate = function () {
        return this.question.getTemplate();
    };
    QuestionImplementor.prototype.getTemplateName = function () {
        if (this.question.customWidget &&
            !this.question.customWidget.widgetJson.isDefaultRender)
            return "survey-widget-" + this.question.customWidget.name;
        return "survey-question-" + this.getQuestionTemplate();
    };
    QuestionImplementor.prototype.getNo = function () {
        return this.question.visibleIndex > -1
            ? this.question.visibleIndex + 1 + ". "
            : "";
    };
    QuestionImplementor.prototype.updateKoDummy = function () {
        if (this.question.isDisposed)
            return;
        this.koDummy(this.koDummy() + 1);
        this.question.locTitle.strChanged();
    };
    QuestionImplementor.prototype.koQuestionAfterRender = function (elements, con) {
        var _this = this;
        setTimeout(function () {
            !!knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"] && knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
            var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements, true);
            if (!!el) {
                _this.question.afterRenderQuestionElement(el);
                if (!!_this.question.customWidget) {
                    _this.question.customWidget.afterRender(_this.question, el);
                }
                knockout__WEBPACK_IMPORTED_MODULE_0__["utils"].domNodeDisposal.addDisposeCallback(el, function () {
                    _this.question.beforeDestroyQuestionElement(el);
                    if (!!_this.question.customWidget) {
                        try {
                            _this.question.customWidget.willUnmount(_this.question, el);
                        }
                        catch (_a) {
                            // eslint-disable-next-line no-console
                            console.warn("Custom widget will unmount failed");
                        }
                    }
                });
            }
        }, 0);
    };
    QuestionImplementor.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        for (var i_1 = 0; i_1 < this.disposedObjects.length; i_1++) {
            var name_1 = this.disposedObjects[i_1];
            var obj = this[name_1] || this.question[name_1];
            if (!obj)
                continue;
            if (this[name_1])
                this[name_1] = undefined;
            if (this.question[name_1])
                this.question[name_1] = undefined;
            if (obj["dispose"])
                obj.dispose();
        }
        this.disposedObjects = [];
        for (var i = 0; i < this.callBackFunctions.length; i++) {
            this.question[this.callBackFunctions[i]] = undefined;
        }
        this.callBackFunctions = [];
        this.question.unregisterPropertyChangedHandlers(["visibleIndex"]);
    };
    return QuestionImplementor;
}(_kobase__WEBPACK_IMPORTED_MODULE_2__["ImplementorBase"]));



/***/ }),

/***/ "./src/knockout/koquestion_baseselect.ts":
/*!***********************************************!*\
  !*** ./src/knockout/koquestion_baseselect.ts ***!
  \***********************************************/
/*! exports provided: QuestionSelectBaseImplementor, QuestionCheckboxBaseImplementor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectBaseImplementor", function() { return QuestionSelectBaseImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxBaseImplementor", function() { return QuestionCheckboxBaseImplementor; });
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

var QuestionSelectBaseImplementor = /** @class */ (function (_super) {
    __extends(QuestionSelectBaseImplementor, _super);
    function QuestionSelectBaseImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.onCreated();
        return _this;
    }
    QuestionSelectBaseImplementor.prototype.onCreated = function () { };
    Object.defineProperty(QuestionSelectBaseImplementor.prototype, "isOtherSelected", {
        get: function () {
            return this.question.isOtherSelected;
        },
        enumerable: false,
        configurable: true
    });
    return QuestionSelectBaseImplementor;
}(_koquestion__WEBPACK_IMPORTED_MODULE_0__["QuestionImplementor"]));

var QuestionCheckboxBaseImplementor = /** @class */ (function (_super) {
    __extends(QuestionCheckboxBaseImplementor, _super);
    function QuestionCheckboxBaseImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.setCallbackFunc("koAfterRender", _this.koAfterRender);
        return _this;
    }
    QuestionCheckboxBaseImplementor.prototype.koAfterRender = function (el, con) {
        var tEl = el[0];
        if (tEl.nodeName == "#text")
            tEl.data = "";
        tEl = el[el.length - 1];
        if (tEl.nodeName == "#text")
            tEl.data = "";
    };
    return QuestionCheckboxBaseImplementor;
}(QuestionSelectBaseImplementor));



/***/ }),

/***/ "./src/knockout/koquestion_boolean.ts":
/*!********************************************!*\
  !*** ./src/knockout/koquestion_boolean.ts ***!
  \********************************************/
/*! exports provided: QuestionBoolean */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionBoolean", function() { return QuestionBoolean; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var QuestionBoolean = /** @class */ (function (_super) {
    __extends(QuestionBoolean, _super);
    function QuestionBoolean(name) {
        return _super.call(this, name) || this;
    }
    QuestionBoolean.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionBoolean.prototype.onSwitchClick = function (data, event) {
        return _super.prototype.onSwitchClickModel.call(this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["getOriginalEvent"])(event));
    };
    QuestionBoolean.prototype.onTrueLabelClick = function (data, event) {
        return this.onLabelClick(event, true);
    };
    QuestionBoolean.prototype.onFalseLabelClick = function (data, event) {
        return this.onLabelClick(event, false);
    };
    QuestionBoolean.prototype.onKeyDown = function (data, event) {
        return this.onKeyDownCore(event);
    };
    QuestionBoolean.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionBoolean;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionBooleanModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("boolean", function () {
    return new QuestionBoolean("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("boolean", function (name) {
    return new QuestionBoolean(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_buttongroup.ts":
/*!************************************************!*\
  !*** ./src/knockout/koquestion_buttongroup.ts ***!
  \************************************************/
/*! exports provided: QuestionButtonGroup */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionButtonGroup", function() { return QuestionButtonGroup; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion_baseselect */ "./src/knockout/koquestion_baseselect.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var QuestionButtonGroup = /** @class */ (function (_super) {
    __extends(QuestionButtonGroup, _super);
    function QuestionButtonGroup(name) {
        return _super.call(this, name) || this;
    }
    QuestionButtonGroup.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__["QuestionCheckboxBaseImplementor"](this);
    };
    QuestionButtonGroup.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionButtonGroup;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionButtonGroupModel"]));

// Serializer.overrideClassCreator("buttongroup", function() {
//   return new QuestionButtonGroup("");
// });
// QuestionFactory.Instance.registerQuestion("buttongroup", name => {
//   var q = new QuestionButtonGroup(name);
//   q.choices = QuestionFactory.DefaultChoices;
//   return q;
// });


/***/ }),

/***/ "./src/knockout/koquestion_checkbox.ts":
/*!*********************************************!*\
  !*** ./src/knockout/koquestion_checkbox.ts ***!
  \*********************************************/
/*! exports provided: QuestionCheckboxImplementor, QuestionCheckbox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxImplementor", function() { return QuestionCheckboxImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckbox", function() { return QuestionCheckbox; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion_baseselect */ "./src/knockout/koquestion_baseselect.ts");
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





var QuestionCheckboxImplementor = /** @class */ (function (_super) {
    __extends(QuestionCheckboxImplementor, _super);
    function QuestionCheckboxImplementor(question) {
        return _super.call(this, question) || this;
    }
    QuestionCheckboxImplementor.prototype.getKoValue = function () {
        return this.question.renderedValue;
    };
    QuestionCheckboxImplementor.prototype.setKoValue = function (val) {
        this.question.renderedValue = val;
    };
    return QuestionCheckboxImplementor;
}(_koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__["QuestionCheckboxBaseImplementor"]));

var QuestionCheckbox = /** @class */ (function (_super) {
    __extends(QuestionCheckbox, _super);
    function QuestionCheckbox(name) {
        var _this = _super.call(this, name) || this;
        _this.isAllSelectedUpdating = false;
        _this.koAllSelected = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](_this.isAllSelected);
        _this.koAllSelected.subscribe(function (newValue) {
            if (_this.isAllSelectedUpdating)
                return;
            if (newValue)
                _this.selectAll();
            else
                _this.clearValue();
        });
        return _this;
    }
    QuestionCheckbox.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionCheckboxImplementor(this);
    };
    QuestionCheckbox.prototype.onSurveyValueChanged = function (newValue) {
        _super.prototype.onSurveyValueChanged.call(this, newValue);
        this.updateAllSelected();
    };
    QuestionCheckbox.prototype.onVisibleChoicesChanged = function () {
        _super.prototype.onVisibleChoicesChanged.call(this);
        this.updateAllSelected();
    };
    QuestionCheckbox.prototype.updateAllSelected = function () {
        this.isAllSelectedUpdating = true;
        this.koAllSelected(this.isAllSelected);
        this.isAllSelectedUpdating = false;
    };
    QuestionCheckbox.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        this.koAllSelected = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionCheckbox;
}(survey_core__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_2__["Serializer"].overrideClassCreator("checkbox", function () {
    return new QuestionCheckbox("");
});
survey_core__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].Instance.registerQuestion("checkbox", function (name) {
    var q = new QuestionCheckbox(name);
    q.choices = survey_core__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_comment.ts":
/*!********************************************!*\
  !*** ./src/knockout/koquestion_comment.ts ***!
  \********************************************/
/*! exports provided: QuestionComment */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionComment", function() { return QuestionComment; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionComment = /** @class */ (function (_super) {
    __extends(QuestionComment, _super);
    function QuestionComment(name) {
        return _super.call(this, name) || this;
    }
    QuestionComment.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionComment.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionComment;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionCommentModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("comment", function () {
    return new QuestionComment("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("comment", function (name) {
    return new QuestionComment(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_custom.ts":
/*!*******************************************!*\
  !*** ./src/knockout/koquestion_custom.ts ***!
  \*******************************************/
/*! exports provided: QuestionCustom, QuestionComposite */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCustom", function() { return QuestionCustom; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionComposite", function() { return QuestionComposite; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var QuestionCustom = /** @class */ (function (_super) {
    __extends(QuestionCustom, _super);
    function QuestionCustom(name, questionJSON) {
        return _super.call(this, name, questionJSON) || this;
    }
    QuestionCustom.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionCustom.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionCustom;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionCustomModel"]));

var QuestionComposite = /** @class */ (function (_super) {
    __extends(QuestionComposite, _super);
    function QuestionComposite(name, questionJSON) {
        return _super.call(this, name, questionJSON) || this;
    }
    QuestionComposite.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionComposite.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionComposite;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionCompositeModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.onCreateCustom = function (name, questionJSON) {
    return new QuestionCustom(name, questionJSON);
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.onCreateComposite = function (name, questionJSON) {
    return new QuestionComposite(name, questionJSON);
};


/***/ }),

/***/ "./src/knockout/koquestion_dropdown.ts":
/*!*********************************************!*\
  !*** ./src/knockout/koquestion_dropdown.ts ***!
  \*********************************************/
/*! exports provided: QuestionDropdown */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionDropdown", function() { return QuestionDropdown; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion_baseselect */ "./src/knockout/koquestion_baseselect.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





var QuestionDropdownImplementor = /** @class */ (function (_super) {
    __extends(QuestionDropdownImplementor, _super);
    function QuestionDropdownImplementor(question) {
        return _super.call(this, question) || this;
    }
    return QuestionDropdownImplementor;
}(_koquestion_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionSelectBaseImplementor"]));
var QuestionDropdown = /** @class */ (function (_super) {
    __extends(QuestionDropdown, _super);
    function QuestionDropdown(name) {
        var _this = _super.call(this, name) || this;
        _this.koDisableOption = function (option, item) {
            if (!item)
                return;
            knockout__WEBPACK_IMPORTED_MODULE_0__["applyBindingsToNode"](option, { disable: knockout__WEBPACK_IMPORTED_MODULE_0__["computed"](function () { return !item.isEnabled; }) }, item);
        };
        return _this;
    }
    QuestionDropdown.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionDropdownImplementor(this);
    };
    QuestionDropdown.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionDropdown;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionDropdownModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("dropdown", function () {
    return new QuestionDropdown("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("dropdown", function (name) {
    var q = new QuestionDropdown(name);
    q.choices = survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_empty.ts":
/*!******************************************!*\
  !*** ./src/knockout/koquestion_empty.ts ***!
  \******************************************/
/*! exports provided: QuestionEmpty */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionEmpty", function() { return QuestionEmpty; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var QuestionEmpty = /** @class */ (function (_super) {
    __extends(QuestionEmpty, _super);
    function QuestionEmpty(name) {
        return _super.call(this, name) || this;
    }
    QuestionEmpty.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionEmpty.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionEmpty;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionEmptyModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("empty", function () {
    return new QuestionEmpty("");
});


/***/ }),

/***/ "./src/knockout/koquestion_expression.ts":
/*!***********************************************!*\
  !*** ./src/knockout/koquestion_expression.ts ***!
  \***********************************************/
/*! exports provided: QuestionExpression */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionExpression", function() { return QuestionExpression; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionExpression = /** @class */ (function (_super) {
    __extends(QuestionExpression, _super);
    function QuestionExpression(name) {
        return _super.call(this, name) || this;
    }
    QuestionExpression.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionExpression.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionExpression;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionExpressionModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("expression", function () {
    return new QuestionExpression("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("expression", function (name) {
    return new QuestionExpression(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_file.ts":
/*!*****************************************!*\
  !*** ./src/knockout/koquestion_file.ts ***!
  \*****************************************/
/*! exports provided: QuestionFile */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionFile", function() { return QuestionFile; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionFileImplementor = /** @class */ (function (_super) {
    __extends(QuestionFileImplementor, _super);
    function QuestionFileImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.setObservaleObj("koState", knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]("empty"));
        _this.setObservaleObj("koHasValue", knockout__WEBPACK_IMPORTED_MODULE_0__["computed"](function () { return _this.question.koState() === "loaded"; }));
        _this.setObservaleObj("koData", knockout__WEBPACK_IMPORTED_MODULE_0__["computed"](function () {
            if (_this.question.koHasValue()) {
                return _this.question.previewValue;
            }
            return [];
        }));
        _this.setObservaleObj("koInputTitle", knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]());
        _this.setObservaleObj("koChooseFileCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            return _this.question.getChooseFileCss();
        }));
        _this.setCallbackFunc("ondrop", function (data, event) {
            _this.question.onDrop(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getOriginalEvent"])(event));
        });
        _this.setCallbackFunc("ondragover", function (data, event) {
            _this.question.onDragOver(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getOriginalEvent"])(event));
        });
        _this.setCallbackFunc("ondragenter", function (data, event) {
            _this.question.onDragEnter(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getOriginalEvent"])(event));
        });
        _this.setCallbackFunc("ondragleave", function (data, event) {
            _this.question.onDragLeave(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getOriginalEvent"])(event));
        });
        _this.setCallbackFunc("dochange", function (data, event) {
            _this.question.doChange(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getOriginalEvent"])(event));
        });
        _this.setCallbackFunc("doclean", function (data, event) {
            _this.question.doClean(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getOriginalEvent"])(event));
        });
        _this.setCallbackFunc("doremovefile", function (data, event) {
            _this.question.doRemoveFile(data);
        });
        _this.setCallbackFunc("dodownload", function (data, event) {
            _this.question.doDownloadFile(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getOriginalEvent"])(event), data);
            return true;
        });
        return _this;
    }
    return QuestionFileImplementor;
}(_koquestion__WEBPACK_IMPORTED_MODULE_2__["QuestionImplementor"]));
var QuestionFile = /** @class */ (function (_super) {
    __extends(QuestionFile, _super);
    function QuestionFile(name) {
        var _this = _super.call(this, name) || this;
        _this.updateState = function (sender, options) {
            _this.koState(options.state);
            _this.koInputTitle(_this.inputTitle);
        };
        _this.onUploadStateChanged.add(_this.updateState);
        _this.updateState(_this, { state: _this.currentState });
        return _this;
    }
    QuestionFile.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionFileImplementor(this);
    };
    QuestionFile.prototype.dispose = function () {
        this.onUploadStateChanged.remove(this.updateState);
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionFile;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFileModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("file", function () {
    return new QuestionFile("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("file", function (name) {
    return new QuestionFile(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_html.ts":
/*!*****************************************!*\
  !*** ./src/knockout/koquestion_html.ts ***!
  \*****************************************/
/*! exports provided: QuestionHtml */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionHtml", function() { return QuestionHtml; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionHtml = /** @class */ (function (_super) {
    __extends(QuestionHtml, _super);
    function QuestionHtml(name) {
        return _super.call(this, name) || this;
    }
    QuestionHtml.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionHtml.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionHtml;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionHtmlModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("html", function () {
    return new QuestionHtml("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("html", function (name) {
    return new QuestionHtml(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_image.ts":
/*!******************************************!*\
  !*** ./src/knockout/koquestion_image.ts ***!
  \******************************************/
/*! exports provided: QuestionImage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionImage", function() { return QuestionImage; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionImage = /** @class */ (function (_super) {
    __extends(QuestionImage, _super);
    function QuestionImage(name) {
        return _super.call(this, name) || this;
    }
    QuestionImage.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionImage.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionImage;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionImageModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("image", function () {
    return new QuestionImage("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("image", function (name) {
    return new QuestionImage(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_imagepicker.ts":
/*!************************************************!*\
  !*** ./src/knockout/koquestion_imagepicker.ts ***!
  \************************************************/
/*! exports provided: QuestionImagePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionImagePicker", function() { return QuestionImagePicker; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion_baseselect */ "./src/knockout/koquestion_baseselect.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionImagePickerImplementor = /** @class */ (function (_super) {
    __extends(QuestionImagePickerImplementor, _super);
    function QuestionImagePickerImplementor(question) {
        return _super.call(this, question) || this;
    }
    QuestionImagePickerImplementor.prototype.getKoValue = function () {
        return this.question.renderedValue;
    };
    return QuestionImagePickerImplementor;
}(_koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__["QuestionCheckboxBaseImplementor"]));
var QuestionImagePicker = /** @class */ (function (_super) {
    __extends(QuestionImagePicker, _super);
    function QuestionImagePicker(name) {
        return _super.call(this, name) || this;
    }
    QuestionImagePicker.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionImagePickerImplementor(this);
    };
    QuestionImagePicker.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionImagePicker;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionImagePickerModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("imagepicker", function () {
    return new QuestionImagePicker("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("imagepicker", function (name) {
    var q = new QuestionImagePicker(name);
    //q.choices = QuestionFactory.DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_matrix.ts":
/*!*******************************************!*\
  !*** ./src/knockout/koquestion_matrix.ts ***!
  \*******************************************/
/*! exports provided: QuestionMatrix */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrix", function() { return QuestionMatrix; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kobase */ "./src/knockout/kobase.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






var QuestionMatrix = /** @class */ (function (_super) {
    __extends(QuestionMatrix, _super);
    function QuestionMatrix(name) {
        var _this = _super.call(this, name) || this;
        _this.koVisibleRows = knockout__WEBPACK_IMPORTED_MODULE_0__["observableArray"]();
        _this.koVisibleColumns = knockout__WEBPACK_IMPORTED_MODULE_0__["observableArray"]();
        _this.koVisibleRows(_this.visibleRows);
        _this.koVisibleColumns(_this.visibleColumns);
        return _this;
    }
    QuestionMatrix.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_2__["QuestionImplementor"](this);
    };
    QuestionMatrix.prototype.onColumnsChanged = function () {
        _super.prototype.onColumnsChanged.call(this);
        this.koVisibleColumns(this.visibleColumns);
    };
    QuestionMatrix.prototype.onRowsChanged = function () {
        _super.prototype.onRowsChanged.call(this);
        this.koVisibleRows(this.visibleRows);
    };
    QuestionMatrix.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        this.onRowsChanged();
    };
    QuestionMatrix.prototype.onMatrixRowCreated = function (row) {
        new _kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"](row);
    };
    QuestionMatrix.prototype.getVisibleRows = function () {
        var rows = _super.prototype.getVisibleRows.call(this);
        this.koVisibleRows(rows);
        return rows;
    };
    QuestionMatrix.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        this.koVisibleRows = undefined;
        this.koVisibleColumns = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionMatrix;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("matrix", function () {
    return new QuestionMatrix("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("matrix", function (name) {
    var q = new QuestionMatrix(name);
    q.rows = survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultRows;
    q.columns = survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultColums;
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_matrixdropdown.ts":
/*!***************************************************!*\
  !*** ./src/knockout/koquestion_matrixdropdown.ts ***!
  \***************************************************/
/*! exports provided: QuestionMatrixBaseImplementor, QuestionMatrixDropdown, KoQuestionMatrixDropdownRenderedTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixBaseImplementor", function() { return QuestionMatrixBaseImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdown", function() { return QuestionMatrixDropdown; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KoQuestionMatrixDropdownRenderedTable", function() { return KoQuestionMatrixDropdownRenderedTable; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kobase */ "./src/knockout/kobase.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();








var QuestionMatrixBaseImplementor = /** @class */ (function (_super) {
    __extends(QuestionMatrixBaseImplementor, _super);
    function QuestionMatrixBaseImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.koRecalc = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](0);
        _this.matrix.onRenderedTableCreatedCallback = function (table) {
            if (!!_this._tableImplementor) {
                _this._tableImplementor.dispose();
            }
            _this._tableImplementor = new _kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"](table);
        };
        _this.matrix.onRenderedTableResetCallback = function () {
            if (_this.question.isDisposed)
                return;
            _this.koRecalc(_this.koRecalc() + 1);
        };
        _this.matrix.onAddColumn = function (column) {
            new _kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"](column);
        };
        _this.setObservaleObj("koTable", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.matrix.renderedTable;
        }));
        _this.setCallbackFunc("koCellAfterRender", function (el, con) {
            return _this.cellAfterRender(el, con);
        });
        _this.setCallbackFunc("koCellQuestionAfterRender", function (el, con) {
            return _this.cellQuestionAfterRender(el, con);
        });
        _this.setCallbackFunc("koAddRowClick", function () {
            _this.addRow();
        });
        _this.setCallbackFunc("koRemoveRowClick", function (data) {
            _this.removeRow(data.row);
        });
        _this.setCallbackFunc("koPanelAfterRender", function (el, con) {
            _this.panelAfterRender(el, con);
        });
        return _this;
    }
    Object.defineProperty(QuestionMatrixBaseImplementor.prototype, "matrix", {
        get: function () { return this.question; },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixBaseImplementor.prototype.getQuestionTemplate = function () {
        return "matrixdynamic";
    };
    QuestionMatrixBaseImplementor.prototype.cellAfterRender = function (elements, con) {
        var _this = this;
        if (!this.question.survey)
            return;
        setTimeout(function () {
            !!knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"] && knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
            var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
            if (!el)
                return;
            var cell = con;
            var options = {
                cell: cell.cell,
                cellQuestion: cell.question,
                htmlElement: el,
                row: cell.row,
                column: !!cell.cell ? cell.cell.column : null,
            };
            _this.question.survey.matrixAfterCellRender(_this.question, options);
        }, 0);
    };
    QuestionMatrixBaseImplementor.prototype.cellQuestionAfterRender = function (elements, con) {
        if (!this.question.survey)
            return;
        setTimeout(function () {
            !!knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"] && knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
            var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
            if (!el)
                return;
            var cell = con;
            if (cell.question.customWidget) {
                cell.question.customWidget.afterRender(cell.question, el);
                knockout__WEBPACK_IMPORTED_MODULE_0__["utils"].domNodeDisposal.addDisposeCallback(el, function () {
                    cell.question.customWidget.willUnmount(cell.question, el);
                });
            }
            cell.question.afterRenderQuestionElement(el);
        }, 0);
    };
    QuestionMatrixBaseImplementor.prototype.isAddRowTop = function () {
        return false;
    };
    QuestionMatrixBaseImplementor.prototype.isAddRowBottom = function () {
        return false;
    };
    QuestionMatrixBaseImplementor.prototype.addRow = function () { };
    QuestionMatrixBaseImplementor.prototype.removeRow = function (row) { };
    QuestionMatrixBaseImplementor.prototype.panelAfterRender = function (elements, con) {
        if (!this.question || !this.question.survey)
            return;
        var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
        this.question.survey.afterRenderPanel(con, el);
    };
    QuestionMatrixBaseImplementor.prototype.dispose = function () {
        if (!!this._tableImplementor) {
            this._tableImplementor.dispose();
        }
        this.matrix.onRenderedTableCreatedCallback = undefined;
        this.matrix.onRenderedTableResetCallback = undefined;
        this.matrix.onAddColumn = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionMatrixBaseImplementor;
}(_koquestion__WEBPACK_IMPORTED_MODULE_2__["QuestionImplementor"]));

var QuestionMatrixDropdown = /** @class */ (function (_super) {
    __extends(QuestionMatrixDropdown, _super);
    function QuestionMatrixDropdown(name) {
        return _super.call(this, name) || this;
    }
    QuestionMatrixDropdown.prototype.createRenderedTable = function () {
        return new KoQuestionMatrixDropdownRenderedTable(this);
    };
    QuestionMatrixDropdown.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionMatrixBaseImplementor(this);
    };
    QuestionMatrixDropdown.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this._implementor.dispose();
        this._implementor = undefined;
    };
    return QuestionMatrixDropdown;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixDropdownModel"]));

var KoQuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
    __extends(KoQuestionMatrixDropdownRenderedTable, _super);
    function KoQuestionMatrixDropdownRenderedTable() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    KoQuestionMatrixDropdownRenderedTable.prototype.createRenderedRow = function (cssClasses, isDetailRow) {
        if (isDetailRow === void 0) { isDetailRow = false; }
        var renderedRow = new survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixDropdownRenderedRow"](cssClasses, isDetailRow);
        new _kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"](renderedRow);
        return renderedRow;
    };
    return KoQuestionMatrixDropdownRenderedTable;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixDropdownRenderedTable"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("matrixdropdown", function () {
    return new QuestionMatrixDropdown("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("matrixdropdown", function (name) {
    var q = new QuestionMatrixDropdown(name);
    q.choices = [1, 2, 3, 4, 5];
    q.rows = survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultRows;
    survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixDropdownModelBase"].addDefaultColumns(q);
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_matrixdynamic.ts":
/*!**************************************************!*\
  !*** ./src/knockout/koquestion_matrixdynamic.ts ***!
  \**************************************************/
/*! exports provided: QuestionMatrixDynamicImplementor, QuestionMatrixDynamic */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamicImplementor", function() { return QuestionMatrixDynamicImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamic", function() { return QuestionMatrixDynamic; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion_matrixdropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion_matrixdropdown */ "./src/knockout/koquestion_matrixdropdown.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






var QuestionMatrixDynamicImplementor = /** @class */ (function (_super) {
    __extends(QuestionMatrixDynamicImplementor, _super);
    function QuestionMatrixDynamicImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.question["getKoPopupIsVisible"] = _this.getKoPopupIsVisible;
        return _this;
    }
    QuestionMatrixDynamicImplementor.prototype.addRow = function () {
        this.question.addRowUI();
    };
    QuestionMatrixDynamicImplementor.prototype.removeRow = function (row) {
        this.question.removeRowUI(row);
    };
    QuestionMatrixDynamicImplementor.prototype.getKoPopupIsVisible = function (row) {
        return knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](row.isDetailPanelShowing);
    };
    QuestionMatrixDynamicImplementor.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.question["getKoPopupIsVisible"] = undefined;
    };
    return QuestionMatrixDynamicImplementor;
}(_koquestion_matrixdropdown__WEBPACK_IMPORTED_MODULE_2__["QuestionMatrixBaseImplementor"]));

var QuestionMatrixDynamic = /** @class */ (function (_super) {
    __extends(QuestionMatrixDynamic, _super);
    function QuestionMatrixDynamic(name) {
        return _super.call(this, name) || this;
    }
    QuestionMatrixDynamic.prototype.createRenderedTable = function () {
        return new _koquestion_matrixdropdown__WEBPACK_IMPORTED_MODULE_2__["KoQuestionMatrixDropdownRenderedTable"](this);
    };
    QuestionMatrixDynamic.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionMatrixDynamicImplementor(this);
    };
    QuestionMatrixDynamic.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionMatrixDynamic;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixDynamicModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("matrixdynamic", function () {
    return new QuestionMatrixDynamic("");
});
// QuestionMatrixDropdownRenderedRow.prototype["onCreating"] = function() {
//   new ImplementorBase(this);
// };
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("matrixdynamic", function (name) {
    var q = new QuestionMatrixDynamic(name);
    q.choices = [1, 2, 3, 4, 5];
    q.rowCount = 2;
    survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixDropdownModelBase"].addDefaultColumns(q);
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_multipletext.ts":
/*!*************************************************!*\
  !*** ./src/knockout/koquestion_multipletext.ts ***!
  \*************************************************/
/*! exports provided: MultipleTextItem, QuestionMultipleTextImplementor, QuestionMultipleText */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultipleTextItem", function() { return MultipleTextItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleTextImplementor", function() { return QuestionMultipleTextImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleText", function() { return QuestionMultipleText; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
/* harmony import */ var _koquestion_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./koquestion_text */ "./src/knockout/koquestion_text.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






var MultipleTextItem = /** @class */ (function (_super) {
    __extends(MultipleTextItem, _super);
    function MultipleTextItem(name, title) {
        if (name === void 0) { name = null; }
        if (title === void 0) { title = null; }
        return _super.call(this, name, title) || this;
    }
    MultipleTextItem.prototype.createEditor = function (name) {
        return new _koquestion_text__WEBPACK_IMPORTED_MODULE_3__["QuestionText"](name);
    };
    return MultipleTextItem;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["MultipleTextItemModel"]));

var QuestionMultipleTextImplementor = /** @class */ (function (_super) {
    __extends(QuestionMultipleTextImplementor, _super);
    function QuestionMultipleTextImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.koRecalc = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](0);
        _this.setObservaleObj("koItemCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.getItemCss();
        }));
        _this.setObservaleObj("koItemTitleCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.getItemTitleCss();
        }));
        return _this;
    }
    return QuestionMultipleTextImplementor;
}(_koquestion__WEBPACK_IMPORTED_MODULE_2__["QuestionImplementor"]));

var QuestionMultipleText = /** @class */ (function (_super) {
    __extends(QuestionMultipleText, _super);
    function QuestionMultipleText(name) {
        var _this = _super.call(this, name) || this;
        _this.koRows = knockout__WEBPACK_IMPORTED_MODULE_0__["observableArray"](_this.getRows());
        _this.colCountChangedCallback = function () {
            _this.onColCountChanged();
        };
        _this.onColCountChanged();
        return _this;
    }
    QuestionMultipleText.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionMultipleTextImplementor(this);
    };
    QuestionMultipleText.prototype.onColCountChanged = function () {
        this.koRows(this.getRows());
    };
    QuestionMultipleText.prototype.createTextItem = function (name, title) {
        return new MultipleTextItem(name, title);
    };
    QuestionMultipleText.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        this.koRows = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionMultipleText;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMultipleTextModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("multipletextitem", function () {
    return new MultipleTextItem("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("multipletext", function () {
    return new QuestionMultipleText("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("multipletext", function (name) {
    var q = new QuestionMultipleText(name);
    survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionMultipleTextModel"].addDefaultItems(q);
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_paneldynamic.ts":
/*!*************************************************!*\
  !*** ./src/knockout/koquestion_paneldynamic.ts ***!
  \*************************************************/
/*! exports provided: QuestionPanelDynamicImplementor, QuestionPanelDynamic */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicImplementor", function() { return QuestionPanelDynamicImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamic", function() { return QuestionPanelDynamic; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var QuestionPanelDynamicImplementor = /** @class */ (function (_super) {
    __extends(QuestionPanelDynamicImplementor, _super);
    function QuestionPanelDynamicImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.koRecalc = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](0);
        _this.setCallbackFunc("koAddPanelClick", function () {
            _this.addPanel();
        });
        _this.setCallbackFunc("koRemovePanelClick", function (data) {
            _this.removePanel(data);
        });
        _this.setCallbackFunc("koPrevPanelClick", function () {
            _this.question.goToPrevPanel();
        });
        _this.setCallbackFunc("koNextPanelClick", function () {
            _this.question.goToNextPanel();
        });
        _this.setObservaleObj("koCanAddPanel", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.canAddPanel;
        }));
        _this.setObservaleObj("koCanRemovePanel", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.canRemovePanel;
        }));
        _this.setObservaleObj("koIsPrevButton", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.isPrevButtonShowing;
        }));
        _this.setObservaleObj("koIsNextButton", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.isNextButtonShowing;
        }));
        _this.setObservaleObj("koIsRange", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.isRangeShowing;
        }));
        _this.setObservaleObj("koPanel", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.currentPanel;
        }));
        _this.setObservaleObj("koIsList", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.isRenderModeList;
        }));
        _this.setObservaleObj("koIsProgressTop", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.isProgressTopShowing;
        }));
        _this.setObservaleObj("koIsProgressBottom", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.isProgressBottomShowing;
        }));
        var koRangeValue = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](_this.question.currentIndex);
        koRangeValue.subscribe(function (newValue) {
            _this.question.currentIndex = newValue;
        });
        _this.setObservaleObj("koRangeValue", koRangeValue);
        _this.setObservaleObj("koRangeMax", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.panelCount - 1;
        }));
        _this.setObservaleObj("koAddButtonCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.getAddButtonCss();
        }));
        _this.setObservaleObj("koPrevButtonCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.getPrevButtonCss();
        }));
        _this.setObservaleObj("koNextButtonCss", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.getNextButtonCss();
        }));
        _this.setObservaleObj("koProgressText", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.progressText;
        }));
        _this.setObservaleObj("koProgress", knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () {
            _this.koRecalc();
            return _this.question.progress;
        }));
        _this.setCallbackFunc("koPanelAfterRender", function (el, con) {
            _this.panelAfterRender(el, con);
        });
        _this.question.panelCountChangedCallback = function () {
            _this.onPanelCountChanged();
        };
        _this.question.renderModeChangedCallback = function () {
            _this.onRenderModeChanged();
        };
        _this.question.currentIndexChangedCallback = function () {
            _this.onCurrentIndexChanged();
        };
        return _this;
    }
    QuestionPanelDynamicImplementor.prototype.onPanelCountChanged = function () {
        this.onCurrentIndexChanged();
    };
    QuestionPanelDynamicImplementor.prototype.onRenderModeChanged = function () {
        this.onCurrentIndexChanged();
    };
    QuestionPanelDynamicImplementor.prototype.onCurrentIndexChanged = function () {
        if (this.question.isDisposed)
            return;
        this.koRecalc(this.koRecalc() + 1);
        this.question.koRangeValue(this.question.currentIndex);
    };
    QuestionPanelDynamicImplementor.prototype.addPanel = function () {
        this.question.addPanelUI();
    };
    QuestionPanelDynamicImplementor.prototype.removePanel = function (val) {
        if (!this.question.isRenderModeList) {
            val = this.question.currentPanel;
        }
        this.question.removePanelUI(val);
    };
    QuestionPanelDynamicImplementor.prototype.panelAfterRender = function (elements, con) {
        if (!this.question || !this.question.survey)
            return;
        var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
        this.question.survey.afterRenderPanel(con, el);
    };
    QuestionPanelDynamicImplementor.prototype.dispose = function () {
        this.question.panelCountChangedCallback = undefined;
        this.question.renderModeChangedCallback = undefined;
        this.question.currentIndexChangedCallback = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionPanelDynamicImplementor;
}(_koquestion__WEBPACK_IMPORTED_MODULE_2__["QuestionImplementor"]));

var QuestionPanelDynamic = /** @class */ (function (_super) {
    __extends(QuestionPanelDynamic, _super);
    function QuestionPanelDynamic(name) {
        return _super.call(this, name) || this;
    }
    QuestionPanelDynamic.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionPanelDynamicImplementor(this);
    };
    QuestionPanelDynamic.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionPanelDynamic;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionPanelDynamicModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("paneldynamic", function () {
    return new QuestionPanelDynamic("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("paneldynamic", function (name) {
    return new QuestionPanelDynamic(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_radiogroup.ts":
/*!***********************************************!*\
  !*** ./src/knockout/koquestion_radiogroup.ts ***!
  \***********************************************/
/*! exports provided: QuestionRadiogroup */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRadiogroup", function() { return QuestionRadiogroup; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion_baseselect */ "./src/knockout/koquestion_baseselect.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionRadiogroup = /** @class */ (function (_super) {
    __extends(QuestionRadiogroup, _super);
    function QuestionRadiogroup(name) {
        return _super.call(this, name) || this;
    }
    QuestionRadiogroup.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_1__["QuestionCheckboxBaseImplementor"](this);
    };
    QuestionRadiogroup.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionRadiogroup;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionRadiogroupModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("radiogroup", function () {
    return new QuestionRadiogroup("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("radiogroup", function (name) {
    var q = new QuestionRadiogroup(name);
    q.choices = survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_ranking.ts":
/*!********************************************!*\
  !*** ./src/knockout/koquestion_ranking.ts ***!
  \********************************************/
/*! exports provided: QuestionRanking */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRanking", function() { return QuestionRanking; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var QuestionRanking = /** @class */ (function (_super) {
    __extends(QuestionRanking, _super);
    function QuestionRanking() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.koHandleKeydown = function (data, event) {
            _this.handleKeydown(event, data);
            return true;
        };
        _this.koHandlePointerDown = function (data, event) {
            if (!_this.survey.isDesignMode)
                event.preventDefault();
            _this.handlePointerDown(event, data, event.currentTarget);
            return true;
        };
        return _this;
    }
    QuestionRanking.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionRanking.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionRanking;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionRankingModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("ranking", function () {
    return new QuestionRanking("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("ranking", function (name) {
    var q = new QuestionRanking(name);
    q.choices = survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_rating.ts":
/*!*******************************************!*\
  !*** ./src/knockout/koquestion_rating.ts ***!
  \*******************************************/
/*! exports provided: QuestionRatingImplementor, QuestionRating */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRatingImplementor", function() { return QuestionRatingImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRating", function() { return QuestionRating; });
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var QuestionRatingImplementor = /** @class */ (function (_super) {
    __extends(QuestionRatingImplementor, _super);
    function QuestionRatingImplementor(question) {
        var _this = _super.call(this, question) || this;
        _this.onCreated();
        return _this;
    }
    QuestionRatingImplementor.prototype.onCreated = function () { };
    return QuestionRatingImplementor;
}(_koquestion__WEBPACK_IMPORTED_MODULE_0__["QuestionImplementor"]));

var QuestionRating = /** @class */ (function (_super) {
    __extends(QuestionRating, _super);
    function QuestionRating(name) {
        return _super.call(this, name) || this;
    }
    QuestionRating.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new QuestionRatingImplementor(this);
    };
    QuestionRating.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionRating;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionRatingModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("rating", function () {
    return new QuestionRating("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("rating", function (name) {
    return new QuestionRating(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_signaturepad.ts":
/*!*************************************************!*\
  !*** ./src/knockout/koquestion_signaturepad.ts ***!
  \*************************************************/
/*! exports provided: QuestionSignaturePad */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePad", function() { return QuestionSignaturePad; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var QuestionSignaturePad = /** @class */ (function (_super) {
    __extends(QuestionSignaturePad, _super);
    function QuestionSignaturePad(name) {
        return _super.call(this, name) || this;
    }
    QuestionSignaturePad.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionSignaturePad.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionSignaturePad;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionSignaturePadModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("signaturepad", function () {
    return new QuestionSignaturePad("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("signaturepad", function (name) {
    return new QuestionSignaturePad(name);
});


/***/ }),

/***/ "./src/knockout/koquestion_tagbox.ts":
/*!*******************************************!*\
  !*** ./src/knockout/koquestion_tagbox.ts ***!
  \*******************************************/
/*! exports provided: QuestionTagbox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionTagbox", function() { return QuestionTagbox; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./koquestion_baseselect */ "./src/knockout/koquestion_baseselect.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





/*
export class QuestionCheckboxImplementor extends QuestionCheckboxBaseImplementor {
  constructor(question: Question) {
    super(question);
  }
  protected getKoValue() {
    return this.question.renderedValue;
  }
}
 */
var QuestionTagbox = /** @class */ (function (_super) {
    __extends(QuestionTagbox, _super);
    function QuestionTagbox(name) {
        var _this = _super.call(this, name) || this;
        _this.isAllSelectedUpdating = false;
        _this.koAllSelected = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](_this.isAllSelected);
        _this.koAllSelected.subscribe(function (newValue) {
            if (_this.isAllSelectedUpdating)
                return;
            if (newValue)
                _this.selectAll();
            else
                _this.clearValue();
        });
        return _this;
    }
    QuestionTagbox.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBaseImplementor"](this);
    };
    QuestionTagbox.prototype.onSurveyValueChanged = function (newValue) {
        _super.prototype.onSurveyValueChanged.call(this, newValue);
        this.updateAllSelected();
    };
    QuestionTagbox.prototype.onVisibleChoicesChanged = function () {
        _super.prototype.onVisibleChoicesChanged.call(this);
        this.updateAllSelected();
    };
    QuestionTagbox.prototype.updateAllSelected = function () {
        this.isAllSelectedUpdating = true;
        this.koAllSelected(this.isAllSelected);
        this.isAllSelectedUpdating = false;
    };
    QuestionTagbox.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        this.koAllSelected = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionTagbox;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionTagboxModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].overrideClassCreator("tagbox", function () {
    return new QuestionTagbox("");
});
survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("tagbox", function (name) {
    var q = new QuestionTagbox(name);
    q.choices = survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/knockout/koquestion_text.ts":
/*!*****************************************!*\
  !*** ./src/knockout/koquestion_text.ts ***!
  \*****************************************/
/*! exports provided: QuestionText */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionText", function() { return QuestionText; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _koquestion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./koquestion */ "./src/knockout/koquestion.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var QuestionText = /** @class */ (function (_super) {
    __extends(QuestionText, _super);
    function QuestionText(name) {
        return _super.call(this, name) || this;
    }
    QuestionText.prototype.onBaseCreating = function () {
        _super.prototype.onBaseCreating.call(this);
        this._implementor = new _koquestion__WEBPACK_IMPORTED_MODULE_1__["QuestionImplementor"](this);
    };
    QuestionText.prototype.dispose = function () {
        this._implementor.dispose();
        this._implementor = undefined;
        _super.prototype.dispose.call(this);
    };
    return QuestionText;
}(survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionTextModel"]));

survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].overrideClassCreator("text", function () {
    return new QuestionText("");
});
survey_core__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("text", function (name) {
    return new QuestionText(name);
});


/***/ }),

/***/ "./src/knockout/kosurvey.ts":
/*!**********************************!*\
  !*** ./src/knockout/kosurvey.ts ***!
  \**********************************/
/*! exports provided: SurveyImplementor, Survey, registerTemplateEngine */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyImplementor", function() { return SurveyImplementor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Survey", function() { return Survey; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerTemplateEngine", function() { return registerTemplateEngine; });
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! knockout */ "./node_modules/knockout/build/output/knockout-latest.js");
/* harmony import */ var knockout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(knockout__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _templateText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./templateText */ "./src/knockout/templateText.ts");
/* harmony import */ var _kobase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kobase */ "./src/knockout/kobase.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();









survey_core__WEBPACK_IMPORTED_MODULE_1__["CustomWidgetCollection"].Instance.onCustomWidgetAdded.add(function (customWidget) {
    if (customWidget.widgetJson.isDefaultRender)
        return;
    if (!customWidget.htmlTemplate)
        customWidget.htmlTemplate =
            "<div>'htmlTemplate' attribute is missed.</div>";
    new _templateText__WEBPACK_IMPORTED_MODULE_2__["SurveyTemplateText"]().replaceText(customWidget.htmlTemplate, "widget", customWidget.name);
});
var SurveyImplementor = /** @class */ (function (_super) {
    __extends(SurveyImplementor, _super);
    function SurveyImplementor(survey) {
        var _this = _super.call(this, survey) || this;
        _this.survey = survey;
        _this.survey.valueHashGetDataCallback = function (valuesHash, key) {
            if (valuesHash[key] === undefined) {
                valuesHash[key] = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]();
            }
            return knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](valuesHash[key]);
        };
        _this.survey.valueHashSetDataCallback = function (valuesHash, key, value) {
            if (knockout__WEBPACK_IMPORTED_MODULE_0__["isWriteableObservable"](valuesHash[key])) {
                valuesHash[key](value);
            }
            else {
                valuesHash[key] = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](value);
            }
        };
        _this.survey.valueHashDeleteDataCallback = function (valuesHash, key) {
            if (knockout__WEBPACK_IMPORTED_MODULE_0__["isWriteableObservable"](valuesHash[key])) {
                valuesHash[key](undefined);
            }
            else {
                delete valuesHash[key];
            }
        };
        _this.survey["koTitleTemplate"] = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"]("survey-header");
        _this.survey["koAfterRenderPage"] = function (elements, con) {
            var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
            if (!el)
                return;
            setTimeout(function () {
                !!knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"] && knockout__WEBPACK_IMPORTED_MODULE_0__["tasks"].runEarly();
                _this.survey.afterRenderPage(el);
            }, 0);
        };
        _this.survey["koAfterRenderHeader"] = function (elements, con) {
            var el = survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].GetFirstNonTextElement(elements);
            if (el)
                _this.survey.afterRenderHeader(el);
        };
        _this.survey.disposeCallback = function () {
            _this.dispose();
        };
        new _kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"](_this.survey.timerModel);
        return _this;
    }
    SurveyImplementor.prototype.render = function (element) {
        if (element === void 0) { element = null; }
        if (typeof knockout__WEBPACK_IMPORTED_MODULE_0__ === "undefined")
            throw new Error("knockoutjs library is not loaded.");
        var page = this.survey.activePage;
        if (!!page) {
            page.updateCustomWidgets();
        }
        this.survey.updateElementCss(false);
        if (element && typeof element === "string") {
            element = document.getElementById(element);
        }
        if (element) {
            this.renderedElement = element;
        }
        this.survey.startTimerFromUI();
        this.applyBinding();
    };
    SurveyImplementor.prototype.applyBinding = function () {
        if (!this.renderedElement)
            return;
        knockout__WEBPACK_IMPORTED_MODULE_0__["cleanNode"](this.renderedElement);
        knockout__WEBPACK_IMPORTED_MODULE_0__["renderTemplate"]("survey-content", this.survey, {}, this.renderedElement);
    };
    SurveyImplementor.prototype.koEventAfterRender = function (element, survey) {
        if (survey["needRenderIcons"]) {
            survey_core__WEBPACK_IMPORTED_MODULE_1__["SvgRegistry"].renderIcons();
        }
        survey.afterRenderSurvey(element);
    };
    SurveyImplementor.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        if (!!this.renderedElement) {
            knockout__WEBPACK_IMPORTED_MODULE_0__["cleanNode"](this.renderedElement);
            this.renderedElement.innerHTML = "";
        }
        this.survey["koAfterRenderPage"] = undefined;
        this.survey["koAfterRenderHeader"] = undefined;
        this.survey.iteratePropertiesHash(function (hash, key) {
            delete hash[key];
        });
    };
    return SurveyImplementor;
}(_kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"]));

// SurveyModel.prototype["onCreating"] = function() {
//   this.implementor = new SurveyImplementor(this);
// };
// SurveyModel.prototype["render"] = function(element: any = null) {
//   this.implementor.render(element);
// };
// SurveyModel.prototype["getHtmlTemplate"] = function(): string {
//   return koTemplate;t
// };
var Survey = /** @class */ (function (_super) {
    __extends(Survey, _super);
    function Survey(jsonObj, renderedElement) {
        if (jsonObj === void 0) { jsonObj = null; }
        if (renderedElement === void 0) { renderedElement = null; }
        var _this = _super.call(this, jsonObj, renderedElement) || this;
        _this.implementor = new SurveyImplementor(_this);
        return _this;
    }
    Survey.prototype.render = function (element) {
        if (element === void 0) { element = null; }
        this.implementor.render(element);
    };
    Survey.prototype.getHtmlTemplate = function () {
        return _templateText__WEBPACK_IMPORTED_MODULE_2__["koTemplate"];
    };
    Survey.prototype.makeReactive = function (obj) {
        new _kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"](obj);
    };
    return Survey;
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"]));

function ensureSurvey(survey) {
    if (!survey.implementor) {
        survey.implementor = new SurveyImplementor(survey);
        survey.render = function (element) {
            if (element === void 0) { element = null; }
            survey.implementor.render(element);
        };
        survey.getHtmlTemplate = function () {
            return _templateText__WEBPACK_IMPORTED_MODULE_2__["koTemplate"];
        };
        survey.makeReactive = function (obj) {
            new _kobase__WEBPACK_IMPORTED_MODULE_3__["ImplementorBase"](obj);
        };
    }
}
survey_core__WEBPACK_IMPORTED_MODULE_1__["LocalizableString"].prototype["onCreating"] = function () {
    var self = this;
    this.koHasHtml = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](this.hasHtml);
    this.koRenderedHtml = knockout__WEBPACK_IMPORTED_MODULE_0__["observable"](this.renderedHtml);
    this.onStringChanged.add(function () {
        var hasHtml = self.hasHtml;
        self.koHasHtml(hasHtml);
        self.koRenderedHtml(hasHtml ? self.getHtmlValue() : self.calculatedText);
    });
};
survey_core__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].prototype["onCreating"] = function () {
    var _this = this;
    // new ImplementorBase(this);
    this.koText = knockout__WEBPACK_IMPORTED_MODULE_0__["pureComputed"](function () { return _this.locText.koRenderedHtml(); });
};
knockout__WEBPACK_IMPORTED_MODULE_0__["components"].register("survey", {
    viewModel: {
        createViewModel: function (params, componentInfo) {
            var survey = knockout__WEBPACK_IMPORTED_MODULE_0__["unwrap"](params.survey);
            ensureSurvey(survey);
            setTimeout(function () {
                var surveyRoot = document.createElement("div");
                componentInfo.element.appendChild(surveyRoot);
                survey.render(surveyRoot);
            }, 1);
            // !!ko.tasks && ko.tasks.runEarly();
            return params.survey;
        },
    },
    template: _templateText__WEBPACK_IMPORTED_MODULE_2__["koTemplate"],
});
knockout__WEBPACK_IMPORTED_MODULE_0__["bindingHandlers"]["surveyProp"] = {
    update: function (element, valueAccessor, allBindingsAccessor) {
        var value = knockout__WEBPACK_IMPORTED_MODULE_0__["utils"].unwrapObservable(valueAccessor()) || {};
        for (var propName in value) {
            if (typeof propName == "string") {
                var propValue = knockout__WEBPACK_IMPORTED_MODULE_0__["utils"].unwrapObservable(value[propName]);
                element[propName] = propValue;
            }
        }
    },
};
survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"].platform = "knockout";
var registerTemplateEngine = function (ko, platform) {
    ko.surveyTemplateEngine = function () { };
    ko.surveyTemplateEngine.prototype = new ko.nativeTemplateEngine();
    ko.surveyTemplateEngine.prototype.makeTemplateSource = function (template, templateDocument) {
        if (typeof template === "string") {
            templateDocument = templateDocument || document;
            var templateElementRoot = templateDocument.getElementById("survey-content-" + platform);
            if (!templateElementRoot) {
                templateElementRoot = document.createElement("div");
                templateElementRoot.id = "survey-content-" + survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"].platform;
                templateElementRoot.style.display = "none";
                templateElementRoot.innerHTML = _templateText__WEBPACK_IMPORTED_MODULE_2__["koTemplate"];
                document.body.appendChild(templateElementRoot);
            }
            var elem;
            for (var i = 0; i < templateElementRoot.children.length; i++) {
                if (templateElementRoot.children[i].id === template) {
                    elem = templateElementRoot.children[i];
                    break;
                }
            }
            if (!elem) {
                elem = templateDocument.getElementById(template);
            }
            if (!elem) {
                return new ko.nativeTemplateEngine().makeTemplateSource(template, templateDocument);
            }
            return new ko.templateSources.domElement(elem);
        }
        else if (template.nodeType === 1 || template.nodeType === 8) {
            return new ko.templateSources.anonymousTemplate(template);
        }
        else {
            throw new Error("Unknown template type: " + template);
        }
    };
    // (<any>ko).surveyTemplateEngine.prototype.renderTemplateSource = function (templateSource: any, bindingContext: any, options: any, templateDocument: any) {
    //   var useNodesIfAvailable = !((<any>ko.utils).ieVersion < 9),
    //     templateNodesFunc = useNodesIfAvailable ? templateSource["nodes"] : null,
    //     templateNodes = templateNodesFunc ? templateSource["nodes"]() : null;
    //   if (templateNodes) {
    //     return (<any>ko.utils).makeArray(templateNodes.cloneNode(true).childNodes);
    //   } else {
    //     var templateText = templateSource["text"]();
    //     return (<any>ko.utils).parseHtmlFragment(templateText, templateDocument);
    //   }
    // };
    var surveyTemplateEngineInstance = new ko.surveyTemplateEngine();
    ko.setTemplateEngine(surveyTemplateEngineInstance);
};
knockout__WEBPACK_IMPORTED_MODULE_0__["bindingHandlers"]["key2click"] = {
    init: function (element, valueAccessor, allBindingsAccessor, viewModel) {
        var options = valueAccessor() || {
            processEsc: true,
            disableTabStop: false
        };
        if ((!!viewModel && viewModel.disableTabStop) || (!!options && options.disableTabStop)) {
            element.tabIndex = -1;
            return;
        }
        element.tabIndex = 0;
        element.onkeyup = function (evt) {
            evt.preventDefault();
            evt.stopPropagation();
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["doKey2ClickUp"])(evt, options);
            return false;
        };
        element.onkeydown = function (evt) { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["doKey2ClickDown"])(evt, options); };
        element.onblur = function (evt) { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["doKey2ClickBlur"])(evt); };
    },
};


/***/ }),

/***/ "./src/knockout/templateText.ts":
/*!**************************************!*\
  !*** ./src/knockout/templateText.ts ***!
  \**************************************/
/*! exports provided: koTemplate, SurveyTemplateText */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "koTemplate", function() { return koTemplate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTemplateText", function() { return SurveyTemplateText; });
var koTemplate = __webpack_require__(/*! html-loader?interpolate!val-loader!./templates/entry.html */ "./node_modules/html-loader/index.js?interpolate!./node_modules/val-loader/index.js!./src/knockout/templates/entry.html");
var SurveyTemplateText = /** @class */ (function () {
    function SurveyTemplateText() {
    }
    SurveyTemplateText.prototype.addText = function (newText, id, name) {
        id = this.getId(id, name);
        this.text =
            this.text +
                '<script type="text/html" ' +
                id +
                ">" +
                newText +
                "</script>";
    };
    SurveyTemplateText.prototype.replaceText = function (replaceText, id, questionType) {
        if (questionType === void 0) { questionType = null; }
        var posId = this.getId(id, questionType);
        var pos = this.text.indexOf(posId);
        if (pos < 0) {
            this.addText(replaceText, id, questionType);
            return;
        }
        pos = this.text.indexOf(">", pos);
        if (pos < 0)
            return;
        var startPos = pos + 1;
        var endString = "</script>";
        pos = this.text.indexOf(endString, startPos);
        if (pos < 0)
            return;
        this.text =
            this.text.substring(0, startPos) + replaceText + this.text.substring(pos);
    };
    SurveyTemplateText.prototype.getId = function (id, questionType) {
        var result = 'id="survey-' + id;
        if (questionType) {
            result += "-" + questionType;
        }
        return result + '"';
    };
    Object.defineProperty(SurveyTemplateText.prototype, "text", {
        get: function () {
            return koTemplate;
        },
        set: function (value) {
            koTemplate = value;
        },
        enumerable: false,
        configurable: true
    });
    return SurveyTemplateText;
}());



/***/ }),

/***/ "./src/knockout/templates/comment.html":
/*!*********************************************!*\
  !*** ./src/knockout/templates/comment.html ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-comment\">\n  <!--ko if: !question.isReadOnlyRenderDiv() -->\n<textarea data-bind=\"attr: { maxLength: question.getOthersMaxLength(), 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, placeholder: question.commentOrOtherPlaceholder }, \n        event: { input: function(s, e) { $data.question.onCommentInput(s, e); } }, \n        value: $data.question.comment, \n        visible: $data.visible,\n        disable: $data.question.isInputReadOnly,\n        style: { resize: question.resizeStyle },\n        css: $data.question.koCss().other\"></textarea>\n<!--/ko-->\n\n<!--ko if: question.isReadOnlyRenderDiv() -->\n<div data-bind=\"text: question.comment\"></div>\n<!--/ko-->\n</script>";

/***/ }),

/***/ "./src/knockout/templates/flowpanel.html":
/*!***********************************************!*\
  !*** ./src/knockout/templates/flowpanel.html ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-flowpanel\">\n  <div data-bind=\"style: { flexBasis: renderWidth, flexGrow: 1, flexShrink: 1, width: renderWidth, minWidth: $data.minWidth, maxWidth: $data.maxWidth }, attr: { id: id }, css: cssClasses.panel.container\">\n      <h4 data-bind=\"visible: (processedTitle.length > 0), css: question.cssTitle\">\n          <!-- ko template: { name: 'survey-string', data: locTitle } -->\n          <!-- /ko -->\n      </h4>\n      <div data-bind=\"css: cssClasses.panel.description\">\n          <!-- ko template: { name: 'survey-string', data: locDescription } -->\n          <!-- /ko -->\n      </div>\n      <div data-bind=\"style: { paddingLeft: innerPaddingLeft }\"></div>\n      <f-panel params=\"question: question\" data-bind=\"attr: { contenteditable : question.isDesignMode, placeHolder: question.placeHolder }\"></f-panel>\n  </div>\n</script>\n<script type=\"text/html\" id=\"survey-flowpanel-question\">\n  <!-- ko with: $parent.question.getQuestionByName($data) -->\n    <!-- ko template: { name: koElementType(), data: $data, as: 'question', afterRender: parent.koElementAfterRender } --><!-- /ko -->\n  <!-- /ko -->\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/header.html":
/*!********************************************!*\
  !*** ./src/knockout/templates/header.html ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-header\">\n  <!-- ko if: renderedHasHeader -->\n<div data-bind=\"css: css.header\">\n  <!-- ko if: isLogoBefore -->\n  <!-- ko component: { name: getElementWrapperComponentName($data, 'logo-image'), params: getElementWrapperComponentData($data, 'logo-image') } -->\n  <!-- /ko -->\n  <!-- /ko -->\n\n  <!-- ko if: renderedHasTitle -->\n  <div data-bind=\"css: css.headerText, style: { maxWidth: titleMaxWidth }\">\n    <!-- ko component: { name: 'survey-element-title', params: {element: $data } } -->\n    <!-- /ko -->\n    <!-- ko if: renderedHasDescription -->\n    <h5 data-bind=\"css: css.description\">\n      <!-- ko template: { name: 'survey-string', data: locDescription } -->\n      <!-- /ko -->\n    </h5>\n    <!-- /ko -->\n  </div>\n  <!-- /ko -->\n\n  <!-- ko if: isLogoAfter -->\n  <!-- ko component: { name: getElementWrapperComponentName($data, 'logo-image'), params: getElementWrapperComponentData($data, 'logo-image') } -->\n  <!-- /ko -->\n  <!-- /ko -->\n  <div data-bind=\"css: css.headerClose\"></div>\n</div>\n<!-- /ko -->\n</script>";

/***/ }),

/***/ "./src/knockout/templates/index.html":
/*!*******************************************!*\
  !*** ./src/knockout/templates/index.html ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-content\">\n    <!-- ko template: { name: \"survey-content-template\", afterRender: $data.implementor.koEventAfterRender } -->\n    <!-- /ko -->\n</script>\n\n<script type=\"text/html\" id=\"survey-content-template\">\n  <div data-bind=\"css: rootCss\">\n      <form onsubmit=\"return false;\">\n          <div class=\"sv_custom_header\" data-bind=\"visible: !hasLogo\"></div>\n          <div data-bind=\"css: containerCss\">\n              <!-- ko template: { name: koTitleTemplate, afterRender: koAfterRenderHeader } -->\n              <!-- /ko -->\n              <!-- ko if: isShowingPage -->\n              <!-- ko if: isTimerPanelShowingOnTop && !isShowStartingPage -->\n              <!-- ko template: { name: 'survey-timerpanel' } -->\n              <!-- /ko -->\n              <!-- /ko -->\n              <!-- ko if: isShowProgressBarOnTop && !isShowStartingPage -->\n              <!-- ko component: { name: 'sv-progress-' + progressBarType, params: { model: $data } } -->\n              <!-- /ko -->\n              <!-- /ko -->\n              <div data-bind=\"css: bodyCss, style:{maxWidth: renderedWidth}\">\n                  <!-- ko if: isNavigationButtonsShowingOnTop -->\n                    <!-- ko component: { name: 'sv-action-bar', params: { model: navigationBar } } --><!-- /ko -->\n                  <!-- /ko -->\n                  <!-- ko if: activePage -->\n                    <div data-bind=\"attr: { id: activePage.id }, template: { name: 'survey-page', data: activePage, afterRender: koAfterRenderPage }\"></div>\n                    <!-- ko if: activePage.rows.length == 0 && $data.emptyPageTemplate -->\n                    <!-- ko template: { name: emptyPageTemplate, data: $data.emptyPageTemplateData || $data } -->\n                    <!-- /ko -->\n                    <!-- /ko -->\n                  <!-- /ko -->\n                  <!-- ko if: isShowProgressBarOnBottom && !isShowStartingPage -->\n                  <!-- ko component: { name: 'sv-progress-' + progressBarType, params: { model: $data } } -->\n                  <!-- /ko -->\n                  <!-- /ko -->\n                  <!-- ko if: isNavigationButtonsShowingOnBottom -->\n                    <!-- ko component: { name: 'sv-action-bar', params: { model: navigationBar } } --><!-- /ko -->\n                  <!-- /ko -->\n              </div>\n              <!-- ko if: isTimerPanelShowingOnBottom && !isShowStartingPage -->\n              <!-- ko template: { name: 'survey-timerpanel' } -->\n              <!-- /ko -->\n              <!-- /ko -->\n              <!-- /ko -->\n              <!-- ko if: state == \"completed\" && showCompletedPage -->\n              <div data-bind=\"html: processedCompletedHtml, css: completedCss\"></div>\n              <div data-bind=\"visible: completedState != '', css: css.saveData.root\">\n                  <div data-bind=\"css: completedStateCss\">\n                      <span data-bind=\"text:completedStateText\"></span>\n                      <input type=\"button\" data-bind=\"visible: completedState == 'error', value: getLocalizationString('saveAgainButton'), click: doComplete, css: css.saveData.saveAgainButton\"/>\n                  </div>\n              </div>\n              <!-- /ko -->\n              <!-- ko if: state == \"completedbefore\" -->\n              <div data-bind=\"html: processedCompletedBeforeHtml, css: css.body\"></div>\n              <!-- /ko -->\n              <!-- ko if: state == \"loading\" -->\n              <div data-bind=\"html: processedLoadingHtml, css: css.body\"></div>\n              <!-- /ko -->\n              <!-- ko if: state == \"empty\" -->\n              <div data-bind=\"text:emptySurveyText, css: css.bodyEmpty\"></div>\n              <!-- /ko -->\n          </div>\n      </form>\n      <!-- ko if: showBrandInfo -->\n      <sv-brand-info></sv-brand-info>\n      <!-- /ko -->\n  </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/page.html":
/*!******************************************!*\
  !*** ./src/knockout/templates/page.html ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-page\">\n  <div data-bind=\"css: cssRoot\">\n    <!-- ko component: { name: 'survey-element-title', params: {element: $data } } --><!-- /ko -->\n    <!-- ko if: _showDescription-->\n    <div\n      data-bind=\"visible: data.showPageTitles, css: cssClasses.page.description\"\n    >\n      <!-- ko template: { name: 'survey-string', data: locDescription } -->\n      <!-- /ko -->\n    </div>\n    <!-- /ko -->\n    <!-- ko template: { name: 'survey-rows', data: $data} -->\n    <!-- /ko -->\n  </div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/panel.html":
/*!*******************************************!*\
  !*** ./src/knockout/templates/panel.html ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-panel\">\n  <!-- ko if: $data.isVisible -->\n  <div\n    data-bind=\"attr: { id: id }, css: $data.getContainerCss(), event: {focusin: focusIn}\"\n  >\n    <!-- ko if: hasDescription || hasTitle  -->\n        <!--ko template: { name: 'survey-question-title', data: $data  } --><!-- /ko -->\n    <!-- /ko -->\n    <!-- ko template: { name: 'survey-question-errors', data: $data } -->\n    <!-- /ko -->\n    <!-- ko if: state != \"collapsed\" -->\n    <div\n      data-bind=\"style: { paddingLeft: innerPaddingLeft }, css: cssClasses.panel.content, attr: {id:contentId}\"\n    >\n      <!-- ko template: { name: 'survey-rows', data: $data} -->\n      <!-- /ko -->\n      <!-- ko component: { name: 'sv-action-bar', params: { model: getFooterToolbar() } } -->\n      <!-- /ko -->\n    </div>\n    <!-- /ko -->\n  </div>\n  <!-- /ko -->\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/popup-pointer.html":
/*!***************************************************!*\
  !*** ./src/knockout/templates/popup-pointer.html ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"popup-pointer\">\n  <span class=\"sv-popup__pointer\" data-bind=\"style: { left: pointerTarget.left, top: pointerTarget.top }\"></span>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-boolean.html":
/*!******************************************************!*\
  !*** ./src/knockout/templates/question-boolean.html ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-boolean\">\n  <div data-bind=\"css: question.koCss().root, event: { keydown: question.onKeyDown}\">\n    <label data-bind=\"css: question.getItemCss()\">\n      <input\n        type=\"checkbox\"\n        data-bind=\"value: question.booleanValue, css: question.koCss().control, attr: {name: question.name, id: question.inputId, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy}, checked: question.booleanValue, surveyProp: {indeterminate: question.isIndeterminate}, enable: !question.isInputReadOnly\"\n      />\n      <span\n        data-bind=\"css: question.getLabelCss(false), click: onFalseLabelClick\"\n        ><!-- ko template: { name: 'survey-string', data: locLabelFalse } --><!-- /ko --></span\n      >\n      <div data-bind=\"css: question.koCss().switch, click: onSwitchClick\">\n        <span data-bind=\"css: question.koCss().slider\">\n            <!-- ko if: question.koCss().sliderText && question.isDeterminated -->\n            <span data-bind=\"css: question.koCss().sliderText\">\n              <!-- ko template: { name: 'survey-string', data: question.getCheckedLabel() } --><!-- /ko -->\n            </span>\n            <!-- /ko -->\n        </span>\n      </div>\n      <span\n        data-bind=\"css: question.getLabelCss(true), click: onTrueLabelClick\"\n        ><!-- ko template: { name: 'survey-string', data: locLabelTrue } --><!-- /ko --></span\n      >\n    </label>\n  </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-buttongroup.html":
/*!**********************************************************!*\
  !*** ./src/knockout/templates/question-buttongroup.html ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-buttongroup\">\n  <div role=\"group\" data-bind=\"css: question.koCss().root\">\n      <!-- ko foreach: question.visibleChoices -->\n        <!-- ko component: { name: 'sv-button-group-item', params: { question: question, item: $data, index: $index } } -->\n        <!-- /ko -->\n      <!-- /ko -->\n    </div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-checkbox.html":
/*!*******************************************************!*\
  !*** ./src/knockout/templates/question-checkbox.html ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-checkbox\">\n  <fieldset data-bind=\"css: question.getSelectBaseRootCss()\" role=\"presentation\">\n      <legend role=\"presentation\" class=\"sv-hidden\"></legend>\n      <!-- ko if: question.hasHeadItems  -->\n        <!-- ko foreach: { data: question.headItems, as: 'item', afterRender: question.koAfterRender }  -->\n          <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n          <!-- /ko -->\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko ifnot: question.hasColumns  -->\n        <!-- ko if: question.blockedRow -->\n        <div data-bind=\"css: question.koCss().rootRow\">\n          <!-- ko foreach: { data: question.dataChoices, as: 'item', afterRender: question.koAfterRender }  -->\n          <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n          <!-- /ko -->\n          <!-- /ko -->\n        </div>\n        <!-- /ko -->\n        <!-- ko ifnot: question.blockedRow -->\n        <!-- ko foreach: { data: question.bodyItems, as: 'item', afterRender: question.koAfterRender }  -->\n          <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n          <!-- /ko -->\n        <!-- /ko -->\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: question.hasColumns  -->\n        <div data-bind=\"css: question.koCss().rootMultiColumn\">\n        <!-- ko foreach: question.columns -->\n            <div data-bind=\"css: question.getColumnClass()\" role=\"presentation\">\n            <!-- ko foreach: { data: $data, as: 'item', afterRender: question.koAfterRender }  -->\n              <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n              <!-- /ko -->\n            <!-- /ko -->\n            </div>\n        <!-- /ko -->\n        </div>\n      <!-- /ko -->\n      <!-- ko if: question.hasFootItems  -->\n        <!-- ko foreach: { data: question.footItems, as: 'item', afterRender: question.koAfterRender }  -->\n          <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n          <!-- /ko -->\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: question.hasOther && question.isOtherSelected -->\n      <div class=\"form-group\" data-bind=\"template: { name: 'survey-comment', data: {'question': question, 'visible': question.isOtherSelected } }\"></div>\n      <!-- /ko -->\n    </fieldset>\n</script>\n<script type=\"text/html\" id=\"survey-checkbox-item\">\n  <div role=\"presentation\" data-bind=\"css: question.getItemClass(item)\">\n      <label data-bind=\"css: question.getLabelClass(item), attr: { 'aria-label': question.getAriaItemLabel(item) }\">\n          <!-- ko if: item == question.selectAllItem -->\n          <input role=\"option\" type=\"checkbox\" value=\"\" data-bind=\"attr: {name: question.name, id: question.getItemId(item), 'aria-describedby': question.ariaDescribedBy }, checked: question.koAllSelected, enable: question.getItemEnabled(item), css: question.koCss().itemControl\"/>\n          <!-- /ko -->\n          <!-- ko if: item != question.selectAllItem -->\n          <input role=\"option\" type=\"checkbox\" data-bind=\"attr: {name: question.name, id: question.getItemId(item), 'aria-describedby': question.ariaDescribedBy }, checkedValue: item.value, checked: question.koValue, enable: question.getItemEnabled(item), css: question.koCss().itemControl\"/>\n          <!-- /ko -->\n              <!-- ko if: question.koCss().materialDecorator -->\n              <span data-bind=\"css: question.koCss().materialDecorator\">\n                <!-- ko if: question.itemSvgIcon -->\n                <svg data-bind=\"css:question.koCss().itemDecorator\">\n                  <use data-bind=\"attr:{'xlink:href':question.itemSvgIcon}\" xlink:href=''></use>\n                </svg>\n                <!-- /ko -->\n              </span>\n              <!-- /ko -->\n              <span data-bind=\"visible: !item.hideCaption, css: question.koCss().controlLabel\">\n              <!-- ko template: { name: 'survey-string', data: item.locText } -->\n              <!-- /ko -->\n          </span>\n      </label>\n  </div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-comment.html":
/*!******************************************************!*\
  !*** ./src/knockout/templates/question-comment.html ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-comment\">\n  <!--ko if: !question.isReadOnlyRenderDiv() -->\n<textarea data-bind=\"attr: {'readonly': question.renderedInputReadOnly, 'disabled': question.renderedInputDisabled, maxLength: question.getMaxLength(), cols: question.cols, rows: question.rows, id: question.inputId, placeholder: question.renderedPlaceholder, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy}, \n  event: { input: function(s, e) { question.onInput(e); }, keydown: function(s, e) { question.onKeyDown(e); return true; } }, \n  value: question.value, \n  style: { resize: question.resizeStyle },\n  css: question.className\"></textarea>\n<!--/ko-->\n\n<!--ko if: question.isReadOnlyRenderDiv() -->\n<div data-bind=\"text: question.value\"></div>\n<!--/ko-->\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-composite.html":
/*!********************************************************!*\
  !*** ./src/knockout/templates/question-composite.html ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-composite\">\n  <!-- ko template: { name: 'survey-panel', data: question.contentPanel, as: 'question', afterRender: question.contentPanel.koPanelAfterRender } -->\n  <!-- /ko -->\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-custom.html":
/*!*****************************************************!*\
  !*** ./src/knockout/templates/question-custom.html ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-custom\">\n  <!-- ko template: { name: question.contentQuestion.koTemplateName(), data: question.contentQuestion, as: 'question', afterRender: question.contentQuestion.koQuestionAfterRender } -->\n  <!-- /ko -->\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-dropdown.html":
/*!*******************************************************!*\
  !*** ./src/knockout/templates/question-dropdown.html ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-dropdown\">\n  <div data-bind=\"css: question.renderCssRoot\">\n    <!-- ko component: { name: 'sv-dropdown', params: { question: question } } -->\n    <!-- /ko -->\n  <!-- ko if: question.isOtherSelected -->\n  <div class=\"form-group\"\n    data-bind=\"template: { name: 'survey-comment', data: {'question': question, 'visible': question.isOtherSelected } }, style: {display: question.isFlowLayout ? 'inline': ''}\">\n  </div>\n  <!-- /ko -->\n  </div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-empty.html":
/*!****************************************************!*\
  !*** ./src/knockout/templates/question-empty.html ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-empty\">\n    <div></div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-errors.html":
/*!*****************************************************!*\
  !*** ./src/knockout/templates/question-errors.html ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-errors\">\n        <!-- ko if: hasVisibleErrors -->\n            <div role=\"alert\" aria-live=\"polite\" data-bind=\"visible: hasVisibleErrors, foreach: { data: errors, as: 'error' }, css: koErrorClass(), attr: { id: question.id + '_errors' }\">\n            <!-- ko if: error.visible -->\n            <div>   \n                <span aria-hidden=\"true\" data-bind=\"css: question.koCss().error.icon\"></span>\n                <span data-bind=\"css: question.koCss().error.item\">\n                    <!-- ko template: { name: 'survey-string', data: error.locText } --><!-- /ko -->\n                </span>\n            </div>\n            <!-- /ko -->\n        </div>\n        <!-- /ko -->\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-expression.html":
/*!*********************************************************!*\
  !*** ./src/knockout/templates/question-expression.html ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-expression\">\n  <div data-bind=\"text:question.formatedValue, css: question.koCss().root\"></div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-file.html":
/*!***************************************************!*\
  !*** ./src/knockout/templates/question-file.html ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-file\">\n  <div data-bind=\"css: question.fileRootCss\">\n      <!-- ko ifnot: question.isInputReadOnly -->\n      <input type=\"file\" data-bind=\"css: question.cssClasses.fileInput, attr: { id: question.inputId, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy, multiple: question.allowMultiple ? 'multiple' : undefined, title: koInputTitle, accept: question.acceptedTypes }, event: { change: question.dochange }\">\n      <!-- /ko -->\n      <!-- ko if: question.isReadOnly -->\n      <input type=\"file\" disabled data-bind=\"css: question.getReadOnlyFileCss(), attr: { id: question.inputId, placeholder: question.title, multiple: question.allowMultiple ? 'multiple' : undefined }\" style=\"color: transparent;\"/>\n      <!-- /ko -->\n      <div data-bind=\"css: question.cssClasses.dragArea, event: { dragenter: question.ondragenter, dragover: question.ondragover, drop: question.ondrop, dragleave: question.ondragleave }\">     \n        <div data-bind=\"css: question.getFileDecoratorCss()\">\n          <span data-bind=\"css: question.koCss().dragAreaPlaceholder, text: question.dragAreaPlaceholder\"></span>\n          <div data-bind=\"css: question.koCss().wrapper\">\n            <label tabindex=\"0\" role=\"button\" data-bind=\"css: question.koChooseFileCss, attr: { for: question.inputId, 'aria-label': question.chooseButtonCaption }\">\n              <span data-bind=\"text: question.chooseButtonCaption\"></span>\n              <!-- ko if: question.cssClasses.chooseFileIconId -->\n                  <!-- ko component: { name: 'sv-svg-icon', params: { title: question.chooseButtonCaption, iconName: question.cssClasses.chooseFileIconId, size: 'auto' } } --><!-- /ko -->\n              <!-- /ko -->\n            </label>\n            <!-- ko if: !question.koHasValue() -->\n            <span data-bind=\"css: question.koCss().noFileChosen, text: question.noFileChosenCaption\"></span>\n            <!-- /ko -->\n          </div>\n        </div>\n        <!-- ko template: { name: 'survey-question-file-clean-button', data: {question: question, showRemoveButton: question.showRemoveButton} } --><!-- /ko -->\n        <!-- ko if: question.showPreview -->\n        <!-- ko if: question.koHasValue -->\n        <div data-bind=\"css: question.cssClasses.fileList, foreach: question.koData, visible: question.koHasValue\">\n            <span data-bind=\"visible: question.isPreviewVisible($index()), css: question.cssClasses.preview\">\n              <!-- ko template: { name: 'survey-question-file-sign', data: {question: question, item: $data, fileSignCss: question.cssClasses.fileSign} } --><!-- /ko -->\n              <div data-bind=\"css: question.cssClasses.imageWrapper\">\n                <!-- ko if: question.canPreviewImage($data) -->\n                <img data-bind=\"attr: { src: $data.content }, style : { height: question.imageHeight, width: question.imageWidth }\" alt=\"File preview\">\n                <!-- /ko -->\n                <!-- ko if: question.defaultImage($data) -->\n                <!-- ko component: { name: 'sv-svg-icon', params: { css: question.cssClasses.defaultImage, iconName: question.cssClasses.defaultImageIconId, size: 'auto' } } --><!-- /ko -->\n                <!-- /ko -->\n                <!-- ko if: $data.name -->\n                <!-- ko ifnot: question.isReadOnly -->\n                <div data-bind=\"click: question.doremovefile, css: question.cssClasses.removeFileButton\">\n                    <span data-bind=\"css: question.cssClasses.removeFile, text: question.removeFileCaption\"></span>\n                    <!-- ko if: question.cssClasses.removeFileSvgIconId -->\n                      <!-- ko component: { name: 'sv-svg-icon', params: { css: question.cssClasses.removeFileSvg, title: question.removeFileCaption, iconName: question.cssClasses.removeFileSvgIconId, size: 'auto' } } --><!-- /ko -->\n                    <!-- /ko -->\n                </div>\n                <!-- /ko -->\n                <!-- /ko -->\n              </div>\n              <!-- ko template: { name: 'survey-question-file-sign', data: {question: question, item: $data, fileSignCss: question.cssClasses.fileSignBottom} } --><!-- /ko -->\n            </span>\n        </div>\n        <!-- /ko -->\n        <!-- /ko -->\n        <!-- ko template: { name: 'survey-question-file-clean-button', data: {question: question, showRemoveButton: question.showRemoveButtonBottom} } --><!-- /ko -->\n        <!-- ko if: question.mobileFileNavigatorVisible -->\n        <!-- ko component: { name: 'sv-action-bar', params: { model: question.mobileFileNavigator } } -->\n        <!-- /ko -->\n        <!-- /ko -->\n      </div>\n  </div>\n</script>\n<script type=\"text/html\" id=\"survey-question-file-clean-button\">\n  <!-- ko if: question.koHasValue() && !question.isReadOnly && $data.showRemoveButton-->\n  <button type=\"button\" data-bind=\"css: showRemoveButton, enabled: !question.isInputReadOnly, click: question.doclean\">\n      <span data-bind=\"text: question.clearButtonCaption\"></span>\n      <!-- ko if: question.cssClasses.removeButtonIconId -->\n        <!-- ko component: { name: 'sv-svg-icon', params: { iconName: question.cssClasses.removeButtonIconId, size: 'auto', title: question.clearButtonCaption } } --><!-- /ko -->\n      <!-- /ko -->\n  </button>\n  <!-- /ko -->\n</script>\n<script type=\"text/html\" id=\"survey-question-file-sign\">\n  <!-- ko if: item.name && fileSignCss -->\n  <div data-bind=\"css: fileSignCss\">\n    <a data-bind=\"style: { width: question.imageWidth }, click: question.dodownload, text: item.name, attr: { href: item.content, title: item.name, download: item.name }\"></a>\n  </div>\n  <!-- /ko -->\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-html.html":
/*!***************************************************!*\
  !*** ./src/knockout/templates/question-html.html ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-html\">\n  <div data-bind=\"html: question.locHtml.koRenderedHtml, css: question.koCss().root\"></div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-image.html":
/*!****************************************************!*\
  !*** ./src/knockout/templates/question-image.html ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-image\">\n  <div data-bind=\"css: question.koCss().root\">\n    <!-- ko if: question.renderedMode === \"image\" -->\n    <img data-bind=\"css: question.getImageCss(), attr: { src: $data.locImageLink.koRenderedHtml(), width: question.renderedWidth, height: question.renderedHeight, alt: question.altText || question.title }, style: { objectFit: question.imageFit }\"/>\n    <!-- /ko -->\n    <!-- ko if: question.renderedMode === \"video\" -->\n    <video controls data-bind=\"css: question.getImageCss(), attr: { src: $data.locImageLink.koRenderedHtml(), width: question.renderedWidth, height: question.renderedHeight }, style: { objectFit: question.imageFit }\"></video>\n    <!-- /ko -->\n    <!-- ko if: question.renderedMode === \"youtube\" -->\n    <iframe data-bind=\"css: question.getImageCss(), attr: { src: $data.locImageLink.koRenderedHtml(), width: question.renderedWidth, height: question.renderedHeight }, style: { objectFit: question.imageFit }\"></iframe>\n    <!-- /ko -->\n  </div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-imagepicker.html":
/*!**********************************************************!*\
  !*** ./src/knockout/templates/question-imagepicker.html ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-imagepicker\">\n    <fieldset data-bind=\"css: question.getSelectBaseRootCss()\">\n        <legend data-bind=\"attr: { 'aria-label': question.locTitle.renderedHtml }\" role=\"radio\"></legend>\n        <!-- ko ifnot: question.hasColumns -->\n        <!-- ko foreach: { data: question.visibleChoices, as: 'item', afterRender: question.koAfterRender}  -->\n        <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: 'survey-imagepicker-item', data: item } } } -->\n        <!-- /ko -->\n        <!-- /ko -->\n        <!-- /ko -->\n        <!-- ko if: question.hasColumns -->\n        <!-- ko foreach: question.columns -->\n        <div data-bind=\"css: question.getColumnClass()\" role=\"presentation\">\n            <!-- ko foreach: { data: $data, as: 'item', afterRender: question.koAfterRender }  -->\n            <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: 'survey-imagepicker-item', data: item } } } -->\n            <!-- /ko -->\n            <!-- /ko -->\n        </div>\n        <!-- /ko -->\n        <!-- /ko -->\n    </fieldset>\n</script>\n<script type=\"text/html\" id=\"survey-imagepicker-item\">\n    <div data-bind=\"css: question.getItemClass(item)\">\n        <label data-bind=\"css: question.koCss().label\">\n            <input data-bind=\"attr: {type: question.inputType, name: question.questionName, value: item.value, id: question.getItemId(item), 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy}, checked: question.koValue, enable: question.getItemEnabled(item), css: question.koCss().itemControl\"\n            />\n            <div data-bind=\"css: question.koCss().itemDecorator\">\n                <div data-bind=\"css: question.koCss().imageContainer\">\n\n                  <!-- ko if: $data.locImageLink.koRenderedHtml() && question.contentMode === \"image\" -->\n                  <img data-bind=\"css: question.koCss().image, attr: { src: $data.locImageLink.koRenderedHtml, width: question.renderedImageWidth, height: question.renderedImageHeight, alt: item.locText.koRenderedHtml }, style: { objectFit: question.imageFit }, event: { load: question.onContentLoaded }\"/>\n                  <!-- /ko -->\n                  <!-- ko if: $data.locImageLink.koRenderedHtml() && question.contentMode === \"video\" -->\n                  <video controls data-bind=\"css: question.koCss().image, attr: { src: $data.locImageLink.koRenderedHtml, width: question.renderedImageWidth, height: question.renderedImageHeight }, style: { objectFit: question.imageFit }, event: { loadedmetadata: question.onContentLoaded }\"></video>\n                  <!-- /ko -->\n                  <!-- ko ifnot: $data.locImageLink.koRenderedHtml() -->\n                  <div data-bind=\"css: question.koCss().itemNoImage, style: { width: question.renderedImageWidth, height: question.renderedImageHeight, objectFit: question.imageFit}\">\n                    <!-- ko if: question.koCss().itemNoImageSvgIconId -->\n                    <svg data-bind=\"css:question.koCss().itemNoImageSvgIcon\">\n                      <use data-bind=\"attr:{'xlink:href':question.koCss().itemNoImageSvgIconId}\" xlink:href=''></use>\n                    </svg>\n                    <!-- /ko -->\n                  </div>\n                  <!-- /ko -->\n                  \n                </div>\n                <!-- ko if: question.showLabel -->\n                <span data-bind=\"css: question.koCss().itemText\">\n                  <!-- ko template: { name: 'survey-string', data: item.locText } -->\n                  <!-- /ko -->\n                </span>\n                <!-- /ko -->\n            </div>\n        </label>\n    </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-matrix.html":
/*!*****************************************************!*\
  !*** ./src/knockout/templates/question-matrix.html ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-matrix\">\n  <div data-bind=\"css: question.koCss().tableWrapper\">\n    <fieldset>\n      <legend\n        data-bind=\"attr: { 'aria-label': question.locTitle.renderedHtml }\"\n      ></legend>\n      <table data-bind=\"css: question.getTableCss()\">\n        <!-- ko if: question.showHeader -->\n        <thead>\n          <tr>\n            <td data-bind=\"visible: question.hasRows\"></td>\n            <!-- ko foreach: question.koVisibleColumns -->\n            <th data-bind=\"css: question.koCss().headerCell\">\n              <!-- ko component: { name: question.getColumnHeaderWrapperComponentName($data), params: { componentData:  question.getColumnHeaderWrapperComponentData($data), templateData: { data: $data } } } -->\n                <!-- ko template: { name: 'survey-string', data: $data.locText } --><!-- /ko -->\n              <!-- /ko -->\n            </th>\n            <!-- /ko -->\n          </tr>\n        </thead>\n        <!-- /ko -->\n        <tbody>\n          <!-- ko foreach: { data: question.koVisibleRows, as: 'row' } -->\n          <tr data-bind=\"css: row.rowClasses\">\n            <td\n              data-bind=\"visible: question.hasRows, css: question.koCss().rowTextCell\"\n            >\n              <!-- ko component: { name: question.getRowHeaderWrapperComponentName($data), params: { componentData:  question.getRowHeaderWrapperComponentData($data), templateData: { data: $data } } } -->\n                <!-- ko template: { name: 'survey-string', data: row.locText } -->\n                <!-- /ko -->\n              <!-- /ko -->\n            </td>\n            <!-- ko foreach: question.koVisibleColumns -->\n            <!-- ko if: question.hasCellText -->\n            <td\n              data-bind=\"css: question.getItemClass(row, $data), click: function() { if (!question.isInputReadOnly) { row.cellClick($data); } }\"\n            >\n              <!-- ko template: { name: 'survey-string', data: question.getCellDisplayLocText(row.name, $data) } -->\n              <!-- /ko -->\n            </td>\n            <!-- /ko -->\n            <!-- ko if: !question.hasCellText -->\n            <td\n              data-bind=\"attr: { 'data-responsive-title': $data.locText.renderedHtml }, css: question.koCss().cell\"\n            >\n              <label data-bind=\"css: question.getItemClass(row, $data)\">\n                <input\n                  type=\"radio\"\n                  data-bind=\"css: question.koCss().itemValue, attr: { name: row.fullName, 'aria-required': question.ariaRequired, 'aria-label': $data.locText.renderedHtml, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy, id: question.inputId + '_' + row.name + '_' + $index() }, checkedValue: $data.value, checked: row.value, enable: !question.isInputReadOnly\"\n                />\n                <span data-bind=\"css: question.koCss().materialDecorator\">\n                    <!-- ko if: question.itemSvgIcon -->\n                      <svg data-bind=\"css:question.koCss().itemDecorator\">\n                        <use data-bind=\"attr:{'xlink:href':question.itemSvgIcon}\" xlink:href=''></use>\n                      </svg>  \n                    <!-- /ko -->\n                </span>\n                <span data-bind=\"visible: question.isMobile, css: question.koCss().cellResponsiveTitle\">\n                  <!-- ko template: { name: 'survey-string', data: $data.locText } --><!-- /ko -->\n                </span>\n              </label>\n            </td>\n            <!-- /ko -->\n            <!-- /ko -->\n          </tr>\n          <!-- /ko -->\n        </tbody>\n      </table>\n    </fieldset>\n  </div>\n</script>\n<script type=\"text/html\" id=\"survey-text\">\n  <span data-bind=\"text:$data.renderedHtml\"></span>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-matrixdynamic.html":
/*!************************************************************!*\
  !*** ./src/knockout/templates/question-matrixdynamic.html ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-matrixdynamic\">\n    <div>\n    <!-- ko if: question.koTable().showAddRowOnTop -->\n    <div\n      data-bind=\"css: question.koCss().footer\"\n    >\n      <button\n        type=\"button\"\n        data-bind=\"click: question.isDesignMode ? undefined : question.koAddRowClick, css: question.getAddRowButtonCss(), disable: question.isInputReadOnly\"\n      >\n        <!-- ko template: { name: 'survey-string', data: question.locAddRowText } --><!-- /ko -->\n        <span data-bind=\"css: question.koCss().iconAdd\"></span>\n      </button>\n    </div>\n    <!-- /ko -->\n    <div\n      data-bind=\"visible: question.koTable().showTable, style: { overflowX: question.showHorizontalScroll ? 'scroll': '' }\"\n    >\n      <table data-bind=\"css: question.getTableCss()\">\n        <!-- ko if: question.koTable().showHeader -->\n        <thead>\n          <tr>\n            <!-- ko foreach: question.koTable().headerRow.cells -->\n              <!-- ko if: $data.hasTitle -->\n                <th\n                  data-bind=\"style: { minWidth: $data.minWidth, width: $data.width }, css: $data.className\"\n                >\n                  <!-- ko component: { name: question.getColumnHeaderWrapperComponentName($data), params: { componentData:  question.getColumnHeaderWrapperComponentData($data), templateData: { data: $data } } } -->\n                    <!-- ko template: { name: 'survey-string', data: $data.locTitle } --><!-- /ko -->\n                    <!-- ko if: $data.column && $data.column.isRenderedRequired -->\n                    <span data-bind=\"css: question.koCss().cellRequiredText, text: $data.column.requiredText\"></span>\n                    <!-- /ko -->\n                  <!-- /ko -->\n                </th>\n              <!-- /ko -->\n              <!-- ko ifnot: $data.hasTitle -->\n                <td data-bind=\"style: { minWidth: $data.minWidth, width: $data.width }, css: $data.className\"></td>\n              <!-- /ko -->\n            <!-- /ko -->\n          </tr>\n        </thead>\n        <!-- /ko -->\n        <tbody>\n          <!-- ko foreach: question.koTable().rows -->\n          <!-- ko ifnot: $parent.detailPanelMode === \"popup\" && $data.isDetailRow -->\n          <tr data-bind=\"css: $data.className, attr: attributes, event: { pointerdown: function (model, event) { question.onPointerDown(event, row); return true;} }\">\n            <!-- ko foreach: $data.cells -->\n            <!-- ko if: $data.isDragHandlerCell -->\n            <td data-bind=\"css:$data.className, attr: {colspan: $data.colSpans}\">\n              <!-- ko component: { name: 'sv-matrix-drag-drop-icon', params: { item: { data: { row: row, question: question } } }} -->\n              <!-- /ko -->\n            </td>\n            <!-- /ko -->\n            <!-- ko if: $data.isActionsCell -->\n            <td data-bind=\"css: $data.className, attr: { colspan: $data.colSpans }\">\n              <!-- ko component: { name: 'sv-action-bar', params: { model: $data.item.getData(), handleClick: false } } -->\n              <!-- /ko -->\n            </td>\n            <!-- /ko -->\n            <!-- ko if: $data.isEmpty -->\n            <td data-bind=\"attr: { colspan: $data.colSpans }\"></td>\n            <!-- /ko -->\n            <!-- ko if: $data.hasPanel -->\n            <td data-bind=\"css: $data.className, attr: { colspan: $data.colSpans }\">\n              <!-- ko component: { name: $data.panel.survey.getElementWrapperComponentName($data.panel), \n                params: { componentData:  $data.panel.survey.getElementWrapperComponentData($data.panel), \n                templateData: { name: $data.panel.koElementType, data: $data.panel, afterRender: question.koElementAfterRender } } } \n              -->\n              <!-- /ko -->\n            </td>\n            <!-- /ko -->\n            <!-- ko if: $data.hasQuestion -->\n            <!-- ko template: { name: 'survey-matrixcell', afterRender: function(els) { $data.matrix.koCellAfterRender(els, $data); } } --><!-- /ko -->\n            <!-- /ko -->\n            <!-- ko if: $data.hasTitle -->\n            <td\n              data-bind=\"css: $data.className, style: { minWidth: $data.minWidth, width: $data.width }\"\n            >\n              <!-- ko component: { name: question.getRowHeaderWrapperComponentName($data), params: { componentData:  question.getRowHeaderWrapperComponentData($data), templateData: { data: $data } } } -->\n              <!-- ko template: { name: 'survey-string', data: $data.locTitle } --><!-- /ko -->\n              <!-- ko if: $data.requiredText -->\n              <span data-bind=\"css: question.koCss().cellRequiredText, text: $data.requiredText\"></span>\n              <!-- /ko -->\n              <!-- /ko -->\n            </td>\n            <!-- /ko -->\n            <!-- /ko -->\n          </tr>\n\n          <!-- /ko -->\n          <!-- /ko -->\n        </tbody>\n        <!-- ko if:question.koTable().hasFooter -->\n        <tfoot>\n          <tr>\n            <!-- ko foreach: question.koTable().footerRow.cells -->\n              <!-- ko if: $data.hasQuestion -->\n                <!-- ko template: { name: 'survey-matrixcell', afterRender: function(els) { $data.matrix.koCellAfterRender(els, $data); } } --><!-- /ko -->\n              <!-- /ko -->\n              <!-- ko if: $data.hasTitle -->\n              <td>\n                <!-- ko template: { name: 'survey-string', data: $data.locTitle } --><!-- /ko -->\n              </td>\n              <!-- /ko -->\n            <!-- /ko -->\n          </tr>\n        </tfoot>\n        <!-- /ko -->\n      </table>\n    </div>\n    <!-- ko ifnot: question.koTable().showTable -->\n    <div data-bind=\"css: question.koCss().emptyRowsSection\">\n      <div data-bind=\"css: question.koCss().emptyRowsText\">\n        <!-- ko template: { name: 'survey-string', data: question.locEmptyRowsText } --><!-- /ko -->\n      </div>\n      <button\n        type=\"button\"\n        data-bind=\"click:question.koAddRowClick, css: question.getAddRowButtonCss(true), disable: question.isInputReadOnly\"\n      >\n        <!-- ko template: { name: 'survey-string', data: question.locAddRowText } --><!-- /ko -->\n        <span data-bind=\"css: question.koCss().iconAdd\"></span>\n      </button>\n    </div>\n    <!-- /ko -->\n    <!-- ko if: question.koTable().showAddRowOnBottom -->\n    <div\n      data-bind=\"css: question.koCss().footer\"\n    >\n      <button\n        type=\"button\"\n        data-bind=\"click: question.koAddRowClick, css: question.getAddRowButtonCss(), disable: question.isInputReadOnly\"\n      >\n        <!-- ko template: { name: 'survey-string', data: question.locAddRowText } --><!-- /ko -->\n        <span data-bind=\"css: question.koCss().iconAdd\"></span>\n      </button>\n    </div>\n    <!-- /ko -->\n  </div>\n</script>\n<script type=\"text/html\" id=\"survey-matrixcell\">\n  <td\n    data-bind=\"css: $data.className, style: { minWidth: $data.minWidth, width: $data.width }, attr: { 'data-responsive-title': headers, title: $data.getTitle() }\"\n  >\n    <div data-bind=\"visible: question.isVisible, css: $parentContext.question.cssClasses.cellQuestionWrapper\">\n      <!-- ko if: $data.showErrorOnTop-->\n      <!-- ko template: { name: 'survey-question-errors', data: question, as: 'question' } -->\n      <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: $data.isOtherChoice -->\n        <div class=\"form-group\" data-bind=\"template: { name: 'survey-comment', data: {'question': question, 'visible': true } }\"></div>\n      <!-- /ko -->\n      <!-- ko if: $data.isCheckbox -->\n        <!-- ko template: {name: 'survey-checkbox-item', templateOptions: {hideCaption: true} }  --><!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: $data.isRadio -->\n        <!-- ko template: {name: 'survey-radiogroup-item', templateOptions: {hideCaption: true} }  --><!-- /ko -->\n      <!-- /ko -->\n      <!-- ko ifnot: $data.isChoice -->\n      <!-- ko if: question.isDefaultRendering() -->\n        <!-- ko let: { question: $data.matrix.getCellTemplateData($data) } -->\n        <!-- ko component: { name: $data.matrix.getCellWrapperComponentName($data), params: { componentData:  $data.matrix.getCellWrapperComponentData($data), templateData: { name: question.koTemplateName(), data: question, afterRender: function(el) { $data.matrix.koCellQuestionAfterRender(el, $data); } } } } -->\n        <!-- /ko -->\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko ifnot: question.isDefaultRendering() -->\n        <!-- ko component: { name: question.getComponentName(), params: { question: question } } -->\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: $data.showErrorOnBottom-->\n      <!-- ko template: { name: 'survey-question-errors', data: question, as: 'question' } -->\n      <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: $data.hasQuestion && $data.question.isErrorsModeTooltip-->\n        <!-- ko component: { name: 'sv-tooltip-error', params: { question: question } } -->\n        <!-- /ko -->\n      <!-- /ko -->\n    </div>\n  </td>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-multipletext.html":
/*!***********************************************************!*\
  !*** ./src/knockout/templates/question-multipletext.html ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-multipletext\">\n  <table data-bind=\"css: question.koCss().root\">\n    <tbody data-bind=\"foreach: { data:  question.koRows, as: 'row' }\">\n      <tr data-bind=\"foreach: { data: row, as: 'item' }, css: question.koCss().row\">\n        <td data-bind=\"css: question.cssClasses.cell\">  \n          <label data-bind=\"css: question.getItemLabelCss(item)\">\n              <span data-bind=\"css: question.koItemTitleCss\">\n                <!-- ko component: { name: 'survey-element-title-content', params: {element: item.editor} } --><!-- /ko -->\n              </span>\n              <div data-bind=\"css: question.koItemCss\">\n                <!-- ko if: item.editor.showErrorOnTop -->\n                  <!-- ko template: { name: 'survey-question-errors', data: item.editor } -->\n                  <!-- /ko -->\n                <!-- /ko -->\n                <!-- ko template: { name: item.editor.koTemplateName(), data: item.editor, as: 'question', afterRender: item.editor.koQuestionAfterRender } -->\n                <!-- /ko -->\n                <!-- ko if: item.editor.showErrorOnBottom -->\n                  <!-- ko template: { name: 'survey-question-errors', data: item.editor } -->\n                  <!-- /ko -->\n                <!-- /ko -->\n              </div>\n                <!-- ko if: item.editor.isErrorsModeTooltip -->\n                  <!-- ko component: { name: \"sv-tooltip-error\", params: { question: item.editor } } -->\n                  <!-- /ko -->\n                <!-- /ko -->\n            </label>\n          </td>\n        </tr>\n    </tbody>\n  </table>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-paneldynamic-navigator.html":
/*!*********************************************************************!*\
  !*** ./src/knockout/templates/question-paneldynamic-navigator.html ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-paneldynamic-navigator\">\n  <div style=\"clear: both;\">\n        <div data-bind=\"css: question.koCss().progressContainer\">\n          <!-- ko component: { name: 'sv-paneldynamic-prev-btn', params: { question: question }} --><!-- /ko -->\n          <!-- ko if: question.koIsRange -->\n            <!-- ko template: { name: 'survey-question-paneldynamic-progress', data: question, as: 'question'} --><!-- /ko -->\n          <!-- /ko -->\n          <!-- ko component: { name: 'sv-paneldynamic-next-btn', params: { question: question }} --><!-- /ko -->\n        </div>\n          <!-- ko component: { name: 'sv-paneldynamic-add-btn', params: { question: question }} --><!-- /ko -->\n        <div data-bind=\"text: question.koProgressText, css: question.koCss().progressText\"></div>\n      </div>\n</script>\n<script type=\"text/html\" id=\"survey-question-paneldynamic-progress\">\n  <div data-bind=\"css: question.koCss().progress\">\n    <div\n      data-bind=\"css: question.koCss().progressBar, style: { width: question.koProgress }\"\n      role=\"progressbar\"\n    ></div>\n  </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-paneldynamic.html":
/*!***********************************************************!*\
  !*** ./src/knockout/templates/question-paneldynamic.html ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-paneldynamic\">\n  <div data-bind=\"css: question.koCss().root\">\n    <!-- ko if: question.getShowNoEntriesPlaceholder() -->\n      <div data-bind=\"css: question.koCss().noEntriesPlaceholder\">\n        <span>\n          <!-- ko template: { name: 'survey-string', data: locNoEntriesText } --><!-- /ko -->\n        </span>\n          <!-- ko component: { name: 'sv-paneldynamic-add-btn', params: { question: question }} -->\n          <!-- /ko -->\n        </div>\n    <!-- /ko -->\n    <!-- ko if: question.koIsList() -->\n      <!-- ko foreach: { data: question.panels } -->\n        <div data-bind=\"css: question.getPanelWrapperCss()\">\n          <!-- ko let: { question: $data } -->\n            <!-- ko component: { name: survey.getElementWrapperComponentName(question), params: { componentData:  survey.getElementWrapperComponentData(question), templateData: { name: question.koElementType, data: question, afterRender: $parent.koPanelAfterRender } } } -->\n            <!-- /ko -->\n          <!-- /ko -->\n          <!-- ko template: { name: 'survey-question-paneldynamic-remove-btn', data: { question: question, panel: $data} } -->\n          <!-- /ko -->\n        </div>\n        <!-- ko if: $index() < question.panelCount - 1 -->\n        <hr data-bind=\"css: question.koCss().separator\"/>\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: question.showLegacyNavigation -->\n        <!-- ko component: { name: 'sv-paneldynamic-add-btn', params: { question: question }} --><!-- /ko -->\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko ifnot: question.koIsList()  -->\n      <!-- ko if: question.koIsProgressTop-->\n        <!-- ko if: !question.showLegacyNavigation && question.koIsRange -->\n          <!-- ko template: { name: 'survey-question-paneldynamic-progress', data: question, as: 'question'} -->\n          <!-- /ko -->\n        <!-- /ko -->\n        <!-- ko if: question.showLegacyNavigation -->\n        <div data-bind=\"css: question.koCss().progressTop\">\n          <!-- ko template: { name: 'survey-question-paneldynamic-navigator', data: question, as: 'question'} -->\n          <!-- /ko -->\n        </div>\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- ko if: question.koPanel() -->\n      <div data-bind=\"css: question.getPanelWrapperCss()\">\n        <!-- ko let: { question: question.koPanel() } -->\n          <!-- ko component: { name: question.survey.getElementWrapperComponentName(question), params: { componentData:  question.survey.getElementWrapperComponentData(question), templateData: { name: question.koElementType, data: question, afterRender: $parent.koPanelAfterRender } } } -->\n          <!-- /ko -->\n        <!-- /ko -->\n        <!-- ko template: { name: 'survey-question-paneldynamic-remove-btn', data: { question: question, panel: question.koPanel() }, as: 'question'} -->\n        <!-- /ko -->\n      </div>\n      <!-- /ko -->\n      <!-- ko if: question.showLegacyNavigation && question.koIsProgressBottom--> \n      <div data-bind=\"css: question.koCss().progressBottom\">\n        <!-- ko template: { name: 'survey-question-paneldynamic-navigator', data: question, as: 'question'} -->\n        <!-- /ko -->\n      </div>\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko if: !question.showLegacyNavigation && !!question.panelCount != 0 -->\n    <div data-bind=\"css: question.koCss().footer\">\n      <hr data-bind=\"css: question.koCss().separator\"/>\n      <!-- ko if: question.koIsRange() && question.koIsProgressBottom -->\n         <!-- ko template: { name: 'survey-question-paneldynamic-progress', data: question, as: 'question'} -->\n         <!-- /ko -->\n      <!-- /ko -->\n      <div data-bind=\"css: question.koCss().footerButtonsContainer\">\n        <!-- ko component: { name: \"sv-action-bar\", params: { model: question.footerToolbar } } -->\n        <!-- /ko -->\n      </div>\n    </div>\n    <!-- /ko -->\n  </div>\n</script>\n\n<script type=\"text/html\" id=\"survey-question-paneldynamic-remove-btn\">\n  <button type=\"button\"\n    data-bind=\"visible: question.koCanRemovePanel() && panel.state != 'collapsed', click: function() { question.koRemovePanelClick(panel); }, css: question.getPanelRemoveButtonCss()\">\n    <span data-bind=\"css: question.koCss().buttonRemoveText, text: question.panelRemoveText\"></span>\n    <span data-bind=\"css: question.koCss().iconRemove\"></span>\n  </button>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-radiogroup.html":
/*!*********************************************************!*\
  !*** ./src/knockout/templates/question-radiogroup.html ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-radiogroup\">\n\n  <fieldset data-bind=\"css: question.getSelectBaseRootCss()\" role=\"presentation\">\n    <!-- ko ifnot: question.hasColumns -->\n      <!-- ko if: question.blockedRow -->\n      <div data-bind=\"css: question.koCss().rootRow\">\n        <!-- ko foreach: { data: question.dataChoices, as: 'item', afterRender: question.koAfterRender }  -->\n        <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n        <!-- /ko -->\n        <!-- /ko -->\n      </div>\n      <!-- /ko -->\n      <!-- ko ifnot: question.blockedRow -->\n      <!-- ko foreach: { data: question.bodyItems, as: 'item', afterRender: question.koAfterRender }  -->\n        <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n        <!-- /ko -->\n      <!-- /ko -->\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko if: question.hasColumns -->\n      <div data-bind=\"css: question.koCss().rootMultiColumn\">\n\n        <!-- ko foreach: question.columns -->\n        <div data-bind=\"css: question.getColumnClass()\" role=\"presentation\">\n          <!-- ko foreach: { data: $data, as: 'item', afterRender: question.koAfterRender } -->\n            <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n            <!-- /ko -->\n          <!-- /ko -->\n        </div>\n        <!-- /ko -->\n      </div>\n    <!-- /ko -->\n    <!-- ko if: question.hasFootItems  -->\n      <!-- ko foreach: { data: question.footItems, as: 'item', afterRender: question.koAfterRender }  -->\n        <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: question.itemComponent, data: item } } } -->\n        <!-- /ko -->\n      <!-- /ko -->\n    <!-- /ko -->\n\n    <!-- ko if: question.hasOther && question.isOtherSelected -->\n      <div class=\"form-group\" data-bind=\"template: { name: 'survey-comment', data: {'question': question, 'visible': question.isOtherSelected } }\"></div>\n    <!-- /ko -->\n    <!-- ko if: question.showClearButtonInContent -->\n    <div>\n      <input\n        type=\"button\"\n        data-bind=\"click:question.clearValue, css: question.koCss().clearButton, value: question.clearButtonCaption\"\n      />\n    </div>\n    <!-- /ko -->\n  </fieldset>\n</script>\n<script type=\"text/html\" id=\"survey-radiogroup-item\">\n  <div role=\"presentation\" data-bind=\"css: question.getItemClass(item)\">\n    <label data-bind=\"css: question.getLabelClass(item), attr: { 'aria-label': question.getAriaItemLabel(item) }\">\n      <input\n        type=\"radio\"\n        data-bind=\"attr: { name: question.questionName, id: question.getItemId(item), 'aria-describedby': question.ariaDescribedBy }, checkedValue: item.value, checked: question.renderedValue, enable: question.getItemEnabled(item), css: question.koCss().itemControl\"\n      />\n      <!-- ko if: question.koCss().materialDecorator -->\n      <span data-bind=\"css: question.koCss().materialDecorator\">\n        <!-- ko if: question.itemSvgIcon -->\n        <svg data-bind=\"css:question.koCss().itemDecorator\">\n          <use data-bind=\"attr:{'xlink:href':question.itemSvgIcon}\" xlink:href=''></use>\n        </svg>\n        <!-- /ko -->\n      </span>\n      <!-- /ko -->\n      <span\n        data-bind=\"visible: !item.hideCaption, css: question.getControlLabelClass(item)\"\n      >\n        <!-- ko template: { name: 'survey-string', data: item.locText } -->\n        <!-- /ko -->\n      </span>\n    </label>\n  </div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-ranking.html":
/*!******************************************************!*\
  !*** ./src/knockout/templates/question-ranking.html ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-ranking\">\n  <div data-bind=\"css: question.rootClass\">\n    <!-- ko foreach: { data: question.rankingChoices, as: 'item', afterRender: question.koAfterRender } -->\n      <!-- ko component: { name: question.getItemValueWrapperComponentName(item), params: { componentData:  question.getItemValueWrapperComponentData(item), templateData: { name: 'survey-ranking-item', data: item } } } -->\n      <!-- /ko -->\n    <!-- /ko -->\n  </div>\n</script>\n\n<script type=\"text/html\" id=\"survey-ranking-item\">\n  <div\n    data-bind=\"event: { keydown: question.koHandleKeydown, pointerdown: question.koHandlePointerDown}, css: question.getItemClass($data), attr: {tabindex: question.getItemTabIndex($data), 'data-sv-drop-target-ranking-item': $index() }\"\n  >\n    <div tabindex=\"-1\" style=\"outline: none;\">\n      <div data-bind=\"css: question.cssClasses.itemGhostNode\"></div>\n      <div data-bind=\"css: question.cssClasses.itemContent\">\n        <div data-bind=\"css: question.cssClasses.itemIconContainer\">\n          <svg\n            width=\"10\"\n            height=\"16\"\n            viewBox=\"0 0 10 16\"\n            data-bind=\"css: question.getIconHoverCss()\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n          >\n            <path\n              d=\"M6 2C6 0.9 6.9 0 8 0C9.1 0 10 0.9 10 2C10 3.1 9.1 4 8 4C6.9 4 6 3.1 6 2ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12ZM2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12Z\"\n            />\n          </svg>\n          <svg\n            width=\"10\"\n            height=\"24\"\n            viewBox=\"0 0 10 24\"\n            data-bind=\"css: question.getIconFocusCss()\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n          >\n            <path d=\"M10 5L5 0L0 5H4V9H6V5H10Z\" />\n            <path d=\"M6 19V15H4V19H0L5 24L10 19H6Z\" />\n          </svg>\n        </div>\n        <div\n          data-bind=\"css: question.cssClasses.itemIndex, text: question.getNumberByIndex($index())\"\n        ></div>\n        <div data-bind=\"css: question.cssClasses.controlLabel\">\n          <!-- ko template: { name: 'survey-string', data: $data.locText } -->\n          <!-- /ko -->\n        </div>\n      </div>\n    </div>\n  </div>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-rating.html":
/*!*****************************************************!*\
  !*** ./src/knockout/templates/question-rating.html ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-rating\">\n    <div data-bind=\"css: question.ratingRootCss\">\n        <fieldset role=\"radiogroup\">\n            <legend role=\"presentation\" class=\"sv-hidden\"></legend>\n            <!-- ko if: question.hasMinLabel-->\n            <span data-bind=\"css: question.koCss().minText\">\n              <!-- ko template: { name: 'survey-string', data: question.locMinRateDescription } -->\n              <!-- /ko -->\n              </span>\n            <!-- /ko -->\n            <!-- ko foreach: question.renderedRateItems -->\n            <label data-bind=\"css: question.getItemClass($data.itemValue)\">\n                <input\n                type=\"radio\"\n                class=\"sv-visuallyhidden\"\n                data-bind=\"attr: { name: question.name, id: question.getInputId($index()), value: $data.value, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy }, checkedValue: $data.value, enable: !question.isInputReadOnly, event: { click: function(data, event) { question.setValueFromClick(event.target.value); return true; } }\"\n                />\n                <span data-bind=\"css: question.koCss().itemText\">\n                <!-- ko template: { name: 'survey-string', data: $data.locText } -->\n                <!-- /ko -->\n                </span>\n            </label>\n            <!-- /ko -->\n            <!-- ko if: question.hasMaxLabel-->\n            <span data-bind=\"css: question.koCss().maxText\">\n              <!-- ko template: { name: 'survey-string', data: question.locMaxRateDescription } -->\n              <!-- /ko -->\n              </span>\n            <!-- /ko -->\n\n        </fieldset>\n    </div>\n  </fieldset>\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question-signaturepad.html":
/*!***********************************************************!*\
  !*** ./src/knockout/templates/question-signaturepad.html ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-signaturepad\">\n    <div data-bind=\"css: question.koCss().root, style: { height: signatureHeight, width: signatureWidth }\">\n        <div \n            data-bind=\"text: placeHolderText, css: question.koCss().placeholder, visible: $data.needShowPlaceholder()\">\n        </div>\n        <div>\n            <canvas tabindex='0'></canvas>\n        </div>\n        <!-- ko if: question.canShowClearButton -->\n        <div data-bind=\"css: question.koCss().controls\">\n            <button type='button'\n                data-bind=\"click: question.clearValue, css: question.koCss().clearButton, attr: { title: question.clearButtonCaption }\">\n                    <!-- ko ifnot: question.koCss().clearButtonIconId -->\n                        <span>✖</span>\n                    <!-- /ko -->\n                    <!-- ko if: question.koCss().clearButtonIconId -->\n                        <sv-svg-icon params=\"iconName: question.koCss().clearButtonIconId, size: 'auto'\"></sv-svg-icon>\n                    <!-- /ko -->\n            </button>\n        </div>\n        <!-- /ko -->\n    </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-tagbox.html":
/*!*****************************************************!*\
  !*** ./src/knockout/templates/question-tagbox.html ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-tagbox\">\n  <div data-bind=\"css: question.renderCssRoot\">\n    <!-- ko component: { name: 'sv-tagbox', params: { question: question } } -->\n    <!-- /ko -->\n  <!-- ko if: question.isOtherSelected -->\n  <div class=\"form-group\"\n    data-bind=\"template: { name: 'survey-comment', data: {'question': question, 'visible': question.isOtherSelected } }, style: {display: question.isFlowLayout ? 'inline': ''}\">\n  </div>\n  <!-- /ko -->\n  </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/question-text.html":
/*!***************************************************!*\
  !*** ./src/knockout/templates/question-text.html ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-text\">\n  <!--ko if: !question.dataListId && !question.isInputTextUpdate && !question.isReadOnlyRenderDiv()-->\n  <input\n    data-bind=\"disable: question.isInputReadOnly, style: question.inputStyle, attr: {type: question.inputType, size: question.renderedInputSize, id: question.inputId, placeholder: question.renderedPlaceholder, maxLength: question.getMaxLength(), min: question.renderedMin, max: question.renderedMax, step: question.renderedStep, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy, autocomplete: question.autocomplete, list:question.dataListId}, value: question.value, css: question.getControlClass()\"\n  />\n  <!--/ko-->\n  <!--ko if: !question.dataListId && question.isInputTextUpdate && !question.isReadOnlyRenderDiv()-->\n  <input\n    data-bind=\"disable: question.isInputReadOnly, style: question.inputStyle, attr: {type: question.inputType, size: question.renderedInputSize, id: question.inputId, placeholder: question.renderedPlaceholder, maxLength: question.getMaxLength(), min: question.renderedMin, max: question.renderedMax, step: question.renderedStep, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy, autocomplete: question.autocomplete, list:question.dataListId}, textInput: question.value, css: question.getControlClass()\"\n  />\n  <!--/ko-->\n  <!--ko if: question.dataListId && !question.isReadOnlyRenderDiv()-->\n  <div>\n    <!--ko if: !question.isInputTextUpdate-->\n    <input\n    data-bind=\"disable: question.isInputReadOnly, style: question.inputStyle, attr: {type: question.inputType, size: question.renderedInputSize, id: question.inputId, placeholder: question.renderedPlaceholder, maxLength: question.getMaxLength(), min: question.renderedMin, max: question.renderedMax, step: question.renderedStep, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy, autocomplete: question.autocomplete, list:question.dataListId}, value: question.value, css: question.getControlClass()\"\n    />\n    <!--/ko-->\n    <!--ko if: question.isInputTextUpdate-->\n    <input\n      data-bind=\"disable: question.isInputReadOnly, style: question.inputStyle, attr: {type: question.inputType, size: question.renderedInputSize, id: question.inputId, placeholder: question.renderedPlaceholder, maxLength: question.getMaxLength(), min: question.renderedMin, max: question.renderedMax, step: question.renderedStep, 'aria-required': question.ariaRequired, 'aria-label': question.ariaLabel, 'aria-invalid': question.ariaInvalid, 'aria-describedby': question.ariaDescribedBy, autocomplete: question.autocomplete, list:question.dataListId}, textInput: question.value, css: question.getControlClass()\"\n    />\n    <!--/ko-->\n    <datalist data-bind=\"attr: {id: question.dataListId}\">\n    <!-- ko foreach: question.dataList -->\n      <option data-bind=\"value:$data\"></option>\n    <!--/ko-->\n    </datalist>\n  </div>\n  <!--/ko-->\n  <!--ko if: question.isReadOnlyRenderDiv() -->\n  <div data-bind=\"text: question.value\"></div>\n  <!--/ko-->\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/question.html":
/*!**********************************************!*\
  !*** ./src/knockout/templates/question.html ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question\">\n<div data-bind=\"css: question.koRootCss(), style: { paddingLeft: question.paddingLeft, paddingRight: question.paddingRight }, attr: { id: question.id, 'data-name': question.name, role: question.ariaRole, 'aria-required': question.ariaRequired, 'aria-invalid': question.ariaInvalid, 'aria-labelledby': question.ariaLabelledBy}\">\n  <!-- ko if: question.showErrorsAboveQuestion -->\n    <!-- ko template: { name: 'survey-question-errors', data: question } -->\n    <!-- /ko -->\n  <!-- /ko -->\n  <!-- ko if: question.hasTitleOnLeftTop -->\n    <!--ko template: { name: 'survey-question-title', data: question  } -->\n    <!-- /ko -->\n  <!-- /ko -->\n  <!-- ko component: { name: question.survey.getQuestionContentWrapperComponentName(question), params: { componentData:  question.survey.getElementWrapperComponentData(question), templateData: { name: 'survey-question-content', data: question } } } -->\n  <!-- /ko -->\n  <!-- ko if: question.showErrorsBelowQuestion -->\n    <!-- ko template: { name: 'survey-question-errors', data: question } -->\n    <!-- /ko -->\n  <!-- /ko -->\n  </script>\n";

/***/ }),

/***/ "./src/knockout/templates/questioncontent.html":
/*!*****************************************************!*\
  !*** ./src/knockout/templates/questioncontent.html ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-content\">\n<div data-bind=\"visible: !question.isCollapsed, css: question.cssContent\" role=\"presentation\">\n    <!-- ko if: question.showErrorOnTop -->\n      <!-- ko template: { name: 'survey-question-errors', data: question } -->\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko if: question.isDefaultRendering() -->\n      <!-- ko template: { name: question.koTemplateName(), data: question, afterRender: question.koQuestionAfterRender } -->\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko ifnot: question.isDefaultRendering() -->\n      <!-- ko component: { name: getComponentName(), params: { question: question } } -->\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko if: question.hasComment -->\n    <div data-bind=\"css: question.koCss().formGroup\">\n      <!-- ko template: { name: 'survey-string', data: question.locCommentText } -->\n      <!-- /ko -->\n      <div data-bind=\"template: { name: 'survey-comment', data: {'question': question, 'visible': true } }\"></div>\n    </div>\n    <!-- /ko -->\n    <!-- ko if: question.showErrorOnBottom -->\n      <!-- ko template: { name: 'survey-question-errors', data: question } -->\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko if: question.isErrorsModeTooltip -->\n      <!-- ko component: { name: 'sv-tooltip-error', params: {question: question} } -->\n      <!-- /ko -->\n    <!-- /ko -->\n    <!-- ko if: question.hasDescriptionUnderInput -->\n    <div data-bind=\"css: koCss().descriptionUnderInput\">\n      <!-- ko template: { name: 'survey-string', data: locDescription } -->\n      <!-- /ko -->\n    </div>\n    <!-- /ko -->\n    <!-- ko if: question.hasTitleOnBottom -->\n      <!--ko template: { name: 'survey-question-title', data: question  } -->\n      <!-- /ko -->\n    <!-- /ko -->\n  </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/questiontitle.html":
/*!***************************************************!*\
  !*** ./src/knockout/templates/questiontitle.html ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-question-title\">\n  <div data-bind=\"css: question.cssHeader, click: question.clickTitleFunction\">\n    <!-- ko component: { name: 'survey-element-title', params: { element: $data } } --><!-- /ko -->\n    <!-- ko v-if: $data.hasDescriptionUnderTitle -->\n    <div\n      data-bind=\"visible: question.hasDescriptionUnderTitle, css: $data.cssDescription\"\n    >\n      <!-- ko template: { name: 'survey-string', data: $data.locDescription } --><!-- /ko -->\n    </div>\n    <!-- /ko -->\n  </div>\n</script>";

/***/ }),

/***/ "./src/knockout/templates/row.html":
/*!*****************************************!*\
  !*** ./src/knockout/templates/row.html ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-row\">\n  <div data-bind=\"css: row.getRowCss()\">\n    <!-- ko template: { name: \"survey-row-content\", afterRender: row.rowAfterRender } -->\n    <!-- /ko -->\n  </div>\n</script>\n<script type=\"text/html\" id=\"survey-row-content\">\n<!-- ko foreach: { data: row.visibleElements, as: 'question', afterRender: row.koAfterRender } -->\n  <div data-bind=\"css: question.koCss().questionWrapper, style: $data.rootStyle, event: {focusin: question.focusIn }\">\n  <!-- ko if: row.isNeedRender -->\n    <!-- ko component: { name: row.panel.survey.getElementWrapperComponentName(question), params: { componentData:  row.panel.survey.getElementWrapperComponentData(question), templateData: { name: question.koElementType, data: question, afterRender: $parent.koElementAfterRender } } } -->\n    <!-- /ko -->\n  <!-- /ko -->\n  <!-- ko if: !row.isNeedRender && question.skeletonComponentName -->\n    <!-- ko component: { name: question.skeletonComponentName, params: { element: question } } -->\n    <!-- /ko -->\n  <!-- /ko -->\n  </div>\n<!-- /ko -->\n</script>";

/***/ }),

/***/ "./src/knockout/templates/rows.html":
/*!******************************************!*\
  !*** ./src/knockout/templates/rows.html ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-rows\">\n  <!-- ko foreach: { data: rows, as: 'row'} -->\n    <!-- ko if: row.visible -->\n      <!-- ko component: { name: $parent.survey.getRowWrapperComponentName(row), params: { componentData:  $parent.survey.getRowWrapperComponentData(row), templateData: { name: 'survey-row', data: row } } } -->\n      <!-- /ko -->\n    <!-- /ko -->\n  <!-- /ko -->\n</script>";

/***/ }),

/***/ "./src/knockout/templates/string.html":
/*!********************************************!*\
  !*** ./src/knockout/templates/string.html ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-string\">\n    <!-- ko component: { name: renderAs, params: { locString: renderAsData } } -->\n    <!-- /ko -->\n</script>\n";

/***/ }),

/***/ "./src/knockout/templates/timerpanel.html":
/*!************************************************!*\
  !*** ./src/knockout/templates/timerpanel.html ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = "<script type=\"text/html\" id=\"survey-timerpanel\">\n    <!-- ko if: timerModel.showTimerAsClock -->\n    <div data-bind=\"css: timerModel.rootCss\">\n        <svg data-bind=\"css: timerModel.getProgressCss(), style: { strokeDasharray: 440, strokeDashoffset: -440 * timerModel.progress }\">\n            <use data-bind=\"attr:{'xlink:href': '#icon-timercircle'}\" xlink:href=''></use>\n          </svg>\n        <div data-bind=\"css: timerModel.textContainerCss\">\n            <span data-bind=\"css: timerModel.majorTextCss, text: timerModel.clockMajorText\"></span>\n            <!-- ko if: !!timerModel.minorTextCss -->\n            <span data-bind=\"css: timerModel.minorTextCss, text: timerModel.clockMinorText\"></span>\n            <!-- /ko -->\n        </div>\n    </div>\n    <!-- /ko -->\n    <!-- ko if: !timerModel.showTimerAsClock -->\n    <div data-bind=\"css: timerModel.survey.getCss().timerRoot, text: timerModel.text\"></div>\n    <!--/ko -->\n</script>\n";

/***/ }),

/***/ "./src/list.ts":
/*!*********************!*\
  !*** ./src/list.ts ***!
  \*********************/
/*! exports provided: defaultListCss, ListModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultListCss", function() { return defaultListCss; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListModel", function() { return ListModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _element_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-helper */ "./src/element-helper.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var defaultListCss = {
    root: "sv-list__container",
    item: "sv-list__item",
    loadingIndicator: "sv-list__loading-indicator",
    itemSelected: "sv-list__item--selected",
    itemWithIcon: "sv-list__item--with-icon",
    itemDisabled: "sv-list__item--disabled",
    itemFocused: "sv-list__item--focused",
    itemIcon: "sv-list__item-icon",
    itemSeparator: "sv-list__item-separator",
    itemBody: "sv-list__item-body",
    itemsContainer: "sv-list",
    filter: "sv-list__filter",
    filterIcon: "sv-list__filter-icon",
    filterInput: "sv-list__input",
    emptyContainer: "sv-list__empty-container",
    emptyText: "sv-list__empty-text"
};
var ListModel = /** @class */ (function (_super) {
    __extends(ListModel, _super);
    function ListModel(items, onSelectionChanged, allowSelection, selectedItem, onFilterStringChangedCallback) {
        var _this = _super.call(this) || this;
        _this.onSelectionChanged = onSelectionChanged;
        _this.allowSelection = allowSelection;
        _this.onFilterStringChangedCallback = onFilterStringChangedCallback;
        _this.onItemClick = function (itemValue) {
            if (_this.isItemDisabled(itemValue)) {
                return;
            }
            _this.isExpanded = false;
            if (_this.allowSelection) {
                _this.selectedItem = itemValue;
            }
            if (!!_this.onSelectionChanged) {
                _this.onSelectionChanged(itemValue);
            }
        };
        _this.isItemDisabled = function (itemValue) {
            return itemValue.enabled !== undefined && !itemValue.enabled;
        };
        _this.isItemSelected = function (itemValue) {
            return !!_this.allowSelection && !!_this.selectedItem && _this.selectedItem.id == itemValue.id;
        };
        _this.isItemFocused = function (itemValue) {
            return !!_this.focusedItem && _this.focusedItem.id == itemValue.id;
        };
        _this.getItemClass = function (itemValue) {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
                .append(_this.cssClasses.item)
                .append(_this.cssClasses.itemWithIcon, !!itemValue.iconName)
                .append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
                .append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
                .append(_this.cssClasses.itemSelected, itemValue.active || _this.isItemSelected(itemValue))
                .append(itemValue.css)
                .toString();
        };
        _this.getItemIndent = function (itemValue) {
            var level = itemValue.level || 0;
            return (level + 1) * ListModel.INDENT + "px";
        };
        _this.setItems(items);
        _this.selectedItem = selectedItem;
        return _this;
    }
    ListModel.prototype.hasText = function (item, filterStringInLow) {
        if (!filterStringInLow)
            return true;
        var textInLow = (item.title || "").toLocaleLowerCase();
        return textInLow.indexOf(filterStringInLow.toLocaleLowerCase()) > -1;
    };
    ListModel.prototype.isItemVisible = function (item) {
        return item.visible && (!this.shouldProcessFilter || this.hasText(item, this.filterString));
    };
    Object.defineProperty(ListModel.prototype, "visibleItems", {
        get: function () {
            var _this = this;
            return this.visibleActions.filter(function (item) { return _this.isItemVisible(item); });
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ListModel.prototype, "shouldProcessFilter", {
        get: function () {
            return !this.onFilterStringChangedCallback;
        },
        enumerable: false,
        configurable: true
    });
    ListModel.prototype.onFilterStringChanged = function (text) {
        var _this = this;
        this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
        if (!!this.onFilterStringChangedCallback) {
            this.onFilterStringChangedCallback(text);
        }
    };
    ListModel.prototype.setItems = function (items, sortByVisibleIndex) {
        if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
        _super.prototype.setItems.call(this, items, sortByVisibleIndex);
        if (!this.isAllDataLoaded && !!this.actions.length) {
            this.actions.push(this.loadingIndicator);
        }
    };
    ListModel.prototype.onSet = function () {
        this.showFilter = this.searchEnabled && (this.actions || []).length > ListModel.MINELEMENTCOUNT;
        _super.prototype.onSet.call(this);
    };
    ListModel.prototype.getDefaultCssClasses = function () {
        return defaultListCss;
    };
    ListModel.prototype.updateItemActiveState = function () {
        var _this = this;
        this.actions.forEach(function (action) { return action.active = _this.isItemSelected(action); });
    };
    Object.defineProperty(ListModel.prototype, "filterStringPlaceholder", {
        get: function () {
            return this.getLocalizationString("filterStringPlaceholder");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ListModel.prototype, "emptyMessage", {
        get: function () {
            return this.getLocalizationString("emptyMessage");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ListModel.prototype, "scrollableContainer", {
        get: function () {
            return this.listContainerHtmlElement.querySelector("." + this.getDefaultCssClasses().itemsContainer);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ListModel.prototype, "loadingText", {
        get: function () {
            return this.getLocalizationString("loadingFile");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ListModel.prototype, "loadingIndicator", {
        get: function () {
            if (!this.loadingIndicatorValue) {
                this.loadingIndicatorValue = new _actions_action__WEBPACK_IMPORTED_MODULE_2__["Action"]({
                    id: "loadingIndicator",
                    title: this.loadingText,
                    action: function () { },
                    css: this.cssClasses.loadingIndicator
                });
            }
            return this.loadingIndicatorValue;
        },
        enumerable: false,
        configurable: true
    });
    ListModel.prototype.goToItems = function (event) {
        if (event.key === "ArrowDown" || event.keyCode === 40) {
            var currentElement = event.target.parentElement;
            _element_helper__WEBPACK_IMPORTED_MODULE_4__["ElementHelper"].focusElement(_element_helper__WEBPACK_IMPORTED_MODULE_4__["ElementHelper"].getNextElementPreorder(currentElement.nextElementSibling.firstElementChild));
            event.preventDefault();
        }
    };
    ListModel.prototype.onMouseMove = function (event) {
        this.resetFocusedItem();
    };
    ListModel.prototype.onKeyDown = function (event) {
        var currentElement = event.target;
        if (event.key === "ArrowDown" || event.keyCode === 40) {
            _element_helper__WEBPACK_IMPORTED_MODULE_4__["ElementHelper"].focusElement(_element_helper__WEBPACK_IMPORTED_MODULE_4__["ElementHelper"].getNextElementPreorder(currentElement));
            event.preventDefault();
        }
        else if (event.key === "ArrowUp" || event.keyCode === 38) {
            _element_helper__WEBPACK_IMPORTED_MODULE_4__["ElementHelper"].focusElement(_element_helper__WEBPACK_IMPORTED_MODULE_4__["ElementHelper"].getNextElementPostorder(currentElement));
            event.preventDefault();
        }
    };
    ListModel.prototype.onPointerDown = function (event, item) { };
    ListModel.prototype.refresh = function () {
        this.filterString = "";
        this.resetFocusedItem();
    };
    ListModel.prototype.resetFocusedItem = function () {
        this.focusedItem = undefined;
    };
    ListModel.prototype.focusFirstVisibleItem = function () {
        this.focusedItem = this.visibleItems[0];
    };
    ListModel.prototype.focusLastVisibleItem = function () {
        this.focusedItem = this.visibleItems[this.visibleItems.length - 1];
    };
    ListModel.prototype.initFocusedItem = function () {
        var _this = this;
        if (!!this.selectedItem) {
            this.focusedItem = this.visibleItems.filter(function (item) { return item.id === _this.selectedItem.id; })[0];
        }
        else {
            this.focusFirstVisibleItem();
        }
    };
    ListModel.prototype.focusNextVisibleItem = function () {
        if (!this.focusedItem) {
            this.initFocusedItem();
        }
        else {
            var items = this.visibleItems;
            var currentFocusedItemIndex = items.indexOf(this.focusedItem);
            var nextItem = items[currentFocusedItemIndex + 1];
            if (nextItem) {
                this.focusedItem = nextItem;
            }
            else {
                this.focusFirstVisibleItem();
            }
        }
    };
    ListModel.prototype.focusPrevVisibleItem = function () {
        if (!this.focusedItem) {
            this.initFocusedItem();
        }
        else {
            var items = this.visibleItems;
            var currentFocusedItemIndex = items.indexOf(this.focusedItem);
            var prevItem = items[currentFocusedItemIndex - 1];
            if (prevItem) {
                this.focusedItem = prevItem;
            }
            else {
                this.focusLastVisibleItem();
            }
        }
    };
    ListModel.prototype.selectFocusedItem = function () {
        !!this.focusedItem && this.onItemClick(this.focusedItem);
    };
    ListModel.prototype.initListContainerHtmlElement = function (htmlElement) {
        this.listContainerHtmlElement = htmlElement;
    };
    ListModel.prototype.onLastItemRended = function (item) {
        if (this.isAllDataLoaded)
            return;
        if (item === this.actions[this.actions.length - 1] && !!this.listContainerHtmlElement) {
            this.hasVerticalScroller = _element_helper__WEBPACK_IMPORTED_MODULE_4__["ElementHelper"].hasVerticalScroller(this.scrollableContainer);
        }
    };
    ListModel.prototype.scrollToFocusedItem = function () {
        var _this = this;
        setTimeout(function () {
            if (!_this.listContainerHtmlElement)
                return;
            var item = _this.listContainerHtmlElement.querySelector("." + _this.getDefaultCssClasses().itemFocused);
            if (item) {
                item.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
            }
        }, 0);
    };
    ListModel.prototype.addScrollEventListener = function (handler) {
        if (!!handler) {
            this.scrollHandler = handler;
        }
        if (!!this.scrollHandler) {
            this.scrollableContainer.addEventListener("scroll", this.scrollHandler);
        }
    };
    ListModel.prototype.removeScrollEventListener = function () {
        if (!!this.scrollHandler) {
            this.scrollableContainer.removeEventListener("scroll", this.scrollHandler);
        }
    };
    ListModel.INDENT = 16;
    ListModel.MINELEMENTCOUNT = 10;
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
            defaultValue: true,
            onSet: function (newValue, target) {
                target.onSet();
            }
        })
    ], ListModel.prototype, "searchEnabled", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], ListModel.prototype, "showFilter", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], ListModel.prototype, "isExpanded", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
            onSet: function (newValue, target) {
                target.updateItemActiveState();
            }
        })
    ], ListModel.prototype, "selectedItem", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], ListModel.prototype, "focusedItem", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
            onSet: function (_, target) {
                target.onFilterStringChanged(target.filterString);
            }
        })
    ], ListModel.prototype, "filterString", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], ListModel.prototype, "hasVerticalScroller", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
    ], ListModel.prototype, "isAllDataLoaded", void 0);
    return ListModel;
}(_actions_container__WEBPACK_IMPORTED_MODULE_1__["ActionContainer"]));



/***/ }),

/***/ "./src/localizablestring.ts":
/*!**********************************!*\
  !*** ./src/localizablestring.ts ***!
  \**********************************/
/*! exports provided: LocalizableString, LocalizableStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocalizableString", function() { return LocalizableString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocalizableStrings", function() { return LocalizableStrings; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./src/base.ts");




/**
 * The class represents the string that supports multi-languages and markdown.
 * It uses in all objects where support for multi-languages and markdown is required.
 */
var LocalizableString = /** @class */ (function () {
    function LocalizableString(owner, useMarkdown, name) {
        if (useMarkdown === void 0) { useMarkdown = false; }
        this.owner = owner;
        this.useMarkdown = useMarkdown;
        this.name = name;
        this.values = {};
        this.htmlValues = {};
        this.onStringChanged = new _base__WEBPACK_IMPORTED_MODULE_3__["EventBase"]();
        this.onCreating();
    }
    Object.defineProperty(LocalizableString, "defaultLocale", {
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName;
        },
        set: function (val) {
            _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName = val;
        },
        enumerable: false,
        configurable: true
    });
    LocalizableString.prototype.getIsMultiple = function () { return false; };
    Object.defineProperty(LocalizableString.prototype, "locale", {
        get: function () {
            if (this.owner && this.owner.getLocale) {
                var res = this.owner.getLocale();
                if (!!res || !this.sharedData)
                    return res;
            }
            if (!!this.sharedData)
                return this.sharedData.locale;
            return "";
        },
        enumerable: false,
        configurable: true
    });
    LocalizableString.prototype.strChanged = function () {
        this.searchableText = undefined;
        if (this.renderedText === undefined)
            return;
        this.calculatedTextValue = this.calcText();
        if (this.renderedText !== this.calculatedTextValue) {
            this.renderedText = undefined;
            this.calculatedTextValue = undefined;
        }
        this.htmlValues = {};
        this.onChanged();
        this.onStringChanged.fire(this, {});
    };
    Object.defineProperty(LocalizableString.prototype, "text", {
        get: function () {
            return this.pureText;
        },
        set: function (value) {
            this.setLocaleText(this.locale, value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableString.prototype, "calculatedText", {
        get: function () {
            this.renderedText =
                this.calculatedTextValue !== undefined
                    ? this.calculatedTextValue
                    : this.calcText();
            this.calculatedTextValue = undefined;
            return this.renderedText;
        },
        enumerable: false,
        configurable: true
    });
    LocalizableString.prototype.calcText = function () {
        var res = this.pureText;
        if (res &&
            this.owner &&
            this.owner.getProcessedText &&
            res.indexOf("{") > -1) {
            res = this.owner.getProcessedText(res);
        }
        if (this.onGetTextCallback)
            res = this.onGetTextCallback(res);
        return res;
    };
    Object.defineProperty(LocalizableString.prototype, "pureText", {
        get: function () {
            var loc = this.locale;
            if (!loc)
                loc = this.defaultLoc;
            var res = this.getValue(loc);
            if (!res && loc === this.defaultLoc) {
                res = this.getValue(_surveyStrings__WEBPACK_IMPORTED_MODULE_1__["surveyLocalization"].defaultLocale);
            }
            if (!res) {
                var dialect = this.getRootDialect(loc);
                if (!!dialect) {
                    res = this.getValue(dialect);
                }
            }
            if (!res && loc !== this.defaultLoc) {
                res = this.getValue(this.defaultLoc);
            }
            if (!res && !!this.getLocalizationName()) {
                res = this.getLocalizationStr();
                if (!!this.onGetLocalizationTextCallback) {
                    res = this.onGetLocalizationTextCallback(res);
                }
            }
            if (!res)
                res = "";
            return res;
        },
        enumerable: false,
        configurable: true
    });
    LocalizableString.prototype.getRootDialect = function (loc) {
        if (!loc)
            return loc;
        var index = loc.indexOf("-");
        return index > -1 ? loc.substring(0, index) : "";
    };
    LocalizableString.prototype.getLocalizationName = function () {
        return !!this.sharedData ? this.sharedData.localizationName : this.localizationName;
    };
    LocalizableString.prototype.getLocalizationStr = function () {
        var name = this.getLocalizationName();
        return !!name ? _surveyStrings__WEBPACK_IMPORTED_MODULE_1__["surveyLocalization"].getString(name, this.locale) : "";
    };
    Object.defineProperty(LocalizableString.prototype, "hasHtml", {
        get: function () {
            return this.hasHtmlValue();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableString.prototype, "html", {
        get: function () {
            if (!this.hasHtml)
                return "";
            return this.getHtmlValue();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableString.prototype, "isEmpty", {
        get: function () {
            return this.getValuesKeys().length == 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableString.prototype, "textOrHtml", {
        get: function () {
            return this.hasHtml ? this.getHtmlValue() : this.calculatedText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableString.prototype, "renderedHtml", {
        get: function () {
            return this.textOrHtml;
        },
        enumerable: false,
        configurable: true
    });
    LocalizableString.prototype.getLocaleText = function (loc) {
        if (!loc)
            loc = this.defaultLoc;
        var res = this.getValue(loc);
        return res ? res : "";
    };
    LocalizableString.prototype.getLocaleTextWithDefault = function (loc) {
        var res = this.getLocaleText(loc);
        if (!res && this.onGetDefaultTextCallback) {
            return this.onGetDefaultTextCallback();
        }
        return res;
    };
    LocalizableString.prototype.setLocaleText = function (loc, value) {
        if (!this.storeDefaultText && value == this.getLocaleTextWithDefault(loc)) {
            if (!!value || !!loc && loc !== this.defaultLoc)
                return;
            var dl = _surveyStrings__WEBPACK_IMPORTED_MODULE_1__["surveyLocalization"].defaultLocale;
            var oldValue_1 = this.getValue(dl);
            if (!!dl && !!oldValue_1) {
                this.setValue(dl, value);
                this.fireStrChanged(oldValue_1, value);
            }
            return;
        }
        if (!_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].storeDuplicatedTranslations &&
            value &&
            loc &&
            loc != this.defaultLoc &&
            !this.getValue(loc) &&
            value == this.getLocaleText(this.defaultLoc))
            return;
        var curLoc = this.locale;
        if (!loc)
            loc = this.defaultLoc;
        if (!curLoc)
            curLoc = this.defaultLoc;
        var oldValue = this.onStrChanged && loc === curLoc ? this.pureText : undefined;
        delete this.htmlValues[loc];
        if (!value) {
            if (this.getValue(loc))
                this.deleteValue(loc);
        }
        else {
            if (typeof value === "string") {
                if (this.canRemoveLocValue(loc, value)) {
                    this.setLocaleText(loc, null);
                }
                else {
                    this.setValue(loc, value);
                    if (loc == this.defaultLoc) {
                        this.deleteValuesEqualsToDefault(value);
                    }
                }
            }
        }
        this.fireStrChanged(oldValue, value);
    };
    LocalizableString.prototype.canRemoveLocValue = function (loc, val) {
        if (_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].storeDuplicatedTranslations)
            return false;
        if (loc === this.defaultLoc)
            return false;
        var dialect = this.getRootDialect(loc);
        if (!!dialect) {
            var dialectVal = this.getLocaleText(dialect);
            if (!!dialectVal)
                return dialectVal == val;
            return this.canRemoveLocValue(dialect, val);
        }
        else {
            return val == this.getLocaleText(this.defaultLoc);
        }
    };
    LocalizableString.prototype.fireStrChanged = function (oldValue, value) {
        this.strChanged();
        if (!!this.onStrChanged && oldValue !== value) {
            this.onStrChanged(oldValue, value);
        }
    };
    LocalizableString.prototype.hasNonDefaultText = function () {
        var keys = this.getValuesKeys();
        if (keys.length == 0)
            return false;
        return keys.length > 1 || keys[0] != this.defaultLoc;
    };
    LocalizableString.prototype.getLocales = function () {
        var keys = this.getValuesKeys();
        if (keys.length == 0)
            return [];
        return keys;
    };
    LocalizableString.prototype.getJson = function () {
        if (!!this.sharedData)
            return this.sharedData.getJson();
        var keys = this.getValuesKeys();
        if (keys.length == 0)
            return null;
        if (keys.length == 1 &&
            keys[0] == _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName &&
            !_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].serializeLocalizableStringAsObject)
            return this.values[keys[0]];
        return this.values;
    };
    LocalizableString.prototype.setJson = function (value) {
        if (!!this.sharedData) {
            this.sharedData.setJson(value);
            return;
        }
        this.values = {};
        this.htmlValues = {};
        if (!value)
            return;
        if (typeof value === "string") {
            this.setLocaleText(null, value);
        }
        else {
            for (var key in value) {
                this.setLocaleText(key, value[key]);
            }
        }
        this.strChanged();
    };
    Object.defineProperty(LocalizableString.prototype, "renderAs", {
        get: function () {
            if (!this.owner || typeof this.owner.getRenderer !== "function") {
                return LocalizableString.defaultRenderer;
            }
            return this.owner.getRenderer(this.name) || LocalizableString.defaultRenderer;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableString.prototype, "renderAsData", {
        get: function () {
            if (!this.owner || typeof this.owner.getRendererContext !== "function") {
                return this;
            }
            return this.owner.getRendererContext(this) || this;
        },
        enumerable: false,
        configurable: true
    });
    LocalizableString.prototype.equals = function (obj) {
        if (!!this.sharedData)
            return this.sharedData.equals(obj);
        if (!obj || !obj.values)
            return false;
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(this.values, obj.values, false, true, false);
    };
    LocalizableString.prototype.setFindText = function (text) {
        if (this.searchText == text)
            return;
        this.searchText = text;
        if (!this.searchableText) {
            var textOrHtml = this.textOrHtml;
            this.searchableText = !!textOrHtml ? textOrHtml.toLowerCase() : "";
        }
        var str = this.searchableText;
        var index = !!str && !!text ? str.indexOf(text) : undefined;
        if (index < 0)
            index = undefined;
        if (index != undefined || this.searchIndex != index) {
            this.searchIndex = index;
            if (!!this.onSearchChanged) {
                this.onSearchChanged();
            }
        }
        return this.searchIndex != undefined;
    };
    LocalizableString.prototype.onChanged = function () { };
    LocalizableString.prototype.onCreating = function () { };
    LocalizableString.prototype.hasHtmlValue = function () {
        if (!this.owner || !this.useMarkdown)
            return false;
        var loc = this.locale;
        if (!loc)
            loc = this.defaultLoc;
        if (this.htmlValues[loc] !== undefined)
            return !!this.htmlValues[loc];
        var renderedText = this.calculatedText;
        if (!renderedText)
            return false;
        if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr())
            return false;
        var res = this.owner.getMarkdownHtml(renderedText, this.name);
        this.htmlValues[loc] = res;
        return !!res;
    };
    LocalizableString.prototype.getHtmlValue = function () {
        var loc = this.locale;
        if (!loc)
            loc = this.defaultLoc;
        return this.htmlValues[loc];
    };
    LocalizableString.prototype.deleteValuesEqualsToDefault = function (defaultValue) {
        var keys = this.getValuesKeys();
        for (var i = 0; i < keys.length; i++) {
            if (keys[i] == this.defaultLoc)
                continue;
            if (this.getValue(keys[i]) == defaultValue) {
                this.deleteValue(keys[i]);
            }
        }
    };
    LocalizableString.prototype.getValue = function (loc) {
        if (!!this.sharedData)
            return this.sharedData.getValue(loc);
        return this.values[loc];
    };
    LocalizableString.prototype.setValue = function (loc, value) {
        if (!!this.sharedData)
            this.sharedData.setValue(loc, value);
        else
            this.values[loc] = value;
    };
    LocalizableString.prototype.deleteValue = function (loc) {
        if (!!this.sharedData)
            this.sharedData.deleteValue(loc);
        else
            delete this.values[loc];
    };
    LocalizableString.prototype.getValuesKeys = function () {
        if (!!this.sharedData)
            return this.sharedData.getValuesKeys();
        return Object.keys(this.values);
    };
    Object.defineProperty(LocalizableString.prototype, "defaultLoc", {
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName;
        },
        enumerable: false,
        configurable: true
    });
    LocalizableString.SerializeAsObject = false;
    LocalizableString.defaultRenderer = "sv-string-viewer";
    LocalizableString.editableRenderer = "sv-string-editor";
    return LocalizableString;
}());

/**
 * The class represents the list of strings that supports multi-languages.
 */
var LocalizableStrings = /** @class */ (function () {
    function LocalizableStrings(owner) {
        this.owner = owner;
        this.values = {};
    }
    LocalizableStrings.prototype.getIsMultiple = function () { return true; };
    Object.defineProperty(LocalizableStrings.prototype, "locale", {
        get: function () {
            return this.owner && this.owner.getLocale ? this.owner.getLocale() : "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableStrings.prototype, "value", {
        get: function () {
            return this.getValue("");
        },
        set: function (val) {
            this.setValue("", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LocalizableStrings.prototype, "text", {
        get: function () {
            return Array.isArray(this.value) ? this.value.join("\n") : "";
        },
        set: function (val) {
            this.value = !!val ? val.split("\n") : [];
        },
        enumerable: false,
        configurable: true
    });
    LocalizableStrings.prototype.getLocaleText = function (loc) {
        var res = this.getValueCore(loc, !loc || loc === this.locale);
        if (!res || !Array.isArray(res) || res.length == 0)
            return "";
        return res.join("\n");
    };
    LocalizableStrings.prototype.setLocaleText = function (loc, newValue) {
        var val = !!newValue ? newValue.split("\n") : null;
        this.setValue(loc, val);
    };
    LocalizableStrings.prototype.getValue = function (loc) {
        return this.getValueCore(loc);
    };
    LocalizableStrings.prototype.getValueCore = function (loc, useDefault) {
        if (useDefault === void 0) { useDefault = true; }
        loc = this.getLocale(loc);
        if (this.values[loc])
            return this.values[loc];
        if (useDefault) {
            var defLoc = _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName;
            if (loc !== defLoc && this.values[defLoc])
                return this.values[defLoc];
        }
        return [];
    };
    LocalizableStrings.prototype.setValue = function (loc, val) {
        loc = this.getLocale(loc);
        var oldValue = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].createCopy(this.values);
        if (!val || val.length == 0) {
            delete this.values[loc];
        }
        else {
            this.values[loc] = val;
        }
        if (!!this.onValueChanged) {
            this.onValueChanged(oldValue, this.values);
        }
    };
    LocalizableStrings.prototype.hasValue = function (loc) {
        if (loc === void 0) { loc = ""; }
        return !this.isEmpty && this.getValue(loc).length > 0;
    };
    Object.defineProperty(LocalizableStrings.prototype, "isEmpty", {
        get: function () {
            return this.getValuesKeys().length == 0;
        },
        enumerable: false,
        configurable: true
    });
    LocalizableStrings.prototype.getLocale = function (loc) {
        if (!!loc)
            return loc;
        loc = this.locale;
        return !!loc ? loc : _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName;
    };
    LocalizableStrings.prototype.getLocales = function () {
        var keys = this.getValuesKeys();
        if (keys.length == 0)
            return [];
        return keys;
    };
    LocalizableStrings.prototype.getJson = function () {
        var keys = this.getValuesKeys();
        if (keys.length == 0)
            return null;
        if (keys.length == 1 &&
            keys[0] == _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName &&
            !_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].serializeLocalizableStringAsObject)
            return this.values[keys[0]];
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].createCopy(this.values);
    };
    LocalizableStrings.prototype.setJson = function (value) {
        this.values = {};
        if (!value)
            return;
        if (Array.isArray(value)) {
            this.setValue(null, value);
        }
        else {
            for (var key in value) {
                this.setValue(key, value[key]);
            }
        }
    };
    LocalizableStrings.prototype.getValuesKeys = function () {
        return Object.keys(this.values);
    };
    return LocalizableStrings;
}());



/***/ }),

/***/ "./src/localization/arabic.ts":
/*!************************************!*\
  !*** ./src/localization/arabic.ts ***!
  \************************************/
/*! exports provided: arabicSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arabicSurveyStrings", function() { return arabicSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var arabicSurveyStrings = {
    pagePrevText: "السابق",
    pageNextText: "التالي",
    completeText: "إرسال البيانات",
    previewText: "معاينة",
    editText: "تعديل",
    startSurveyText: "بداية",
    otherItemText: "نص آخر",
    noneItemText: "لا شيء",
    selectAllItemText: "اختر الكل",
    progressText: "{1} صفحة {0} من",
    panelDynamicProgressText: "سجل {0} من {1}",
    questionsProgressText: "تمت الإجابة على أسئلة {0} / {1}",
    emptySurvey: "لا توجد صفحة مرئية أو سؤال في النموذج",
    completingSurvey: "شكرا لكم لاستكمال النموذج!",
    completingSurveyBefore: "تظهر سجلاتنا أنك قد أكملت هذا الاستطلاع بالفعل.",
    loadingSurvey: "...يتم تحميل النموذج",
    placeholder: "...اختر",
    value: "القيمة",
    requiredError: ".يرجى الإجابة على السؤال",
    requiredErrorInPanel: "الرجاء الإجابة على سؤال واحد على الأقل.",
    requiredInAllRowsError: "يرجى الإجابة على الأسئلة في جميع الصفوف",
    numericError: "يجب أن تكون القيمة رقمية.",
    textMinLength: "الرجاء إدخال ما لا يقل عن {0} حروف",
    textMaxLength: "الرجاء إدخال أقل من {0} حروف",
    textMinMaxLength: "يرجى إدخال أكثر من {0} وأقل من {1} حروف",
    minRowCountError: "يرجى ملء ما لا يقل عن {0} الصفوف",
    minSelectError: "يرجى تحديد ما لا يقل عن {0} المتغيرات",
    maxSelectError: "يرجى تحديد ما لا يزيد عن {0} المتغيرات",
    numericMinMax: "و'{0}' يجب أن تكون مساوية أو أكثر من {1} وتساوي أو أقل من {2}ا",
    numericMin: "و'{0}' يجب أن تكون مساوية أو أكثر من {1}ا",
    numericMax: "و'{0}' يجب أن تكون مساوية أو أقل من {1}ا",
    invalidEmail: "الرجاء إدخال بريد الكتروني صحيح",
    invalidExpression: "يجب أن يعرض التعبير: {0} 'صواب'.",
    urlRequestError: "طلب إرجاع خطأ '{0}'. {1}ا",
    urlGetChoicesError: "عاد طلب البيانات فارغ أو 'المسار' غير صحيح ",
    exceedMaxSize: "ينبغي ألا يتجاوز حجم الملف {0}ا",
    otherRequiredError: "الرجاء إدخال قيمة أخرى",
    uploadingFile: "تحميل الملف الخاص بك. يرجى الانتظار عدة ثوان والمحاولة لاحقًا",
    loadingFile: "جار التحميل...",
    chooseFile: "اختر الملفات...",
    noFileChosen: "لم تقم باختيار ملف",
    confirmDelete: "هل تريد حذف السجل؟",
    keyDuplicationError: "يجب أن تكون هذه القيمة فريدة.",
    addColumn: "أضف العمود",
    addRow: "اضافة صف",
    removeRow: "إزالة صف",
    addPanel: "اضف جديد",
    removePanel: "إزالة",
    choices_Item: "بند",
    matrix_column: "عمود",
    matrix_row: "صف",
    savingData: "يتم حفظ النتائج على الخادم ...",
    savingDataError: "حدث خطأ ولم نتمكن من حفظ النتائج.",
    savingDataSuccess: "تم حفظ النتائج بنجاح!",
    saveAgainButton: "حاول مجددا",
    timerMin: "دقيقة",
    timerSec: "ثانية",
    timerSpentAll: "لقد أنفقت {0} على هذه الصفحة و {1} إجمالاً.",
    timerSpentPage: "لقد أنفقت {0} على هذه الصفحة.",
    timerSpentSurvey: "لقد أنفقت {0} إجمالاً.",
    timerLimitAll: "لقد أنفقت {0} من {1} في هذه الصفحة و {2} من إجمالي {3}.",
    timerLimitPage: "لقد أنفقت {0} من {1} في هذه الصفحة.",
    timerLimitSurvey: "لقد أنفقت {0} من إجمالي {1}.",
    clearCaption: "واضح",
    chooseFileCaption: "اختر ملف",
    removeFileCaption: "قم بإزالة هذا الملف",
    booleanCheckedLabel: "نعم",
    booleanUncheckedLabel: "لا",
    confirmRemoveFile: "هل أنت متأكد أنك تريد إزالة هذا الملف: {0}؟",
    confirmRemoveAllFiles: "هل أنت متأكد أنك تريد إزالة كافة الملفات؟",
    questionTitlePatternText: "عنوان السؤال",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ar"] = arabicSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ar"] = "العربية";


/***/ }),

/***/ "./src/localization/basque.ts":
/*!************************************!*\
  !*** ./src/localization/basque.ts ***!
  \************************************/
/*! exports provided: basqueSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basqueSurveyStrings", function() { return basqueSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var basqueSurveyStrings = {
    pagePrevText: "Aurrekoa",
    pageNextText: "Hurrengoa",
    completeText: "Bukatu",
    previewText: "Aurrebista",
    editText: "Editatu",
    startSurveyText: "Hasi",
    otherItemText: "Beste bat (zehaztu)",
    noneItemText: "Bat ere ez",
    selectAllItemText: "Guztia hautatu",
    progressText: "{1}-(e)tik {0} orrialde",
    panelDynamicProgressText: "{0} errigistro {1}-(e)tik",
    questionsProgressText: "Erantzundako galderak {0}/{1}",
    emptySurvey: "Ez dago orrialde bistaragarririk edo ez dago galderarik.",
    completingSurvey: "Eskerrik asko galdetegia erantzuteagatik!",
    completingSurveyBefore: "Gure datuek diote dagoeneko galdetegia erantzun duzula.",
    loadingSurvey: "Galdetegia kargatzen...",
    placeholder: "Hautatu...",
    value: "balioa",
    requiredError: "Mesedez, galdera erantzun.",
    requiredErrorInPanel: "Mesedez, gutxienez galdera bat erantzun.",
    requiredInAllRowsError: "Mesedez, errenkadako galdera guztiak erantzun.",
    numericError: "Estimazioa zenbakizkoa izan behar du.",
    minError: "Balioa ez da {0} baino txikiagoa izan behar",
    maxError: "Balioa ez da {0} baino handiagoa izan behar",
    textMinLength: "Mesedez, gutxienez {0} karaktere erabili behar dira.",
    textMaxLength: "Mesedez, gehienez {0} karaktere erabili behar dira.",
    textMinMaxLength: "Mesedez, gehienez {0} eta gutxienez {1} karaktere erabili behar dira.",
    minRowCountError: "Mesedez, gutxienez {0} errenkada bete.",
    minSelectError: "Mesedez, gutxienez {0} aukera hautatu.",
    maxSelectError: "Mesedez, {0} aukera baino gehiago ez hautatu.",
    numericMinMax: "El '{0}' debe de ser igual o más de {1} y igual o menos de {2}",
    numericMin: "'{0}' {1} baino handiagoa edo berdin izan behar da",
    numericMax: "'{0}' {1} baino txikiago edo berdin izan behar da",
    invalidEmail: "Mesedez, baliozko emaila idatz ezazu.",
    invalidExpression: "{0} adierazpenak 'egiazkoa' itzuli beharko luke.",
    urlRequestError: "Eskaerak '{0}' errorea itzuli du. {1}",
    urlGetChoicesError: "La solicitud regresó vacío de data o la propiedad 'trayectoria' no es correcta",
    exceedMaxSize: "Fitxategiaren tamaina ez da {0} baino handiagoa izan behar.",
    otherRequiredError: "Mesedez, beste estimazioa gehitu.",
    uploadingFile: "Zure fitxategia igotzen ari da. Mesedez, segundo batzuk itxaron eta saiatu berriro.",
    loadingFile: "Kargatzen...",
    chooseFile: "Fitxategia(k) hautatu...",
    noFileChosen: "Ez da inolako fitxategirik hautatu",
    confirmDelete: "¿Erregistroa borratu nahi al duzu?",
    keyDuplicationError: "Balio hau bakarra izan behar du.",
    addColumn: "Zutabe bat gehitu",
    addRow: "Errenkada bat gehitu",
    removeRow: "Errenkada bat kendu",
    emptyRowsText: "Ez dago errenkadarik.",
    addPanel: "Berria gehitu",
    removePanel: "Kendu",
    choices_Item: "artikulua",
    matrix_column: "Zutabea",
    matrix_row: "Errenkada",
    multipletext_itemname: "testua",
    savingData: "Erantzunak zerbitzarian gordetzen ari dira...",
    savingDataError: "Erroreren bat gertatu eta erantzunak ez dira zerbitzarian gorde ahal izan.",
    savingDataSuccess: "Erantzunak egoki gorde dira!",
    saveAgainButton: "Berriro saiatu.",
    timerMin: "min",
    timerSec: "seg",
    timerSpentAll: "{0} erabili duzu orrialde honetan eta orotara {1}.",
    timerSpentPage: "Zuk {0} erabili duzu.",
    timerSpentSurvey: "Orotara gastatu duzu.",
    timerLimitAll: "{0} gastatu duzu {1}-(e)tik orrialde honetan eta orotara {2} {3}-(e)tik.",
    timerLimitPage: "{0} gastatu duzu orrialde honetan {1}-(e)tik.",
    timerLimitSurvey: "Zuk orotara {0} gastatu duzu {1}-(e)tik.",
    clearCaption: "Hustu",
    signaturePlaceHolder: "Sinatu hemen",
    chooseFileCaption: "Fitxategia hautatu",
    removeFileCaption: "Fitxategi hau ezabatu",
    booleanCheckedLabel: "Bai",
    booleanUncheckedLabel: "Ez",
    confirmRemoveFile: "Ziur zaude hurrengo fitxategia ezabatu nahi duzula: {0}?",
    confirmRemoveAllFiles: "Ziur al zaude fitxategi guztiak ezabatu nahi dituzula?",
    questionTitlePatternText: "Galderaren izenburua",
    modalCancelButtonText: "Ezeztatu",
    modalApplyButtonText: "Ezarri",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["eu"] = basqueSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["eu"] = "Euskara";


/***/ }),

/***/ "./src/localization/bulgarian.ts":
/*!***************************************!*\
  !*** ./src/localization/bulgarian.ts ***!
  \***************************************/
/*! exports provided: bulgarianStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bulgarianStrings", function() { return bulgarianStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var bulgarianStrings = {
    pagePrevText: "Назад",
    pageNextText: "Напред",
    completeText: "Край",
    previewText: "Визуализация",
    editText: "редактиране",
    startSurveyText: "Начало",
    otherItemText: "Друго (опишете)",
    noneItemText: "Нито един",
    selectAllItemText: "Всички",
    progressText: "стр. {0}, общо стр. {1}",
    panelDynamicProgressText: "Запис {0} от {1}",
    questionsProgressText: "Отговорени на {0} / {1} въпроса",
    emptySurvey: "Анкетата не съдържа видими страници или въпроси.",
    completingSurvey: "Благодарим ви за участието в анкетата!",
    completingSurveyBefore: "Изглежда, че вие вече сте попълнили анкетата.",
    loadingSurvey: "Зареждане на анкетата...",
    placeholder: "Изберете...",
    value: "value",
    requiredError: "Моля, отговорете на следния въпрос.",
    requiredErrorInPanel: "Моля, отговорете поне на един от въпросите.",
    requiredInAllRowsError: "Моля, отговорете на въпросите на всички редове.",
    numericError: "Стойността следва да бъде число.",
    textMinLength: "Моля, използвайте поне {0} символа.",
    textMaxLength: "Моля, използвайте не повече от {0} символа.",
    textMinMaxLength: "Моля, използвайте повече от {0} и по-малко от {1} символа.",
    minRowCountError: "Моля, попълнете поне {0} реда.",
    minSelectError: "Моля, изберете поне {0} варианта.",
    maxSelectError: "Моля, изберете не повече от {0} варианта.",
    numericMinMax: "Стойността '{0}' следва да бъде равна или по-голяма от {1} и равна или по-малка от {2}",
    numericMin: "Стойността '{0}' следва да бъде равна или по-голяма от {1}",
    numericMax: "Стойността '{0}' следва да бъде равна или по-малка от {1}",
    invalidEmail: "Моля, въведете валиден адрес на електронна поща.",
    invalidExpression: "Изразът: {0} трябва да дава резултат 'true' (истина).",
    urlRequestError: "Заявката води до грешка '{0}'. {1}",
    urlGetChoicesError: "Заявката не връща данни или частта 'path' (път до търсения ресурс на сървъра) е неправилно зададена",
    exceedMaxSize: "Размерът на файла следва да не превишава {0}.",
    otherRequiredError: "Моля, въведете другата стойност.",
    uploadingFile: "Вашит файл се зарежда на сървъра. Моля, изчакайте няколко секунди и тогава опитвайте отново.",
    loadingFile: "Зареждане...",
    chooseFile: "Изберете файл(ове)...",
    noFileChosen: "Няма избран файл",
    confirmDelete: "Желаете ли да изтриете записа?",
    keyDuplicationError: "Стойността следва да бъде уникална.",
    addColumn: "Добавяне на колона",
    addRow: "Добавяне на ред",
    removeRow: "Премахване на ред",
    addPanel: "Добавяне на панел",
    removePanel: "Премахване на панел",
    choices_Item: "елемент",
    matrix_column: "Колона",
    matrix_row: "Ред",
    savingData: "Резултатите се запазват на сървъра...",
    savingDataError: "Поради възникнала грешка резултатите не можаха да бъдат запазени.",
    savingDataSuccess: "Резултатите бяха запазени успешно!",
    saveAgainButton: "Нов опит",
    timerMin: "мин",
    timerSec: "сек",
    timerSpentAll: "Вие използвахте {0} на тази страница и общо {1}.",
    timerSpentPage: "Вие използвахте {0} на тази страница.",
    timerSpentSurvey: "Вие използвахте общо {0}.",
    timerLimitAll: "Вие изпозвахте {0} от {1} на тази страница и общо {2} от {3}.",
    timerLimitPage: "Вие използвахте {0} от {1} на тази страница.",
    timerLimitSurvey: "Вие използвахте общо {0} от {1}.",
    clearCaption: "Начално състояние",
    chooseFileCaption: "Изберете файл",
    removeFileCaption: "Премахване на файла",
    booleanCheckedLabel: "Да",
    booleanUncheckedLabel: "Не",
    confirmRemoveFile: "Наистина ли искате да премахнете този файл: {0}?",
    confirmRemoveAllFiles: "Наистина ли искате да премахнете всички файлове?",
    questionTitlePatternText: "Заглавие на въпроса",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["bg"] = bulgarianStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["bg"] = "български";


/***/ }),

/***/ "./src/localization/catalan.ts":
/*!*************************************!*\
  !*** ./src/localization/catalan.ts ***!
  \*************************************/
/*! exports provided: catalanSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catalanSurveyStrings", function() { return catalanSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var catalanSurveyStrings = {
    pagePrevText: "Anterior",
    pageNextText: "Següent",
    completeText: "Complet",
    otherItemText: "Un altre (descrigui)",
    progressText: "Pàgina {0} de {1}",
    emptySurvey: "No hi ha cap pàgina visible o pregunta a l'enquesta.",
    completingSurvey: "Gràcies per completar l'enquesta!",
    loadingSurvey: "L'enquesta s'està carregant ...",
    placeholder: "Selecciona ...",
    requiredError: "Si us plau contesti la pregunta.",
    requiredInAllRowsError: "Si us plau contesti les preguntes de cada filera.",
    numericError: "L'estimació ha de ser numèrica.",
    textMinLength: "Si us plau entre almenys {0} símbols.",
    textMaxLength: "Si us plau entre menys de {0} símbols.",
    textMinMaxLength: "Si us plau entre més de {0} i menys de {1} símbols.",
    minRowCountError: "Si us plau ompli almenys {0} fileres.",
    minSelectError: "Si us plau seleccioni almenys {0} variants.",
    maxSelectError: "Si us plau seleccioni no més de {0} variants.",
    numericMinMax: "El '{0}' deu ser igual o més de {1} i igual o menys de {2}",
    numericMin: "El '{0}' ha de ser igual o més de {1}",
    numericMax: "El '{0}' ha de ser igual o menys de {1}",
    invalidEmail: "Si us plau afegiu un correu electrònic vàlid.",
    urlRequestError: "La sol·licitud va tornar error '{0}'. {1}",
    urlGetChoicesError: "La sol·licitud va tornar buida de dates o la propietat 'trajectòria' no és correcta",
    exceedMaxSize: "La mida de l'arxiu no pot excedir {0}.",
    otherRequiredError: "Si us plau afegiu l'altra estimació.",
    uploadingFile: "El seu arxiu s'està pujant. Si us plau esperi uns segons i intenteu-ho de nou.",
    addRow: "Afegiu una filera",
    removeRow: "Eliminar una filera",
    choices_firstItem: "primer article",
    choices_secondItem: "segon article",
    choices_thirdItem: "tercer article",
    matrix_column: "Columna",
    matrix_row: "Filera"
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ca"] = catalanSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ca"] = "català";


/***/ }),

/***/ "./src/localization/croatian.ts":
/*!**************************************!*\
  !*** ./src/localization/croatian.ts ***!
  \**************************************/
/*! exports provided: croatianStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "croatianStrings", function() { return croatianStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var croatianStrings = {
    pagePrevText: "Prethodni",
    pageNextText: "Sljedeći",
    completeText: "Kompletan",
    previewText: "Pregled",
    editText: "Uređivanje",
    startSurveyText: "Početak",
    otherItemText: "Ostali (opis)",
    noneItemText: "Nitko",
    selectAllItemText: "Select All",
    progressText: "Stranica {0} od {1}",
    panelDynamicProgressText: "Zapisa {0} od {1}",
    questionsProgressText: "Odgovorio na {0}/{1} pitanja",
    emptySurvey: "U anketi nema vidljive stranice ili pitanja.",
    completingSurvey: "Hvala vam što ste završili anketu!",
    completingSurveyBefore: "Naši zapisi pokazuju da ste već završili ovu anketu.",
    loadingSurvey: "Anketa o učitavanje...",
    placeholder: "Odaberite...",
    value: "vrijednost",
    requiredError: "Molim vas odgovorite na pitanje.",
    requiredErrorInPanel: "Molim vas odgovorite na barem jedno pitanje.",
    requiredInAllRowsError: "Odgovorite na pitanja u svim redovima.",
    numericError: "Vrijednost bi trebala biti brojčana.",
    textMinLength: "Unesite najmanje {0} znak(ova).",
    textMaxLength: "Unesite manje od {0} znak(ova).",
    textMinMaxLength: "Unesite više od {0} i manje od {1} znakova.",
    minRowCountError: "Molimo ispunite najmanje {0} redaka.",
    minSelectError: "Odaberite barem {0} varijante.",
    maxSelectError: "Odaberite ne više od {0} varijanti.",
    numericMinMax: "'{0}'bi trebao biti jednak ili više od {1} i jednak ili manji od {2}.",
    numericMin: "'{0}' bi trebao biti jednak ili više od {1}.",
    numericMax: "'{0}' bi trebao biti jednak ili manji od {1}",
    invalidEmail: "Unesite valjanu e-mail adresu.",
    invalidExpression: "Izraz: {0} treba vratiti 'true'.",
    urlRequestError: "Zahtjev vratio pogrešku '{0}'. {1}",
    urlGetChoicesError: "Zahtjev je vratio prazne podatke ili je 'path' svojstvo netočna.",
    exceedMaxSize: "Veličina datoteke ne smije prelaziti {0}.",
    otherRequiredError: "Unesite drugu vrijednost.",
    uploadingFile: "Vaša datoteka se prenosi. Pričekajte nekoliko sekundi i pokušajte ponovno.",
    loadingFile: "Učitavanje...",
    chooseFile: "Odaberite datoteku...",
    noFileChosen: "Nije odabrana datoteka",
    confirmDelete: "Želite li izbrisati zapis?",
    keyDuplicationError: "Ta bi vrijednost trebala biti jedinstvena.",
    addColumn: "Dodavanje stupca",
    addRow: "Dodavanje redaka",
    removeRow: "Ukloniti",
    addPanel: "Dodavanje novih",
    removePanel: "Ukloniti",
    choices_Item: "stavku",
    matrix_column: "Stupca",
    matrix_row: "Redak",
    savingData: "Rezultati se spremaju na poslužitelju...",
    savingDataError: "Došlo je do pogreške i nismo mogli spremiti rezultate.",
    savingDataSuccess: "Rezultati su uspješno spremljeni!",
    saveAgainButton: "Pokušaj ponovo",
    timerMin: "min",
    timerSec: "sec",
    timerSpentAll: "Vi ste proveli {0} na ovoj stranici i {1} ukupno.",
    timerSpentPage: "Potrošili ste {0} na ovu stranicu.",
    timerSpentSurvey: "You have spent {0} in total. {0}.",
    timerLimitAll: "Vi ste proveli {0} od {1} na ovoj stranici i {2} od {3} ukupno.",
    timerLimitPage: "Potrošio si {0} od {1} na ovoj stranici.",
    timerLimitSurvey: "Ukupno ste potrošili {0} od {1}.",
    clearCaption: "Očistiti",
    chooseFileCaption: "Odaberite datoteku",
    removeFileCaption: "Uklonite ovu datoteku",
    booleanCheckedLabel: "Da",
    booleanUncheckedLabel: "Ne",
    confirmRemoveFile: "Jeste li sigurni da želite ukloniti ovu datoteku: {0}?",
    confirmRemoveAllFiles: "Jeste li sigurni da želite ukloniti sve datoteke?",
    questionTitlePatternText: "Naslov pitanja",
    modalCancelButtonText: "Otkazati",
    modalApplyButtonText: "Primijeniti",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["hr"] = croatianStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["hr"] = "hrvatski";


/***/ }),

/***/ "./src/localization/czech.ts":
/*!***********************************!*\
  !*** ./src/localization/czech.ts ***!
  \***********************************/
/*! exports provided: czechSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "czechSurveyStrings", function() { return czechSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var czechSurveyStrings = {
    pagePrevText: "Předchozí",
    pageNextText: "Další",
    completeText: "Hotovo",
    previewText: "Náhled",
    editText: "Upravit",
    startSurveyText: "Start",
    otherItemText: "Jiná odpověď (napište)",
    noneItemText: "Žádný",
    selectAllItemText: "Vybrat vše",
    progressText: "Strana {0} z {1}",
    panelDynamicProgressText: "Záznam {0} z {1}",
    questionsProgressText: "Zodpovězené otázky: {0} / {1}",
    emptySurvey: "Průzkumu neobsahuje žádné otázky.",
    completingSurvey: "Děkujeme za vyplnění průzkumu!",
    completingSurveyBefore: "Naše záznamy ukazují, že jste tento průzkum již dokončili.",
    loadingSurvey: "Probíhá načítání průzkumu...",
    placeholder: "Vyber...",
    value: "hodnota",
    requiredError: "Odpovězte prosím na otázku.",
    requiredErrorInPanel: "Please answer at least one question.",
    requiredInAllRowsError: "Odpovězte prosím na všechny otázky.",
    numericError: "V tomto poli lze zadat pouze čísla.",
    textMinLength: "Zadejte prosím alespoň {0} znaků.",
    textMaxLength: "Zadejte prosím méně než {0} znaků.",
    textMinMaxLength: "Zadejte prosím více než {0} a méně než {1} znaků.",
    minRowCountError: "Vyplňte prosím alespoň {0} řádků.",
    minSelectError: "Vyberte prosím alespoň {0} varianty.",
    maxSelectError: "Nevybírejte prosím více než {0} variant.",
    numericMinMax: "Odpověď '{0}' by mělo být větší nebo rovno {1} a menší nebo rovno {2}",
    numericMin: "Odpověď '{0}' by mělo být větší nebo rovno {1}",
    numericMax: "Odpověď '{0}' by mělo být menší nebo rovno {1}",
    invalidEmail: "Zadejte prosím platnou e-mailovou adresu.",
    invalidExpression: "Výraz: {0} by měl vrátit hodnotu „true“.",
    urlRequestError: "Požadavek vrátil chybu '{0}'. {1}",
    urlGetChoicesError: "Požadavek nevrátil data nebo cesta je neplatná",
    exceedMaxSize: "Velikost souboru by neměla být větší než {0}.",
    otherRequiredError: "Zadejte prosím jinou hodnotu.",
    uploadingFile: "Váš soubor se nahrává. Zkuste to prosím za několik sekund.",
    loadingFile: "Načítání...",
    chooseFile: "Vyberte soubory ...",
    noFileChosen: "Není zvolený žádný soubor",
    confirmDelete: "Chcete smazat záznam?",
    keyDuplicationError: "Tato hodnota by měla být jedinečná.",
    addColumn: "Přidat sloupec",
    addRow: "Přidat řádek",
    removeRow: "Odstranit",
    addPanel: "Přidat nový",
    removePanel: "Odstranit",
    choices_Item: "položka",
    matrix_column: "Sloupec",
    matrix_row: "Řádek",
    savingData: "Výsledky se ukládají na server ...",
    savingDataError: "Došlo k chybě a výsledky jsme nemohli uložit.",
    savingDataSuccess: "Výsledky byly úspěšně uloženy!",
    saveAgainButton: "Zkus to znovu",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Na této stránce jste utratili celkem {0} a celkem {1}.",
    timerSpentPage: "Na této stránce jste utratili {0}.",
    timerSpentSurvey: "Celkem jste utratili {0}.",
    timerLimitAll: "Na této stránce jste utratili {0} z {1} a celkem {2} z {3}.",
    timerLimitPage: "Na této stránce jste strávili {0} z {1}.",
    timerLimitSurvey: "Celkově jste utratili {0} z {1}.",
    clearCaption: "Průhledná",
    chooseFileCaption: "Vyberte soubor",
    removeFileCaption: "Odeberte tento soubor",
    booleanCheckedLabel: "Ano",
    booleanUncheckedLabel: "Ne",
    confirmRemoveFile: "Opravdu chcete odebrat tento soubor: {0}?",
    confirmRemoveAllFiles: "Opravdu chcete odstranit všechny soubory?",
    questionTitlePatternText: "Název otázky",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["cs"] = czechSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["cs"] = "čeština";


/***/ }),

/***/ "./src/localization/danish.ts":
/*!************************************!*\
  !*** ./src/localization/danish.ts ***!
  \************************************/
/*! exports provided: danishSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "danishSurveyStrings", function() { return danishSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var danishSurveyStrings = {
    pagePrevText: "Tilbage",
    pageNextText: "Videre",
    completeText: "Færdig",
    previewText: "Forpremiere",
    editText: "Redigér",
    startSurveyText: "Start",
    otherItemText: "Valgfrit svar...",
    noneItemText: "Ingen",
    selectAllItemText: "Vælg alle",
    progressText: "Side {0} af {1}",
    panelDynamicProgressText: "Optag {0} af {1}",
    questionsProgressText: "Besvarede {0} / {1} spørgsmål",
    emptySurvey: "Der er ingen synlige spørgsmål.",
    completingSurvey: "Mange tak for din besvarelse!",
    completingSurveyBefore: "Vores data viser at du allerede har gennemført dette spørgeskema.",
    loadingSurvey: "Spørgeskemaet hentes fra serveren...",
    placeholder: "Vælg...",
    value: "værdi",
    requiredError: "Besvar venligst spørgsmålet.",
    requiredErrorInPanel: "Besvar venligst mindst ét spørgsmål.",
    requiredInAllRowsError: "Besvar venligst spørgsmål i alle rækker.",
    numericError: "Angiv et tal.",
    textMinLength: "Angiv mindst {0} tegn.",
    textMaxLength: "Please enter less than {0} characters.",
    textMinMaxLength: "Angiv mere end {0} og mindre end {1} tegn.",
    minRowCountError: "Udfyld mindst {0} rækker.",
    minSelectError: "Vælg venligst mindst {0} svarmulighed(er).",
    maxSelectError: "Vælg venligst færre {0} svarmuligheder(er).",
    numericMinMax: "'{0}' skal være lig med eller større end {1} og lig med eller mindre end {2}",
    numericMin: "'{0}' skal være lig med eller større end {1}",
    numericMax: "'{0}' skal være lig med eller mindre end {1}",
    invalidEmail: "Angiv venligst en gyldig e-mail adresse.",
    invalidExpression: "Udtrykket: {0} skal returnere 'true'.",
    urlRequestError: "Forespørgslen returnerede fejlen '{0}'. {1}",
    urlGetChoicesError: "Forespørgslen returnerede ingen data eller 'path' parameteren er forkert",
    exceedMaxSize: "Filstørrelsen må ikke overstige {0}.",
    otherRequiredError: "Angiv en værdi for dit valgfrie svar.",
    uploadingFile: "Din fil bliver uploadet. Vent nogle sekunder og prøv eventuelt igen.",
    loadingFile: "Indlæser...",
    chooseFile: "Vælg fil(er)...",
    noFileChosen: "Ingen fil er valgt",
    confirmDelete: "Vil du fjerne den?",
    keyDuplicationError: "Denne værdi skal være unik.",
    addColumn: "Tilføj kolonne",
    addRow: "Tilføj række",
    removeRow: "Fjern",
    addPanel: "Tilføj ny",
    removePanel: "Fjern",
    choices_Item: "valg",
    matrix_column: "Kolonne",
    matrix_row: "Række",
    savingData: "Resultaterne bliver gemt på serveren...",
    savingDataError: "Der opstod en fejl og vi kunne ikke gemme resultatet.",
    savingDataSuccess: "Resultatet blev gemt!",
    saveAgainButton: "Prøv igen",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Du har brugt {0} på denne side og {1} i alt.",
    timerSpentPage: "Du har brugt {0} på denne side.",
    timerSpentSurvey: "Du har brugt {0} i alt.",
    timerLimitAll: "Du har brugt {0} af {1} på denne side og {2} af {3} i alt.",
    timerLimitPage: "Du har brugt {0} af {1} på denne side.",
    timerLimitSurvey: "Du har brugt {0} af {1} i alt.",
    clearCaption: "Fjern",
    chooseFileCaption: "Vælg fil",
    removeFileCaption: "Fjern denne fil",
    booleanCheckedLabel: "Ja",
    booleanUncheckedLabel: "Ingen",
    confirmRemoveFile: "Er du sikker på, at du vil fjerne denne fil: {0}?",
    confirmRemoveAllFiles: "Er du sikker på, at du vil fjerne alle filer?",
    questionTitlePatternText: "Spørgsmåls titel",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["da"] = danishSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["da"] = "dansk";


/***/ }),

/***/ "./src/localization/dutch.ts":
/*!***********************************!*\
  !*** ./src/localization/dutch.ts ***!
  \***********************************/
/*! exports provided: dutchSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dutchSurveyStrings", function() { return dutchSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
//Created on behalf https://github.com/Frank13
//Modified on behalf Roeland Verbakel

var dutchSurveyStrings = {
    pagePrevText: "Vorige",
    pageNextText: "Volgende",
    completeText: "Verzenden",
    previewText: "Voorbeeld",
    editText: "Bewerk",
    startSurveyText: "Start",
    otherItemText: "Anders, nl.",
    noneItemText: "Geen",
    selectAllItemText: "Selecteer Alles",
    progressText: "Pagina {0} van {1}",
    panelDynamicProgressText: "Record {0} of {1}",
    questionsProgressText: "Geantwoord {0}/{1} vragen",
    emptySurvey: "Er is geen zichtbare pagina of vraag in deze vragenlijst",
    completingSurvey: "Bedankt voor het invullen van de vragenlijst",
    completingSurveyBefore: "Onze gegevens tonen aan dat je deze vragenlijst reeds beantwoord hebt.",
    loadingSurvey: "De vragenlijst is aan het laden...",
    placeholder: "Kies...",
    value: "waarde",
    requiredError: "Dit is een vereiste vraag",
    requiredErrorInPanel: "Gelieve ten minste een vraag te beantwoorden.",
    requiredInAllRowsError: "Deze vraag vereist één antwoord per rij",
    numericError: "Het antwoord moet een getal zijn",
    textMinLength: "Vul minstens {0} karakters in",
    textMaxLength: "Gelieve minder dan {0} karakters in te vullen.",
    textMinMaxLength: "Gelieve meer dan {0} en minder dan {1} karakters in te vullen.",
    minRowCountError: "Gelieve ten minste {0} rijen in te vullen.",
    minSelectError: "Selecteer minimum {0} antwoorden",
    maxSelectError: "Selecteer niet meer dan {0} antwoorden",
    numericMinMax: "Uw antwoord '{0}' moet groter of gelijk zijn aan {1} en kleiner of gelijk aan {2}",
    numericMin: "Uw antwoord '{0}' moet groter of gelijk zijn aan {1}",
    numericMax: "Uw antwoord '{0}' moet groter of gelijk zijn aan {1}",
    invalidEmail: "Vul een geldig e-mailadres in",
    invalidExpression: "De uitdrukking: {0} moet 'waar' teruggeven.",
    urlRequestError: "De vraag keerde een fout terug '{0}'. {1}",
    urlGetChoicesError: "De vraag gaf een leeg antwoord terug of de 'pad' eigenschap is niet correct",
    exceedMaxSize: "De grootte van het bestand mag niet groter zijn dan {0}",
    otherRequiredError: "Vul het veld 'Anders, nl.' in",
    uploadingFile: "Uw bestand wordt opgeladen. Gelieve enkele seconden te wachten en opnieuw te proberen.",
    loadingFile: "Opladen...",
    chooseFile: "Kies uw bestand(en)...",
    noFileChosen: "Geen bestand gekozen",
    fileDragAreaPlaceholder: "Sleep het bestand naar hier",
    confirmDelete: "Wil je deze gegevens verwijderen?",
    keyDuplicationError: "Deze waarde moet uniek zijn.",
    addColumn: "Voeg kolom toe",
    addRow: "Voeg rij toe",
    removeRow: "Verwijder",
    addPanel: "Nieuwe toevoegen",
    removePanel: "Verwijder",
    choices_Item: "onderwerp",
    matrix_column: "Kolom",
    matrix_row: "Rij",
    savingData: "De resultaten worden bewaard op de server...",
    savingDataError: "Er was een probleem en we konden de resultaten niet bewaren.",
    savingDataSuccess: "De resultaten werden succesvol bewaard!",
    saveAgainButton: "Probeer opnieuw",
    timerMin: "minimum",
    timerSec: "sec",
    timerSpentAll: "U heeft {0} gespendeerd op deze pagina en {1} in totaal.",
    timerSpentPage: "U heeft {0} op deze pagina gespendeerd.",
    timerSpentSurvey: "U heeft in totaal {0} gespendeerd.",
    timerLimitAll: "U heeft {0} van {1} op deze pagina gespendeerd en {2} van {3} in totaal.",
    timerLimitPage: "U heeft {0} van {1} gespendeerd op deze pagina.",
    timerLimitSurvey: "U heeft {0} van {1} in het totaal.",
    clearCaption: "Kuis op",
    signaturePlaceHolder: "Hier tekenen",
    chooseFileCaption: "Gekozen bestand",
    removeFileCaption: "Verwijder deze file",
    booleanCheckedLabel: "Ja",
    booleanUncheckedLabel: "Nee",
    confirmRemoveFile: "Bent u zeker dat u deze file wilt verwijderen: {0}?",
    confirmRemoveAllFiles: "Bent u zeker dat u al deze files wilt verwijderen?",
    questionTitlePatternText: "Titel van de vraag",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["nl"] = dutchSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["nl"] = "nederlands";


/***/ }),

/***/ "./src/localization/english.ts":
/*!*************************************!*\
  !*** ./src/localization/english.ts ***!
  \*************************************/
/*! exports provided: englishStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "englishStrings", function() { return englishStrings; });
// Uncomment this line on creating a translation file
// import { surveyLocalization } from "survey-core";
var englishStrings = {
    pagePrevText: "Previous",
    pageNextText: "Next",
    completeText: "Complete",
    previewText: "Preview",
    editText: "Edit",
    startSurveyText: "Start",
    otherItemText: "Other (describe)",
    noneItemText: "None",
    selectAllItemText: "Select All",
    progressText: "Page {0} of {1}",
    indexText: "{0} of {1}",
    panelDynamicProgressText: "{0} of {1}",
    questionsProgressText: "Answered {0}/{1} questions",
    emptySurvey: "The survey doesn't contain visible pages or questions.",
    completingSurvey: "Thank you for completing the survey",
    completingSurveyBefore: "Our records show that you have already completed this survey.",
    loadingSurvey: "Loading Survey...",
    placeholder: "Select...",
    ratingOptionsCaption: "Tap to rate here...",
    value: "value",
    requiredError: "Response required.",
    requiredErrorInPanel: "Response required: answer at least one question.",
    requiredInAllRowsError: "Response required: answer questions in all rows.",
    numericError: "The value should be numeric.",
    minError: "The value should not be less than {0}",
    maxError: "The value should not be greater than {0}",
    textMinLength: "Please enter at least {0} character(s).",
    textMaxLength: "Please enter no more than {0} character(s).",
    textMinMaxLength: "Please enter at least {0} and no more than {1} characters.",
    minRowCountError: "Please fill in at least {0} row(s).",
    minSelectError: "Please select at least {0} variant(s).",
    maxSelectError: "Please select no more than {0} variant(s).",
    numericMinMax: "The '{0}' should be at least {1} and at most {2}",
    numericMin: "The '{0}' should be at least {1}",
    numericMax: "The '{0}' should be at most {1}",
    invalidEmail: "Please enter a valid e-mail address.",
    invalidExpression: "The expression: {0} should return 'true'.",
    urlRequestError: "The request returned error '{0}'. {1}",
    urlGetChoicesError: "The request returned empty data or the 'path' property is incorrect",
    exceedMaxSize: "The file size should not exceed {0}.",
    otherRequiredError: "Response required: enter another value.",
    uploadingFile: "Your file is uploading. Please wait several seconds and try again.",
    loadingFile: "Loading...",
    chooseFile: "Choose file(s)...",
    noFileChosen: "No file chosen",
    fileDragAreaPlaceholder: "Drop a file here or click the button below to load the file.",
    confirmDelete: "Do you want to delete the record?",
    keyDuplicationError: "This value should be unique.",
    addColumn: "Add Column",
    addRow: "Add Row",
    removeRow: "Remove",
    emptyRowsText: "There are no rows.",
    addPanel: "Add new",
    removePanel: "Remove",
    choices_Item: "item",
    matrix_column: "Column",
    matrix_row: "Row",
    multipletext_itemname: "text",
    savingData: "The results are being saved on the server...",
    savingDataError: "An error occurred and we could not save the results.",
    savingDataSuccess: "The results were saved successfully!",
    saveAgainButton: "Try again",
    timerMin: "min",
    timerSec: "sec",
    timerSpentAll: "You have spent {0} on this page and {1} in total.",
    timerSpentPage: "You have spent {0} on this page.",
    timerSpentSurvey: "You have spent {0} in total.",
    timerLimitAll: "You have spent {0} of {1} on this page and {2} of {3} in total.",
    timerLimitPage: "You have spent {0} of {1} on this page.",
    timerLimitSurvey: "You have spent {0} of {1} in total.",
    clearCaption: "Clear",
    signaturePlaceHolder: "Sign here",
    chooseFileCaption: "Choose file",
    removeFileCaption: "Remove this file",
    booleanCheckedLabel: "Yes",
    booleanUncheckedLabel: "No",
    confirmRemoveFile: "Are you sure that you want to remove this file: {0}?",
    confirmRemoveAllFiles: "Are you sure that you want to remove all files?",
    questionTitlePatternText: "Question Title",
    modalCancelButtonText: "Cancel",
    modalApplyButtonText: "Apply",
    filterStringPlaceholder: "Type to search...",
    emptyMessage: "No data to display",
    noEntriesText: "There are no entries yet.\nClick the button below to add a new entry.",
    more: "More"
};
//Uncomment these two lines on creating a translation file. You should replace "en" and enStrings with your locale ("fr", "de" and so on) and your variable.
//surveyLocalization.locales["en"] = englishStrings;
//surveyLocalization.localeNames["en"] = "English";


/***/ }),

/***/ "./src/localization/estonian.ts":
/*!**************************************!*\
  !*** ./src/localization/estonian.ts ***!
  \**************************************/
/*! exports provided: estonianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "estonianSurveyStrings", function() { return estonianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var estonianSurveyStrings = {
    pagePrevText: "Tagasi",
    pageNextText: "Edasi",
    completeText: "Lõpeta",
    previewText: "Eelvaade",
    editText: "Muuda",
    startSurveyText: "Alusta",
    otherItemText: "Muu (täpsusta)",
    noneItemText: "Mitte midagi",
    selectAllItemText: "Vali kõik",
    progressText: "Lehekülg {0}/{1}",
    panelDynamicProgressText: "Kirje {0}/{1}",
    questionsProgressText: "Vastatud {0} küsimust {1}-st",
    emptySurvey: "Selles uuringus ei ole ühtki nähtavat lehekülge või küsimust.",
    completingSurvey: "Aitäh, et vastasid ankeedile!",
    completingSurveyBefore: "Meie andmetel oled sa sellele ankeedile juba vastanud.",
    loadingSurvey: "Laen ankeeti...",
    placeholder: "Vali...",
    value: "väärtus",
    requiredError: "Palun vasta küsimusele.",
    requiredErrorInPanel: "Palun vasta vähemalt ühele küsimusele.",
    requiredInAllRowsError: "Palun anna vastus igal real.",
    numericError: "See peaks olema numbriline väärtus.",
    textMinLength: "Palun sisesta vähemalt {0} tähemärki.",
    textMaxLength: "Palun ära sisesta rohkem kui {0} tähemärki.",
    textMinMaxLength: "Sisesta palun {0} - {1} tähemärki.",
    minRowCountError: "Sisesta plaun vähemalt {0} rida.",
    minSelectError: "Palun vali vähemalt {0} varianti.",
    maxSelectError: "Palun vali kõige rohkem {0} varianti.",
    numericMinMax: "'{0}' peaks olema võrdne või suurem kui {1} ja võrdne või väiksem kui {2}",
    numericMin: "'{0}' peaks olema võrdne või suurem kui {1}",
    numericMax: "'{0}' peaks olema võrnde või väiksem kui {1}",
    invalidEmail: "Sisesta palun korrektne e-posti aadress.",
    invalidExpression: "Avaldis: {0} peaks tagastama tõese.",
    urlRequestError: "Taotlus tagastas vea „{0}”. {1}",
    urlGetChoicesError: "Taotlus tagastas tühjad andmed või atribuut 'path' on vale",
    exceedMaxSize: "Faili suurus ei tohi ületada {0}.",
    otherRequiredError: "Sisesta palun muu vastus.",
    uploadingFile: "Sinu fail laeb üles. Palun oota mõned sekundid ning proovi seejärel uuesti.",
    loadingFile: "Laen...",
    chooseFile: "Vali fail(id)...",
    noFileChosen: "Faili pole valitud",
    confirmDelete: "Kas tahad kirje kustutada?",
    keyDuplicationError: "See väärtus peab olema unikaalne.",
    addColumn: "Lisa veerg",
    addRow: "Lisa rida",
    removeRow: "Eemalda",
    addPanel: "Lisa uus",
    removePanel: "Eemalda",
    choices_Item: "üksus",
    matrix_column: "Veerg",
    matrix_row: "Rida",
    savingData: "Salvestan andmed serveris...",
    savingDataError: "Tekkis viga ning me ei saanud vastuseid salvestada.",
    savingDataSuccess: "Vastuste salvestamine õnnestus!",
    saveAgainButton: "Proovi uuesti",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Oled veetnud {0} sellel lehel ning kokku {1}.",
    timerSpentPage: "Oled veetnud {0} sellel lehel.",
    timerSpentSurvey: "Oled veetnud {0} kokku.",
    timerLimitAll: "Oled kulutanud {0} võimalikust {1} sellel lehel ning {2} võimalikust {3} kokku.",
    timerLimitPage: "Oled kulutanud {0} võimalikust {1} sellel lehel.",
    timerLimitSurvey: "Oled kulutanud {0} võimalikust {1} koguajast.",
    clearCaption: "Puhasta",
    chooseFileCaption: "Vali fail",
    removeFileCaption: "Eemalda see fail",
    booleanCheckedLabel: "Jah",
    booleanUncheckedLabel: "Ei",
    confirmRemoveFile: "Oled sa kindel, et soovid selle faili eemaldada: {0}?",
    confirmRemoveAllFiles: "Oled sa kindel, et soovid eemaldada kõik failid?",
    questionTitlePatternText: "Küsimuse pealkiri",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["et"] = estonianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["et"] = "eesti keel";


/***/ }),

/***/ "./src/localization/finnish.ts":
/*!*************************************!*\
  !*** ./src/localization/finnish.ts ***!
  \*************************************/
/*! exports provided: finnishSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finnishSurveyStrings", function() { return finnishSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var finnishSurveyStrings = {
    pagePrevText: "Edellinen",
    pageNextText: "Seuraava",
    completeText: "Valmis",
    previewText: "Esikatselu",
    editText: "Muokkaa",
    startSurveyText: "Aloita",
    otherItemText: "Muu (tarkenna)",
    noneItemText: "Ei mitään",
    selectAllItemText: "Valitse kaikki",
    progressText: "Sivu {0} / {1}",
    panelDynamicProgressText: "Osio {0} / {1}",
    questionsProgressText: "Olet vastannut {0} / {1} kysymykseen.",
    emptySurvey: "Tässä kyselyssä ei ole yhtään näkyvillä olevaa sivua tai kysymystä.",
    completingSurvey: "Kiitos kyselyyn vastaamisesta!",
    completingSurveyBefore: "Tietojemme mukaan olet jo suorittanut tämän kyselyn.",
    loadingSurvey: "Kyselyä ladataan palvelimelta...",
    placeholder: "Valitse...",
    value: "arvo",
    requiredError: "Vastaa kysymykseen, kiitos.",
    requiredErrorInPanel: "Vastaa ainakin yhteen kysymykseen.",
    requiredInAllRowsError: "Vastaa kysymyksiin kaikilla riveillä.",
    numericError: "Arvon tulee olla numeerinen.",
    textMinLength: "Syötä vähintään {0} merkkiä.",
    textMaxLength: "Älä syötä yli {0} merkkiä.",
    textMinMaxLength: "Syötä vähintään {0} ja enintään {1} merkkiä.",
    minRowCountError: "Täytä vähintään {0} riviä.",
    minSelectError: "Valitse vähintään {0} vaihtoehtoa.",
    maxSelectError: "Valitse enintään {0} vaihtoehtoa.",
    numericMinMax: "Luvun '{0}' tulee olla vähintään {1} ja korkeintaan {2}.",
    numericMin: "Luvun '{0}' tulee olla vähintään {1}.",
    numericMax: "Luvun '{0}' tulee olla korkeintaan {1}.",
    invalidEmail: "Syötä validi sähköpostiosoite.",
    invalidExpression: "Lausekkeen: {0} pitäisi palauttaa 'true'.",
    urlRequestError: "Pyyntö palautti virheen {0}. {1}",
    urlGetChoicesError: "Pyyntö palautti tyhjän tiedoston tai 'path'-asetus on väärä",
    exceedMaxSize: "Tiedoston koko ei saa olla suurempi kuin {0}.",
    otherRequiredError: "Tarkenna vastaustasi tekstikenttään.",
    uploadingFile: "Tiedostoa lähetetään. Odota muutama sekunti ja yritä uudelleen.",
    loadingFile: "Ladataan...",
    chooseFile: "Valitse tiedosto(t)...",
    fileDragAreaPlaceholder: "Pudota tiedosto tähän tai lataa tiedosto napsauttamalla alla olevaa painiketta.",
    noFileChosen: "Ei tiedostoa valittuna",
    confirmDelete: "Haluatko poistaa osion?",
    keyDuplicationError: "Tämä arvo on jo käytössä. Syötä toinen arvo.",
    addColumn: "Lisää sarake",
    addRow: "Lisää rivi",
    removeRow: "Poista",
    emptyRowsText: "Ei rivejä",
    addPanel: "Lisää uusi",
    removePanel: "Poista",
    choices_Item: "kohde",
    matrix_column: "Sarake",
    matrix_row: "Rivi",
    savingData: "Tietoja tallennetaan palvelimelle...",
    savingDataError: "Tapahtui virhe, emmekä voineet tallentaa kyselyn tietoja.",
    savingDataSuccess: "Tiedot tallennettiin onnistuneesti!",
    saveAgainButton: "Yritä uudelleen",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Olet käyttänyt {0} tällä sivulla ja yhteensä {1}.",
    timerSpentPage: "Olet käyttänyt {0} tällä sivulla.",
    timerSpentSurvey: "Olet käyttänyt yhteensä {0}.",
    timerLimitAll: "Olet käyttänyt tällä sivulla {0} / {1} ja yhteensä {2} / {3}.",
    timerLimitPage: "Olet käyttänyt {0} / {1} tällä sivulla.",
    timerLimitSurvey: "Olet käyttänyt yhteensä {0} / {1}.",
    clearCaption: "Tyhjennä",
    chooseFileCaption: "Valitse tiedosto",
    removeFileCaption: "Poista tämä tiedosto",
    booleanCheckedLabel: "Kyllä",
    booleanUncheckedLabel: "Ei",
    confirmRemoveFile: "Haluatko varmasti poistaa tämän tiedoston: {0}?",
    confirmRemoveAllFiles: "Haluatko varmasti poistaa kaikki tiedostot?",
    questionTitlePatternText: "Kysymyksen otsikko",
    modalCancelButtonText: "Peruuta",
    modalApplyButtonText: "Käytä",
    ratingOptionsCaption: "Arvioi napauttamalla tätä...",
    filterStringPlaceholder: "Hae kirjoittamalla...",
    indexText: "{0} / {1}",
    minError: "Arvo ei saa olla pienempi kuin {0}",
    maxError: "Arvo ei saa olla suurempi kuin {0}",
    multipletext_itemname: "teksti",
    noEntriesText: "Merkintöjä ei ole vielä.\nLisää uusi merkintä napsauttamalla alla olevaa painiketta.",
    signaturePlaceHolder: "Allekirjoita tähän",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["fi"] = finnishSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["fi"] = "suomi";


/***/ }),

/***/ "./src/localization/french.ts":
/*!************************************!*\
  !*** ./src/localization/french.ts ***!
  \************************************/
/*! exports provided: frenchSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frenchSurveyStrings", function() { return frenchSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var frenchSurveyStrings = {
    pagePrevText: "Précédent",
    pageNextText: "Suivant",
    completeText: "Terminer",
    previewText: "Aperçu",
    editText: "Modifier",
    startSurveyText: "Commencer",
    otherItemText: "Autre (préciser)",
    noneItemText: "Aucun",
    selectAllItemText: "Tout sélectionner",
    progressText: "Page {0} sur {1}",
    panelDynamicProgressText: "Enregistrement {0} sur {1}",
    questionsProgressText: "{0}/{1} question(s) répondue(s)",
    emptySurvey: "Il n'y a ni page visible ni question visible dans ce questionnaire",
    completingSurvey: "Merci d'avoir répondu au questionnaire !",
    completingSurveyBefore: "Nos données indiquent que vous avez déjà rempli ce questionnaire.",
    loadingSurvey: "Le questionnaire est en cours de chargement...",
    placeholder: "Choisissez...",
    ratingOptionsCaption: "Appuyez ici pour noter...",
    value: "valeur",
    requiredError: "La réponse à cette question est obligatoire.",
    requiredErrorInPanel: "Merci de répondre au moins à une question.",
    requiredInAllRowsError: "Toutes les lignes sont obligatoires",
    numericError: "La réponse doit être un nombre.",
    textMinLength: "Merci de saisir au moins {0} caractères.",
    textMaxLength: "Merci de saisir moins de {0} caractères.",
    textMinMaxLength: "Merci de saisir entre {0} et {1} caractères.",
    minRowCountError: "Merci de compléter au moins {0} lignes.",
    minSelectError: "Merci de sélectionner au minimum {0} réponses.",
    maxSelectError: "Merci de sélectionner au maximum {0} réponses.",
    numericMinMax: "Votre réponse '{0}' doit être supérieure ou égale à {1} et inférieure ou égale à {2}",
    numericMin: "Votre réponse '{0}' doit être supérieure ou égale à {1}",
    numericMax: "Votre réponse '{0}' doit être inférieure ou égale à {1}",
    invalidEmail: "Merci d'entrer une adresse mail valide.",
    invalidExpression: "L'expression: {0} doit retourner 'true'.",
    urlRequestError: "La requête a renvoyé une erreur '{0}'. {1}",
    urlGetChoicesError: "La requête a renvoyé des données vides ou la propriété 'path' est incorrecte",
    exceedMaxSize: "La taille du fichier ne doit pas excéder {0}.",
    otherRequiredError: "Merci de préciser le champ 'Autre'.",
    uploadingFile: "Votre fichier est en cours de chargement. Merci d'attendre quelques secondes et de réessayer.",
    loadingFile: "Chargement...",
    chooseFile: "Ajouter des fichiers...",
    fileDragAreaPlaceholder: "Déposez un fichier ici ou cliquez sur le bouton ci-dessous pour charger le fichier.",
    noFileChosen: "Aucun fichier ajouté",
    confirmDelete: "Voulez-vous supprimer cet enregistrement ?",
    keyDuplicationError: "Cette valeur doit être unique.",
    addColumn: "Ajouter une colonne",
    addRow: "Ajouter une ligne",
    removeRow: "Supprimer",
    addPanel: "Ajouter",
    removePanel: "Supprimer",
    choices_Item: "item",
    matrix_column: "Colonne",
    matrix_row: "Ligne",
    savingData: "Les résultats sont en cours de sauvegarde sur le serveur...",
    savingDataError: "Une erreur est survenue et a empêché la sauvegarde des résultats.",
    savingDataSuccess: "Les résultats ont bien été enregistrés !",
    saveAgainButton: "Réessayer",
    timerMin: "min",
    timerSec: "sec",
    timerSpentAll: "Vous avez passé {0} sur cette page et {1} au total.",
    timerSpentPage: "Vous avez passé {0} sur cette page.",
    timerSpentSurvey: "Vous avez passé {0} au total.",
    timerLimitAll: "Vous avez passé {0} sur {1} sur cette page et {2} sur {3} au total.",
    timerLimitPage: "Vous avez passé {0} sur {1} sur cette page.",
    timerLimitSurvey: "Vous avez passé {0} sur {1} au total.",
    clearCaption: "Vider",
    chooseFileCaption: "Ajouter un fichier",
    removeFileCaption: "Enlever ce fichier",
    booleanCheckedLabel: "Oui",
    booleanUncheckedLabel: "Non",
    confirmRemoveFile: "Êtes-vous certains de vouloir supprimer ce fichier : {0}?",
    confirmRemoveAllFiles: "Êtes-vous certains de vouloir supprimer tous les fichiers?",
    questionTitlePatternText: "Titre de la question",
    emptyRowsText: "Il n'y a pas de lignes.",
    filterStringPlaceholder: "Tapez pour rechercher...",
    indexText: "{0} sur {1}",
    minError: "La valeur ne doit pas être inférieure à {0}",
    maxError: "La valeur ne doit pas être supérieure à {0}",
    modalApplyButtonText: "Appliquer",
    modalCancelButtonText: "Annuler",
    multipletext_itemname: "texte",
    noEntriesText: "Il n'y a pas encore d'entrées.\nCliquez sur le bouton ci-dessous pour ajouter une nouvelle entrée.",
    signaturePlaceHolder: "Signez ici",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["fr"] = frenchSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["fr"] = "français";


/***/ }),

/***/ "./src/localization/georgian.ts":
/*!**************************************!*\
  !*** ./src/localization/georgian.ts ***!
  \**************************************/
/*! exports provided: georgianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "georgianSurveyStrings", function() { return georgianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var georgianSurveyStrings = {
    pagePrevText: "უკან",
    pageNextText: "შემდეგ",
    completeText: "დასრულება",
    progressText: "გვერდი {0} / {1}",
    emptySurvey: "არცერთი კითხვა არ არის.",
    completingSurvey: "გმადლობთ კითხვარის შევსებისთვის!",
    loadingSurvey: "ჩატვირთვა სერვერიდან...",
    otherItemText: "სხვა (გთხოვთ მიუთითეთ)",
    placeholder: "არჩევა...",
    requiredError: "გთხოვთ უპასუხეთ კითხვას.",
    numericError: "პასუხი უნდა იყოს რიცხვი.",
    textMinLength: "გთხოვთ შეიყვანეთ არანაკლებ {0} სიმბოლო.",
    minSelectError: "გთხოვთ აირჩიეთ არანაკლებ {0} ვარიანტი.",
    maxSelectError: "გთხოვთ აირჩიეთ არაუმეტეს {0} ვარიანტი.",
    numericMinMax: "'{0}' უნდა იყოს მეტი ან ტოლი, ვიდრე {1}, და ნაკლები ან ტოლი ვიდრე {2}",
    numericMin: "'{0}' უნდა იყოს მეტი ან ტოლი ვიდრე {1}",
    numericMax: "'{0}' უნდა იყოს ნაკლები ან ტოლი ვიდრე {1}",
    invalidEmail: "გთხოვთ შეიყვანოთ ელ. ფოსტის რეალური მისამართი.",
    otherRequiredEror: "გთხოვთ შეავსეთ ველი 'სხვა'"
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ka"] = georgianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ka"] = "ქართული";


/***/ }),

/***/ "./src/localization/german.ts":
/*!************************************!*\
  !*** ./src/localization/german.ts ***!
  \************************************/
/*! exports provided: germanSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "germanSurveyStrings", function() { return germanSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var germanSurveyStrings = {
    pagePrevText: "Zurück",
    pageNextText: "Weiter",
    completeText: "Abschließen",
    previewText: "Vorschau",
    editText: "Bearbeiten",
    startSurveyText: "Start",
    otherItemText: "Sonstiges (Bitte angeben)",
    noneItemText: "Nichts trifft zu",
    selectAllItemText: "Alles auswählen",
    progressText: "Seite {0} von {1}",
    panelDynamicProgressText: "Eintrag {0} von {1}",
    questionsProgressText: "{0}/{1} Fragen beantwortet",
    emptySurvey: "Es sind keine Fragen vorhanden.",
    completingSurvey: "Vielen Dank, dass Sie die Umfrage abgeschlossen haben!",
    completingSurveyBefore: "Wir haben festgestellt, dass Sie diese Umfrage bereits abgeschlossen haben.",
    loadingSurvey: "Umfrage wird geladen...",
    placeholder: "Bitte auswählen...",
    value: "Wert",
    requiredError: "Bitte beantworten Sie diese Frage.",
    requiredErrorInPanel: "Bitte beantworten Sie mindestens eine Frage.",
    requiredInAllRowsError: "Bitte beantworten Sie alle Fragen.",
    numericError: "Der Wert muss eine Zahl sein.",
    textMinLength: "Bitte geben Sie mindestens {0} Zeichen ein.",
    textMaxLength: "Bitte geben Sie nicht mehr als {0} Zeichen ein.",
    textMinMaxLength: "Bitte geben Sie mindestens {0} und maximal {1} Zeichen ein.",
    minRowCountError: "Bitte machen Sie in mindestens {0} Zeilen eine Eingabe.",
    minSelectError: "Bitte wählen Sie mindestens {0} Antwort(en) aus.",
    maxSelectError: "Bitte wählen Sie nicht mehr als {0} Antwort(en) aus.",
    numericMinMax: "'{0}' muss größer oder gleich {1} und kleiner oder gleich {2} sein",
    numericMin: "'{0}' muss größer oder gleich {1} sein",
    numericMax: "'{0}' muss kleiner oder gleich {1} sein",
    invalidEmail: "Bitte geben Sie eine gültige E-Mail-Adresse ein.",
    invalidExpression: "Der Ausdruck: {0} muss den Wert 'wahr' zurückgeben.",
    urlRequestError: "Ein Netzwerkdienst hat folgenden Fehler zurückgegeben '{0}'. {1}",
    urlGetChoicesError: "Eine Netzwerkdienst hat ungültige Daten zurückgegeben",
    exceedMaxSize: "Die Datei darf nicht größer als {0} sein.",
    otherRequiredError: "Bitte geben Sie einen Wert an.",
    uploadingFile: "Bitte warten Sie bis der Upload Ihrer Dateien abgeschlossen ist.",
    loadingFile: "Wird hochgeladen...",
    chooseFile: "Datei(en) auswählen...",
    fileDragAreaPlaceholder: "Legen Sie hier eine Datei ab oder klicken Sie auf die Schaltfläche unten, um die Datei zu laden.",
    noFileChosen: "Keine Datei ausgewählt",
    confirmDelete: "Wollen Sie den Eintrag löschen?",
    keyDuplicationError: "Dieser Wert muss einmalig sein.",
    addColumn: "Spalte hinzufügen",
    addRow: "Zeile hinzufügen",
    removeRow: "Entfernen",
    addPanel: "Neu hinzufügen",
    removePanel: "Entfernen",
    choices_Item: "Element",
    matrix_column: "Spalte",
    matrix_row: "Zeile",
    savingData: "Die Ergebnisse werden auf dem Server gespeichert...",
    savingDataError: "Es ist ein Fehler aufgetreten. Die Ergebnisse konnten nicht gespeichert werden.",
    savingDataSuccess: "Die Ergebnisse wurden gespeichert!",
    saveAgainButton: "Erneut absenden",
    timerMin: "Min.",
    timerSec: "Sek.",
    timerSpentAll: "Sie waren {0} auf dieser Seite und brauchten insgesamt {1}.",
    timerSpentPage: "Sie waren {0} auf dieser Seite.",
    timerSpentSurvey: "Sie haben insgesamt {0} gebraucht.",
    timerLimitAll: "Sie waren {0} von {1} auf dieser Seite und brauchten insgesamt {2} von {3}.",
    timerLimitPage: "Sie waren {0} von {1} auf dieser Seite.",
    timerLimitSurvey: "Sie haben insgesamt {0} von {1} gebraucht.",
    clearCaption: "Auswahl entfernen",
    chooseFileCaption: "Datei auswählen",
    removeFileCaption: "Datei löschen",
    booleanCheckedLabel: "Ja",
    booleanUncheckedLabel: "Nein",
    confirmRemoveFile: "Sind Sie sicher, dass Sie diese Datei löschen möchten: {0}?",
    confirmRemoveAllFiles: "Sind Sie sicher, dass Sie alle Dateien löschen möchten?",
    questionTitlePatternText: "Fragentitel",
    ratingOptionsCaption: "Tippen Sie hier, um zu bewerten...",
    emptyRowsText: "Es gibt keine Reihen.",
    filterStringPlaceholder: "Tippe um zu suchen...",
    indexText: "{0} von {1}",
    minError: "Der Wert sollte nicht kleiner als {0} sein",
    maxError: "Der Wert sollte nicht größer als {0} sein",
    modalApplyButtonText: "Anwenden",
    modalCancelButtonText: "Stornieren",
    multipletext_itemname: "Text",
    noEntriesText: "Es gibt noch keine Einträge.\nKlicken Sie auf die Schaltfläche unten, um einen neuen Eintrag hinzuzufügen.",
    signaturePlaceHolder: "Hier unterschreiben",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["de"] = germanSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["de"] = "deutsch";


/***/ }),

/***/ "./src/localization/greek.ts":
/*!***********************************!*\
  !*** ./src/localization/greek.ts ***!
  \***********************************/
/*! exports provided: greekSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "greekSurveyStrings", function() { return greekSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
//Created by https://github.com/agelospanagiotakis

var greekSurveyStrings = {
    pagePrevText: "Προηγούμενο",
    pageNextText: "Επόμενο",
    completeText: "Ολοκλήρωση",
    previewText: "Προεπισκόπηση",
    editText: "Επεξεργασία",
    startSurveyText: "Αρχή",
    otherItemText: "Άλλο (παρακαλώ διευκρινίστε)",
    noneItemText: "Κανένας",
    selectAllItemText: "Επιλογή όλων",
    progressText: "Σελίδα {0} από {1}",
    panelDynamicProgressText: "Εγγραφή {0} από {1}",
    questionsProgressText: "Απαντήθηκαν {0} / {1} ερωτήσεις",
    emptySurvey: "Δεν υπάρχει καμία ορατή σελίδα ή ορατή ερώτηση σε αυτό το ερωτηματολόγιο.",
    completingSurvey: "Ευχαριστούμε για την συμπλήρωση αυτού του ερωτηματολογίου!",
    completingSurveyBefore: "Τα αρχεία μας δείχνουν ότι έχετε ήδη ολοκληρώσει αυτήν την έρευνα.",
    loadingSurvey: "Το ερωτηματολόγιο φορτώνεται απο το διακομιστή...",
    placeholder: "Επιλέξτε...",
    value: "αξία",
    requiredError: "Παρακαλώ απαντήστε στην ερώτηση.",
    requiredErrorInPanel: "Απαντήστε σε τουλάχιστον μία ερώτηση.",
    requiredInAllRowsError: "Παρακαλώ απαντήστε στις ερωτήσεις σε όλες τις γραμμές.",
    numericError: "Η τιμή πρέπει να είναι αριθμητική.",
    textMinLength: "Παρακαλώ συμπληρώστε τουλάχιστον {0} σύμβολα.",
    textMaxLength: "Εισαγάγετε λιγότερους από {0} χαρακτήρες.",
    textMinMaxLength: "Εισαγάγετε περισσότερους από {0} και λιγότερους από {1} χαρακτήρες.",
    minRowCountError: "Παρακαλώ συμπληρώστε τουλάχιστον {0} γραμμές.",
    minSelectError: "Παρακαλώ επιλέξτε τουλάχιστον {0} παραλλαγές.",
    maxSelectError: "Παρακαλώ επιλέξτε όχι παραπάνω απο {0} παραλλαγές.",
    numericMinMax: "Το '{0}' θα πρέπει να είναι ίσο ή μεγαλύτερο απο το {1} και ίσο ή μικρότερο απο το {2}",
    numericMin: "Το '{0}' πρέπει να είναι μεγαλύτερο ή ισο με το {1}",
    numericMax: "Το '{0}' πρέπει να είναι μικρότερο ή ίσο απο το {1}",
    invalidEmail: "Παρακαλώ δώστε μια αποδεκτή διεύθυνση e-mail.",
    invalidExpression: "Η έκφραση: {0} θα πρέπει να επιστρέψει 'true'.",
    urlRequestError: "Η αίτηση επέστρεψε σφάλμα '{0}'. {1}",
    urlGetChoicesError: "Η αίτηση επέστρεψε κενά δεδομένα ή η ιδιότητα 'μονοπάτι/path' είναι εσφαλμένη",
    exceedMaxSize: "Το μέγεθος δεν μπορεί να υπερβαίνει τα {0}.",
    otherRequiredError: "Παρακαλώ συμπληρώστε την τιμή για το πεδίο 'άλλο'.",
    uploadingFile: "Το αρχείο σας ανεβαίνει. Παρακαλώ περιμένετε καποια δευτερόλεπτα και δοκιμάστε ξανά.",
    loadingFile: "Φόρτωση...",
    chooseFile: "Επιλογή αρχείων ...",
    noFileChosen: "Δεν έχει επιλεγεί αρχείο",
    confirmDelete: "Θέλετε να διαγράψετε την εγγραφή;",
    keyDuplicationError: "Αυτή η τιμή πρέπει να είναι μοναδική.",
    addColumn: "Προσθήκη στήλης",
    addRow: "Προσθήκη γραμμής",
    removeRow: "Αφαίρεση",
    addPanel: "Προσθεσε νεο",
    removePanel: "Αφαιρώ",
    choices_Item: "είδος",
    matrix_column: "Στήλη",
    matrix_row: "Σειρά",
    savingData: "Τα αποτελέσματα αποθηκεύονται στον διακομιστή ...",
    savingDataError: "Παρουσιάστηκε σφάλμα και δεν ήταν δυνατή η αποθήκευση των αποτελεσμάτων.",
    savingDataSuccess: "Τα αποτελέσματα αποθηκεύτηκαν με επιτυχία!",
    saveAgainButton: "Προσπάθησε ξανά",
    timerMin: "ελάχ",
    timerSec: "δευτ",
    timerSpentAll: "Έχετε δαπανήσει {0} σε αυτήν τη σελίδα και {1} συνολικά.",
    timerSpentPage: "Έχετε ξοδέψει {0} σε αυτήν τη σελίδα.",
    timerSpentSurvey: "Έχετε ξοδέψει συνολικά {0}.",
    timerLimitAll: "Έχετε δαπανήσει {0} από {1} σε αυτήν τη σελίδα και {2} από {3} συνολικά.",
    timerLimitPage: "Έχετε ξοδέψει {0} από {1} σε αυτήν τη σελίδα.",
    timerLimitSurvey: "Έχετε ξοδέψει {0} από {1} συνολικά.",
    clearCaption: "Σαφή",
    chooseFileCaption: "Επιλέξτε το αρχείο",
    removeFileCaption: "Καταργήστε αυτό το αρχείο",
    booleanCheckedLabel: "Ναί",
    booleanUncheckedLabel: "Οχι",
    confirmRemoveFile: "Είστε βέβαιοι ότι θέλετε να καταργήσετε αυτό το αρχείο: {0};",
    confirmRemoveAllFiles: "Είστε βέβαιοι ότι θέλετε να καταργήσετε όλα τα αρχεία;",
    questionTitlePatternText: "Τίτλος ερώτησης",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["gr"] = greekSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["gr"] = "ελληνικά";


/***/ }),

/***/ "./src/localization/hebrew.ts":
/*!************************************!*\
  !*** ./src/localization/hebrew.ts ***!
  \************************************/
/*! exports provided: hebrewSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hebrewSurveyStrings", function() { return hebrewSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var hebrewSurveyStrings = {
    pagePrevText: "אחורה",
    pageNextText: "קדימה",
    completeText: "סיום",
    previewText: "תצוגה מקדימה",
    editText: "לַעֲרוֹך",
    startSurveyText: "הַתחָלָה",
    otherItemText: "אחר (נא לתאר)",
    noneItemText: "אף אחד",
    selectAllItemText: "בחר הכל",
    progressText: "דף {1} מתוך {0}",
    panelDynamicProgressText: "הקלטה {0} מתוך {1}",
    questionsProgressText: "ענה על שאלות",
    emptySurvey: "אין שאלות",
    completingSurvey: "תודה על מילוי השאלון!",
    completingSurveyBefore: "הרשומות שלנו מראות שכבר סיימת את הסקר הזה.",
    loadingSurvey: "טעינה מהשרת...",
    placeholder: "בחר...",
    value: "ערך",
    requiredError: "אנא השב על השאלה",
    requiredErrorInPanel: "אנא ענה לפחות על שאלה אחת.",
    requiredInAllRowsError: "אנא ענה על שאלות בכל השורות.",
    numericError: "התשובה צריכה להיות מספר.",
    textMinLength: "הזן לפחות {0} תווים.",
    textMaxLength: "הזן פחות מ- {0} תווים.",
    textMinMaxLength: "הזן יותר מ- {0} ופחות מ- {1} תווים.",
    minRowCountError: "אנא מלא לפחות {0} שורות.",
    minSelectError: "בחר לפחות {0} אפשרויות.",
    maxSelectError: "בחר עד {0} אפשרויות.",
    numericMinMax: "'{0}' חייב להיות שווה או גדול מ {1}, ושווה ל- {2} או פחות מ- {}}",
    numericMin: "'{0}' חייב להיות שווה או גדול מ {1}",
    numericMax: "'{0}' חייב להיות שווה או קטן מ {1}",
    invalidEmail: 'הזן כתובת דוא"ל חוקית.',
    invalidExpression: "הביטוי: {0} צריך להחזיר 'אמת'.",
    urlRequestError: "הבקשה החזירה את השגיאה '{0}'. {1}",
    urlGetChoicesError: "הבקשה החזירה נתונים ריקים או שהמאפיין 'נתיב' שגוי",
    exceedMaxSize: "גודל הקובץ לא יעלה על {0}.",
    otherRequiredError: 'נא להזין נתונים בשדה "אחר"',
    uploadingFile: "הקובץ שלך נטען. המתן מספר שניות ונסה שוב.",
    loadingFile: "טוען...",
    chooseFile: "לבחור קבצים...",
    noFileChosen: "לא נבחר קובץ",
    confirmDelete: "האם אתה רוצה למחוק את הרשומה?",
    keyDuplicationError: "ערך זה צריך להיות ייחודי.",
    addColumn: "הוסף עמודה",
    addRow: "להוסיף שורה",
    removeRow: "לְהַסִיר",
    addPanel: "הוסף חדש",
    removePanel: "לְהַסִיר",
    choices_Item: "פריט",
    matrix_column: "טור",
    matrix_row: "שׁוּרָה",
    savingData: "התוצאות נשמרות בשרת ...",
    savingDataError: "אירעה שגיאה ולא הצלחנו לשמור את התוצאות.",
    savingDataSuccess: "התוצאות נשמרו בהצלחה!",
    saveAgainButton: "נסה שוב",
    timerMin: "דקה",
    timerSec: "שניות",
    timerSpentAll: "הוצאת {0} בדף זה ובסך הכל {1}.",
    timerSpentPage: "הוצאת {0} בדף זה.",
    timerSpentSurvey: "הוצאת סכום כולל של {0}.",
    timerLimitAll: "הוצאת {0} מתוך {1} בדף זה ו- {2} מתוך {3} בסך הכל.",
    timerLimitPage: "הוצאת {0} מתוך {1} בדף זה.",
    timerLimitSurvey: "הוצאת סכום כולל של {0} מתוך {1}.",
    clearCaption: "ברור",
    chooseFileCaption: "בחר קובץ",
    removeFileCaption: "הסר קובץ זה",
    booleanCheckedLabel: "כן",
    booleanUncheckedLabel: "לא",
    confirmRemoveFile: "האם אתה בטוח שברצונך להסיר קובץ זה: {0}?",
    confirmRemoveAllFiles: "האם אתה בטוח שברצונך להסיר את כל הקבצים?",
    questionTitlePatternText: "כותרת שאלה",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["he"] = hebrewSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["he"] = "עברית";


/***/ }),

/***/ "./src/localization/hindi.ts":
/*!***********************************!*\
  !*** ./src/localization/hindi.ts ***!
  \***********************************/
/*! exports provided: hindiStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hindiStrings", function() { return hindiStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var hindiStrings = {
    pagePrevText: "पिछला",
    pageNextText: "अगला",
    completeText: "पूरा",
    previewText: "पूर्वसमीक्षा",
    editText: "संपादित",
    startSurveyText: "शुरू",
    otherItemText: "दूसरा (वर्णन करें)",
    noneItemTex: "कोई नहीं",
    selectAllItemText: "सभी का चयन करें",
    progressText: "पृष्ठ 1 में से 0",
    panelDynamicProgressText: " दस्तावेज {1} के {0}",
    questionsProgressText: "{1} सवालों में से {0} के जवाब दिए",
    emptySurvey: "सर्वेक्षण में कोई दृश्यमान पृष्ठ या प्रश्न नहीं है",
    completingSurvey: "सर्वेक्षण को पूरा करने के लिए धन्यवाद",
    completingSurveyBefore: " हमारे रिकॉर्ड बताते हैं कि आप पहले ही इस सर्वेक्षण को पूरा कर चुके हैं",
    loadingSurvey: "सर्वेक्षण खुल रहा है.…",
    placeholder: "चुनें",
    value: "मूल्य",
    requiredError: "कृपया प्रश्न का उत्तर दें",
    requiredErrorInPanel: "कृपया कम से कम एक प्रश्न का उत्तर दें",
    requiredInAllRowsError: "कृपया सभी पंक्तियों में सवालों के जवाब दें",
    numericError: "मूल्य संख्यात्मक होना चाहिए",
    textMinLength: "कृपया कम से कम {0} वर्ण दर्ज करें",
    textMaxLength: "कृपया {0} से कम वर्ण दर्ज करें",
    textMinMaxLength: "कृपया {0} से अधिक और {1} से कम पात्रों में प्रवेश करें",
    minRowCountError: "कृपया कम से कम {0} पंक्तियों को भरें",
    minSelectError: "कृपया कम से कम {0} विकल्प का चयन करें",
    maxSelectError: "कृपया {0} विकल्पों से अधिक नहीं चुनें",
    numericMinMax: "'{0}' {1} से बराबर या अधिक और {2} से बराबर या कम होना चाहिए",
    numericMin: "'{0}' {1} से बराबर या अधिक होना चाहिए",
    numericMax: "'{0}' {1} से बराबर या कम होना चाहिए",
    invalidEmail: "कृपया एक वैध ईमेल पता दर्ज करें",
    invalidExpression: "अभिव्यक्ति: {0} को ' सच ' लौटना चाहिए",
    urlRequestError: "अनुरोध लौटाया त्रुटि '{0}' . {1}",
    urlGetChoicesError: "अनुरोध ने खाली डेटा वापस कर दिया है ",
    exceedMaxSize: "फ़ाइल का आकार {0} से अधिक नहीं होना चाहिए  या फिर 'पाथ' प्रॉपर्टी गलत है",
    otherRequiredError: "कृपया दूसरा मूल्य दर्ज करें",
    uploadingFile: "आपकी फाइल अपलोड हो रही है। कृपया कई सेकंड इंतजार करें और फिर से प्रयास करें।",
    loadingFile: "लोडिंग",
    chooseFile: "फ़ाइल चुनें",
    noFileChosen: "कोई फाइल नहीं चुनी गई",
    confirmDelete: "क्या आप रिकॉर्ड हटाना चाहते हैं",
    keyDuplicationError: "यह मान अनोखा होना चाहिए",
    addColumn: "कॉलम जोड़ें",
    addRow: "पंक्ति जोड़ें",
    removeRow: "हटाए",
    addPanel: "नया जोड़ें",
    removePanel: "हटाए",
    choices_Item: "मद",
    matrix_column: "कॉलम",
    matrix_row: "पंक्ति",
    savingData: "परिणाम सर्वर पर सेव हो रहे हैं",
    savingDataError: "एक त्रुटि हुई और हम परिणामों को नहीं सेव कर सके",
    savingDataSuccess: "परिणाम सफलतापूर्वक सेव हो गए",
    saveAgainButton: "फिर कोशिश करो",
    timerMin: "मिनट",
    timerSec: "सेकंड",
    timerSpentAll: "आपने इस पृष्ठ पर {0} खर्च किए हैं और कुल {1}",
    timerSpentPage: "आपने इस पृष्ठ पर {0} खर्च किया है",
    timerSpentSurvey: "आपने कुल {0} खर्च किया है",
    timerLimitAll: "आपने इस पृष्ठ पर {1} की {0} और कुल {3} की {2} खर्च की है।",
    timerLimitPage: "आपने इस पृष्ठ पर {1} का {0} खर्च किया है",
    timerLimitSurvey: "आपने कुल {1} की {0} खर्च की है",
    clearCaption: "स्पष्ट",
    chooseFileCaption: "फ़ाइल चुनें",
    removeFileCaption: "इस फाइल को निकालें",
    booleanCheckedLabel: "हाँ",
    booleanUncheckedLabel: "नहीं",
    confirmRemoveFile: "क्या आप सुनिश्चित हैं कि आप इस फ़ाइल को हटाना चाहते हैं: {0}",
    confirmRemoveAllFiles: "क्या आप सुनिश्चित हैं कि आप सभी फ़ाइलों को हटाना चाहते हैं",
    questionTitlePatternText: "प्रश्न का शीर्षक",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["hi"] = hindiStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["hi"] = "hindi";


/***/ }),

/***/ "./src/localization/hungarian.ts":
/*!***************************************!*\
  !*** ./src/localization/hungarian.ts ***!
  \***************************************/
/*! exports provided: hungarianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hungarianSurveyStrings", function() { return hungarianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var hungarianSurveyStrings = {
    pagePrevText: "Vissza",
    pageNextText: "Tovább",
    completeText: "Kész",
    previewText: "Előnézet",
    editText: "Szerkesztés",
    startSurveyText: "Rajt",
    otherItemText: "Egyéb (adja meg)",
    noneItemText: "Egyik sem",
    selectAllItemText: "Mindet kiválaszt",
    progressText: "{0}./{1} oldal",
    panelDynamicProgressText: "{0} / {1} rekord",
    questionsProgressText: "Válaszolt kérdések: {0} / {1}",
    emptySurvey: "The survey doesn't contain visible pages or questions.",
    completingSurvey: "Köszönjük, hogy kitöltötte felmérésünket!",
    completingSurveyBefore: "Már kitöltötte a felmérést.",
    loadingSurvey: "Felmérés betöltése...",
    placeholder: "Válasszon...",
    value: "érték",
    requiredError: "Kérjük, válaszolja meg ezt a kérdést!",
    requiredErrorInPanel: "Kérjük, válaszoljon legalább egy kérdésre.",
    requiredInAllRowsError: "Kérjük adjon választ minden sorban!",
    numericError: "Az érték szám kell, hogy legyen!",
    textMinLength: "Adjon meg legalább {0} karaktert!",
    textMaxLength: "Legfeljebb {0} karaktert adjon meg!",
    textMinMaxLength: "Adjon meg legalább {0}, de legfeljebb {1} karaktert!",
    minRowCountError: "Töltsön ki minimum {0} sort!",
    minSelectError: "Válasszon ki legalább {0} lehetőséget!",
    maxSelectError: "Ne válasszon többet, mint {0} lehetőség!",
    numericMinMax: "'{0}' legyen nagyobb, vagy egyenlő, mint {1} és kisebb, vagy egyenlő, mint {2}!",
    numericMin: "'{0}' legyen legalább {1}!",
    numericMax: "The '{0}' ne legyen nagyobb, mint {1}!",
    invalidEmail: "Adjon meg egy valós email címet!",
    invalidExpression: "A következő kifejezés: {0} vissza kell adnia az „igaz” értéket.",
    urlRequestError: "A lekérdezés hibával tért vissza: '{0}'. {1}",
    urlGetChoicesError: "A lekérdezés üres adattal tért vissza, vagy a 'path' paraméter helytelen.",
    exceedMaxSize: "A méret nem lehet nagyobb, mint {0}.",
    otherRequiredError: "Adja meg az egyéb értéket!",
    uploadingFile: "Feltöltés folyamatban. Várjon pár másodpercet, majd próbálja újra.",
    loadingFile: "Betöltés...",
    chooseFile: "Fájlok kiválasztása ...",
    fileDragAreaPlaceholder: "Dobjon ide egy fájlt, vagy kattintson az alábbi gombra a fájl betöltéséhez.",
    noFileChosen: "Nincs kiválasztva fájl",
    confirmDelete: "Törli ezt a rekordot?",
    keyDuplicationError: "Az értéknek egyedinek kell lennie.",
    addColumn: "Oszlop hozzáadása",
    addRow: "Sor hozzáadása",
    removeRow: "Eltávolítás",
    addPanel: "Új hozzáadása",
    removePanel: "Eltávolítás",
    choices_Item: "elem",
    matrix_column: "Oszlop",
    matrix_row: "Sor",
    savingData: "Eredmény mentése a szerverre...",
    savingDataError: "Egy hiba folytán nem tudtuk elmenteni az eredményt.",
    savingDataSuccess: "Eredmény sikeresen mentve!",
    saveAgainButton: "Próbálja újra",
    timerMin: "min",
    timerSec: "sec",
    timerSpentAll: "Ön {0} összeget költött ezen az oldalon, és összesen {1}.",
    timerSpentPage: "{0} összeget költött ezen az oldalon.",
    timerSpentSurvey: "Összesen {0} költött.",
    timerLimitAll: "Ön {0} / {1} összeget költött ezen az oldalon, és összesen {2} / {3}.",
    timerLimitPage: "Ön {0} / {1} összeget költött ezen az oldalon.",
    timerLimitSurvey: "Összesen {0} / {1} összeget költött el.",
    clearCaption: "Egyértelmű",
    chooseFileCaption: "Válassz fájlt",
    removeFileCaption: "Távolítsa el ezt a fájlt",
    booleanCheckedLabel: "Igen",
    booleanUncheckedLabel: "Nem",
    confirmRemoveFile: "Biztosan eltávolítja ezt a fájlt: {0}?",
    confirmRemoveAllFiles: "Biztosan el akarja távolítani az összes fájlt?",
    questionTitlePatternText: "Kérdés címe",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["hu"] = hungarianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["hu"] = "magyar";


/***/ }),

/***/ "./src/localization/icelandic.ts":
/*!***************************************!*\
  !*** ./src/localization/icelandic.ts ***!
  \***************************************/
/*! exports provided: icelandicSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "icelandicSurveyStrings", function() { return icelandicSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var icelandicSurveyStrings = {
    pagePrevText: "Tilbaka",
    pageNextText: "Áfram",
    completeText: "Lokið",
    previewText: "Forskoða",
    editText: "Breyta",
    startSurveyText: "Byrjaðu",
    otherItemText: "Hinn (skýring)",
    noneItemText: "Enginn",
    selectAllItemText: "Velja allt",
    progressText: "Síða {0} of {1}",
    panelDynamicProgressText: "Taka upp {0} af {1}",
    questionsProgressText: "Svarað {0} / {1} spurningum",
    emptySurvey: "Það er enginn síða eða spurningar í þessari könnun.",
    completingSurvey: "Takk fyrir að fyllja út þessa könnun!",
    completingSurveyBefore: "Skrár okkar sýna að þú hefur þegar lokið þessari könnun.",
    loadingSurvey: "Könnunin er að hlaða...",
    placeholder: "Veldu...",
    value: "gildi",
    requiredError: "Vinsamlegast svarið spurningunni.",
    requiredErrorInPanel: "Vinsamlegast svaraðu að minnsta kosti einni spurningu.",
    requiredInAllRowsError: "Vinsamlegast svarið spurningum í öllum röðum.",
    numericError: "Þetta gildi verður að vera tala.",
    textMinLength: "Það ætti að vera minnst {0} tákn.",
    textMaxLength: "Það ætti að vera mest {0} tákn.",
    textMinMaxLength: "Það ætti að vera fleiri en {0} og færri en {1} tákn.",
    minRowCountError: "Vinsamlegast fyllið úr að minnsta kosti {0} raðir.",
    minSelectError: "Vinsamlegast veljið að minnsta kosti {0} möguleika.",
    maxSelectError: "Vinsamlegast veljið ekki fleiri en {0} möguleika.",
    numericMinMax: "'{0}' ætti að vera meira en eða jafnt og {1} minna en eða jafnt og {2}",
    numericMin: "{0}' ætti að vera meira en eða jafnt og {1}",
    numericMax: "'{0}' ætti að vera minna en eða jafnt og {1}",
    invalidEmail: "Vinsamlegast sláið inn gilt netfang.",
    invalidExpression: "Tjáningin: {0} ætti að skila 'satt'.",
    urlRequestError: "Beiðninn skilaði eftirfaranadi villu '{0}'. {1}",
    urlGetChoicesError: "Beiðninng skilaði engum gögnum eða slóðinn var röng",
    exceedMaxSize: "Skráinn skal ekki vera stærri en {0}.",
    otherRequiredError: "Vinamlegast fyllið út hitt gildið.",
    uploadingFile: "Skráinn þín var send. Vinsamlegast bíðið í nokkrar sekúndur og reynið aftur.",
    loadingFile: "Hleður ...",
    chooseFile: "Veldu skrár ...",
    noFileChosen: "Engin skrá valin",
    confirmDelete: "Viltu eyða skránni?",
    keyDuplicationError: "Þetta gildi ætti að vera einstakt.",
    addColumn: "Bæta við dálki",
    addRow: "Bæta við röð",
    removeRow: "Fjarlægja",
    addPanel: "Bæta við nýju",
    removePanel: "Fjarlægðu",
    choices_Item: "hlutur",
    matrix_column: "Dálkur",
    matrix_row: "Röð",
    savingData: "Niðurstöðurnar eru að spara á netþjóninum ... ",
    savingDataError: "Villa kom upp og við gátum ekki vistað niðurstöðurnar.",
    savingDataSuccess: "Árangurinn var vistaður með góðum árangri!",
    saveAgainButton: "Reyndu aftur",
    timerMin: "mín",
    timerSec: "sek",
    timerSpentAll: "Þú hefur eytt {0} á þessari síðu og {1} samtals.",
    timerSpentPage: "Þú hefur eytt {0} á þessari síðu.",
    timerSpentSurvey: "Þú hefur eytt {0} samtals.",
    timerLimitAll: "Þú hefur eytt {0} af {1} á þessari síðu og {2} af {3} samtals.",
    timerLimitPage: "Þú hefur eytt {0} af {1} á þessari síðu.",
    timerLimitSurvey: "Þú hefur eytt {0} af {1} samtals.",
    clearCaption: "Hreinsa",
    chooseFileCaption: "Veldu skrá",
    removeFileCaption: "Fjarlægðu þessa skrá",
    booleanCheckedLabel: "Já",
    booleanUncheckedLabel: "Nei",
    confirmRemoveFile: "Ertu viss um að þú viljir fjarlægja þessa skrá: {0}?",
    confirmRemoveAllFiles: "Ertu viss um að þú viljir fjarlægja allar skrár?",
    questionTitlePatternText: "Spurningartitill",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["is"] = icelandicSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["is"] = "íslenska";


/***/ }),

/***/ "./src/localization/indonesian.ts":
/*!****************************************!*\
  !*** ./src/localization/indonesian.ts ***!
  \****************************************/
/*! exports provided: indonesianStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indonesianStrings", function() { return indonesianStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var indonesianStrings = {
    pagePrevText: "Sebelumnya",
    pageNextText: "Selanjutnya",
    completeText: "Selesai",
    previewText: "Pratinjau",
    editText: "Sunting",
    startSurveyText: "Mulai",
    otherItemText: "Lainnya (jelaskan)",
    noneItemText: "Tidak Ada",
    selectAllItemText: "Pilih Semua",
    progressText: "Halaman {0} dari {1}",
    panelDynamicProgressText: "Rekam {0} dari {1}",
    questionsProgressText: "Menjawab pertanyaan {0} / {1}",
    emptySurvey: "Tidak ada halaman atau pertanyaan dalam survei.",
    completingSurvey: "Terima kasih telah menyelesaikan survei!",
    completingSurveyBefore: "Catatan kami menunjukkan bahwa Anda telah menyelesaikan survei ini.",
    loadingSurvey: "Memuat survei...",
    placeholder: "Pilih...",
    value: "nilai",
    requiredError: "Silahkan jawab pertanyaan berikut.",
    requiredErrorInPanel: "Silahkan jawab setidaknya satu petanyaan.",
    requiredInAllRowsError: "Silahkan jawab pertanyaan pada semua baris.",
    numericError: "Nilai harus berupa angka.",
    textMinLength: "Silahkan masukkan setidaknya {0} karakter.",
    textMaxLength: "Silahkan masukkan kurang {0} karakter.",
    textMinMaxLength: "PSilahkan masukkan lebih dari {0} dan kurang dari {1} karakter.",
    minRowCountError: "Silahkan isi setidaknya {0} baris.",
    minSelectError: "Silahkan pilih setidaknya {0} varian.",
    maxSelectError: "Silahkan pilih tidak lebih dari {0} varian.",
    numericMinMax: "'{0}' harus sama dengan atau lebih dari {1} dan harus sama dengan atau kurang dari {2}",
    numericMin: "'{0}' harus sama dengan atau lebih dari {1}",
    numericMax: "'{0}' harus sama dengan atau kurang dari {1}",
    invalidEmail: "Silahkan masukkan e-mail yang benar.",
    invalidExpression: "Ekspresi: {0} harus mengembalikan 'benar'.",
    urlRequestError: "Permintaan mengembalikan kesalahan '{0}'. {1}",
    urlGetChoicesError: "Permintaan mengembalikan data kosong atau properti 'path' salah.",
    exceedMaxSize: "Ukuran berkas tidak boleh melebihi {0}.",
    otherRequiredError: "Silahkan masukkan nilai lainnnya.",
    uploadingFile: "Berkas Anda sedang diunggah. Silahkan tunggu beberapa saat atau coba lagi.",
    loadingFile: "Memuat...",
    chooseFile: "Pilih berkas...",
    noFileChosen: "Tidak ada file yang dipilih",
    confirmDelete: "Apakah Anda ingin menghapus catatan?",
    keyDuplicationError: "Nilai harus unik.",
    addColumn: "Tambah kolom",
    addRow: "Tambah baris",
    removeRow: "Hapus",
    addPanel: "Tambah baru",
    removePanel: "Hapus",
    choices_Item: "item",
    matrix_column: "Kolom",
    matrix_row: "Baris",
    savingData: "Hasil sedang disimpan pada server...",
    savingDataError: "Kesalahan terjadi dan kami tidak dapat menyimpan hasil.",
    savingDataSuccess: "Hasil telah sukses disimpan!",
    saveAgainButton: "Coba lagi",
    timerMin: "menit",
    timerSec: "detik",
    timerSpentAll: "Anda telah menghabiskan {0} pada halaman ini dan {1} secara keseluruhan.",
    timerSpentPage: "YAnda telah menghabiskan {0} pada halaman ini.",
    timerSpentSurvey: "Anda telah menghabiskan {0} secara keseluruhan.",
    timerLimitAll: "Anda telah menghabiskan {0} dari {1} pada halaman ini dan {2} dari {3} secara keseluruhan.",
    timerLimitPage: "Anda telah menghabiskan {0} dari {1} pada halaman ini.",
    timerLimitSurvey: "Anda telah menghabiskan {0} dari {1} secara keseluruhan.",
    clearCaption: "Bersihkan",
    chooseFileCaption: "Pilih File",
    removeFileCaption: "Hapus berkas ini",
    booleanCheckedLabel: "Iya",
    booleanUncheckedLabel: "Tidak",
    confirmRemoveFile: "Anda yakin ingin menghapus file ini: {0}?",
    confirmRemoveAllFiles: "Anda yakin ingin menghapus semua file?",
    questionTitlePatternText: "Judul pertanyaan",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["id"] = indonesianStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["id"] = "bahasa Indonesia";


/***/ }),

/***/ "./src/localization/italian.ts":
/*!*************************************!*\
  !*** ./src/localization/italian.ts ***!
  \*************************************/
/*! exports provided: italianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "italianSurveyStrings", function() { return italianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var italianSurveyStrings = {
    pagePrevText: "Precedente",
    pageNextText: "Successivo",
    completeText: "Salva",
    previewText: "Anteprima",
    editText: "Modifica",
    startSurveyText: "Inizio",
    otherItemText: "Altro (descrivi)",
    noneItemText: "Nessuno",
    selectAllItemText: "Seleziona tutti",
    progressText: "Pagina {0} di {1}",
    panelDynamicProgressText: "Record di {0} di {1}",
    questionsProgressText: "Risposte a {0}/{1} domande",
    emptySurvey: "Non ci sono pagine o domande visibili nel questionario.",
    completingSurvey: "Grazie per aver completato il questionario!",
    completingSurveyBefore: "I nostri records mostrano che hai già completato questo questionario.",
    loadingSurvey: "Caricamento del questionario in corso...",
    placeholder: "Scegli...",
    value: "valore",
    requiredError: "Campo obbligatorio",
    requiredErrorInPanel: "Per Favore, rispondi ad almeno una domanda.",
    requiredInAllRowsError: "Completare tutte le righe",
    numericError: "Il valore deve essere numerico",
    textMinLength: "Inserire almeno {0} caratteri",
    textMaxLength: "Lunghezza massima consentita {0} caratteri",
    textMinMaxLength: "Inserire una stringa con minimo {0} e massimo {1} caratteri",
    minRowCountError: "Completare almeno {0} righe.",
    minSelectError: "Selezionare almeno {0} varianti.",
    maxSelectError: "Selezionare massimo {0} varianti.",
    numericMinMax: "'{0}' deve essere uguale o superiore a {1} e uguale o inferiore a {2}",
    numericMin: "'{0}' deve essere uguale o superiore a {1}",
    numericMax: "'{0}' deve essere uguale o inferiore a {1}",
    invalidEmail: "Inserire indirizzo mail valido",
    invalidExpression: "L'espressione: {0} dovrebbe tornare 'vero'.",
    urlRequestError: "La richiesta ha risposto con un errore '{0}'. {1}",
    urlGetChoicesError: "La richiesta ha risposto null oppure il percorso non è corretto",
    exceedMaxSize: "Il file non può eccedere {0}",
    otherRequiredError: "Inserire il valore 'altro'",
    uploadingFile: "File in caricamento. Attendi alcuni secondi e riprova",
    loadingFile: "Caricamento...",
    chooseFile: "Selezionare file(s)...",
    fileDragAreaPlaceholder: "Trascina un file qui o fai clic sul pulsante in basso per caricare il file.",
    noFileChosen: "Nessun file selezionato",
    confirmDelete: "Sei sicuro di voler elminare il record?",
    keyDuplicationError: "Questo valore deve essere univoco.",
    addColumn: "Aggiungi colonna",
    addRow: "Aggiungi riga",
    removeRow: "Rimuovi riga",
    addPanel: "Aggiungi riga",
    removePanel: "Elimina",
    choices_Item: "Elemento",
    matrix_column: "Colonna",
    matrix_row: "Riga",
    savingData: "Salvataggio dati sul server...",
    savingDataError: "Si è verificato un errore e non è stato possibile salvare i risultati.",
    savingDataSuccess: "I risultati sono stati salvati con successo!",
    saveAgainButton: "Riprova",
    timerMin: "min",
    timerSec: "sec",
    timerSpentAll: "Hai impiegato {0} su questa pagina e {1} in totale.",
    timerSpentPage: "Hai impiegato {0} su questa pagina.",
    timerSpentSurvey: "Hai impiegato {0} in totale.",
    timerLimitAll: "Hai impiegato {0} di {1} su questa pagina e {2} di {3} in totale.",
    timerLimitPage: "Hai impiegato {0} di {1} su questa pagina.",
    timerLimitSurvey: "Hai impiegato {0} di {1} in totale.",
    clearCaption: "Cancella",
    chooseFileCaption: "Scegliere il file",
    removeFileCaption: "Rimuovere questo file",
    booleanCheckedLabel: "Sì",
    booleanUncheckedLabel: "No",
    confirmRemoveFile: "Sei sicuro di voler elminare questo file: {0}?",
    confirmRemoveAllFiles: "Sei sicuro di voler elminare tutti i files?",
    questionTitlePatternText: "Titolo della domanda",
    ratingOptionsCaption: "Tocca qui per valutare...",
    emptyRowsText: "Non ci sono righe.",
    filterStringPlaceholder: "Digita per cercare...",
    indexText: "{0} da {1}",
    minError: "Il valore non deve essere inferiore a {0}",
    maxError: "Il valore non deve essere maggiore di {0}",
    modalApplyButtonText: "Applicare",
    modalCancelButtonText: "Annulla",
    multipletext_itemname: "testo",
    noEntriesText: "Non ci sono ancora voci.\nFai clic sul pulsante qui sotto per aggiungere una nuova voce.",
    signaturePlaceHolder: "Firmare qui",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["it"] = italianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["it"] = "italiano";


/***/ }),

/***/ "./src/localization/japanese.ts":
/*!**************************************!*\
  !*** ./src/localization/japanese.ts ***!
  \**************************************/
/*! exports provided: japaneseSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "japaneseSurveyStrings", function() { return japaneseSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var japaneseSurveyStrings = {
    pagePrevText: "前へ",
    pageNextText: "次へ",
    completeText: "完了",
    previewText: "プレビュー",
    editText: "編集",
    startSurveyText: "スタート",
    otherItemText: "その他（説明）",
    noneItemText: "なし",
    selectAllItemText: "すべて選択",
    progressText: "{0}/{1}頁",
    panelDynamicProgressText: "{1}の{0}を記録する",
    questionsProgressText: "{0}/{1}の質問に回答しました。",
    emptySurvey: "この調査に表示できるページや質問はありません",
    completingSurvey: "調査を完了してくれてありがとうございました",
    completingSurveyBefore: "当社の記録によると、この調査はすでに完了しています。",
    loadingSurvey: "調査をダウンロード中",
    placeholder: "選択",
    value: "値打ち",
    requiredError: "質問にお答え下さい",
    requiredErrorInPanel: "最低でも1つの質問に答えてください。",
    requiredInAllRowsError: "質問には全列で回答してください。",
    numericError: "数字でご記入下さい",
    textMinLength: "{0} 文字以上で入力して下さい",
    textMaxLength: "{0}文字以下で入力してください。",
    textMinMaxLength: "{0}以上{1}未満の文字を入力してください。",
    minRowCountError: "{0}行以上で入力して下さい",
    minSelectError: "{0}種類以上を選択して下さい",
    maxSelectError: "{0}以上のバリアントを選択しないでください。",
    numericMinMax: "{0}は{1}以上であり、{2}以下であることが望ましい。",
    numericMin: "'{0}' は同等か{1}より大きくなければなりません",
    numericMax: "'{0}' は同等か{1}より小さくなければなりません",
    invalidEmail: "有効なメールアドレスをご記入下さい",
    invalidExpression: "式は {0}は'true'を返すべきです。",
    urlRequestError: "リクエストはエラー '{0}' を返しました。{1}",
    urlGetChoicesError: "リクエストが空のデータを返したか、'path' プロパティが正しくありません。",
    exceedMaxSize: "ファイルのサイズは{0}を超えてはいけません",
    otherRequiredError: "その他の値を入力してください。",
    uploadingFile: "ファイルをアップロード中です。しばらくしてから再度お試し下さい",
    loadingFile: "読み込み中",
    chooseFile: "ファイルを選択",
    noFileChosen: "選択されたファイルはありません",
    confirmDelete: "レコードを削除しますか？",
    keyDuplicationError: "この値は一意でなければなりません。",
    addColumn: "列の追加",
    addRow: "追加行",
    removeRow: "除去",
    addPanel: "新規追加",
    removePanel: "除去",
    choices_Item: "品目",
    matrix_column: "コラム",
    matrix_row: "行",
    savingData: "結果はサーバーに保存されています...。",
    savingDataError: "エラーが発生し、結果を保存できませんでした。",
    savingDataSuccess: "結果は無事に保存されました",
    saveAgainButton: "もう一度試してみてください。",
    timerMin: "僅少",
    timerSec: "セック",
    timerSpentAll: "あなたはこのページに{0}を費やし、合計で{1}を費やしました。",
    timerSpentPage: "あなたはこのページに{0}を費やしました。",
    timerSpentSurvey: "合計で{0}を使ったことになります。",
    timerLimitAll: "このページに{1}のうち{0}を費やし、{3}のうち{2}を合計で費やしました。",
    timerLimitPage: "このページで{1}の{0}を使ったことがあります。",
    timerLimitSurvey: "合計で{1}の{0}を使ったことがあります。",
    clearCaption: "空白",
    chooseFileCaption: "ファイルを選択",
    removeFileCaption: "このファイルを削除",
    booleanCheckedLabel: "噫",
    booleanUncheckedLabel: "否",
    confirmRemoveFile: "このファイルを削除してもよろしいですか？{0}?",
    confirmRemoveAllFiles: "すべてのファイルを削除してもよろしいですか？",
    questionTitlePatternText: "質問名",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ja"] = japaneseSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ja"] = "日本語";


/***/ }),

/***/ "./src/localization/kazakh.ts":
/*!************************************!*\
  !*** ./src/localization/kazakh.ts ***!
  \************************************/
/*! exports provided: kazakhStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kazakhStrings", function() { return kazakhStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var kazakhStrings = {
    pagePrevText: "Артқа",
    pageNextText: "Келесі",
    completeText: "Дайын",
    previewText: "Алдын ала қарау",
    editText: "Редакциялау",
    startSurveyText: "Бастау",
    otherItemText: "Басқа (өтінеміз, жазыңыз)",
    noneItemText: "Жоқ",
    selectAllItemText: "Барлығын таңдау",
    progressText: "{0} ден {1} бет ",
    panelDynamicProgressText: "{0} ден {1} жазба",
    questionsProgressText: "{0}/{1} сұрақтарға жауап",
    emptySurvey: "Бір де бір сұрақ жоқ.",
    completingSurvey: "Сауалнаманы толтырғаныңыз үшін рахмет!",
    completingSurveyBefore: "Сіз бұл сауалнаманы өтіп қойдыңыз.",
    loadingSurvey: "Серверден жүктеу...",
    placeholder: "Таңдау...",
    value: "мәні",
    requiredError: "Өтінеміз, сұраққа жауап беріңіз.",
    requiredErrorInPanel: "Өтінеміз, кем дегенде бір сұраққа жауап беріңіз.",
    requiredInAllRowsError: "Өтінеміз, әрбір жолдың сұрағаны жауап беріңіз.",
    numericError: "Жауап сан түрінде болуы керек.",
    textMinLength: "Өтінеміз, {0} ден көп таңба енгізіңіз.",
    textMaxLength: "Өтінеміз, {0} ден аз таңба енгізіңіз.",
    textMinMaxLength: "Өтінеміз, {0} аз және {1} көп таңба енгізіңіз.",
    minRowCountError: "Өтінеміз, {0} ден кем емес жол толтырыңыз.",
    minSelectError: "Өтінеміз, тым болмаса {0} нұсқа таңдаңыз.",
    maxSelectError: "Өтінеміз, {0} нұсқадан көп таңдамаңыз.",
    numericMinMax: "'{0}' {1} ден кем емес және {2} ден көп емес болу керек",
    numericMin: "'{0}' {1} ден кем емес болу керек",
    numericMax: "'{0}' {1} ден көп емес болу керек",
    invalidEmail: "Өтінеміз, жарамды электрондық поштаңызды енгізіңіз.",
    invalidExpression: "{0} өрнегі  'true' қайтару керек.",
    urlRequestError: "Сұратым қателікті қайтарды'{0}'. {1}",
    urlGetChoicesError: "Сұратымға жауап бос келді немесе 'path' қасиеті қате көрсетілген ",
    exceedMaxSize: "Файлдың мөлшері {0} аспау керек.",
    otherRequiredError: "Өтінеміз, “Басқа” жолына деректі енгізіңіз",
    uploadingFile: "Сіздің файлыңыз жүктеліп жатыр. Бірнеше секунд тосып, қайтадан байқап көріңіз.",
    loadingFile: "Жүктеу...",
    chooseFile: "Файлдарды таңдаңыз...",
    noFileChosen: "Файл таңдалынбады",
    confirmDelete: "Сіз жазбаны жоятыныңызға сенімдісіз бе?",
    keyDuplicationError: "Бұл мән бірегей болу керек.",
    addColumn: "Бағана қосу",
    addRow: "Жолды қосу",
    removeRow: "Өшіру",
    addPanel: "Жаңа қосу",
    removePanel: "Өшіру",
    choices_Item: "Нұсқа",
    matrix_column: "Бағана",
    matrix_row: "Жол",
    savingData: "Нәтижелер серверде сақталады...",
    savingDataError: "Қателік туындады, нәтиже сақталынбады.",
    savingDataSuccess: "Нәтиже ойдағыдай сақталды!",
    saveAgainButton: "Қайтадан байқап көру",
    timerMin: "мин",
    timerSec: "сек",
    timerSpentAll: "Сіз бұл бетте {0} кетірдіңіз және барлығы {1}.",
    timerSpentPage: "Сіз бұл бетте {0} кетірдіңіз.",
    timerSpentSurvey: "Сіз сауалнама кезінде {0} кетірдіңіз.",
    timerLimitAll: "Сіз бұл бетте {0} ден {1} кетірдіңіз және {2} ден {3} бүкіл сауалнама үшін.",
    timerLimitPage: "Сіз бұл бетте {0} ден {1} кетірдіңіз.",
    timerLimitSurvey: "Сіз бүкіл сауалнама үшін {0} ден {1} кетірдіңіз ",
    clearCaption: "Тазалау",
    chooseFileCaption: "Файл таңдаңыз",
    removeFileCaption: "Файлды жойыңыз",
    booleanCheckedLabel: "Иә",
    booleanUncheckedLabel: "Жоқ",
    confirmRemoveFile: "Сіз бұл файлды жоятыныңызға сенімдісіз бе: {0}?",
    confirmRemoveAllFiles: "Сіз барлық файлдарды жоятыныңызға сенімдісіз бе?",
    questionTitlePatternText: "Сұрақтың атауы",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["kk"] = kazakhStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["kk"] = "Kazakh";


/***/ }),

/***/ "./src/localization/korean.ts":
/*!************************************!*\
  !*** ./src/localization/korean.ts ***!
  \************************************/
/*! exports provided: koreanStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "koreanStrings", function() { return koreanStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var koreanStrings = {
    pagePrevText: "이전",
    pageNextText: "다음",
    completeText: "완료",
    previewText: "미리보기",
    editText: "수정",
    startSurveyText: "시작",
    otherItemText: "기타 (설명)",
    noneItemText: "없음",
    selectAllItemText: "모두 선택",
    progressText: "페이지 {1} / {0}",
    indexText: "{0} / {1}",
    panelDynamicProgressText: "{0} / {1}",
    questionsProgressText: "{0} / {1} 개의 질문에 답변함",
    emptySurvey: "설문지에 보여지는 페이지나 질문이 없습니다.",
    completingSurvey: "설문조사를 완료해 주셔서 감사합니다.",
    completingSurveyBefore: "기록에 따르면 이미 설문 조사를 마치셨습니다.",
    loadingSurvey: "설문조사가 로드중입니다...",
    placeholder: "선택...",
    ratingOptionsCaption: "등급을 매기려면 누르세요.",
    value: "값",
    requiredError: "질문에 답하시오.",
    requiredErrorInPanel: "하나 이상의 질문에 답하십시오.",
    requiredInAllRowsError: "모든 행에 있는 질문에 답하십시오.",
    numericError: "값은 숫자여야 합니다.",
    minError: "값은 {0}보다 작으면 안됩니다.",
    maxError: "값은 {0}보다 클 수 없습니다.",
    textMinLength: "답변의 길이는 최소 {0}자여야 입니다.",
    textMaxLength: "답변의 길이는 {0}자를 초과 할 수 없습니다.",
    textMinMaxLength: "답변의 길이는 {0} - {1}자 사이여야 합니다.",
    minRowCountError: "최소 {0}개의 행을 채우십시오",
    minSelectError: "최소 {0}개의 변수를 선택하십시오.",
    maxSelectError: "최대 {0}개의 변수를 선택하십시오.",
    numericMinMax: "'{0}'은 {1}보다 크거나 같고 {2}보다 작거나 같아야합니다.",
    numericMin: "'{0}'은 {1}보다 크거나 같아야합니다.",
    numericMax: "'{0}'은 {1}보다 작거나 같아야합니다.",
    invalidEmail: "올바른 이메일 주소를 입력하십시오.",
    invalidExpression: "표현식: {0}은 '참'이어야 합니다.",
    urlRequestError: "'{0}'으로 잘못된 요청입니다. {1}",
    urlGetChoicesError: "비어있는 데이터를 요청했거나 잘못된 속성의 경로입니다.",
    exceedMaxSize: "파일 크기가 {0}을 초과 할 수 없습니다.",
    otherRequiredError: "다른 질문을 작성하십시오.",
    uploadingFile: "파일 업로드 중입니다. 잠시 후 다시 시도하십시오.",
    loadingFile: "로드 중...",
    chooseFile: "파일 선택...",
    noFileChosen: "선택된 파일이 없습니다.",
    fileDragAreaPlaceholder: "파일을 여기에 놓거나 아래 버튼을 클릭하여 파일을 불러오세요.",
    confirmDelete: "기록을 삭제하시겠습니까?",
    keyDuplicationError: " 이 값은 고유해야합니다.",
    addColumn: "열 추가",
    addRow: "행 추가",
    removeRow: "제거",
    emptyRowsText: "행이 없습니다.",
    addPanel: "추가",
    removePanel: "제거",
    choices_Item: "항목",
    matrix_column: "열",
    matrix_row: "행",
    multipletext_itemname: "텍스트",
    savingData: "결과가 서버에 저장 중입니다...",
    savingDataError: "오류가 발생하여 결과를 저장할 수 없습니다.",
    savingDataSuccess: "결과가 성공적으로 저장되었습니다.",
    saveAgainButton: "다시 시도하세요.",
    timerMin: "분",
    timerSec: "초",
    timerSpentAll: "현재 페이지에서 {0}을 소요해 총 {1}이 걸렸습니다.",
    timerSpentPage: "현재 페이지에서 {0}이 걸렸습니다.",
    timerSpentSurvey: "총 {0}이 걸렸습니다.",
    timerLimitAll: "현재 페이지에서 {0}/{1}을 소요해 총 {2}/{3}이 걸렸습니다.",
    timerLimitPage: "현재 페이지에서 {0}/{1}이 걸렸습니다.",
    timerLimitSurvey: "총 {0}/{1}이 걸렸습니다.",
    clearCaption: "지우기",
    signaturePlaceHolder: "서명하세요.",
    chooseFileCaption: "파일 선택",
    removeFileCaption: "파일 제거",
    booleanCheckedLabel: "예",
    booleanUncheckedLabel: "아니오",
    confirmRemoveFile: "{0} 파일을 제거 하시겠습니까?",
    confirmRemoveAllFiles: "모든 파일을 제거 하시겠습니까?",
    questionTitlePatternText: "질문 제목",
    modalCancelButtonText: "취소",
    modalApplyButtonText: "적용",
    filterStringPlaceholder: "검색 유형...",
    noEntriesText: "아직 항목이 없습니다.\n새 항목을 추가하려면 아래 버튼을 클릭하세요.",
    more: "더보기"
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ko"] = koreanStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ko"] = "한국어";


/***/ }),

/***/ "./src/localization/latvian.ts":
/*!*************************************!*\
  !*** ./src/localization/latvian.ts ***!
  \*************************************/
/*! exports provided: latvianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "latvianSurveyStrings", function() { return latvianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var latvianSurveyStrings = {
    pagePrevText: "Atpakaļ",
    pageNextText: "Tālāk",
    completeText: "Pabeigt",
    previewText: "Priekšskatījums",
    editText: "Rediģēt",
    startSurveyText: "Sākt",
    otherItemText: "Cits (lūdzu, aprakstiet!)",
    noneItemText: "Nav",
    selectAllItemText: "Izvēlēties visus",
    progressText: "{0}. lapa no {1}",
    panelDynamicProgressText: "Ierakstīt {0} no {1}",
    questionsProgressText: "Atbildēts uz {0} / {1} jautājumiem",
    emptySurvey: "Nav neviena jautājuma.",
    completingSurvey: "Pateicamies Jums par anketas aizpildīšanu!",
    completingSurveyBefore: "Mūsu ieraksti liecina, ka Jūs jau esat aizpildījis šo aptauju.",
    loadingSurvey: "Ielāde no servera...",
    placeholder: "Izvēlēties...",
    value: "value",
    requiredError: "Lūdzu, atbildiet uz jautājumu!",
    requiredErrorInPanel: "Lūdzu, atbildiet uz vismaz vienu jautājumu.",
    requiredInAllRowsError: "Lūdzu, atbildiet uz jautājumiem visās rindās.",
    numericError: "Atbildei ir jābūt skaitlim.",
    textMinLength: "Lūdzu, ievadiet vismaz {0} simbolus.",
    textMaxLength: "Lūdzu, ievadiet mazāk nekā {0} rakstzīmes.",
    textMinMaxLength: "Lūdzu, ievadiet vairāk nekā {0} rakstzīmes un mazāk nekā {1} rakstzīmes.",
    minRowCountError: "Lūdzu, aizpildiet vismaz {0} rindas.",
    minSelectError: "Lūdzu, izvēlieties vismaz {0} variantu.",
    maxSelectError: "Lūdzu, izvēlieties ne vairak par {0} variantiem.",
    numericMinMax: "'{0}' jābūt vienādam vai lielākam nekā {1}, un vienādam vai mazākam, nekā {2}",
    numericMin: "'{0}' jābūt vienādam vai lielākam {1}",
    numericMax: "'{0}' jābūt vienādam vai lielākam {1}",
    invalidEmail: "Lūdzu, ievadiet pareizu e-pasta adresi!",
    invalidExpression: "Izteicienam: {0} jāatgriež “true”.",
    urlRequestError: "Pieprasījumā tika atgriezta kļūda “{0}”. {1}",
    urlGetChoicesError: "Pieprasījums atgrieza tukšus datus vai rekvizīts “path” ir nepareizs",
    exceedMaxSize: "Faila lielums nedrīkst pārsniegt {0}.",
    otherRequiredError: "Lūdzu, ievadiet datus laukā 'Cits'",
    uploadingFile: "Jūsu fails tiek augšupielādēts. Lūdzu, uzgaidiet dažas sekundes un mēģiniet vēlreiz.",
    loadingFile: "Notiek ielāde ...",
    chooseFile: "Izvēlieties failus ...",
    fileDragAreaPlaceholder: "Lai pievienotu, ievelciet failu šeit vai arī klikšķiniet uz zemāk redzamās pogas",
    noFileChosen: "Nav izvēlēts neviens fails",
    confirmDelete: "Vai vēlaties izdzēst ierakstu?",
    keyDuplicationError: "Šai vērtībai jābūt unikālai.",
    addColumn: "Pievienot kolonnu",
    addRow: "Pievienot rindu",
    removeRow: "Noņemt",
    addPanel: "Pievieno jaunu",
    removePanel: "Noņemt",
    choices_Item: "vienums",
    matrix_column: "Sleja",
    matrix_row: "Rinda",
    savingData: "Rezultāti tiek saglabāti serverī ...",
    savingDataError: "Radās kļūda, un mēs nevarējām saglabāt rezultātus.",
    savingDataSuccess: "Rezultāti tika veiksmīgi saglabāti!",
    saveAgainButton: "Mēģiniet vēlreiz",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Šajā lapā esat iztērējis {0} un kopā {1}.",
    timerSpentPage: "Šajā lapā esat iztērējis {0}.",
    timerSpentSurvey: "Kopā esat iztērējis {0}.",
    timerLimitAll: "Šajā lapā esat iztērējis {0} no {1} un kopā {2} no {3}.",
    timerLimitPage: "Šajā lapā esat iztērējis {0} no {1}.",
    timerLimitSurvey: "Kopā esat iztērējis {0} no {1}.",
    clearCaption: "Iztīrīt",
    chooseFileCaption: "Izvēlēties failu",
    removeFileCaption: "Noņemiet šo failu",
    booleanCheckedLabel: "Jā",
    booleanUncheckedLabel: "Nē",
    confirmRemoveFile: "Vai tiešām vēlaties noņemt šo failu: {0}?",
    confirmRemoveAllFiles: "Vai tiešām vēlaties noņemt visus failus?",
    questionTitlePatternText: "Jautājuma nosaukums",
    ratingOptionsCaption: "Nospiediet šeit, lai novērtētu...",
    emptyRowsText: "Nav rindu.",
    filterStringPlaceholder: "Ierakstiet, lai meklētu...",
    indexText: "{0} no {1}",
    minError: "Vērtība nedrīkst būt mazāka par {0}",
    maxError: "Vērtība nedrīkst būt lielāka par {0}",
    modalApplyButtonText: "Pielietot",
    modalCancelButtonText: "Atcelt",
    multipletext_itemname: "teksts",
    noEntriesText: "Vēl nav neviena ieraksta.\nNoklikšķiniet uz zemāk esošās pogas, lai pievienotu jaunu ierakstu.",
    signaturePlaceHolder: "Parakstieties šeit",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["lv"] = latvianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["lv"] = "latviešu";


/***/ }),

/***/ "./src/localization/lithuanian.ts":
/*!****************************************!*\
  !*** ./src/localization/lithuanian.ts ***!
  \****************************************/
/*! exports provided: lithuaniaSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lithuaniaSurveyStrings", function() { return lithuaniaSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var lithuaniaSurveyStrings = {
    pagePrevText: "Atgal",
    pageNextText: "Toliau",
    completeText: "Baigti",
    previewText: "Peržiūra",
    editText: "Redaguoti",
    startSurveyText: "Pradėti",
    otherItemText: "Kita (įvesti)",
    noneItemText: "Nėra",
    selectAllItemText: "Pasirinkti visus",
    progressText: "Puslapis {0} iš {1}",
    panelDynamicProgressText: "Įrašyti {0} iš {1}",
    questionsProgressText: "Atsakė į {0} / {1} klausimus",
    emptySurvey: "Apklausoje nėra matomo puslapio ar klausimo.",
    completingSurvey: "Dėkojame už dalyvavimą apklausoje!",
    completingSurveyBefore: "Mūsų įrašai rodo, kad jau atlikote šią apklausą.",
    loadingSurvey: "Prašome palaukti...",
    placeholder: "Pasirinkti...",
    value: "reikšmė",
    requiredError: "Būtina atsakyti į šį klausimą.",
    requiredErrorInPanel: "Būtina atsakyti bent į vieną klausimą.",
    requiredInAllRowsError: "Prašome atsakyti į klausimus visose eilutėse.",
    numericError: "Turi būti skaičiai.",
    textMinLength: "Prašome suvesti bent {0} simbolius.",
    textMaxLength: "Prašome suvesti mažiau nei {0} simbolių.",
    textMinMaxLength: "Prašome suvesti daugiau nei {0} ir mažiau nei {1} simbolių.",
    minRowCountError: "Prašome suvesti ne mažiau nei {0} eilučių.",
    minSelectError: "Prašome pasirinkti bent {0} variantų.",
    maxSelectError: "Pasirinkite ne daugiau kaip {0} variantus.",
    numericMinMax: "'{0}' turi būti lygus arba didesnis nei {1} ir lygus arba mažesnis nei {2}",
    numericMin: "'{0}' turėtų būti lygus arba didesnis nei {1}",
    numericMax: "'{0}' turėtų būti lygus ar mažesnis už {1}",
    invalidEmail: "Prašome įvesti galiojantį elektroninio pašto adresą.",
    invalidExpression: "Reikšmė: {0} turi grąžinti 'true'.",
    urlRequestError: "Užklausa grąžino klaidą'{0}'. {1}",
    urlGetChoicesError: "Užklausa grąžino tuščius duomenis arba 'path' savybė yra neteisinga",
    exceedMaxSize: "Failo dydis neturi viršyti {0}.",
    otherRequiredError: "Įveskite kitą reikšmę.",
    uploadingFile: "Jūsų failas yra keliamas. Palaukite keletą sekundžių ir bandykite dar kartą.",
    loadingFile: "Prašome palaukti...",
    chooseFile: "Pasirinkti failą(us)...",
    noFileChosen: "Nepasirinktas joks failas",
    confirmDelete: "Ar norite ištrinti įrašą?",
    keyDuplicationError: "Ši reikšmė turėtų būti unikali.",
    addColumn: "Pridėti stulpelį",
    addRow: "Pridėti eilutę",
    removeRow: "Ištrinti",
    addPanel: "Pridėti naują",
    removePanel: "Ištrinti",
    choices_Item: "elementas",
    matrix_column: "Stulpelis",
    matrix_row: "Eilutė",
    savingData: "Rezultatai saugomi serveryje...",
    savingDataError: "Įvyko klaida ir mes negalėjome išsaugoti rezultatų.",
    savingDataSuccess: "Rezultatai buvo išsaugoti sėkmingai!",
    saveAgainButton: "Bandyti dar kartą",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Praleidote {0} šiame puslapyje ir {1} iš viso.",
    timerSpentPage: "Praleidote {0} šiame puslapyje.",
    timerSpentSurvey: "Praleidote {0} iš viso.",
    timerLimitAll: "Praleidote {0} iš {1} šiame puslapyje ir {2} iš {3} iš viso.",
    timerLimitPage: "Praleidote {0} iš {1} šiame puslapyje.",
    timerLimitSurvey: "Praleidote {0} iš {1} iš viso.",
    clearCaption: "Valyti",
    chooseFileCaption: "Pasirinkti failą",
    removeFileCaption: "Ištrinti šį failą",
    booleanCheckedLabel: "Taip",
    booleanUncheckedLabel: "Ne",
    confirmRemoveFile: "Ar tikrai norite pašalinti šį failą: {0}?",
    confirmRemoveAllFiles: "Ar tikrai norite pašalinti visus failus?",
    questionTitlePatternText: "Klausimo pavadinimas",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["lt"] = lithuaniaSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["lt"] = "lietuvių";


/***/ }),

/***/ "./src/localization/macedonian.ts":
/*!****************************************!*\
  !*** ./src/localization/macedonian.ts ***!
  \****************************************/
/*! exports provided: macedonianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "macedonianSurveyStrings", function() { return macedonianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var macedonianSurveyStrings = {
    pagePrevText: "Претходна",
    pageNextText: "Следно",
    completeText: "Заврши",
    previewText: "Преглед",
    editText: "Уредување",
    startSurveyText: "Започнете",
    otherItemText: "Друго (опиши)",
    noneItemText: "Ништо",
    selectAllItemText: "Селектирај се",
    progressText: "Страница {0} од {1}",
    panelDynamicProgressText: "Сними {0} од {1}",
    questionsProgressText: "Одговорени на {0} / {1} прашања",
    emptySurvey: "Нема видлива страница или прашање во истражувањето.",
    completingSurvey: "Ви благодариме што го завршивте истражувањето!",
    completingSurveyBefore: "Нашите записи покажуваат дека веќе сте го завршиле ова истражување.",
    loadingSurvey: "Анкетата се вчитува ...",
    placeholder: "Изберете ...",
    value: "вредност",
    requiredError: "Ве молам, одговорете на прашањето.",
    requiredErrorInPanel: "Ве молам, одговорете барем на едно прашање.",
    requiredInAllRowsError: "Ве молиме, одговорете на прашања во сите редови.",
    numericError: "Вредноста треба да биде нумеричка.",
    minError: "Вредноста не треба да биде помала од {0}",
    maxError: "Вредноста не треба да биде поголема од {0}",
    textMinLength: "Внесете најмалку {0} знак/ци.",
    textMaxLength: "Внесете не повеќе од {0} знак/ци.",
    textMinMaxLength: "Внесете најмалку {0} и не повеќе од {1} знаци.",
    minRowCountError: "Пополнете најмалку {0} ред(ови).",
    minSelectError: "Ве молиме изберете најмалку {0} варијанта(и).",
    maxSelectError: "Изберете не повеќе од {0} варијанта(и).",
    numericMinMax: "'{0}' треба да биде најмалку {1} и најмногу {2}",
    numericMin: "'{0}' треба да биде најмалку {1}",
    numericMax: "'{0}' треба да биде најмногу {1}",
    invalidEmail: "Ве молиме внесете валидна е-маил адреса.",
    invalidExpression: "Изразот: {0} треба да се врати 'true'.",
    urlRequestError: "Барањето врати грешка '{0}'. {1} ",
    urlGetChoicesError: "Барањето врати празни податоци или својството 'path' е неточно",
    exceedMaxSize: "Големината на датотеката не треба да надминува {0}.",
    otherRequiredError: "Внесете ја другата вредност.",
    uploadingFile: "Вашата датотека се поставува. Ве молиме почекајте неколку секунди и обидете се повторно.",
    loadingFile: "Се вчитува ...",
    chooseFile: "Изберете датотека (и) ...",
    fileDragAreaPlaceholder: "Пуштете датотека овде или кликнете на копчето подолу за да ја вчитате датотеката.",
    noFileChosen: "Не се избрани датотеки",
    confirmDelete: "Дали сакате да го избришете записот?",
    keyDuplicationError: "Оваа вредност треба да биде единствена.",
    addColumn: "Додај колона",
    addRow: "Додади ред",
    removeRow: "Отстрани",
    emptyRowsText: "Нема редови.",
    addPanel: "Додади ново",
    removePanel: "Отстрани",
    choices_Item: "ставка",
    matrix_column: "Колона",
    matrix_row: "Ред",
    savingData: "Резултатите се зачувуваат на серверот ...",
    savingDataError: "Настана грешка и не можевме да ги зачуваме резултатите.",
    savingDataSuccess: "Резултатите беа успешно зачувани!",
    saveAgainButton: "Обиди се повторно",
    timerMin: "мин",
    timerSec: "сек",
    timerSpentAll: "Поминавте {0} на оваа страница и вкупно {1}.",
    timerSpentPage: "Поминавте {0} на оваа страница.",
    timerSpentSurvey: "Вие потрошивте вкупно {0}.",
    timerLimitAll: "Поминавте {0} од {1} на оваа страница и {2} од {3} вкупно.",
    timerLimitPage: "Поминавте {0} од {1} на оваа страница.",
    timerLimitSurvey: "Вие потрошивте вкупно {0} од {1}.",
    clearCaption: "Да расчисти",
    chooseFileCaption: "Изберете датотека",
    removeFileCaption: "Отстранете ја оваа датотека",
    booleanCheckedLabel: "Да",
    booleanUncheckedLabel: "Не",
    confirmRemoveFile: "Дали сте сигурни дека сакате да ја отстраните оваа датотека: {0}?",
    confirmRemoveAllFiles: "Дали сте сигурни дека сакате да ги отстраните сите датотеки?",
    questionTitlePatternText: "Наслов на прашањето",
    modalCancelButtonText: "Откажи",
    modalApplyButtonText: "Аплицирај",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["mk"] = macedonianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["mk"] = "Македонски";


/***/ }),

/***/ "./src/localization/malay.ts":
/*!***********************************!*\
  !*** ./src/localization/malay.ts ***!
  \***********************************/
/*! exports provided: malaySurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "malaySurveyStrings", function() { return malaySurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var malaySurveyStrings = {
    pagePrevText: "Sebelumnya",
    pageNextText: "Seterusnya",
    completeText: "Selesai",
    previewText: "Pratonton",
    editText: "Edit",
    startSurveyText: "Mula",
    otherItemText: "Lain (terangkan)",
    noneItemText: "Tiada",
    selectAllItemText: "Pilih Semua",
    progressText: "Halaman {0} daripada {1}",
    panelDynamicProgressText: "Rekod {0} daripada {1}",
    questionsProgressText: "{0}/{1} soalan telah dijawab",
    emptySurvey: "Tiada halaman atau soalan boleh dilihat dalam tinjauan.",
    completingSurvey: "Terima kasih kerana melengkapkan tinjauan!",
    completingSurveyBefore: "Rekod kami menunjukkan yang anda telah melengkapkan tinjauan ini.",
    loadingSurvey: "Memuatkan Tinjauan...",
    placeholder: "Pilih...",
    value: "nilai",
    requiredError: "Respons diperlukan.",
    requiredErrorInPanel: "Respons diperlukan: jawab sekurang-kurangnya satu soalan.",
    requiredInAllRowsError: "Respons diperlukan: jawab soalan dalam semua baris.",
    numericError: "Nilai mestilah numerik.",
    minError: "Nilai tidak boleh kurang daripada {0}",
    maxError: "Nilai tidak boleh lebih besar daripada {0}",
    textMinLength: "Sila masukkan sekurang-kurangnya {0} aksara.",
    textMaxLength: "Sila masukkan tidak lebih daripada {0} aksara.",
    textMinMaxLength: "Sila masukkan sekurang-kurangnya {0} dan tidak lebih daripada {1} aksara.",
    minRowCountError: "Sila isikan sekurang-kurangnya {0} baris.",
    minSelectError: "Sila pilih sekurang-kurangnya {0} varian.",
    maxSelectError: "Sila pilih tidak lebih daripada {0} varian.",
    numericMinMax: "'{0}' mestilah sekurang-kurangnya {1} dan paling banyak {2}",
    numericMin: "'{0}' mestilah sekurang-kurangnya {1}",
    numericMax: "'{0}' mestilah paling banyak {1}",
    invalidEmail: "Sila masukkan alamat e-mel yang sah.",
    invalidExpression: "Ekspresi: {0} hendaklah mengembalikan nilai 'benar'.",
    urlRequestError: "Permintaan mengembalikan ralat '{0}'. {1}",
    urlGetChoicesError: "Permintaan mengembalikan data kosong atau ciri 'laluan' salah",
    exceedMaxSize: "Saiz fail hendaklah tidak melebihi {0}.",
    otherRequiredError: "Respons diperlukan: masukkan nilai lain.",
    uploadingFile: "Fail anda sedang dimuat naik. Sila tunggu beberapa saat dan cuba lagi.",
    loadingFile: "Memuat...",
    chooseFile: "Pilih fail...",
    noFileChosen: "Tiada fail dipilih",
    fileDragAreaPlaceholder: "Letakkan fail di sini atau klik butang di bawah untuk memuatkan fail.",
    confirmDelete: "Adakah anda ingin memadamkan rekod?",
    keyDuplicationError: "Nilai ini hendaklah unik.",
    addColumn: "Tambahkan lajur",
    addRow: "Tambahkan baris",
    removeRow: "Alih keluar",
    emptyRowsText: "Tiada baris.",
    addPanel: "Tambah baharu",
    removePanel: "Alih keluar",
    choices_Item: "item",
    matrix_column: "Lajur",
    matrix_row: "Baris",
    multipletext_itemname: "teks",
    savingData: "Keputusan sedang disimpan pada pelayan...",
    savingDataError: "Ralat berlaku dan kami tidak dapat menyimpan keputusan.",
    savingDataSuccess: "Keputusan berjaya disimpan!",
    saveAgainButton: "Cuba lagi",
    timerMin: "min",
    timerSec: "saat",
    timerSpentAll: "Anda telah meluangkan {0} pada halaman ini dan {1} secara keseluruhan.",
    timerSpentPage: "Anda telah meluangkan {0} pada halaman ini.",
    timerSpentSurvey: "Anda telah meluangkan {0} secara keseluruhan.",
    timerLimitAll: "Anda telah meluangkan {0} daripada {1} pada halaman ini dan {2} daripada {3} secara keseluruhan.",
    timerLimitPage: "Anda telah meluangkan {0} daripada {1} pada halaman ini.",
    timerLimitSurvey: "Anda telah meluangkan {0} daripada {1} secara keseluruhan.",
    clearCaption: "Kosongkan",
    signaturePlaceHolder: "Tandatangan di sini",
    chooseFileCaption: "Pilih fail",
    removeFileCaption: "Alih keluar fail ini",
    booleanCheckedLabel: "Ya",
    booleanUncheckedLabel: "Tidak",
    confirmRemoveFile: "Anda pasti ingin mengalih keluar fail ini: {0}?",
    confirmRemoveAllFiles: "Anda pasti ingin mengalih keluar semua fail?",
    questionTitlePatternText: "Tajuk Soalan",
    modalCancelButtonText: "Batal",
    modalApplyButtonText: "Guna",
    filterStringPlaceholder: "Taip untuk membuat carian...",
    noEntriesText: "Belum ada entri.\nKlik butang di bawah untuk menambahkan entri."
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ms"] = malaySurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ms"] = "melayu";


/***/ }),

/***/ "./src/localization/nl-BE.ts":
/*!***********************************!*\
  !*** ./src/localization/nl-BE.ts ***!
  \***********************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
/* harmony import */ var _dutch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dutch */ "./src/localization/dutch.ts");


/**
 * This is initialized as a copy of the Dutch strings, when they start to deviate a choice has to be made:
 * - Copy the Dutch set once and move forward as if it are 2 totally different languages
 * - Override the relevant strings only
 */
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["nl-BE"] = _dutch__WEBPACK_IMPORTED_MODULE_1__["dutchSurveyStrings"];
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["nl-BE"] = "vlaams";


/***/ }),

/***/ "./src/localization/norwegian.ts":
/*!***************************************!*\
  !*** ./src/localization/norwegian.ts ***!
  \***************************************/
/*! exports provided: norwegianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "norwegianSurveyStrings", function() { return norwegianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var norwegianSurveyStrings = {
    pagePrevText: "Forrige",
    pageNextText: "Neste",
    completeText: "Fullfør",
    previewText: "Forhåndsvisning",
    editText: "Redigere",
    startSurveyText: "Start",
    otherItemText: "Annet (beskriv)",
    noneItemText: "Ingen",
    selectAllItemText: "Velg alle",
    progressText: "Side {0} av {1}",
    panelDynamicProgressText: "Ta opp {0} av {1}",
    questionsProgressText: "Besvarte {0} / {1} spørsmål",
    emptySurvey: "Det er ingen synlig side eller spørsmål i undersøkelsen.",
    completingSurvey: "Takk for at du fullførte undersøkelsen!",
    completingSurveyBefore: "Våre data viser at du allerede har gjennomført denne undersøkelsen.",
    loadingSurvey: "Undersøkelsen laster...",
    placeholder: "Velg...",
    value: "verdi",
    requiredError: "Vennligst svar på spørsmålet.",
    requiredErrorInPanel: "Vennligst svar på minst ett spørsmål.",
    requiredInAllRowsError: "Vennligst svar på spørsmål i alle rader.",
    numericError: "Verdien skal være numerisk.",
    textMinLength: "Vennligst skriv inn minst {0} tegn.",
    textMaxLength: "Vennligst skriv inn mindre enn {0} tegn.",
    textMinMaxLength: "Vennligst skriv inn mer enn {0} og mindre enn {1} tegn.",
    minRowCountError: "Vennligst fyll inn minst {0} rader.",
    minSelectError: "Vennligst velg minst {0} varianter.",
    maxSelectError: "Vennligst ikke velg mer enn {0} varianter.",
    numericMinMax: "'{0}' bør være lik eller mer enn {1} og lik eller mindre enn {2}",
    numericMin: "'{0}' bør være lik eller mer enn {1}",
    numericMax: "'{0}' bør være lik eller mindre enn {1}",
    invalidEmail: "Vennligst skriv inn en gyldig e-post adresse.",
    invalidExpression: "Uttrykket: {0} skal returnere 'sant'.",
    urlRequestError: "Forespørselen returnerte feilen '{0}'. {1}",
    urlGetChoicesError: "Forespørselen returnerte tomme data, eller 'sti' -egenskapen er feil",
    exceedMaxSize: "Filstørrelsen bør ikke overstige {0}.",
    otherRequiredError: "Vennligst skriv inn den andre verdien.",
    uploadingFile: "Filen din lastes opp. Vennligst vent noen sekunder og prøv igjen.",
    loadingFile: "Laster inn ...",
    chooseFile: "Velg fil (er) ...",
    noFileChosen: "Ingen fil valgt",
    confirmDelete: "Ønsker du å slette posten?",
    keyDuplicationError: "Denne verdien skal være unik.",
    addColumn: "Legg til kolonne",
    addRow: "Legg til rad",
    removeRow: "Fjern",
    addPanel: "Legg til ny",
    removePanel: "Fjerne",
    choices_Item: "element",
    matrix_column: "Kolonne",
    matrix_row: "Rad",
    savingData: "Resultatene lagres på serveren ...",
    savingDataError: "Det oppsto en feil, og vi kunne ikke lagre resultatene.",
    savingDataSuccess: "Resultatene ble lagret!",
    saveAgainButton: "Prøv igjen",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Du har tilbrakt {0} på denne siden og {1} totalt.",
    timerSpentPage: "Du har tilbrakt {0} på denne siden.",
    timerSpentSurvey: "Du har tilbrakt {0} totalt.",
    timerLimitAll: "Du har tilbrakt {0} av {1} på denne siden og totalt {2} av {3}.",
    timerLimitPage: "Du har tilbrakt {0} av {1} på denne siden.",
    timerLimitSurvey: "Du har tilbrakt {0} av {1} totalt.",
    clearCaption: "Klar",
    chooseFileCaption: "Velg Fil",
    removeFileCaption: "Fjern denne filen",
    booleanCheckedLabel: "Ja",
    booleanUncheckedLabel: "Nei",
    confirmRemoveFile: "Er du sikker på at du vil fjerne denne filen: {0}?",
    confirmRemoveAllFiles: "Er du sikker på at du vil fjerne alle filene?",
    questionTitlePatternText: "Spørsmålstittel",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["no"] = norwegianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["no"] = "norsk";


/***/ }),

/***/ "./src/localization/persian.ts":
/*!*************************************!*\
  !*** ./src/localization/persian.ts ***!
  \*************************************/
/*! exports provided: persianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "persianSurveyStrings", function() { return persianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var persianSurveyStrings = {
    pagePrevText: "قبلی",
    pageNextText: "بعدی",
    completeText: "تکمیل",
    previewText: "پیش نمایش",
    editText: "ویرایش",
    startSurveyText: "شروع",
    otherItemText: "دیگر(توضیح)",
    noneItemText: "هیچ",
    selectAllItemText: "انتخاب همه",
    progressText: "صفحه {0} از {1}",
    panelDynamicProgressText: "مورد {0} از {1}",
    questionsProgressText: "تعداد پاسخ {0}/{1} سوال",
    emptySurvey: "صفحه ای یا گزینه ای برای این پرسشنامه موجود نیست.",
    completingSurvey: "از شما بابت تکمیل این پرسشنامه متشکریم",
    completingSurveyBefore: "به نظر می رسد هم هم اکنون پرسشنامه را تکمیل کرده اید.",
    loadingSurvey: "درحال ایجاد پرسشنامه",
    placeholder: "انتخاب کنید...",
    value: "مقدار",
    requiredError: "لطفا به سوال پاسخ دهید",
    requiredErrorInPanel: "لطفا حداقل به یک سوال پاسخ دهید.",
    requiredInAllRowsError: "لطفا سوالات تمام سطرها را پاسخ دهید.",
    numericError: "مقدار باید عددی باشد",
    textMinLength: "لطفا حداقل  {0} حرف وارد کنید",
    textMaxLength: "لطفا کمتر از  {0} حرف وارد کنید.",
    textMinMaxLength: "لطفا بیشتر از  {0} حرف و کمتر از {1} حرف وارد کنید.",
    minRowCountError: "لطفا حداقل {0} سطر وارد کنید.",
    minSelectError: "حداقل {0} انتخاب کنید.",
    maxSelectError: "لطفا بیشتر از  {0} انتخاب کنید.",
    numericMinMax: "'{0}' باید بین {1} و {2} باشد",
    numericMin: "'{0}' بزرگتر مساوی {1} باشد",
    numericMax: "'{0}' باید کوچکتر یا مساوی {1} باشد",
    invalidEmail: "لطفا ایمیل صحیح درج کنید",
    invalidExpression: "عبارت: {0} پاسخ باید 'true' باشد.",
    urlRequestError: "درخواست با خطا روبرو شد: '{0}'. {1}",
    urlGetChoicesError: "درخواست مسیری خالی بازگشت داده یا مسیر درست تنظیم نشده",
    exceedMaxSize: "بیشترین حجم مجاز فایل: {0}",
    otherRequiredError: "مقدار 'دیگر' را وارد کنید",
    uploadingFile: "فایل در حال آیلود است. لطفا صبر کنید.",
    loadingFile: "بارگیری...",
    chooseFile: "انتخاب فایل(ها)...",
    noFileChosen: "هیچ فایلی انتخاب نشده",
    confirmDelete: "آیا مایل به حذف این ردیف هستید؟",
    keyDuplicationError: "این مقدار باید غیر تکراری باشد",
    addColumn: "ستون جدید",
    addRow: "سطر جدید",
    removeRow: "حذف",
    addPanel: "جدید",
    removePanel: "حذف",
    choices_Item: "آیتم",
    matrix_column: "ستون",
    matrix_row: "سطر",
    savingData: "نتایج در حال ذخیره سازی در سرور است",
    savingDataError: "خطایی در ذخیره سازی نتایج رخ داده است",
    savingDataSuccess: "نتایج با موفقیت ذخیره شد",
    saveAgainButton: "مجدد تلاش کنید",
    timerMin: "دقیقه",
    timerSec: "ثانیه",
    timerSpentAll: "شما مدت {0} در این صفحه و مدت {1} را در مجموع سپری کرده اید.",
    timerSpentPage: "شما مدت {0} را در این صفحه سپری کرده اید.",
    timerSpentSurvey: "شما مدت {0} را در مجموع سپری کرده اید.",
    timerLimitAll: "شما مدت {0} از {1} در این صفحه و مدت {2} از {3} را در مجموع سپری کرده اید.",
    timerLimitPage: "شما مدت {0} از {1} را در این صفحه سپری کرده اید.",
    timerLimitSurvey: "شما مدت {0} از {1} را در مجموع سپری کرده اید.",
    clearCaption: "خالی کردن",
    chooseFileCaption: "انتخاب فایل",
    removeFileCaption: "حذف این فایل",
    booleanCheckedLabel: "بله",
    booleanUncheckedLabel: "خیر",
    confirmRemoveFile: "آیا میخواهید این فایل را پاک کنید: {0}?",
    confirmRemoveAllFiles: "آیا میخواهید تمام فایل ها را پاک کنید?",
    questionTitlePatternText: "عنوان سوال",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["fa"] = persianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["fa"] = "فارْسِى";


/***/ }),

/***/ "./src/localization/polish.ts":
/*!************************************!*\
  !*** ./src/localization/polish.ts ***!
  \************************************/
/*! exports provided: polishSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polishSurveyStrings", function() { return polishSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var polishSurveyStrings = {
    pagePrevText: "Wstecz",
    pageNextText: "Dalej",
    completeText: "Gotowe",
    previewText: "Premiera",
    editText: "Edycja",
    startSurveyText: "Start",
    otherItemText: "Inna odpowiedź (wpisz)",
    noneItemText: "Brak",
    selectAllItemText: "Wybierz wszystkie",
    progressText: "Strona {0} z {1}",
    panelDynamicProgressText: "Zapis {0} z {1}",
    questionsProgressText: "Odpowiedzi na {0}/{1} pytania",
    emptySurvey: "Nie ma widocznych pytań.",
    completingSurvey: "Dziękujemy za wypełnienie ankiety!",
    completingSurveyBefore: "Z naszych zapisów wynika, że wypełniłeś już tę ankietę.",
    loadingSurvey: "Trwa wczytywanie ankiety...",
    placeholder: "Wybierz...",
    value: "Wartość",
    requiredError: "Proszę odpowiedzieć na to pytanie.",
    requiredErrorInPanel: "Proszę odpowiedzieć na co najmniej jedno pytanie.",
    requiredInAllRowsError: "Proszę odpowiedzieć na wszystkie pytania.",
    numericError: "W tym polu można wpisać tylko liczby.",
    textMinLength: "Proszę wpisać co najmniej {0} znaków.",
    textMaxLength: "Proszę wpisać mniej niż {0} znaków.",
    textMinMaxLength: "Proszę wpisać więcej niż {0} i mniej niż {1} znaków.",
    minRowCountError: "Proszę uzupełnić przynajmniej {0} wierszy.",
    minSelectError: "Proszę wybrać co najmniej {0} pozycji.",
    maxSelectError: "Proszę wybrać nie więcej niż {0} pozycji.",
    numericMinMax: "Odpowiedź '{0}' powinna być większa lub równa {1} oraz mniejsza lub równa {2}",
    numericMin: "Odpowiedź '{0}' powinna być większa lub równa {1}",
    numericMax: "Odpowiedź '{0}' powinna być mniejsza lub równa {1}",
    invalidEmail: "Proszę podać prawidłowy adres email.",
    invalidExpression: "Wyrażenie: {0} powinno wracać 'prawdziwe'.",
    urlRequestError: "Żądanie zwróciło błąd '{0}'. {1}",
    urlGetChoicesError: "Żądanie nie zwróciło danych albo ścieżka jest nieprawidłowa",
    exceedMaxSize: "Rozmiar przesłanego pliku nie może przekraczać {0}.",
    otherRequiredError: "Proszę podać inną odpowiedź.",
    uploadingFile: "Trwa przenoszenie Twojego pliku, proszę spróbować ponownie za kilka sekund.",
    loadingFile: "Ładowanie...",
    chooseFile: "Wybierz plik(i)...",
    fileDragAreaPlaceholder: "Upuść plik tutaj lub kliknij przycisk poniżej, aby załadować plik.",
    noFileChosen: "Nie wybrano żadnego pliku",
    confirmDelete: "Chcesz skasować nagranie?",
    keyDuplicationError: "Ta wartość powinna być wyjątkowa.",
    addColumn: "Dodaj kolumnę",
    addRow: "Dodaj wiersz",
    removeRow: "Usuń",
    addPanel: "Dodaj panel",
    removePanel: "Usuń",
    choices_Item: "element",
    matrix_column: "Kolumna",
    matrix_row: "Wiersz",
    savingData: "Zapisuję wyniki ankiety na serwerze...",
    savingDataError: "Wystąpił błąd i wyniki nie mogły zostać zapisane.",
    savingDataSuccess: "Wyniki zostały poprawnie zapisane!",
    saveAgainButton: "Spróbuj ponownie",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Spędziłeś {0} na tej stronie a w sumie {1}.",
    timerSpentPage: "Spędziłeś {0} na tej stronie.",
    timerSpentSurvey: "Spędziłeś w sumie {0}.",
    timerLimitAll: "Spędziłeś {0} z {1} na tej stronie a w sumie {2} z {3}.",
    timerLimitPage: "Spędziłeś {0} z {1} na tej stronie",
    timerLimitSurvey: "Spędziłeś {0} z {1}.",
    clearCaption: "Jasne",
    chooseFileCaption: "Wybierz plik",
    removeFileCaption: "Usuń ten plik",
    booleanCheckedLabel: "Tak",
    booleanUncheckedLabel: "Nie",
    confirmRemoveFile: "Jesteś pewien, że chcesz usunąć ten plik: {0}?",
    confirmRemoveAllFiles: "Jesteś pewien, że chcesz usunąć wszystkie pliki?",
    questionTitlePatternText: "Tytuł pytania",
    ratingOptionsCaption: "Kliknij tutaj, aby ocenić...",
    emptyRowsText: "Nie ma rzędów.",
    filterStringPlaceholder: "Wpisz aby wyszukać...",
    indexText: "{0} od {1}",
    minError: "Wartość nie powinna być mniejsza niż {0}",
    maxError: "Wartość nie powinna być większa niż {0}",
    modalApplyButtonText: "Zastosować",
    modalCancelButtonText: "Anulować",
    multipletext_itemname: "tekst",
    noEntriesText: "Nie ma jeszcze wpisów.\nKliknij przycisk poniżej, aby dodać nowy wpis.",
    signaturePlaceHolder: "Podpisz tutaj",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["pl"] = polishSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["pl"] = "polski";


/***/ }),

/***/ "./src/localization/portuguese-br.ts":
/*!*******************************************!*\
  !*** ./src/localization/portuguese-br.ts ***!
  \*******************************************/
/*! exports provided: portugueseBrSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "portugueseBrSurveyStrings", function() { return portugueseBrSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

/**
 * You don't need to translate strings that have the same value as Portuguese translation
 */
var portugueseBrSurveyStrings = {
    emptySurvey: "Não há página visível ou pergunta na pesquisa.",
    completingSurvey: "Obrigado por finalizar a pesquisa!",
    completingSurveyBefore: "Nossos registros mostram que você já finalizou a pesquisa.",
    loadingSurvey: "A pesquisa está carregando...",
    requiredError: "Por favor, responda a pergunta.",
    requiredErrorInPanel: "Por favor, responda pelo menos uma pergunta.",
    requiredInAllRowsError: "Por favor, responda as perguntas em todas as linhas.",
    maxSelectError: "Por favor, selecione não mais do que {0} opções.",
    invalidEmail: "Por favor, informe um e-mail válido.",
    urlRequestError: "A requisição retornou o erro '{0}'. {1}",
    urlGetChoicesError: "A requisição não retornou dados ou o 'caminho' da requisição não está correto",
    otherRequiredError: "Por favor, informe o outro valor.",
    uploadingFile: "Seu arquivo está sendo carregado. Por favor, aguarde alguns segundos e tente novamente.",
    loadingFile: "Carregando...",
    noFileChosen: "Nenhum arquivo escolhido",
    confirmDelete: "Tem certeza que deseja deletar?",
    keyDuplicationError: "Esse valor deve ser único.",
    savingData: "Os resultados esto sendo salvos no servidor...",
    savingDataError: "Ocorreu um erro e não foi possível salvar os resultados.",
    savingDataSuccess: "Os resultados foram salvos com sucesso!",
    chooseFileCaption: "Escolher arquivo",
    removeFileCaption: "Remover este arquivo",
    confirmRemoveFile: "Tem certeza que deseja remover este arquivo: {0}?",
    confirmRemoveAllFiles: "Tem certeza que deseja remover todos os arquivos?",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["pt-br"] = portugueseBrSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["pt-br"] = "português brasileiro";


/***/ }),

/***/ "./src/localization/portuguese.ts":
/*!****************************************!*\
  !*** ./src/localization/portuguese.ts ***!
  \****************************************/
/*! exports provided: portugueseSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "portugueseSurveyStrings", function() { return portugueseSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var portugueseSurveyStrings = {
    pagePrevText: "Anterior",
    pageNextText: "Próximo",
    completeText: "Finalizar",
    previewText: "Pré-visualização",
    editText: "Editar",
    startSurveyText: "Começar",
    otherItemText: "Outros (descrever)",
    noneItemText: "Nenhum",
    selectAllItemText: "Selecionar Todos",
    progressText: "Página {0} de {1}",
    panelDynamicProgressText: "Registo {0} de {1}",
    questionsProgressText: "Respostas {0}/{1} perguntas",
    emptySurvey: "Não há página visível ou pergunta no questionário.",
    completingSurvey: "Obrigado por finalizar o questionário!",
    completingSurveyBefore: "Os nossos registos mostram que já finalizou o questionário.",
    loadingSurvey: "O questionário está a carregar...",
    placeholder: "Selecione...",
    value: "valor",
    requiredError: "Por favor, responda à pergunta.",
    requiredErrorInPanel: "Por favor, responda pelo menos a uma pergunta.",
    requiredInAllRowsError: "Por favor, responda às perguntas em todas as linhas.",
    numericError: "O valor deve ser numérico.",
    textMinLength: "Por favor, insira pelo menos {0} caracteres.",
    textMaxLength: "Por favor, insira menos de {0} caracteres.",
    textMinMaxLength: "Por favor, insira mais de {0} e menos de {1} caracteres.",
    minRowCountError: "Preencha pelo menos {0} linhas.",
    minSelectError: "Selecione pelo menos {0} opções.",
    maxSelectError: "Por favor, selecione no máximo {0} opções.",
    numericMinMax: "O '{0}' deve ser igual ou superior a {1} e igual ou menor que {2}",
    numericMin: "O '{0}' deve ser igual ou superior a {1}",
    numericMax: "O '{0}' deve ser igual ou inferior a {1}",
    invalidEmail: "Por favor, insira um e-mail válido.",
    invalidExpression: "A expressão: {0} deve retornar 'verdadeiro'.",
    urlRequestError: "O pedido retornou o erro '{0}'. {1}",
    urlGetChoicesError: "O pedido não retornou dados ou o 'caminho' do pedido não está correto",
    exceedMaxSize: "O tamanho do arquivo não deve exceder {0}.",
    otherRequiredError: "Por favor, insira o outro valor.",
    uploadingFile: "O seu ficheiro está a carregar. Por favor, aguarde alguns segundos e tente novamente.",
    loadingFile: "A carregar...",
    chooseFile: "Selecione o(s) arquivo(s)...",
    noFileChosen: "Nenhum ficheiro escolhido",
    confirmDelete: "Tem a certeza que deseja apagar?",
    keyDuplicationError: "Este valor deve ser único.",
    addColumn: "Adicionar coluna",
    addRow: "Adicionar linha",
    removeRow: "Remover linha",
    addPanel: "Adicionar novo",
    removePanel: "Remover",
    choices_Item: "item",
    matrix_column: "Coluna",
    matrix_row: "Linha",
    savingData: "Os resultados estão a ser guardados no servidor...",
    savingDataError: "Ocorreu um erro e não foi possível guardar os resultados.",
    savingDataSuccess: "Os resultados foram guardados com sucesso!",
    saveAgainButton: "Tente novamente",
    timerMin: "min",
    timerSec: "seg",
    timerSpentAll: "Você gastou {0} nesta página e {1} no total.",
    timerSpentPage: "Você gastou {0} nesta página.",
    timerSpentSurvey: "Você gastou {0} no total.",
    timerLimitAll: "Você gastou {0} de {1} nesta página e {2} de {3} no total.",
    timerLimitPage: "Você gastou {0} de {1} nesta página.",
    timerLimitSurvey: "Você gastou {0} de {1} no total.",
    clearCaption: "Limpar",
    chooseFileCaption: "Escolher ficheiro",
    removeFileCaption: "Remover este ficheiro",
    booleanCheckedLabel: "Sim",
    booleanUncheckedLabel: "Não",
    confirmRemoveFile: "Tem a certeza que deseja remover este ficheiro: {0}?",
    confirmRemoveAllFiles: "Tem a certeza que deseja remover todos os ficheiros?",
    questionTitlePatternText: "Título da questão",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["pt"] = portugueseSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["pt"] = "português";


/***/ }),

/***/ "./src/localization/romanian.ts":
/*!**************************************!*\
  !*** ./src/localization/romanian.ts ***!
  \**************************************/
/*! exports provided: romanianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "romanianSurveyStrings", function() { return romanianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var romanianSurveyStrings = {
    pagePrevText: "Precedent",
    pageNextText: "Următor",
    completeText: "Finalizare",
    previewText: "previzualizare",
    editText: "Editați",
    startSurveyText: "start",
    otherItemText: "Altul(precizaţi)",
    noneItemText: "Nici unul",
    selectAllItemText: "Selectează tot",
    progressText: "Pagina {0} din {1}",
    panelDynamicProgressText: "Înregistrare {0} din {1}",
    questionsProgressText: "Răspunsuri la {0} / {1} întrebări",
    emptySurvey: "Nu sunt întrebări pentru acest chestionar",
    completingSurvey: "Vă mulţumim pentru timpul acordat!",
    completingSurveyBefore: "Din înregistrările noastre reiese că ați completat deja acest chestionar.",
    loadingSurvey: "Chestionarul se încarcă...",
    placeholder: "Alegeţi...",
    value: "valoare",
    requiredError: "Răspunsul la această întrebare este obligatoriu.",
    requiredErrorInPanel: "Vă rugăm să răspundeți la cel puțin o întrebare.",
    requiredInAllRowsError: "Toate răspunsurile sunt obligatorii",
    numericError: "Răspunsul trebuie să fie numeric.",
    textMinLength: "Trebuie să introduceți minim {0} caractere.",
    textMaxLength: "Trebuie să introduceți maxim {0} caractere.",
    textMinMaxLength: "Trebuie să introduceți mai mult de {0} și mai puțin de {1} caractere.",
    minRowCountError: "Trebuie să completați minim {0} rânduri.",
    minSelectError: "Trebuie să selectați minim {0} opţiuni.",
    maxSelectError: "Trebuie să selectați maxim {0} opţiuni.",
    numericMinMax: "Răspunsul '{0}' trebuie să fie mai mare sau egal ca {1} şî mai mic sau egal cu {2}",
    numericMin: "Răspunsul '{0}' trebuie să fie mai mare sau egal ca {1}",
    numericMax: "Răspunsul '{0}' trebuie să fie mai mic sau egal ca {1}",
    invalidEmail: "Trebuie să introduceţi o adresa de email validă.",
    invalidExpression: "Expresia: {0} ar trebui să returneze „adevărat”.",
    urlRequestError: "Request-ul a returnat eroarea '{0}'. {1}",
    urlGetChoicesError: "Request-ul nu a returnat date sau proprietatea 'path' este incorectă",
    exceedMaxSize: "Dimensiunea fişierului nu trebuie să depăşească {0}.",
    otherRequiredError: "Trebuie să completați câmpul 'Altul'.",
    uploadingFile: "Fișierul dumneavoastră este în curs de încărcare. Vă rugăm așteptați câteva secunde și reveniți apoi.",
    loadingFile: "Se încarcă...",
    chooseFile: "Alege fisierele...",
    noFileChosen: "Niciun fișier ales",
    confirmDelete: "Sunteți sigur că doriți să ștergeți înregistrarea?",
    keyDuplicationError: "Valoarea trebuie să fie unică.",
    addColumn: "Adăugați coloană",
    addRow: "Adăugare rând",
    removeRow: "Ștergere",
    addPanel: "Adăugare",
    removePanel: "Ștergere",
    choices_Item: "opțiune",
    matrix_column: "Coloană",
    matrix_row: "Rând",
    savingData: "Rezultatele sunt în curs de salvare...",
    savingDataError: "A intervenit o eroare, rezultatele nu au putut fi salvate.",
    savingDataSuccess: "Rezultatele au fost salvate cu succes!",
    saveAgainButton: "Încercați din nou",
    timerMin: "min",
    timerSec: "sec",
    timerSpentAll: "Ați petrecut {0} pe această pagină și {1} în total.",
    timerSpentPage: "Ați petrecut {0} pe această pagină.",
    timerSpentSurvey: "Ați petrecut {0} în total.",
    timerLimitAll: "Ați petrecut {0} din {1} pe această pagină și {2} din {3} în total.",
    timerLimitPage: "Ați petrecut {0} din {1} pe această pagină.",
    timerLimitSurvey: "Ați petrecut {0} din {1} în total.",
    clearCaption: "clar",
    chooseFileCaption: "Alege fișierul",
    removeFileCaption: "Eliminați acest fișier",
    booleanCheckedLabel: "da",
    booleanUncheckedLabel: "Nu",
    confirmRemoveFile: "Sigur doriți să eliminați acest fișier: {0}?",
    confirmRemoveAllFiles: "Sigur doriți să eliminați toate fișierele?",
    questionTitlePatternText: "Titlul intrebarii",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ro"] = romanianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ro"] = "română";


/***/ }),

/***/ "./src/localization/russian.ts":
/*!*************************************!*\
  !*** ./src/localization/russian.ts ***!
  \*************************************/
/*! exports provided: russianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "russianSurveyStrings", function() { return russianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var russianSurveyStrings = {
    pagePrevText: "Назад",
    pageNextText: "Далее",
    completeText: "Готово",
    previewText: "Предварительный просмотр",
    editText: "Редактирование",
    startSurveyText: "Начать",
    otherItemText: "Другое (пожалуйста, опишите)",
    noneItemText: "Нет",
    selectAllItemText: "Выбрать всё",
    progressText: "Страница {0} из {1}",
    panelDynamicProgressText: "Запись {0} из {1}",
    questionsProgressText: "Oтвечено на {0}/{1} вопросов",
    emptySurvey: "Нет ни одного вопроса.",
    completingSurvey: "Благодарим Вас за заполнение анкеты!",
    completingSurveyBefore: "Вы уже проходили этот опрос.",
    loadingSurvey: "Загрузка с сервера...",
    placeholder: "Выбрать...",
    value: "значение",
    requiredError: "Пожалуйста, ответьте на вопрос.",
    requiredErrorInPanel: "Пожалуйста, ответьте по крайней мере на один вопрос.",
    requiredInAllRowsError: "Пожалуйста, ответьте на вопросы в каждой строке.",
    numericError: "Ответ должен быть числом.",
    textMinLength: "Пожалуйста введите больше {0} символов.",
    textMaxLength: "Пожалуйста введите меньше {0} символов.",
    textMinMaxLength: "Пожалуйста введите больше {0} и меньше {1} символов.",
    minRowCountError: "Пожалуйста, заполните не меньше {0} строк.",
    minSelectError: "Пожалуйста, выберите хотя бы {0} вариантов.",
    maxSelectError: "Пожалуйста, выберите не более {0} вариантов.",
    numericMinMax: "'{0}' должно быть не меньше чем {1}, и не больше чем {2}",
    numericMin: "'{0}' должно быть не меньше чем {1}",
    numericMax: "'{0}' должно быть не больше чем {1}",
    invalidEmail: "Пожалуйста, введите действительный адрес электронной почты.",
    invalidExpression: "Выражение {0} должно возвращать 'true'.",
    urlRequestError: "Запрос вернул ошибку '{0}'. {1}",
    urlGetChoicesError: "Ответ на запрос пришел пустой или свойство 'path' указано неверно",
    exceedMaxSize: "Размер файла не должен превышать {0}.",
    otherRequiredError: "Пожалуйста, введите данные в поле 'Другое'",
    uploadingFile: "Ваш файл загружается. Подождите несколько секунд и попробуйте снова.",
    loadingFile: "Загрузка...",
    chooseFile: "Выберите файл(ы)...",
    fileDragAreaPlaceholder: "Перетащите файл сюда или нажмите кнопку ниже, чтобы загрузить файл.",
    noFileChosen: "Файл не выбран",
    confirmDelete: "Вы точно хотите удалить запись?",
    keyDuplicationError: "Это значение должно быть уникальным.",
    addColumn: "Добавить колонку",
    addRow: "Добавить строку",
    removeRow: "Удалить",
    addPanel: "Добавить новую",
    removePanel: "Удалить",
    choices_Item: "Вариант",
    matrix_column: "Колонка",
    matrix_row: "Строка",
    savingData: "Результаты сохраняются на сервер...",
    savingDataError: "Произошла ошибка, результат не был сохранён.",
    savingDataSuccess: "Результат успешно сохранён!",
    saveAgainButton: "Попробовать снова",
    timerMin: "мин",
    timerSec: "сек",
    timerSpentAll: "Вы потратили {0} на этой странице и {1} всего.",
    timerSpentPage: "Вы потратили {0} на этой странице.",
    timerSpentSurvey: "Вы потратили {0} в течение теста.",
    timerLimitAll: "Вы потратили {0} из {1} на этой странице и {2} из {3} для всего теста.",
    timerLimitPage: "Вы потратили {0} из {1} на этой странице.",
    timerLimitSurvey: "Вы потратили {0} из {1} для всего теста.",
    clearCaption: "Очистить",
    chooseFileCaption: "Выберите файл",
    removeFileCaption: "Удалить файл",
    booleanCheckedLabel: "Да",
    booleanUncheckedLabel: "Нет",
    confirmRemoveFile: "Вы уверены, что хотите удалить этот файл: {0}?",
    confirmRemoveAllFiles: "Вы уверены, что хотите удалить все файлы?",
    questionTitlePatternText: "Название вопроса",
    ratingOptionsCaption: "Нажмите здесь, чтобы оценить...",
    emptyRowsText: "Рядов нет.",
    filterStringPlaceholder: "Введите для поиска...",
    indexText: "{0} из {1}",
    minError: "Значение не должно быть меньше {0}.",
    maxError: "Значение не должно превышать {0}.",
    modalApplyButtonText: "Применять",
    modalCancelButtonText: "Отменить",
    multipletext_itemname: "текст",
    noEntriesText: "Пока нет записей.\nНажмите кнопку ниже, чтобы добавить новую запись.",
    signaturePlaceHolder: "Подпишите здесь",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ru"] = russianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ru"] = "русский";


/***/ }),

/***/ "./src/localization/serbian.ts":
/*!*************************************!*\
  !*** ./src/localization/serbian.ts ***!
  \*************************************/
/*! exports provided: serbianStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serbianStrings", function() { return serbianStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
//Uncomment this line on creating a translation file

var serbianStrings = {
    pagePrevText: "Nazad",
    pageNextText: "Dalje",
    completeText: "Završi",
    previewText: "Pregledaj",
    editText: "Izmeni",
    startSurveyText: "Započni",
    otherItemText: "Drugo (upiši)",
    noneItemText: "Ništa",
    selectAllItemText: "Izaberi sve",
    progressText: "Stranica {0} od {1}",
    panelDynamicProgressText: "Upis {0} od {1}",
    questionsProgressText: "Odgovoreno na {0}/{1} pitanja",
    emptySurvey: "Nema vidljivih stranica ili pitanja u anketi.",
    completingSurvey: "Hvala na popunjavanju ankete!",
    completingSurveyBefore: "Prema našim podacima, već ste popunili ovu anketu.",
    loadingSurvey: "Učitavam anketu...",
    placeholder: "Izaberi...",
    value: "vrednost",
    requiredError: "Molimo odgovorite na ovo pitanje.",
    requiredErrorInPanel: "Molimo odgovorite na bar jedno pitanje.",
    requiredInAllRowsError: "Molimo odgovorite na pitanja u svim redovima.",
    numericError: "Vrednost bi trebalo da bude numerička.",
    minError: "Vrednost ne bi trebalo da bude manja od {0}",
    maxError: "Vrednost ne bi trebalo da bude veća od {0}",
    textMinLength: "Molimo unesite bar {0} znak(ov)a.",
    textMaxLength: "Molimo unesite najviše {0} znak(ov)a.",
    textMinMaxLength: "Molimo unesite najmanje {0} i ne više od {1} znak(ov)a.",
    minRowCountError: "Molimo popunite najmanje {0} red(ova).",
    minSelectError: "Molimo izaberite najmanje {0} opcija/e.",
    maxSelectError: "Molimo izaberite najviše {0} opcija/e.",
    numericMinMax: "'{0}' bi trebalo da bude najmanje {1} i najviše {2}",
    numericMin: "'{0}' bi trebalo da bude najmanje {1}",
    numericMax: "'{0}' bi trebalo da bude najviše {1}",
    invalidEmail: "Molimo unesite ispravnu e-mail adresu.",
    // vratiti "true" ?
    invalidExpression: "Izraz: {0} bi trebalo da bude tačan.",
    urlRequestError: "Zahtev je naišao na grešku '{0}'. {1}",
    urlGetChoicesError: "Zahtev nije pronašao podatke, ili je putanja netačna",
    exceedMaxSize: "Veličina fajla ne bi trebalo da prelazi {0}.",
    otherRequiredError: "Molimo unesite drugu vrednost.",
    uploadingFile: "Fajl se šalje. Molimo sačekajte neko vreme i pokušajte ponovo.",
    loadingFile: "Učitavanje...",
    chooseFile: "Izaberite fajlove...",
    noFileChosen: "Nije izabran nijedan fajl",
    confirmDelete: "Da li želite da izbrišete unos?",
    keyDuplicationError: "Ova vrednost treba da bude jedinstvena.",
    addColumn: "Dodaj kolonu",
    addRow: "Dodaj red",
    removeRow: "Ukloni",
    emptyRowsText: "Nema redova.",
    addPanel: "Dodaj novo",
    removePanel: "Ukloni",
    choices_Item: "stavka",
    matrix_column: "Kolona",
    matrix_row: "Red",
    multipletext_itemname: "tekst",
    savingData: "U toku je čuvanje podataka na serveru...",
    savingDataError: "Došlo je do greške i rezultati nisu sačuvani.",
    savingDataSuccess: "Rezultati su uspešno sačuvani!",
    saveAgainButton: "Pokušajte ponovo",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Proveli ste {0} na ovoj stranici i {1} ukupno.",
    timerSpentPage: "Proveli ste {0} na ovoj stranici.",
    timerSpentSurvey: "Proveli ste {0} ukupno.",
    timerLimitAll: "Proveli ste {0} od {1} na ovoj stranici i {2} od {3} ukupno.",
    timerLimitPage: "Proveli ste {0} od {1} na ovoj stranici.",
    timerLimitSurvey: "Proveli ste {0} od {1} ukupno.",
    clearCaption: "Poništi",
    chooseFileCaption: "Izaberi fajl",
    removeFileCaption: "Ukloni ovaj fajl",
    booleanCheckedLabel: "Da",
    booleanUncheckedLabel: "Ne",
    confirmRemoveFile: "Da li ste sigurni da želite da uklonite ovaj fajl: {0}?",
    confirmRemoveAllFiles: "Da li ste sigurni da želite da uklonite sve fajlove?",
    questionTitlePatternText: "Naslov pitanja",
    modalCancelButtonText: "Otkaži",
    modalApplyButtonText: "Primeni",
};
//Uncomment these two lines on creating a translation file. You should replace "en" and enStrings with your locale ("fr", "de" and so on) and your variable.
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["rs"] = serbianStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["rs"] = "Srpski";


/***/ }),

/***/ "./src/localization/simplified-chinese.ts":
/*!************************************************!*\
  !*** ./src/localization/simplified-chinese.ts ***!
  \************************************************/
/*! exports provided: simplifiedChineseSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simplifiedChineseSurveyStrings", function() { return simplifiedChineseSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var simplifiedChineseSurveyStrings = {
    pagePrevText: "上一页",
    pageNextText: "下一页",
    completeText: "提交问卷",
    previewText: "预览",
    editText: "编辑",
    startSurveyText: "开始问卷",
    otherItemText: "填写其他答案",
    noneItemText: "无",
    selectAllItemText: "选择全部",
    progressText: "第 {0} 页, 共 {1} 页",
    panelDynamicProgressText: "{0} of {1}",
    questionsProgressText: "第 {0}/{1} 题",
    emptySurvey: "问卷中没有问题或页面",
    completingSurvey: "感谢您的参与!",
    completingSurveyBefore: "你已完成问卷.",
    loadingSurvey: "问卷正在加载中...",
    placeholder: "请选择...",
    value: "值",
    requiredError: "请填写此问题",
    requiredErrorInPanel: "至少回答一题.",
    requiredInAllRowsError: "请填写所有行中问题",
    numericError: "答案必须是个数字",
    minError: "该值不能小于 {0}",
    maxError: "该值不能大于 {0}",
    textMinLength: "答案长度至少 {0} 个字符",
    textMaxLength: "答案长度不能超过 {0} 个字符",
    textMinMaxLength: "答案长度必须在 {0} - {1} 个字符之间",
    minRowCountError: "最少需要填写 {0} 行答案",
    minSelectError: "最少需要选择 {0} 项答案",
    maxSelectError: "最多只能选择 {0} 项答案",
    numericMinMax: "答案 '{0}' 必须大于等于 {1} 且小于等于 {2}",
    numericMin: "答案 '{0}' 必须大于等于 {1}",
    numericMax: "答案 '{0}' 必须小于等于 {1}",
    invalidEmail: "请输入有效的 Email 地址",
    invalidExpression: "公式: {0} 无效.",
    urlRequestError: "载入选项时发生错误 '{0}': {1}",
    urlGetChoicesError: "未能载入有效的选项或请求参数路径有误",
    exceedMaxSize: "文件大小不能超过 {0}",
    otherRequiredError: "请完成其他问题",
    uploadingFile: "文件上传中... 请耐心等待几秒后重试",
    loadingFile: "加载...",
    chooseFile: "选择文件...",
    noFileChosen: "未选择文件",
    confirmDelete: "删除记录?",
    keyDuplicationError: "主键不能重复",
    addColumn: "添加列",
    addRow: "添加行",
    removeRow: "删除答案",
    emptyRowsText: "无内容",
    addPanel: "新添",
    removePanel: "删除",
    choices_Item: "选项",
    matrix_column: "列",
    matrix_row: "行",
    multipletext_itemname: "文本",
    savingData: "正在将结果保存到服务器...",
    savingDataError: "在保存结果过程中发生了错误，结果未能保存",
    savingDataSuccess: "结果保存成功!",
    saveAgainButton: "请重试",
    timerMin: "分",
    timerSec: "秒",
    timerSpentAll: "本页用时 {0} 总计用时{1} .",
    timerSpentPage: "本页用时{0} .",
    timerSpentSurvey: "总计用时 {0} .",
    timerLimitAll: "本页用时 {0} 共 {1}， 总计用时 {2} 共 {3} .",
    timerLimitPage: "本页用时 {0} 共 {1} .",
    timerLimitSurvey: "总计用时 {0} 共 {1}.",
    clearCaption: "清除",
    chooseFileCaption: "选择文件",
    removeFileCaption: "移除文件",
    booleanCheckedLabel: "是",
    booleanUncheckedLabel: "否",
    confirmRemoveFile: "删除文件: {0}?",
    confirmRemoveAllFiles: "删除所有文件?",
    questionTitlePatternText: "标题",
    modalCancelButtonText: "取消",
    modalApplyButtonText: "确定",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["zh-cn"] = simplifiedChineseSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["zh-cn"] = "简体中文";


/***/ }),

/***/ "./src/localization/slovak.ts":
/*!************************************!*\
  !*** ./src/localization/slovak.ts ***!
  \************************************/
/*! exports provided: slovakSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slovakSurveyStrings", function() { return slovakSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var slovakSurveyStrings = {
    pagePrevText: "Predchádzajúca",
    pageNextText: "Ďalej",
    completeText: "Dokončené",
    previewText: "Ukážka",
    editText: "Upraviť",
    startSurveyText: "Spustiť",
    otherItemText: "Iné (opíšte)",
    noneItemText: "Žiadne",
    selectAllItemText: "Vybrať všetky",
    progressText: "Strana {0} z {1}",
    panelDynamicProgressText: "Záznam {0} z {1}",
    questionsProgressText: "Zodpovedané otázky {0}/{1}",
    emptySurvey: "V prieskume nie je žiadna vidieľná stránka ani otázka.",
    completingSurvey: "Ďakujeme vám za dokončenie prieskumu.",
    completingSurveyBefore: "Podľa našich záznamov ste už tento prieskum dokončili.",
    loadingSurvey: "Načítanie prieskumu...",
    placeholder: "Vybrať...",
    value: "hodnota",
    requiredError: "Požaduje sa odozva.",
    requiredErrorInPanel: "Požaduje sa odozva: zodpovedajte aspoň jednu otázku.",
    requiredInAllRowsError: "Požaduje sa odozva: zodpovedajte otázky vo všetkých riadkoch.",
    numericError: "Hodnota má byť číselná.",
    minError: "Hodnota nemá byť nižšia než {0}",
    maxError: "Hodnota nemá byť vyššia než {0}",
    textMinLength: "Zadajte aspoň {0} znak(-y/-ov).",
    textMaxLength: "Nezadávajte viac než {0} znak(-y/-ov).",
    textMinMaxLength: "Zadajte aspoň {0} a nie viac než {1} znaky(-ov).",
    minRowCountError: "Vyplňte aspoň {0} riadok(-y/-ov).",
    minSelectError: "Vyberte aspoň {0} variant(-y/-ov).",
    maxSelectError: "Nevyberajte viac než {0} variant(-y/-ov).",
    numericMinMax: "„{0}“ má byť minimálne {1} a maximálne {2}",
    numericMin: "„{0}“ má byť minimálne {1}",
    numericMax: "„{0}“ má byť maximálne {1}",
    invalidEmail: "Zadajte platnú e-mailovú adresu.",
    invalidExpression: "Výraz: {0} má vrátiť hodnotu „true“.",
    urlRequestError: "Požiadavky vrátila hodnotu „{0}“. {1}",
    urlGetChoicesError: "Požiadavka vrátila prázdne údaje alebo je vlastnosť „cesta“ nesprávna",
    exceedMaxSize: "Veľkosť súboru nemá prekročiť {0}.",
    otherRequiredError: "Požaduje sa odozva: zadajte inú hodnotu.",
    uploadingFile: "Súbor sa odovzdáva. Počkajte niekoľko sekúnd a skúste to znova.",
    loadingFile: "Načítanie...",
    chooseFile: "Vyberte súbor(-y)...",
    noFileChosen: "Žiadny vybratý súbor",
    fileDragAreaPlaceholder: "Presuňte súbor sem alebo kliknite na nasledujúce tlačidlo a načítajte súbor.",
    confirmDelete: "Chcete záznam odstrániť?",
    keyDuplicationError: "Táto hodnota má byť jedinečná.",
    addColumn: "Pridať stĺpec",
    addRow: "Pridať riadok",
    removeRow: "Odstrániť",
    emptyRowsText: "K dispozícii nie sú žiadne riadky.",
    addPanel: "Pridať nové",
    removePanel: "Odstrániť",
    choices_Item: "položka",
    matrix_column: "Stĺpec",
    matrix_row: "Riadok",
    multipletext_itemname: "text",
    savingData: "Výsledky sa ukladajú na server...",
    savingDataError: "V dôsledku chyby sa nepodarilo výsledky uložiť.",
    savingDataSuccess: "Výsledky sa úspešne uložili.",
    saveAgainButton: "Skúste to znova",
    timerMin: "min",
    timerSec: "s",
    timerSpentAll: "Na tejto stránke ste strávili {0} a celkovo {1}.",
    timerSpentPage: "Na tejto stránke ste strávili {0}.",
    timerSpentSurvey: "Celkovo ste strávili {0}.",
    timerLimitAll: "Na tejto stránke ste strávili {0} z {1} a celkovo {2} z {3}.",
    timerLimitPage: "Na tejto stránke ste strávili {0} z {1}.",
    timerLimitSurvey: "Celkovo ste strávili {0} z {1}.",
    clearCaption: "Vymazať",
    signaturePlaceHolder: "Podpísať tu",
    chooseFileCaption: "Vybrať súbor",
    removeFileCaption: "Odstrániť tento súbor",
    booleanCheckedLabel: "Áno",
    booleanUncheckedLabel: "Nie",
    confirmRemoveFile: "Naozaj chcete odstrániť tento súbor: {0}?",
    confirmRemoveAllFiles: "Naozaj chcete odstrániť všetky súbory?",
    questionTitlePatternText: "Titul otázky",
    modalCancelButtonText: "Zrušiť",
    modalApplyButtonText: "Použiť",
    filterStringPlaceholder: "Vyhľadávanie písaním...",
    noEntriesText: "K dispozícii ešte nie sú žiadne zadania.\nKliknutím na nasledujúce tlačidlo pridajte nové zadanie."
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["sk"] = slovakSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["sk"] = "slovenčina";


/***/ }),

/***/ "./src/localization/spanish.ts":
/*!*************************************!*\
  !*** ./src/localization/spanish.ts ***!
  \*************************************/
/*! exports provided: spanishSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spanishSurveyStrings", function() { return spanishSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var spanishSurveyStrings = {
    pagePrevText: "Anterior",
    pageNextText: "Siguiente",
    completeText: "Completar",
    previewText: "Vista previa",
    editText: "Edita",
    startSurveyText: "Comienza",
    otherItemText: "Otro (describa)",
    noneItemText: "Ninguno",
    selectAllItemText: "Seleccionar todo",
    progressText: "Página {0} de {1}",
    panelDynamicProgressText: "Registro {0} de {1}",
    questionsProgressText: "Respondió a {0}/{1} preguntas",
    emptySurvey: "No hay página visible o pregunta en la encuesta.",
    completingSurvey: "¡Gracias por completar la encuesta!",
    completingSurveyBefore: "Nuestros registros muestran que ya ha completado esta encuesta.",
    loadingSurvey: "La encuesta está cargando...",
    placeholder: "Seleccione...",
    value: "valor",
    requiredError: "Por favor conteste la pregunta.",
    requiredErrorInPanel: "Por favor, responda al menos una pregunta.",
    requiredInAllRowsError: "Por favor conteste las preguntas en cada hilera.",
    numericError: "La estimación debe ser numérica.",
    minError: "La estimación no debe ser menor que {0}",
    maxError: "La estimación no debe ser mayor que {0}",
    textMinLength: "Por favor entre por lo menos {0} símbolos.",
    textMaxLength: "Por favor entre menos de {0} símbolos.",
    textMinMaxLength: "Por favor entre más de {0} y menos de {1} símbolos.",
    minRowCountError: "Por favor llene por lo menos {0} hileras.",
    minSelectError: "Por favor seleccione por lo menos {0} variantes.",
    maxSelectError: "Por favor seleccione no más de {0} variantes.",
    numericMinMax: "El '{0}' debe de ser igual o más de {1} y igual o menos de {2}",
    numericMin: "El '{0}' debe ser igual o más de {1}",
    numericMax: "El '{0}' debe ser igual o menos de {1}",
    invalidEmail: "Por favor agregue un correo electrónico válido.",
    invalidExpression: "La expresión: {0} debería devolver 'verdadero'.",
    urlRequestError: "La solicitud regresó error '{0}'. {1}",
    urlGetChoicesError: "La solicitud regresó vacío de data o la propiedad 'trayectoria' no es correcta",
    exceedMaxSize: "El tamaño del archivo no debe de exceder {0}.",
    otherRequiredError: "Por favor agregue la otra estimación.",
    uploadingFile: "Su archivo se está subiendo. Por favor espere unos segundos e intente de nuevo.",
    loadingFile: "Cargando...",
    chooseFile: "Elija archivo(s)...",
    fileDragAreaPlaceholder: "Suelte un archivo aquí o haga clic en el botón de abajo para cargar el archivo",
    noFileChosen: "No se ha elegido ningún archivo",
    confirmDelete: "¿Quieres borrar el registro?",
    keyDuplicationError: "Este valor debe ser único.",
    addColumn: "Añadir columna",
    addRow: "Agregue una hilera",
    removeRow: "Eliminar una hilera",
    emptyRowsText: "No hay hileras.",
    addPanel: "Añadir nuevo",
    removePanel: "Retire",
    choices_Item: "artículo",
    matrix_column: "Columna",
    matrix_row: "Hilera",
    multipletext_itemname: "texto",
    savingData: "Los resultados se están guardando en el servidor...",
    savingDataError: "Los resultados se están guardando en el servidor...",
    savingDataSuccess: "¡Los resultados se guardaron con éxito!",
    saveAgainButton: "Inténtalo de nuevo.",
    timerMin: "min",
    timerSec: "sec",
    timerSpentAll: "Has gastado {0} en esta página y {1} en total.",
    timerSpentPage: "Usted ha pasado {0} en esta página.",
    timerSpentSurvey: "Has gastado en total.",
    timerLimitAll: "Has gastado {0} de {1} en esta página y {2} de {3} en total.",
    timerLimitPage: "Has gastado {0} de {1} en esta página.",
    timerLimitSurvey: "Usted ha gastado {0} de {1} en total.",
    clearCaption: "Despejen",
    signaturePlaceHolder: "Firma aqui",
    chooseFileCaption: "Elija el archivo",
    removeFileCaption: "Elimina este archivo",
    booleanCheckedLabel: "Sí",
    booleanUncheckedLabel: "No",
    confirmRemoveFile: "¿Estás seguro de que quieres eliminar este archivo: {0}?",
    confirmRemoveAllFiles: "¿Estás seguro de que quieres eliminar todos los archivos?",
    questionTitlePatternText: "Título de la pregunta",
    modalCancelButtonText: "Anular",
    modalApplyButtonText: "Aplicar",
    ratingOptionsCaption: "Toca aquí para calificar...",
    filterStringPlaceholder: "Escribe para buscar...",
    indexText: "{0} de {1}",
    noEntriesText: "Aún no hay entradas.\nHaga clic en el botón de abajo para agregar una nueva entrada.",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["es"] = spanishSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["es"] = "español";


/***/ }),

/***/ "./src/localization/swahili.ts":
/*!*************************************!*\
  !*** ./src/localization/swahili.ts ***!
  \*************************************/
/*! exports provided: swahiliStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "swahiliStrings", function() { return swahiliStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var swahiliStrings = {
    pagePrevText: "Iliyotangulia",
    pageNextText: "Ifuatayo",
    completeText: "Kamili",
    previewText: "Hakiki",
    editText: "Hariri",
    startSurveyText: "Anza",
    otherItemText: "Nyingine (eleza)",
    noneItemText: "Hakuna",
    selectAllItemText: "Chagua Zote",
    progressText: "Ukurasa {0} wa {1}",
    panelDynamicProgressText: "Rekodi {0} ya {1}",
    questionsProgressText: "Yaliyojibiwa {0}/{1} maswali",
    emptySurvey: "Hakuna ukurasa unaoonekana au swali katika utafiti.",
    completingSurvey: "Asanti kwa kukamilisha utafiti!",
    completingSurveyBefore: "Recodi zetu zinatuonyesha tayari umekamilisha utafiti.",
    loadingSurvey: "Tunaandaa utafiti...",
    placeholder: "Chagua...",
    value: "thamani",
    requiredError: "Tafadhali jibu hili swali.",
    requiredErrorInPanel: "Tafadhali jibu swali angalau moja.",
    requiredInAllRowsError: "Tafadhali jibu maswali katika safu zote.",
    numericError: "Thamani inapaswa kuwa ya nambari.",
    textMinLength: "Tafadhali ingiza angalau{0} husika.",
    textMaxLength: "Tafadhali ingiza isiozidi {0} husika.",
    textMinMaxLength: "Tafadhali ingiza kiwango zaidi ya {0} na kisichopungua {1} husika.",
    minRowCountError: "Tafadhali jaza isiopungua {0} safu.",
    minSelectError: "Tafadhali chagua angalau {0} lahaja.",
    maxSelectError: "Tafadhali changua isiozidi {0} lahaja.",
    numericMinMax: " '{0}' inapaswa kuwa sawa au zaidi ya {1} na sawa au chini ya {2}",
    numericMin: " '{0}'inapaswa kuwa sawa au zaidi ya {1}",
    numericMax: " '{0}'inapaswa kuwa sawa au chini ya {1}",
    invalidEmail: "Tafadhali ingiza anwani halali ya barua-pepe.",
    invalidExpression: "Usemi:{0} inapaswa kurudi 'kweli'.",
    urlRequestError: "Ombi lina kosa '{0}'. {1}",
    urlGetChoicesError: "Ombi lilirudisha data tupu au the 'path' mali ya njia sio sahihi",
    exceedMaxSize: "Saizi ya faili haipaswi kuzidi {0}.",
    otherRequiredError: "Tafadhali ingiza thamani nyingine.",
    uploadingFile: "Faili yako inapakia.Tafadhali subiri sekunde kadhaa na ujaribu tena.",
    loadingFile: "Inapakia...",
    chooseFile: "Chagua faili...",
    noFileChosen: "Hujachagua faili",
    confirmDelete: "Je! Unataka kufuta rekodi?",
    keyDuplicationError: "Thamani hii inapaswa kuwa ya kipekee.",
    addColumn: "Ongeza Kolamu",
    addRow: "Ongeza safu",
    removeRow: "Toa",
    addPanel: "Ongeza mpya",
    removePanel: "Toa",
    choices_Item: "kitu",
    matrix_column: "Kolamu",
    matrix_row: "Safu",
    savingData: "Matokeo yamehifadhiwa kwa seva...",
    savingDataError: "Kosa limetokea na hatukuweza kuhifadhi matokeo.",
    savingDataSuccess: "Matokeo yamehifadhiwa!",
    saveAgainButton: "Jaribu tena",
    timerMin: "dakika",
    timerSec: "sekunde",
    timerSpentAll: "Umetumia {0} kwenye ukurasa huu na {1} kwa jumla.",
    timerSpentPage: "Umetumia {0} kwenye ukurasa huu.",
    timerSpentSurvey: "Umetumia {0} kwa jumla.",
    timerLimitAll: "Umetumia {0} ya {1} kwenye ukurasa huu {2} wa {3} kwa jumla.",
    timerLimitPage: "Umetumia {0} ya {1} kwenye ukurasa huu.",
    timerLimitSurvey: "Umetumia {0} ya {1} kwa jumla.",
    clearCaption: "Ondoa",
    chooseFileCaption: "Chagua faili",
    removeFileCaption: "Ondoa faili",
    booleanCheckedLabel: "Ndio",
    booleanUncheckedLabel: "Hapana",
    confirmRemoveFile: "Je! Una uhakika kuwa unataka kuondoa faili hii: {0}?",
    confirmRemoveAllFiles: "Je! Una uhakika kuwa unataka kuondoa faili zote?",
    questionTitlePatternText: "Kichwa cha Swali",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["sw"] = swahiliStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["sw"] = "swahili";


/***/ }),

/***/ "./src/localization/swedish.ts":
/*!*************************************!*\
  !*** ./src/localization/swedish.ts ***!
  \*************************************/
/*! exports provided: swedishSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "swedishSurveyStrings", function() { return swedishSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
//Create by Mattias Asplund

var swedishSurveyStrings = {
    pagePrevText: "Föregående",
    pageNextText: "Nästa",
    completeText: "Slutför",
    previewText: "Förhandsvisning",
    editText: "Redigera",
    startSurveyText: "Börja",
    otherItemText: "Annat (beskriv)",
    noneItemText: "Ingen",
    selectAllItemText: "Välj alla",
    progressText: "Sida {0} av {1}",
    indexText: "{0} av {1}",
    panelDynamicProgressText: "{0} av {1}",
    questionsProgressText: "{0} / {1} frågor besvarade",
    emptySurvey: "Det finns ingen synlig sida eller fråga i enkäten.",
    completingSurvey: "Tack för att du genomfört enkäten!!",
    completingSurveyBefore: "Våra register visar att du redan har slutfört denna undersökning.",
    loadingSurvey: "Enkäten laddas...",
    placeholder: "Välj...",
    ratingOptionsCaption: "Tryck här för att betygsätta...",
    value: "värde",
    requiredError: "Frågan är obligatorisk.",
    requiredErrorInPanel: "Vänligen svara på minst en fråga.",
    requiredInAllRowsError: "Var vänlig besvara frågorna på alla rader.",
    numericError: "Värdet ska vara numeriskt.",
    minError: "Värdet får inte vara mindre än {0}",
    maxError: "Värdet får inte vara större än {0}",
    textMinLength: "Ange minst {0} tecken.",
    textMaxLength: "Ange färre än {0} tecken.",
    textMinMaxLength: "Ange mer än {0} och färre än {1} tecken.",
    minRowCountError: "Var vänlig fyll i minst {0} rader.",
    minSelectError: "Var vänlig välj åtminstone {0} varianter.",
    maxSelectError: "Var vänlig välj inte fler än {0} varianter.",
    numericMinMax: "'{0}' ska vara lika med eller mer än {1} samt lika med eller mindre än {2}",
    numericMin: "'{0}' ska vara lika med eller mer än {1}",
    numericMax: "'{0}' ska vara lika med eller mindre än {1}",
    invalidEmail: "Var vänlig ange en korrekt e-postadress.",
    invalidExpression: "Uttrycket: {0} ska returnera 'true'.",
    urlRequestError: "Förfrågan returnerade felet '{0}'. {1}",
    urlGetChoicesError: "Antingen returnerade förfrågan ingen data eller så är egenskapen 'path' inte korrekt",
    exceedMaxSize: "Filstorleken får ej överstiga {0}.",
    otherRequiredError: "Var vänlig ange det andra värdet.",
    uploadingFile: "Din fil laddas upp. Var vänlig vänta några sekunder och försök sedan igen.",
    loadingFile: "Laddar...",
    chooseFile: "Välj fil(er) ...",
    noFileChosen: "Ingen fil vald",
    confirmDelete: "Vill du radera posten?",
    keyDuplicationError: "Detta värde ska vara unikt.",
    addColumn: "Lägg till kolumn",
    addRow: "Lägg till rad",
    removeRow: "Ta bort",
    addPanel: "Lägg till ny",
    removePanel: "Ta bort",
    choices_Item: "Artikel",
    matrix_column: "Kolumn",
    matrix_row: "Rad",
    multipletext_itemname: "text",
    savingData: "Resultaten sparas på servern ...",
    savingDataError: "Ett fel inträffade och vi kunde inte spara resultaten.",
    savingDataSuccess: "Resultaten lyckades sparas!",
    saveAgainButton: "Försök igen",
    timerMin: "min",
    timerSec: "sek",
    timerSpentAll: "Du har spenderat {0} på den här sidan och {1} totalt.",
    timerSpentPage: "Du har spenderat {0} på den här sidan.",
    timerSpentSurvey: "Du har spenderat {0} totalt.",
    timerLimitAll: "Du har spenderat {0} av {1} på den här sidan och {2} av {3} totalt.",
    timerLimitPage: "Du har spenderat {0} av {1} på den här sidan.",
    timerLimitSurvey: "Du har spenderat {0} av {1} totalt.",
    clearCaption: "Klar",
    signaturePlaceHolder: "Signera här",
    chooseFileCaption: "Välj fil",
    removeFileCaption: "Ta bort den här filen",
    booleanCheckedLabel: "Ja",
    booleanUncheckedLabel: "Nej",
    confirmRemoveFile: "Är du säker på att du vill ta bort den här filen: {0}?",
    confirmRemoveAllFiles: "Är du säker på att du vill ta bort alla filer?",
    questionTitlePatternText: "Frågetitel",
    modalCancelButtonText: "Avbryt",
    modalApplyButtonText: "Spara",
    filterStringPlaceholder: "Skriv för att söka...",
    emptyMessage: "Ingen data finns",
    noEntriesText: "Det finns inga värden än.\nKlicka på knappen nedan för att lägga till nytt värde.",
    more: "Mer"
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["sv"] = swedishSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["sv"] = "svenska";


/***/ }),

/***/ "./src/localization/tajik.ts":
/*!***********************************!*\
  !*** ./src/localization/tajik.ts ***!
  \***********************************/
/*! exports provided: tajikSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tajikSurveyStrings", function() { return tajikSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var tajikSurveyStrings = {
    pagePrevText: "Бозгашт",
    pageNextText: "Оянда",
    completeText: "Иҷро шуд",
    startSurveyText: "Оғоз",
    otherItemText: "Дигар (лутфан тавсиф кунед)",
    noneItemText: "Не",
    selectAllItemText: "Ҳамаро интихоб кардан",
    progressText: "Саҳифаи {0} аз {1}",
    emptySurvey: "Ягон савол вуҷуд надорад.",
    completingSurvey: "Ташаккур барои пур кардани саволнома!",
    completingSurveyBefore: "Шумо аллакай ин пурсишро анҷом додаед.",
    loadingSurvey: "Боргирӣ аз сервер...",
    placeholder: "Интихоб кардан...",
    value: "қиммат",
    requiredError: "Илтимос, ба савол ҷавоб диҳед.",
    requiredErrorInPanel: "Илтимос, ақалан ба як савол ҷавоб диҳед.",
    requiredInAllRowsError: "Илтимос, ба ҳамаи саволҳо дар ҳамаи сатрҳо ҷавоб диҳед.",
    numericError: "Ҷавоб бояд рақам бошад.",
    textMinLength: "Илтимос, аз {0} зиёдтар рамз ворид кунед.",
    textMaxLength: "Илтимос, аз {0} камтар рамз ворид кунед.",
    textMinMaxLength: "Илтимос, аз {0} зиёдтар ва аз {1} камтар рамз ворид кунед.",
    minRowCountError: "Илтимос, на камтар аз {0} сатр пур кунед.",
    minSelectError: "Илтимос, ақалан {0} вариант интихоб кунед.",
    maxSelectError: "Илтимос, на зиёдтар аз {0} вариант интихоб кунед.",
    numericMinMax: "'{0}' бояд на кам аз {1} ва на бисёр аз {2} бошад",
    numericMin: "'{0}' бояд на кам аз {1} бошад",
    numericMax: "'{0}' бояд на зиёд аз {1} бошад",
    invalidEmail: "Илтимос, почтаи электронии воқеиро ворид кунед.",
    invalidExpression: "Ифодаи {0} бояд 'true' баргардонад.",
    urlRequestError: "Дархост хатогӣ бозгардонд '{0}'. {1}",
    urlGetChoicesError: "Ҷавоб ба дархост холӣ омад ё хосияти 'path' нодуруст муайян карда шудааст",
    exceedMaxSize: "Андозаи файл бояд на калон аз {0} бошад.",
    otherRequiredError: "Илтимос, ба майдони 'Дигар' додаҳоро ворид кунед",
    uploadingFile: "Файли шумо бор шуда истодааст. Якчанд сония интизор шавед ва бори дигар кӯшиш кунед.",
    loadingFile: "Боркунӣ...",
    chooseFile: "Файл(ҳо)-ро интихоб кунед...",
    confirmDelete: "Шумо мутмаин ҳастед, ки мехоҳед воридро тоза кунед?",
    keyDuplicationError: "Ин арзиш бояд беназир бошад.",
    addColumn: "Иловаи сутун",
    addRow: "Иловаи сатр",
    removeRow: "Нест кардан",
    addPanel: "Илова кардан",
    removePanel: "Нест кардан",
    choices_Item: "Вариант",
    matrix_column: "Сутун",
    matrix_row: "Сатр",
    savingData: "Натиҷа ба сервер сабт шуда истодаанд...",
    savingDataError: "Хатогӣ ба амал омад, натиҷа сабт нашуд.",
    savingDataSuccess: "Натиҷа бомуваффакият сабт шуд!",
    saveAgainButton: "Бори дигар кӯшиш карданд",
    timerMin: "дақ",
    timerSec: "сон",
    timerSpentAll: "Шумо {0} дар ин саҳифа ва {1} дар умум сарф кардед.",
    timerSpentPage: "Шумо {0} дар ин саҳифа сарф кардед.",
    timerSpentSurvey: "Шумо {0} дар ин тест сарф намудед.",
    timerLimitAll: "Шумо {0} аз {1} дар ин саҳифа ва {2} аз {3} дар умум сарф кардед дар дохили ин тест.",
    timerLimitPage: "Шумо {0} аз {1} дар ин саҳифа сарф кардед.",
    timerLimitSurvey: "Шумо {0} аз {1} дар ҳамаи тест сарф кардед.",
    clearCaption: "Тоза кардан",
    removeFileCaption: "Файлро нест кардан"
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["tg"] = tajikSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["tg"] = "тоҷикӣ";


/***/ }),

/***/ "./src/localization/telugu":
/*!*********************************!*\
  !*** ./src/localization/telugu ***!
  \*********************************/
/*! exports provided: teluguStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "teluguStrings", function() { return teluguStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");


var teluguStrings = {
  pagePrevText: "వెనకటి",
  pageNextText: "తరువాయ",
  completeText: "పూర్తి చేయండి",
  previewText: "ముందుగా వీక్షించు",
  editText: "మార్పులు చెయ్యి",
  startSurveyText: "ప్రారంభించు",
  otherItemText: "ఇతరమైన(వివరించండి)",
  noneItemTex: "ఏదీకాదు",
  selectAllItemText: "అన్ని ఎంచుకో",
  progressText: "పేజీ{0}/{1}",
  panelDynamicProgressText: "దాఖలాలు{0}/{1}",
  questionsProgressText: "{0}/{1} ప్రశ్నలకు జవాబు ఇవ్వడం అయినది",
  emptySurvey: "ఈ సర్వేలో పేజీలు గాని ప్రశ్నలు గాని కనబడుట లేదు",
  completingSurvey: "సర్వేను ముగించి నందుకు ధన్యవాదములు",
  completingSurveyBefore: " మీరు ఇప్పటికే సర్వేను ముగించినట్లు మా రికార్డులు చూపిస్తున్నాయి",
  loadingSurvey: "సర్వే లోడ్ అవుతుంది",
  placeholder: "ఎన్నుకోండి",
  value: "విలువ",
  requiredError: "దయచేసి ప్రశ్నకు జవాబు ఇవ్వండి",
  requiredErrorInPanel: "దయచేసి కనీసం ఒక్క ప్రశ్నకైనా జవాబు ఇవ్వండి",
  requiredInAllRowsError: "దయచేసి అన్ని వరుసలలో ఉన్న ప్రశ్నలకు జవాబు ఇవ్వండి",
  numericError: "విలువను సంఖ్యలలో తెలియజేయండి",
  textMinLength: "దయచేసి కనీసం {0} అక్షరాలను నమోదు చేయండి",
  textMaxLength: "దయచేసి {0} కన్నా తక్కువ అక్షరాలను నమోదు చేయండి",
  textMinMaxLength: "దయచేసి {0} కన్నా ఎక్కువ మరియు{1} కన్నా తక్కువ అక్షరాలను నమోదు చేయండి",
  minRowCountError: "దయచేసి కనీసం {0}వరుసలను పూరించండి",
  minSelectError: "దయచేసి కనీసం{0} రకాలను ఎన్నుకోండి",
  maxSelectError: "దయచేసి {0} కన్నా ఎక్కువ రకాలను ఎన్నుకో కండి",
  numericMinMax: "'{0}' {1}తొ సమానంగా లేదా {1} కన్నా ఎక్కువ గా మరియు  {2}కన్నా తక్కువ ఉండాలి లెదా {2}తొ సమానంగా ఉండాలి",
  numericMin: "''{0}' {1}తొ  సమానంగా లేదా  {1}కన్నా ఎక్కువగా ఉండాలి",
  numericMax: "'{0}'  {1}  తక్కువ లేదా సమానంగా ఉండాలి",
  invalidEmail: "దయచేసి సరైన ఈమెయిల్  నమోదు చేయండి",
  invalidExpression: "{0} 'నిజం' అని తిరిగివ్వాలి",
  urlRequestError: "విన్నపము {0} ని తప్పుగా గుర్తించింది {1}",
  urlGetChoicesError: "విన్నపము ఖాళీ డేటాని తిరిగిచ్చింది, లేదా path తప్పైన ది",
  exceedMaxSize: "ఫైల్ పరిమాణం{0} కంటే పెద్దదిగా ఉండకూడదు",
  otherRequiredError: "దయచేసి ఇతర విలువలను నమో దించండి",
  uploadingFile: "మీ ఫైల్ అప్లోడ్ అవుతున్నది దయచేసి కొన్ని సెకండ్లు వేచి ఉండండి మరియు మళ్లీ ప్రయత్నించండి",
  loadingFile: "లోడ్ అవుతున్నది",
  chooseFile: "ఫైళ్లను ఎన్నుకోండి",
  noFileChosen: "ఏ ఫైల్ ఎన్నుకో లేదు",
  confirmDelete: "మీరు రికార్డులను తొలగించాలని అనుకుంటున్నారా",
  keyDuplicationError: "విలువ ప్రత్యేకంగా ఉండాలి",
  addColumn: "కాలం చేర్పించండి",
  addRow: "వరుసలు చేర్పించండి",
  removeRow: "తీసేయండి",
  addPanel: "కొత్త దాన్ని చేర్పించండి",
  removePanel: "తీసేయండి",
  choices_Item: "వస్తువులు",
  matrix_column: "కాలం ",
  matrix_row: "వరుస",
  savingData: "ఫలితాంశాలు సర్వర్లో సేవ్ అవుతున్నాయి",
  savingDataError: "ఒక లోపము సంభవించినది అందుకని ఫలితాంశాలను సేవ్ చేయలేకపోయాము  ",
  savingDataSuccess: "ఫలితాంశాలను విజయవంతంగా సేవ్ చేసాము",
  saveAgainButton: "మళ్లీ ప్రయత్నించు",
  timerMin: "నిమిషాలు ",
  timerSec: "సెకండ్లు",
  timerSpentAll: "ఈ పేజీ పైన మీరు{0}  ఉపయోగించారు మొత్తంగా  {1} ఉపయోగించారు",
  timerSpentPage: "ఈ పేజీ పైన మీరు{0} ఉపయోగించారు",
  timerSpentSurvey: "మీరు మొత్తంగా {0}  ఉపయోగించారు",
  timerLimitAll: "ఈ పేజీ పైన మీరు {1}లో {0} భాగాన్ని ఉపయోగించారు. మోతంగా {3}లో {2} భాగాన్ని ఉపయోగించారు.",
  timerLimitPage: "ఈ పేజీలో మీరు {1}లోని{0} ని ఉపయోగించారు",
  timerLimitSurvey: " మొత్తంగా మీరు {1} లో {0} ని ఉపయోగించారు ",
  clearCaption: "స్పష్టమ్",
  chooseFileCaption: "ఫైల్ ఎంచుకోండి",
  removeFileCaption: "ఈ ఫైల్ తీసేయండి",
  booleanCheckedLabel: "అవును",
  booleanUncheckedLabel: "లేదు",
  confirmRemoveFile: " ఈ ఫైల్ని తీయించాలని మీరు ఖచ్చితంగా అనుకుంటున్నారా:{0} ?",
  confirmRemoveAllFiles: "అన్ని ఫైళ్లను తీసేయాలని మీరు ఖచ్చితంగా అనుకుంటున్నారా",
  questionTitlePatternText: "ప్రశ్న శీర్షిక",
};

survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["tel"] = teluguStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["tel"] = "Telugu";


/***/ }),

/***/ "./src/localization/thai.ts":
/*!**********************************!*\
  !*** ./src/localization/thai.ts ***!
  \**********************************/
/*! exports provided: thaiStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thaiStrings", function() { return thaiStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
//Created by Padet Taweekunkan

var thaiStrings = {
    pagePrevText: "ก่อนหน้า",
    pageNextText: "ถัดไป",
    completeText: "สำเร็จ",
    previewText: "ดูตัวอย่าง",
    editText: "แก้ไข",
    startSurveyText: "เริ่ม",
    otherItemText: "อื่นๆ (โปรดระบุ)",
    noneItemText: "ไม่มี",
    selectAllItemText: "เลือกทั้งหมด",
    progressText: "หน้าที่ {0} จาก {1}",
    panelDynamicProgressText: "รายการที่ {0} จาก {1}",
    questionsProgressText: "คำตอบที่ {0}/{1} จำนวนคำถาม",
    emptySurvey: "ไม่มีหน้าเพจที่มองเห็น หรือ คำถามใน survey นี้",
    completingSurvey: "ขอบคุณที่ทำ survey จนเสร็จ",
    completingSurveyBefore: "รายการของเราแสดงว่าคุณได้ทำ survey เสร็จเรียบร้อยแล้ว",
    loadingSurvey: "กำลังโหลด Survey...",
    placeholder: "เลือก...",
    value: "ข้อมูล",
    requiredError: "กรุณาตอบคำถาม",
    requiredErrorInPanel: "กรุณาตอบขั้นต่ำหนึ่งคำถาม",
    requiredInAllRowsError: "กรุณาตอบคำถามในทุกๆแถว",
    numericError: "ข้อมูลที่ใส่ต้องเป็นตัวเลข",
    textMinLength: "กรุณาใส่ขั้นต่ำจำนวน {0} ตัวอักษร",
    textMaxLength: "กรุณาใส่ไม่เกินจำนวน {0} ตัวอักษร",
    textMinMaxLength: "กรุณาใส่ขั้นต่ำจำนวน {0} และไม่เกินจำนวน {1} ตัวอักษร",
    minRowCountError: "กรุณาใส่ขั้นต่ำจำนวน {0} แถว",
    minSelectError: "กรุณาเลือกอย่างน้อย {0} รายการ",
    maxSelectError: "กรุณาเลือกไม่เกิน {0} รายการ",
    numericMinMax: "'{0}' ต้องมากกว่าหรือเท่ากับ {1} และน้อยกว่าหรือเท่ากับ {2}",
    numericMin: "'{0}' ต้องมากกว่าหรือเท่ากับ {1}",
    numericMax: "'{0}' น้อยกว่าหรือเท่ากับ {1}",
    invalidEmail: "กรุณาใส่อีเมล์แอดเดรสที่ถูกต้อง",
    invalidExpression: "The expression: {0} ต้องรีเทิร์น 'true'.",
    urlRequestError: "รีเควสรีเทิร์น error '{0}'. {1}",
    urlGetChoicesError: "รีเควสรีเทิร์นข้อมูลว่างเปล่า หรือ 'path' property ไม่ถูกต้อง",
    exceedMaxSize: "ขนาดไฟล์ต้องไม่เกิน {0}.",
    otherRequiredError: "กรุณาใส่ค่าอื่น",
    uploadingFile: "ไฟล์ของคุณกำลังอัพโหลดอยู่. กรุณารอสักครู่แล้วทำการลองอีกครั้ง",
    loadingFile: "กำลังโหลด...",
    chooseFile: "เลือกไฟล์...",
    noFileChosen: "ไม่ไฟล์ที่เลือก",
    confirmDelete: "คุณต้องการลบรายการนี้จริงหรือไม่?",
    keyDuplicationError: "ข้อมูลนี้ต้องเป็น unique.",
    addColumn: "เพิ่มคอลัมน์",
    addRow: "เพิ่มแถว",
    removeRow: "ลบ",
    addPanel: "เพิ่ม",
    removePanel: "ลบ",
    choices_Item: "ชิ้น",
    matrix_column: "คอลัมน์",
    matrix_row: "แถว",
    savingData: "ผลลัพท์กำลังบันทึกลงที่เซิร์ฟเวอร์...",
    savingDataError: "มีความผิดพลาดเกิดขึ้นส่งผลให้ไม่สามารถบันทึกผลได้",
    savingDataSuccess: "บันทึกสำเร็จแล้ว",
    saveAgainButton: "รบกวนลองอีกครั้ง",
    timerMin: "นาที",
    timerSec: "วินาที",
    timerSpentAll: "คุณใช้เวลา {0} บนหน้านี้และ {1} รวมทั้งหมด",
    timerSpentPage: "คุณใช้เวลา {0} บนหน้านี้",
    timerSpentSurvey: "คุณใช้เวลา {0} รวมทั้งหมด",
    timerLimitAll: "คุณใช้เวลา {0} ของ {1} บนหน้านี้และ {2} ของ {3} รวมทั้งหมด",
    timerLimitPage: "คุณใช้เวลา {0} ของ {1} บนหน้านี้",
    timerLimitSurvey: "คุณใช้เวลา {0} ของ {1} รวมทั้งหมด",
    clearCaption: "เคลียร์",
    chooseFileCaption: "เลือกไฟล์",
    removeFileCaption: "นำไฟล์นี้ออก",
    booleanCheckedLabel: "ใช่",
    booleanUncheckedLabel: "ไม่ใช่",
    confirmRemoveFile: "คุณแน่ใจที่จะนำไฟล์นี้ออกใช่หรือไม่: {0}?",
    confirmRemoveAllFiles: "คุณแน่ใจที่จะนำไฟล์ทั้งหมดออกใช่หรือไม่",
    questionTitlePatternText: "ชื่อคำถาม",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["th"] = thaiStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["th"] = "ไทย";


/***/ }),

/***/ "./src/localization/traditional-chinese.ts":
/*!*************************************************!*\
  !*** ./src/localization/traditional-chinese.ts ***!
  \*************************************************/
/*! exports provided: traditionalChineseSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "traditionalChineseSurveyStrings", function() { return traditionalChineseSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var traditionalChineseSurveyStrings = {
    pagePrevText: "上一頁",
    pageNextText: "下一頁",
    completeText: "提交問卷",
    otherItemText: "填寫其他答案",
    progressText: "第 {0} 頁, 共 {1} 頁",
    emptySurvey: "問卷中沒有問題或頁面",
    completingSurvey: "感謝您的參與!",
    loadingSurvey: "問卷載入中...",
    placeholder: "請選擇...",
    requiredError: "請填寫此問題",
    requiredInAllRowsError: "請填寫所有行中問題",
    numericError: "答案必須是個數字",
    textMinLength: "答案長度至少 {0} 個字元",
    textMaxLength: "答案長度不能超過 {0} 個字元",
    textMinMaxLength: "答案長度必須在 {0} - {1} 個字元之間",
    minRowCountError: "最少需要填寫 {0} 行答案",
    minSelectError: "最少需要選擇 {0} 項答案",
    maxSelectError: "最多只能選擇 {0} 項答案",
    numericMinMax: "答案 '{0}' 必須大於等於 {1} 且小於等於 {2}",
    numericMin: "答案 '{0}' 必須大於等於 {1}",
    numericMax: "答案 '{0}' 必須小於等於 {1}",
    invalidEmail: "請輸入有效的 Email 地址",
    urlRequestError: "載入選項時發生錯誤 '{0}': {1}",
    urlGetChoicesError: "未能載入有效的選項或請求參數路徑有誤",
    exceedMaxSize: "文件大小不能超過 {0}",
    otherRequiredError: "請完成其他問題",
    uploadingFile: "文件上傳中... 請耐心等待幾秒後重試",
    addRow: "添加答案",
    removeRow: "刪除答案",
    choices_Item: "選項",
    matrix_column: "列",
    matrix_row: "行",
    savingData: "正在將結果保存到服務器...",
    savingDataError: "在保存結果過程中發生了錯誤，結果未能保存",
    savingDataSuccess: "結果保存成功!",
    saveAgainButton: "請重試"
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["zh-tw"] = traditionalChineseSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["zh-tw"] = "繁體中文";


/***/ }),

/***/ "./src/localization/turkish.ts":
/*!*************************************!*\
  !*** ./src/localization/turkish.ts ***!
  \*************************************/
/*! exports provided: turkishSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "turkishSurveyStrings", function() { return turkishSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var turkishSurveyStrings = {
    pagePrevText: "Geri",
    pageNextText: "İleri",
    completeText: "Anketi Tamamla",
    previewText: "Ön izleme",
    editText: "Düzenle",
    startSurveyText: "Başlat",
    otherItemText: "Diğer (açıklayınız)",
    noneItemText: "Yok",
    selectAllItemText: "Hepsini seç",
    progressText: "Sayfa {0} / {1}",
    panelDynamicProgressText: "Kayıt {0} / {1}",
    questionsProgressText: "Soruları cevapladı {0} / {1}",
    emptySurvey: "Ankette görüntülenecek sayfa ya da soru mevcut değil.",
    completingSurvey: "Anketimizi tamamladığınız için teşekkür ederiz.",
    completingSurveyBefore: "Kayıtlarımız, bu anketi zaten tamamladığınızı gösteriyor.",
    loadingSurvey: "Anket sunucudan yükleniyor ...",
    placeholder: "Seçiniz ...",
    value: "değer",
    requiredError: "Lütfen soruya cevap veriniz",
    requiredErrorInPanel: "Lütfen en az bir soruyu yanıtlayın.",
    requiredInAllRowsError: "Lütfen tüm satırlardaki soruları cevaplayınız.",
    numericError: "Girilen değer numerik olmalıdır",
    textMinLength: "En az {0} sembol giriniz.",
    textMaxLength: "Lütfen {0} karakterden az girin.",
    textMinMaxLength: "Lütfen {0} ’den fazla ve {1} ’den az karakter girin.",
    minRowCountError: "Lütfen en az {0} satırı doldurun.",
    minSelectError: "Lütfen en az {0} seçeneği seçiniz.",
    maxSelectError: "Lütfen {0} adetten fazla seçmeyiniz.",
    numericMinMax: "The '{0}' should be equal or more than {1} and equal or less than {2}",
    numericMin: "'{0}' değeri {1} değerine eşit veya büyük olmalıdır",
    numericMax: "'{0}' değeri {1} değerine eşit ya da küçük olmalıdır.",
    invalidEmail: "Lütfen geçerli bir eposta adresi giriniz.",
    invalidExpression: "İfade: {0} 'true' döndürmelidir.",
    urlRequestError: "Talebi şu hatayı döndü '{0}'. {1}",
    urlGetChoicesError: "Talep herhangi bir veri dönmedi ya da 'path' özelliği hatalı.",
    exceedMaxSize: "Dosya boyutu {0} değerini geçemez.",
    otherRequiredError: "Lütfen diğer değerleri giriniz.",
    uploadingFile: "Dosyanız yükleniyor. LÜtfen birkaç saniye bekleyin ve tekrar deneyin.",
    loadingFile: "Yükleniyor...",
    chooseFile: "Dosyaları seçin ...",
    noFileChosen: "Dosya seçili değil",
    confirmDelete: "Kaydı silmek istiyor musunuz?",
    keyDuplicationError: "Bu değer benzersiz olmalıdır.",
    addColumn: "Sütun ekleyin",
    addRow: "Satır Ekle",
    removeRow: "Kaldır",
    addPanel: "Yeni ekle",
    removePanel: "Kaldırmak",
    choices_Item: "eşya",
    matrix_column: "Sütun",
    matrix_row: "Kürek çekmek",
    savingData: "Sonuçlar sunucuya kaydediliyor ...",
    savingDataError: "Bir hata oluştu ve sonuçları kaydedemedik.",
    savingDataSuccess: "Sonuçlar başarıyla kaydedildi!",
    saveAgainButton: "Tekrar deneyin",
    timerMin: "min",
    timerSec: "saniye",
    timerSpentAll: "Bu sayfada {0} ve toplamda {1} harcadınız.",
    timerSpentPage: "Bu sayfaya {0} harcadınız.",
    timerSpentSurvey: "Toplamda {0} harcadınız.",
    timerLimitAll: "Bu sayfaya {0} / {1} ve toplamda {2} / {3} harcadınız.",
    timerLimitPage: "Bu sayfaya {0} / {1} harcadınız.",
    timerLimitSurvey: "Toplamda {0} / {1} harcadınız.",
    clearCaption: "Açık",
    chooseFileCaption: "Dosya seçin",
    removeFileCaption: "Bu dosyayı kaldır",
    booleanCheckedLabel: "Evet",
    booleanUncheckedLabel: "Hayır",
    confirmRemoveFile: "Bu dosyayı kaldırmak istediğinizden emin misiniz: {0}?",
    confirmRemoveAllFiles: "Tüm dosyaları kaldırmak istediğinizden emin misiniz?",
    questionTitlePatternText: "Soru başlığı",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["tr"] = turkishSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["tr"] = "türkçe";


/***/ }),

/***/ "./src/localization/ukrainian.ts":
/*!***************************************!*\
  !*** ./src/localization/ukrainian.ts ***!
  \***************************************/
/*! exports provided: ukrainianSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ukrainianSurveyStrings", function() { return ukrainianSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var ukrainianSurveyStrings = {
    pagePrevText: "Назад",
    pageNextText: "Далі",
    completeText: "Завершити",
    previewText: "Попередній перегляд",
    editText: "Редагувати",
    startSurveyText: "Почати",
    otherItemText: "Інше (будь ласка, опишіть)",
    noneItemText: "Жоден",
    selectAllItemText: "Вибрати все",
    progressText: "Сторінка {0} з {1}",
    panelDynamicProgressText: "Запис {0} із {1}",
    questionsProgressText: "Відповіли на {0}/{1} питань",
    emptySurvey: "Немає жодного питання.",
    completingSurvey: "Дякуємо Вам за заповнення анкети!",
    completingSurveyBefore: "Ви вже проходили це опитування.",
    loadingSurvey: "Завантаження опитування...",
    placeholder: "Вибрати...",
    value: "значення",
    requiredError: "Будь ласка, дайте відповідь.",
    requiredErrorInPanel: "Будь ласка, дайте відповідь хоча б на одне питання.",
    requiredInAllRowsError: "Будь ласка, дайте відповідь на питання в кожному рядку.",
    numericError: "Відповідь повинна бути числом.",
    textMinLength: "Будь ласка введіть більше {0} символів.",
    textMaxLength: "Будь ласка введіть менше {0} символів.",
    textMinMaxLength: "Будь ласка введіть більше {0} и менше {1} символів.",
    minRowCountError: "Будь ласка, заповніть не менше {0} рядків.",
    minSelectError: "Будь ласка, виберіть хоча б {0} варіантів.",
    maxSelectError: "Будь ласка, виберіть не більше {0} варіантів.",
    numericMinMax: "'{0}' повинно бути не менше ніж {1}, і не більше ніж {2}",
    numericMin: "'{0}' повинно бути не менше ніж {1}",
    numericMax: "'{0}' повинно бути не більше ніж {1}",
    invalidEmail: "Будь ласка, введіть дійсну адресу електронної пошти.",
    invalidExpression: "Вираз {0} повинен повертати 'true'.",
    urlRequestError: "Запит повернув помилку '{0}'. {1}",
    urlGetChoicesError: "Відповідь на запит повернулась порожньою або властивіть 'path' вказано невірно",
    exceedMaxSize: "Розмір файлу не повинен перевищувати {0}.",
    otherRequiredError: "Будь ласка, введіть дані в поле 'Інше'",
    uploadingFile: "Ваш файл завантажується. Зачекайте декілька секунд і спробуйте знову.",
    loadingFile: "Завантаження...",
    chooseFile: "Виберіть файл(и)...",
    noFileChosen: "Файл не вибрано",
    confirmDelete: "Ви хочете видалити запис?",
    keyDuplicationError: "Це значення повинно бути унікальним.",
    addColumn: "Додати колонку",
    addRow: "Додати рядок",
    removeRow: "Видалити",
    addPanel: "Додати нову",
    removePanel: "Видалити",
    choices_Item: "Варіант",
    matrix_column: "Колонка",
    matrix_row: "Рядок",
    savingData: "Результати зберігаються на сервер...",
    savingDataError: "Відбулася помилка, результат не був збережений.",
    savingDataSuccess: "Резвультат успішно збережений!",
    saveAgainButton: "Спробувати знову",
    timerMin: "хв",
    timerSec: "сек",
    timerSpentAll: "Ви витратили {0} на цій сторінці і {1} загалом.",
    timerSpentPage: "Ви витратили {0} на цій сторінці.",
    timerSpentSurvey: "Ви витратили {0} протягом тесту.",
    timerLimitAll: "Ви витратили {0} з {1} на цій сторінці і {2} з {3} для всього тесту.",
    timerLimitPage: "Ви витратили {0} з {1} на цій сторінці.",
    timerLimitSurvey: "Ви витратили {0} з {1} для всього тесту.",
    clearCaption: "Очистити",
    chooseFileCaption: "Виберіть файл",
    removeFileCaption: "Видалити файл",
    booleanCheckedLabel: "Так",
    booleanUncheckedLabel: "Ні",
    confirmRemoveFile: "Ви впевнені, що хочете видалити цей файл: {0}?",
    confirmRemoveAllFiles: "Ви впевнені, що хочете видалити всі файли?",
    questionTitlePatternText: "Назва запитання",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ua"] = ukrainianSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ua"] = "українська";


/***/ }),

/***/ "./src/localization/vietnamese.ts":
/*!****************************************!*\
  !*** ./src/localization/vietnamese.ts ***!
  \****************************************/
/*! exports provided: vietnameseSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vietnameseSurveyStrings", function() { return vietnameseSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
//Uncomment this line on creating a translation file

var vietnameseSurveyStrings = {
    pagePrevText: "Trở về",
    pageNextText: "Tiếp theo",
    completeText: "Hoàn thành",
    previewText: "Xem trước",
    editText: "Chỉnh sửa",
    startSurveyText: "Bắt đầu",
    otherItemText: "Khác (mô tả)",
    noneItemText: "Trống",
    selectAllItemText: "Chọn tất cả",
    progressText: "Trang {0} / {1}",
    panelDynamicProgressText: "Dòng {0} / {1}",
    questionsProgressText: "Đã trả lời {0}/{1} câu hỏi",
    emptySurvey: "Không có trang hoặc câu hỏi nào được hiển thị trong cuộc khảo sát này.",
    completingSurvey: "Cảm ơn đã hoàn thành khảo sát!",
    completingSurveyBefore: "Hồ sơ chúng tôi cho thấy rằng bạn đã hoàn thành cuộc khảo sát này.",
    loadingSurvey: "Đang tải khảo sát...",
    placeholder: "Chọn...",
    value: "Giá trị",
    requiredError: "Vui lòng trả lời câu hỏi.",
    requiredErrorInPanel: "Vui lòng trả lời ít nhất một câu hỏi.",
    requiredInAllRowsError: "Vui lòng trả lời các câu hỏi trên tất cả các dòng.",
    numericError: "Giá trị nên là kiểu số.",
    textMinLength: "Vui lòng nhập ít nhất {0} kí tự.",
    textMaxLength: "Vui lòng nhập ít hơn {0} kí tự.",
    textMinMaxLength: "Vui lòng nhập nhiều hơn {0} hoặc ít hơn {1} kí tự.",
    minRowCountError: "Vui lòng nhập ít nhất {0} dòng.",
    minSelectError: "Vui lòng chọn ít nhất {0} loại.",
    maxSelectError: "Vui lòng không chọn nhiều hơn {0} loại.",
    numericMinMax: "Giá trị '{0}' nên bằng hoặc lớn hơn {1} và bằng hoặc nhỏ hơn {2}",
    numericMin: "Giá trị '{0}' nên bằng hoặc lớn hơn {1}",
    numericMax: "Giá trị '{0}' nên bằng hoặc nhỏ hơn {1}",
    invalidEmail: "Vui lòng điền địa chỉ email hợp lệ.",
    invalidExpression: "Biểu thức: {0} nên trả về 'true'.",
    urlRequestError: "Yêu cầu trả về lỗi '{0}'. {1}",
    urlGetChoicesError: "Yêu cầu trả về dữ liệu trống hoặc thuộc tính 'path' không đúng",
    exceedMaxSize: "Kích thước tập tin không nên vượt quá {0}.",
    otherRequiredError: "Vui lòng điền giá trị khác.",
    uploadingFile: "Tập tin đang được tải lên. Vui lòng chờ một lúc và thử lại.",
    loadingFile: "Đang tải...",
    chooseFile: "Chọn các tập tin...",
    noFileChosen: "Không có tập tin nào được chọn",
    confirmDelete: "Bạn muốn xóa dòng này?",
    keyDuplicationError: "Giá trị này không nên bị trùng lặp.",
    addColumn: "Thêm cột",
    addRow: "Thêm dòng",
    removeRow: "Xóa",
    addPanel: "Thêm mới",
    removePanel: "Xóa",
    choices_Item: "mục",
    matrix_column: "Cột",
    matrix_row: "Dòng",
    savingData: "Kết quả đang lưu lại trên hệ thống...",
    savingDataError: "Có lỗi xảy ra và chúng ta không thể lưu kết quả.",
    savingDataSuccess: "Kết quả đã được lưu thành công!",
    saveAgainButton: "Thử lại",
    timerMin: "phút",
    timerSec: "giây",
    timerSpentAll: "Bạn đã sử dụng {0} trên trang này và {1} trên toàn bộ.",
    timerSpentPage: "Bạn đã sử dụng {0} trên trang.",
    timerSpentSurvey: "Bạn đã sử dụng {0} trên toàn bộ.",
    timerLimitAll: "Bạn đã sử dụng {0} / {1} trên trang này và {2} / {3} trên toàn bộ.",
    timerLimitPage: "Bạn đã sử dụng {0} / {1} trên trang này.",
    timerLimitSurvey: "Bạn đã sử dụng {0} / {1} trên toàn bộ.",
    clearCaption: "Xóa",
    chooseFileCaption: "Chọn tập tin",
    removeFileCaption: "Xóa tập tin",
    booleanCheckedLabel: "Có",
    booleanUncheckedLabel: "Không",
    confirmRemoveFile: "Bạn có chắc chắn muốn xóa tập tin này: {0}?",
    confirmRemoveAllFiles: "Bạn có chắc chắn muốn xóa toàn bộ tập tin?",
    questionTitlePatternText: "Tiêu đề câu hỏi",
};
//Uncomment these two lines on creating a translation file. You should replace "en" and enStrings with your locale ("fr", "de" and so on) and your variable.
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["vi"] = vietnameseSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["vi"] = "Việt Nam";


/***/ }),

/***/ "./src/localization/welsh.ts":
/*!***********************************!*\
  !*** ./src/localization/welsh.ts ***!
  \***********************************/
/*! exports provided: welshSurveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "welshSurveyStrings", function() { return welshSurveyStrings; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var welshSurveyStrings = {
    pagePrevText: "Blaenorol",
    pageNextText: "Nesaf",
    completeText: "Cwblhau",
    previewText: "Rhagolwg",
    editText: "Golygu",
    startSurveyText: "Dechrau",
    otherItemText: "Arall (disgrifiwch)",
    noneItemText: "Dim",
    selectAllItemText: "Dewis y Cyfan ",
    progressText: "Tudalen {0} o {1}",
    panelDynamicProgressText: "Cofnod {0} o {1}",
    questionsProgressText: "Wedi ateb {0}/{1} cwestiwn",
    emptySurvey: "Does dim modd gweld tudalen na chwestiwn yn yr arolwg.",
    completingSurvey: "Diolch am lenwi’r holiadur!",
    completingSurveyBefore: "Rydych chi wedi llenwi’r arolwg hwn yn barod yn ôl ein cofnodion.",
    loadingSurvey: "Wrthi’n Llwytho’r Arolwg...",
    placeholder: "Dewiswch...",
    value: "gwerth",
    requiredError: "Atebwch y cwestiwn.",
    requiredErrorInPanel: "Atebwch o leiaf un cwestiwn.",
    requiredInAllRowsError: "Atebwch y cwestiynau ym mhob rhes.",
    numericError: "Dylai’r gwerth fod yn rhif.",
    textMinLength: "Rhowch o leiaf {0} nod.",
    textMaxLength: "Rhowch lai na {0} nod.",
    textMinMaxLength: "Rhowch o leiaf {0} nod ond dim mwy na {1}.",
    minRowCountError: "Llenwch o leiaf {0} rhes.",
    minSelectError: "Dewiswch o leiaf {0} amrywiolyn.",
    maxSelectError: "Peidiwch â dewis mwy na {0} amrywiolyn.",
    numericMinMax: "Dylai’r '{0}' fod yr un fath â {1} neu’n fwy, a’r fath â {2} neu’n llai",
    numericMin: "Dylai’r '{0}' fod yr un fath â {1} neu’n fwy",
    numericMax: "Dylai’r '{0}' fod yr un fath â {1} neu’n llai",
    invalidEmail: "Rhowch gyfeiriad e-bost dilys.",
    invalidExpression: "Dylai’r mynegiad {0} arwain at 'true'.",
    urlRequestError: "Roedd y cais wedi arwain at y gwall '{0}'. {1}",
    urlGetChoicesError: "Roedd y cais wedi arwain at ddata gwag neu mae priodwedd y ‘path’ yn anghywir ",
    exceedMaxSize: "Ddylai’r ffeil ddim bod yn fwy na {0}.",
    otherRequiredError: "Rhowch y gwerth arall.",
    uploadingFile: "Mae eich ffeil wrthi’n llwytho i fyny. Arhoswch ychydig o eiliadau a rhoi cynnig arall arni.",
    loadingFile: "Wrthi’n llwytho...",
    chooseFile: "Dewiswch ffeil(iau)...",
    noFileChosen: "Heb ddewis ffeil ",
    confirmDelete: "Ydych chi am ddileu’r cofnod?",
    keyDuplicationError: "Dylai’r gwerth hwn fod yn unigryw.",
    addColumn: "Ychwanegu colofn ",
    addRow: "Ychwanegu rhes",
    removeRow: "Tynnu",
    addPanel: "Ychwanegu o’r newydd",
    removePanel: "Tynnu",
    choices_Item: "eitem",
    matrix_column: "Colofn",
    matrix_row: "Rhes",
    savingData: "Mae’r canlyniadau’n cael eu cadw ar y gweinydd...",
    savingDataError: "Roedd gwall a doedd dim modd cadw’r canlyniadau.",
    savingDataSuccess: "Wedi llwyddo i gadw’r canlyniadau!",
    saveAgainButton: "Rhowch gynnig arall arni",
    timerMin: "mun",
    timerSec: "eil",
    timerSpentAll: "Rydych chi wedi treulio {0} ar y dudalen hon a {1} gyda’i gilydd.",
    timerSpentPage: "Rydych chi wedi treulio {0} ar y dudalen hon.",
    timerSpentSurvey: "Rydych chi wedi treulio {0} gyda’i gilydd.",
    timerLimitAll: "Rydych chi wedi treulio {0} o {1} ar y dudalen hon a {2} o {3} gyda’i gilydd.",
    timerLimitPage: "Rydych chi wedi treulio {0} o {1} ar y dudalen hon.",
    timerLimitSurvey: "Rydych chi wedi treulio {0} o {1} gyda’i gilydd.",
    clearCaption: "Clirio",
    chooseFileCaption: "Dewiswch ffeil ",
    removeFileCaption: "Tynnu’r ffeil hon ",
    booleanCheckedLabel: "Iawn",
    booleanUncheckedLabel: "Na",
    confirmRemoveFile: "Ydych chi’n siŵr eich bod am dynnu’r ffeil hon: {0}?",
    confirmRemoveAllFiles: "Ydych chi’n siŵr eich bod am dynnu pob ffeil?",
    questionTitlePatternText: "Teitl y Cwestiwn ",
};
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["cy"] = welshSurveyStrings;
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["cy"] = "cymraeg";


/***/ }),

/***/ "./src/martixBase.ts":
/*!***************************!*\
  !*** ./src/martixBase.ts ***!
  \***************************/
/*! exports provided: QuestionMatrixBaseModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixBaseModel", function() { return QuestionMatrixBaseModel; });
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};






/**
 * A base class for all matrix question types.
 */
var QuestionMatrixBaseModel = /** @class */ (function (_super) {
    __extends(QuestionMatrixBaseModel, _super);
    function QuestionMatrixBaseModel(name) {
        var _this = _super.call(this, name) || this;
        _this.generatedVisibleRows = null;
        _this.generatedTotalRow = null;
        _this.filteredRows = null;
        _this.filteredColumns = null;
        _this.columns = _this.createColumnValues();
        _this.rows = _this.createItemValues("rows");
        return _this;
    }
    QuestionMatrixBaseModel.prototype.createColumnValues = function () {
        return this.createItemValues("columns");
    };
    QuestionMatrixBaseModel.prototype.getType = function () {
        return "matrixbase";
    };
    QuestionMatrixBaseModel.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        this.updateVisibilityBasedOnRows();
    };
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "isCompositeQuestion", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "showHeader", {
        /**
         * Specifies whether to display the table header that contains column captions.
         *
         * Default value: `true`
         */
        get: function () {
            return this.getPropertyValue("showHeader");
        },
        set: function (val) {
            this.setPropertyValue("showHeader", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "columns", {
        /**
         * An array of matrix columns.
         *
         * This array can contain primitive values or objects with the `text` (display value) and `value` (value to be saved in survey results) properties.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/single-selection-matrix-table-question/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("columns");
        },
        set: function (newValue) {
            this.setPropertyValue("columns", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "visibleColumns", {
        get: function () {
            return !!this.filteredColumns ? this.filteredColumns : this.columns;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "rows", {
        /**
         * An array of matrix rows.
         *
         * This array can contain primitive values or objects with the `text` (display value) and `value` (value to be saved in survey results) properties.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/single-selection-matrix-table-question/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("rows");
        },
        set: function (newValue) {
            var newRows = this.processRowsOnSet(newValue);
            this.setPropertyValue("rows", newRows);
            this.filterItems();
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixBaseModel.prototype.processRowsOnSet = function (newRows) {
        return newRows;
    };
    QuestionMatrixBaseModel.prototype.getVisibleRows = function () {
        return [];
    };
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "visibleRows", {
        /**
         * Returns an array of visible matrix rows.
         * @see rowsVisibleIf
         */
        get: function () {
            return this.getVisibleRows();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "rowsVisibleIf", {
        /**
         * A Boolean expression that is evaluated against each matrix row. If the expression evaluates to `false`, the row becomes hidden.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Use the `{item}` placeholder to reference the current row in the expression.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see visibleRows
         * @see columnsVisibleIf
         */
        get: function () {
            return this.getPropertyValue("rowsVisibleIf", "");
        },
        set: function (val) {
            this.setPropertyValue("rowsVisibleIf", val);
            this.filterItems();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixBaseModel.prototype, "columnsVisibleIf", {
        /**
         * A Boolean expression that is evaluated against each matrix column. If the expression evaluates to `false`, the column becomes hidden.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Use the `{item}` placeholder to reference the current column in the expression.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see rowsVisibleIf
         */
        get: function () {
            return this.getPropertyValue("columnsVisibleIf", "");
        },
        set: function (val) {
            this.setPropertyValue("columnsVisibleIf", val);
            this.filterItems();
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixBaseModel.prototype.runCondition = function (values, properties) {
        _super.prototype.runCondition.call(this, values, properties);
        this.runItemsCondition(values, properties);
    };
    QuestionMatrixBaseModel.prototype.filterItems = function () {
        if (this.areInvisibleElementsShowing) {
            this.onRowsChanged();
            return false;
        }
        if (this.isLoadingFromJson || !this.data)
            return false;
        return this.runItemsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
    };
    QuestionMatrixBaseModel.prototype.onColumnsChanged = function () { };
    QuestionMatrixBaseModel.prototype.onRowsChanged = function () {
        this.updateVisibilityBasedOnRows();
        this.fireCallback(this.visibleRowsChangedCallback);
    };
    QuestionMatrixBaseModel.prototype.updateVisibilityBasedOnRows = function () {
        if (this.hideIfRowsEmpty) {
            this.visible =
                this.rows.length > 0 &&
                    (!this.filteredRows || this.filteredRows.length > 0);
        }
    };
    QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
        return !this.survey || !this.survey.areInvisibleElementsShowing;
    };
    QuestionMatrixBaseModel.prototype.hasRowsAsItems = function () {
        return true;
    };
    QuestionMatrixBaseModel.prototype.runItemsCondition = function (values, properties) {
        var oldVisibleRows = null;
        if (!!this.filteredRows && !_helpers__WEBPACK_IMPORTED_MODULE_4__["Helpers"].isValueEmpty(this.defaultValue)) {
            oldVisibleRows = [];
            for (var i = 0; i < this.filteredRows.length; i++) {
                oldVisibleRows.push(this.filteredRows[i]);
            }
        }
        var hasChanges = this.hasRowsAsItems() && this.runConditionsForRows(values, properties);
        var hasColumnsChanged = this.runConditionsForColumns(values, properties);
        hasChanges = hasColumnsChanged || hasChanges;
        if (hasChanges) {
            if (this.isClearValueOnHidden && (!!this.filteredColumns || !!this.filteredRows)) {
                this.clearIncorrectValues();
            }
            if (!!oldVisibleRows) {
                this.restoreNewVisibleRowsValues(oldVisibleRows);
            }
            this.clearGeneratedRows();
            if (hasColumnsChanged) {
                this.onColumnsChanged();
            }
            this.onRowsChanged();
        }
        return hasChanges;
    };
    QuestionMatrixBaseModel.prototype.clearGeneratedRows = function () {
        this.generatedVisibleRows = null;
    };
    QuestionMatrixBaseModel.prototype.runConditionsForRows = function (values, properties) {
        var showInvisibile = !!this.survey && this.survey.areInvisibleElementsShowing;
        var runner = !showInvisibile && !!this.rowsVisibleIf
            ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](this.rowsVisibleIf)
            : null;
        this.filteredRows = [];
        var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
        if (this.filteredRows.length === this.rows.length) {
            this.filteredRows = null;
        }
        return hasChanged;
    };
    QuestionMatrixBaseModel.prototype.runConditionsForColumns = function (values, properties) {
        var useColumnsExpression = !!this.survey && !this.survey.areInvisibleElementsShowing;
        var runner = useColumnsExpression && !!this.columnsVisibleIf
            ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](this.columnsVisibleIf)
            : null;
        this.filteredColumns = [];
        var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runConditionsForItems(this.columns, this.filteredColumns, runner, values, properties, this.shouldRunColumnExpression());
        if (this.filteredColumns.length === this.columns.length) {
            this.filteredColumns = null;
        }
        return hasChanged;
    };
    QuestionMatrixBaseModel.prototype.clearIncorrectValues = function () {
        var val = this.value;
        if (!val)
            return;
        var newVal = null;
        var isChanged = false;
        var rows = !!this.filteredRows ? this.filteredRows : this.rows;
        var columns = !!this.filteredColumns ? this.filteredColumns : this.columns;
        for (var key in val) {
            if (_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(rows, key) &&
                _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(columns, val[key])) {
                if (newVal == null)
                    newVal = {};
                newVal[key] = val[key];
            }
            else {
                isChanged = true;
            }
        }
        if (isChanged) {
            this.value = newVal;
        }
        _super.prototype.clearIncorrectValues.call(this);
    };
    QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () {
        if (this.isEmpty())
            return;
        var newData = this.getUnbindValue(this.value);
        var rows = this.rows;
        for (var i = 0; i < rows.length; i++) {
            var key = rows[i].value;
            if (!!newData[key] && !rows[i].isVisible) {
                delete newData[key];
            }
        }
        if (this.isTwoValueEquals(newData, this.value))
            return;
        this.value = newData;
    };
    QuestionMatrixBaseModel.prototype.restoreNewVisibleRowsValues = function (oldVisibleRows) {
        var rows = !!this.filteredRows ? this.filteredRows : this.rows;
        var val = this.defaultValue;
        var newValue = this.getUnbindValue(this.value);
        var isChanged = false;
        for (var key in val) {
            if (_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(rows, key) &&
                !_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(oldVisibleRows, key)) {
                if (newValue == null)
                    newValue = {};
                newValue[key] = val[key];
                isChanged = true;
            }
        }
        if (isChanged) {
            this.value = newValue;
        }
    };
    QuestionMatrixBaseModel.prototype.needResponsiveWidth = function () {
        //TODO: make it mor intelligent
        return true;
    };
    QuestionMatrixBaseModel.prototype.getTableCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(this.cssClasses.root)
            .append(this.cssClasses.rootAlternateRows, this.alternateRows)
            .append(this.cssClasses.rootVerticalAlignTop, (this.verticalAlign === "top"))
            .append(this.cssClasses.rootVerticalAlignMiddle, (this.verticalAlign === "middle")).toString();
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "middle" })
    ], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
    ], QuestionMatrixBaseModel.prototype, "alternateRows", void 0);
    return QuestionMatrixBaseModel;
}(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("matrixbase", [
    "columnsVisibleIf:condition",
    "rowsVisibleIf:condition",
    { name: "showHeader:boolean", default: true },
    {
        name: "verticalAlign",
        choices: ["top", "middle"],
        default: "middle",
    },
    { name: "alternateRows:boolean", default: false }
], undefined, "question");


/***/ }),

/***/ "./src/multiSelectListModel.ts":
/*!*************************************!*\
  !*** ./src/multiSelectListModel.ts ***!
  \*************************************/
/*! exports provided: MultiSelectListModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiSelectListModel", function() { return MultiSelectListModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./list */ "./src/list.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};


var MultiSelectListModel = /** @class */ (function (_super) {
    __extends(MultiSelectListModel, _super);
    function MultiSelectListModel(items, onSelectionChanged, allowSelection, selectedItems, onFilterStringChangedCallback) {
        var _this = _super.call(this, items, onSelectionChanged, allowSelection, undefined, onFilterStringChangedCallback) || this;
        _this.onItemClick = function (item) {
            _this.isExpanded = false;
            if (_this.isItemSelected(item)) {
                var removedItem = _this.selectedItems.splice(_this.selectedItems.indexOf(item), 1)[0];
                !!_this.onSelectionChanged && (_this.onSelectionChanged(removedItem, "removed"));
            }
            else {
                _this.selectedItems.push(item);
                !!_this.onSelectionChanged && (_this.onSelectionChanged(item, "added"));
            }
        };
        _this.isItemDisabled = function (itemValue) {
            return itemValue.enabled !== undefined && !itemValue.enabled;
        };
        _this.isItemSelected = function (itemValue) {
            return !!_this.allowSelection && _this.selectedItems.filter(function (item) { return item.id == itemValue.id; }).length > 0;
        };
        _this.setSelectedItems(selectedItems || []);
        return _this;
    }
    MultiSelectListModel.prototype.updateItemState = function () {
        var _this = this;
        this.actions.forEach(function (action) {
            var isSelected = _this.isItemSelected(action);
            action.active = isSelected;
            action.visible = _this.hideSelectedItems ? !isSelected : true;
        });
    };
    MultiSelectListModel.prototype.setSelectedItems = function (newItems) {
        var _this = this;
        this.selectedItems = newItems;
        this.updateItemState();
        this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
    };
    MultiSelectListModel.prototype.initFocusedItem = function () {
        var _this = this;
        if (this.hideSelectedItems || !this.selectedItems.length) {
            this.focusFirstVisibleItem();
        }
        else if (!!this.selectedItems.length) {
            this.focusedItem = this.visibleItems.filter(function (item) { return item.id === _this.selectedItems[0].id; })[0];
        }
    };
    MultiSelectListModel.prototype.selectFocusedItem = function () {
        _super.prototype.selectFocusedItem.call(this);
        if (this.hideSelectedItems) {
            this.focusNextVisibleItem();
        }
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], MultiSelectListModel.prototype, "hideSelectedItems", void 0);
    return MultiSelectListModel;
}(_list__WEBPACK_IMPORTED_MODULE_1__["ListModel"]));



/***/ }),

/***/ "./src/page.ts":
/*!*********************!*\
  !*** ./src/page.ts ***!
  \*********************/
/*! exports provided: PageModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageModel", function() { return PageModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./panel */ "./src/panel.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




/**
 * The page object. It has elements collection, that contains questions and panels.
 */
var PageModel = /** @class */ (function (_super) {
    __extends(PageModel, _super);
    function PageModel(name) {
        if (name === void 0) { name = ""; }
        var _this = _super.call(this, name) || this;
        _this.hasShownValue = false;
        /**
         * Time in seconds end-user spent on this page
         */
        _this.timeSpent = 0;
        _this.locTitle.onGetTextCallback = function (text) {
            if (_this.canShowPageNumber() && text)
                return _this.num + ". " + text;
            return text;
        };
        _this.createLocalizableString("navigationTitle", _this, true);
        _this.createLocalizableString("navigationDescription", _this, true);
        return _this;
    }
    PageModel.prototype.getType = function () {
        return "page";
    };
    PageModel.prototype.toString = function () {
        return this.name;
    };
    Object.defineProperty(PageModel.prototype, "isPage", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    PageModel.prototype.canShowPageNumber = function () {
        return this.survey && this.survey.showPageNumbers;
    };
    PageModel.prototype.canShowTitle = function () {
        return this.survey && this.survey.showPageTitles;
    };
    Object.defineProperty(PageModel.prototype, "navigationTitle", {
        /**
         * Use this property to show title in navigation buttons. If the value is empty then page name is used.
         * @see survey.progressBarType
         */
        get: function () {
            return this.getLocalizableStringText("navigationTitle");
        },
        set: function (val) {
            this.setLocalizableStringText("navigationTitle", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PageModel.prototype, "locNavigationTitle", {
        get: function () {
            return this.getLocalizableString("navigationTitle");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PageModel.prototype, "navigationDescription", {
        get: function () {
            return this.getLocalizableStringText("navigationDescription");
        },
        set: function (val) {
            this.setLocalizableStringText("navigationDescription", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PageModel.prototype, "locNavigationDescription", {
        get: function () {
            return this.getLocalizableString("navigationDescription");
        },
        enumerable: false,
        configurable: true
    });
    PageModel.prototype.navigationLocStrChanged = function () {
        this.locNavigationTitle.strChanged();
        this.locNavigationDescription.strChanged();
    };
    Object.defineProperty(PageModel.prototype, "passed", {
        get: function () {
            return this.getPropertyValue("passed", false);
        },
        set: function (val) {
            this.setPropertyValue("passed", val);
        },
        enumerable: false,
        configurable: true
    });
    PageModel.prototype.delete = function () {
        if (!!this.survey) {
            this.removeSelfFromList(this.survey.pages);
        }
    };
    PageModel.prototype.onFirstRendering = function () {
        if (this.wasShown)
            return;
        _super.prototype.onFirstRendering.call(this);
    };
    Object.defineProperty(PageModel.prototype, "visibleIndex", {
        /**
         * The visible index of the page. It has values from 0 to visible page count - 1.
         * @see SurveyModel.visiblePages
         * @see SurveyModel.pages
         */
        get: function () {
            return this.getPropertyValue("visibleIndex", -1);
        },
        set: function (val) {
            this.setPropertyValue("visibleIndex", val);
        },
        enumerable: false,
        configurable: true
    });
    PageModel.prototype.canRenderFirstRows = function () {
        return !this.isDesignMode || this.visibleIndex == 0;
    };
    Object.defineProperty(PageModel.prototype, "isStarted", {
        /**
         * Returns true, if the page is started page in the survey. It can be shown on the start only and the end-user could not comeback to it after it passed it.
         */
        get: function () {
            return this.survey && this.survey.isPageStarted(this);
        },
        enumerable: false,
        configurable: true
    });
    PageModel.prototype.calcCssClasses = function (css) {
        var classes = { page: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "" };
        this.copyCssClasses(classes.page, css.page);
        if (!!css.pageTitle) {
            classes.pageTitle = css.pageTitle;
        }
        if (!!css.pageDescription) {
            classes.pageDescription = css.pageDescription;
        }
        if (!!css.row) {
            classes.row = css.row;
        }
        if (!!css.pageRow) {
            classes.pageRow = css.pageRow;
        }
        if (!!css.rowMultiple) {
            classes.rowMultiple = css.rowMultiple;
        }
        if (this.survey) {
            this.survey.updatePageCssClasses(this, classes);
        }
        return classes;
    };
    Object.defineProperty(PageModel.prototype, "cssTitle", {
        get: function () {
            if (!this.cssClasses.page)
                return "";
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
                .append(this.cssClasses.page.title)
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PageModel.prototype, "cssRoot", {
        get: function () {
            if (!this.cssClasses.page || !this.survey)
                return "";
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
                .append(this.cssClasses.page.root)
                .append(this.cssClasses.page.emptyHeaderRoot, !this.survey.renderedHasHeader &&
                !(this.survey.isShowProgressBarOnTop && !this.survey.isStaring))
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PageModel.prototype, "navigationButtonsVisibility", {
        /**
         * Set this property to "hide" to make "Prev", "Next" and "Complete" buttons are invisible for this page. Set this property to "show" to make these buttons visible, even if survey showNavigationButtons property is false.
         * @see SurveyMode.showNavigationButtons
         */
        get: function () {
            return this.getPropertyValue("navigationButtonsVisibility");
        },
        set: function (val) {
            this.setPropertyValue("navigationButtonsVisibility", val.toLowerCase());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PageModel.prototype, "wasShown", {
        /**
         * The property returns true, if the page has been shown to the end-user.
         */
        get: function () {
            return this.hasShownValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PageModel.prototype, "hasShown", {
        get: function () {
            return this.wasShown;
        },
        enumerable: false,
        configurable: true
    });
    PageModel.prototype.setWasShown = function (val) {
        if (val == this.hasShownValue)
            return;
        this.hasShownValue = val;
        if (this.isDesignMode || val !== true)
            return;
        var els = this.elements;
        for (var i = 0; i < els.length; i++) {
            if (els[i].isPanel) {
                els[i].randomizeElements(this.areQuestionsRandomized);
            }
        }
        this.randomizeElements(this.areQuestionsRandomized);
    };
    /**
     * Call it to scroll to the page top.
     */
    PageModel.prototype.scrollToTop = function () {
        if (!!this.survey) {
            this.survey.scrollElementToTop(this, null, this, this.id);
        }
    };
    // public get timeSpent(): number {
    //   return this.getPropertyValue("timeSpent", 0);
    // }
    // public set timeSpent(val: number) {
    //   this.setPropertyValue("timeSpent", val);
    // }
    /**
     * Returns the list of all panels in the page
     */
    PageModel.prototype.getPanels = function (visibleOnly, includingDesignTime) {
        if (visibleOnly === void 0) { visibleOnly = false; }
        if (includingDesignTime === void 0) { includingDesignTime = false; }
        var result = new Array();
        this.addPanelsIntoList(result, visibleOnly, includingDesignTime);
        return result;
    };
    Object.defineProperty(PageModel.prototype, "maxTimeToFinish", {
        /**
         * The maximum time in seconds that end-user has to complete the page. If the value is 0 or less, the end-user has unlimited number of time to finish the page.
         * @see startTimer
         * @see SurveyModel.maxTimeToFinishPage
         */
        get: function () {
            return this.getPropertyValue("maxTimeToFinish", 0);
        },
        set: function (val) {
            this.setPropertyValue("maxTimeToFinish", val);
        },
        enumerable: false,
        configurable: true
    });
    PageModel.prototype.onNumChanged = function (value) { };
    PageModel.prototype.onVisibleChanged = function () {
        if (this.isRandomizing)
            return;
        _super.prototype.onVisibleChanged.call(this);
        if (this.survey != null) {
            this.survey.pageVisibilityChanged(this, this.isVisible);
        }
    };
    PageModel.prototype.getDragDropInfo = function () { return this.dragDropInfo; };
    PageModel.prototype.dragDropStart = function (src, target, nestedPanelDepth) {
        if (nestedPanelDepth === void 0) { nestedPanelDepth = -1; }
        this.dragDropInfo = new _panel__WEBPACK_IMPORTED_MODULE_1__["DragDropInfo"](src, target, nestedPanelDepth);
    };
    PageModel.prototype.dragDropMoveTo = function (destination, isBottom, isEdge) {
        if (isBottom === void 0) { isBottom = false; }
        if (isEdge === void 0) { isEdge = false; }
        if (!this.dragDropInfo)
            return false;
        this.dragDropInfo.destination = destination;
        this.dragDropInfo.isBottom = isBottom;
        this.dragDropInfo.isEdge = isEdge;
        this.correctDragDropInfo(this.dragDropInfo);
        if (!this.dragDropCanDropTagert())
            return false;
        if (!this.dragDropCanDropSource() || !this.dragDropAllowFromSurvey()) {
            if (!!this.dragDropInfo.source) {
                var row = this.dragDropFindRow(this.dragDropInfo.target);
                this.updateRowsRemoveElementFromRow(this.dragDropInfo.target, row);
            }
            return false;
        }
        this.dragDropAddTarget(this.dragDropInfo);
        return true;
    };
    PageModel.prototype.correctDragDropInfo = function (dragDropInfo) {
        if (!dragDropInfo.destination)
            return;
        var panel = dragDropInfo.destination.isPanel
            ? dragDropInfo.destination
            : null;
        if (!panel)
            return;
        if (!dragDropInfo.target.isLayoutTypeSupported(panel.getChildrenLayoutType())) {
            dragDropInfo.isEdge = true;
        }
    };
    PageModel.prototype.dragDropAllowFromSurvey = function () {
        var dest = this.dragDropInfo.destination;
        if (!dest || !this.survey)
            return true;
        var insertBefore = null;
        var insertAfter = null;
        var parent = dest.isPage || (!this.dragDropInfo.isEdge && dest.isPanel)
            ? dest
            : dest.parent;
        if (!dest.isPage) {
            var container = dest.parent;
            if (!!container) {
                var elements = container.elements;
                var index = elements.indexOf(dest);
                if (index > -1) {
                    insertBefore = dest;
                    insertAfter = dest;
                    if (this.dragDropInfo.isBottom) {
                        insertBefore =
                            index < elements.length - 1 ? elements[index + 1] : null;
                    }
                    else {
                        insertAfter = index > 0 ? elements[index - 1] : null;
                    }
                }
            }
        }
        var options = {
            target: this.dragDropInfo.target,
            source: this.dragDropInfo.source,
            parent: parent,
            insertAfter: insertAfter,
            insertBefore: insertBefore,
        };
        return this.survey.dragAndDropAllow(options);
    };
    PageModel.prototype.dragDropFinish = function (isCancel) {
        if (isCancel === void 0) { isCancel = false; }
        if (!this.dragDropInfo)
            return;
        var target = this.dragDropInfo.target;
        var src = this.dragDropInfo.source;
        var dest = this.dragDropInfo.destination;
        var row = this.dragDropFindRow(target);
        var targetIndex = this.dragDropGetElementIndex(target, row);
        this.updateRowsRemoveElementFromRow(target, row);
        var elementsToSetSWNL = [];
        var elementsToResetSWNL = [];
        if (!isCancel && !!row) {
            var isSamePanel = false;
            if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2) {
                var srcRow = src && src.parent && src.parent.dragDropFindRow(src);
                if (row.panel.elements[targetIndex] && row.panel.elements[targetIndex].startWithNewLine && row.elements.length > 1 && row.panel.elements[targetIndex] === dest) {
                    elementsToSetSWNL.push(target);
                    elementsToResetSWNL.push(row.panel.elements[targetIndex]);
                }
                if (target.startWithNewLine && row.elements.length > 1 && (!row.panel.elements[targetIndex] || !row.panel.elements[targetIndex].startWithNewLine)) {
                    elementsToResetSWNL.push(target);
                }
                if (srcRow && srcRow.elements[0] === src && srcRow.elements[1]) {
                    elementsToSetSWNL.push(srcRow.elements[1]);
                }
                if (row.elements.length <= 1) {
                    elementsToSetSWNL.push(target);
                }
                if (target.startWithNewLine && row.elements.length > 1 && row.elements[0] !== dest) {
                    elementsToResetSWNL.push(target);
                }
            }
            if (!!src && !!src.parent) {
                this.survey.startMovingQuestion();
                isSamePanel = row.panel == src.parent;
                if (isSamePanel) {
                    row.panel.dragDropMoveElement(src, target, targetIndex);
                    targetIndex = -1;
                }
                else {
                    src.parent.removeElement(src);
                }
            }
            if (targetIndex > -1) {
                row.panel.addElement(target, targetIndex);
            }
            this.survey.stopMovingQuestion();
        }
        elementsToSetSWNL.map(function (e) { e.startWithNewLine = true; });
        elementsToResetSWNL.map(function (e) { e.startWithNewLine = false; });
        this.dragDropInfo = null;
        return !isCancel ? target : null;
    };
    PageModel.prototype.dragDropGetElementIndex = function (target, row) {
        if (!row)
            return -1;
        var index = row.elements.indexOf(target);
        if (row.index == 0)
            return index;
        var prevRow = row.panel.rows[row.index - 1];
        var prevElement = prevRow.elements[prevRow.elements.length - 1];
        return index + row.panel.elements.indexOf(prevElement) + 1;
    };
    PageModel.prototype.dragDropCanDropTagert = function () {
        var destination = this.dragDropInfo.destination;
        if (!destination || destination.isPage)
            return true;
        return this.dragDropCanDropCore(this.dragDropInfo.target, destination);
    };
    PageModel.prototype.dragDropCanDropSource = function () {
        var source = this.dragDropInfo.source;
        if (!source)
            return true;
        var destination = this.dragDropInfo.destination;
        if (!this.dragDropCanDropCore(source, destination))
            return false;
        if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2) {
            var rowSource = this.dragDropFindRow(source);
            var rowDestination = this.dragDropFindRow(destination);
            if (rowSource !== rowDestination) {
                if (!source.startWithNewLine && destination.startWithNewLine)
                    return true;
                if (source.startWithNewLine && !destination.startWithNewLine) {
                    return true;
                }
            }
            var row = this.dragDropFindRow(destination);
            if (row && row.elements.length == 1)
                return true;
        }
        return this.dragDropCanDropNotNext(source, destination, this.dragDropInfo.isEdge, this.dragDropInfo.isBottom);
    };
    PageModel.prototype.dragDropCanDropCore = function (target, destination) {
        if (!destination)
            return true;
        if (this.dragDropIsSameElement(destination, target))
            return false;
        if (target.isPanel) {
            var pnl = target;
            if (pnl.containsElement(destination) ||
                !!pnl.getElementByName(destination.name))
                return false;
        }
        return true;
    };
    PageModel.prototype.dragDropCanDropNotNext = function (source, destination, isEdge, isBottom) {
        if (!destination || (destination.isPanel && !isEdge))
            return true;
        if (typeof source.parent === "undefined" || source.parent !== destination.parent)
            return true;
        var pnl = source.parent;
        var srcIndex = pnl.elements.indexOf(source);
        var destIndex = pnl.elements.indexOf(destination);
        if (destIndex < srcIndex && !isBottom)
            destIndex--;
        if (isBottom)
            destIndex++;
        return srcIndex < destIndex
            ? destIndex - srcIndex > 1
            : srcIndex - destIndex > 0;
    };
    PageModel.prototype.dragDropIsSameElement = function (el1, el2) {
        return el1 == el2 || el1.name == el2.name;
    };
    PageModel.prototype.ensureRowsVisibility = function () {
        _super.prototype.ensureRowsVisibility.call(this);
        this.getPanels().forEach(function (panel) { return panel.ensureRowsVisibility(); });
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: -1, onSet: function (val, target) { return target.onNumChanged(val); } })
    ], PageModel.prototype, "num", void 0);
    return PageModel;
}(_panel__WEBPACK_IMPORTED_MODULE_1__["PanelModelBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
    {
        name: "navigationButtonsVisibility",
        default: "inherit",
        choices: ["inherit", "show", "hide"],
    },
    { name: "maxTimeToFinish:number", default: 0, minValue: 0 },
    {
        name: "navigationTitle",
        visibleIf: function (obj) {
            return !!obj.survey && obj.survey.progressBarType === "buttons";
        },
        serializationProperty: "locNavigationTitle",
    },
    {
        name: "navigationDescription",
        visibleIf: function (obj) {
            return !!obj.survey && obj.survey.progressBarType === "buttons";
        },
        serializationProperty: "locNavigationDescription",
    },
    { name: "title:text", serializationProperty: "locTitle" },
    { name: "description:text", serializationProperty: "locDescription" },
], function () {
    return new PageModel();
}, "panelbase");


/***/ }),

/***/ "./src/panel.ts":
/*!**********************!*\
  !*** ./src/panel.ts ***!
  \**********************/
/*! exports provided: DragDropInfo, QuestionRowModel, PanelModelBase, PanelModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropInfo", function() { return DragDropInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRowModel", function() { return QuestionRowModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelModelBase", function() { return PanelModelBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelModel", function() { return PanelModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};










var DragDropInfo = /** @class */ (function () {
    function DragDropInfo(source, target, nestedPanelDepth) {
        if (nestedPanelDepth === void 0) { nestedPanelDepth = -1; }
        this.source = source;
        this.target = target;
        this.nestedPanelDepth = nestedPanelDepth;
    }
    return DragDropInfo;
}());

var QuestionRowModel = /** @class */ (function (_super) {
    __extends(QuestionRowModel, _super);
    function QuestionRowModel(panel) {
        var _this = _super.call(this) || this;
        _this.panel = panel;
        _this._scrollableParent = undefined;
        _this._updateVisibility = undefined;
        _this.idValue = QuestionRowModel.getRowId();
        _this.visible = panel.areInvisibleElementsShowing;
        _this.createNewArray("elements");
        _this.createNewArray("visibleElements");
        return _this;
    }
    QuestionRowModel.getRowId = function () {
        return "pr_" + QuestionRowModel.rowCounter++;
    };
    QuestionRowModel.prototype.startLazyRendering = function (rowContainerDiv, findScrollableContainer) {
        var _this = this;
        if (findScrollableContainer === void 0) { findScrollableContainer = _utils_utils__WEBPACK_IMPORTED_MODULE_8__["findScrollableParent"]; }
        this._scrollableParent = findScrollableContainer(rowContainerDiv);
        // if  this._scrollableParent is html the scroll event isn't fired, so we should use window
        if (this._scrollableParent === document.documentElement) {
            this._scrollableParent = window;
        }
        var hasScroll = this._scrollableParent.scrollHeight > this._scrollableParent.clientHeight;
        this.isNeedRender = !hasScroll;
        if (hasScroll) {
            this._updateVisibility = function () {
                var isRowContainerDivVisible = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["isElementVisible"])(rowContainerDiv, 50);
                if (!_this.isNeedRender && isRowContainerDivVisible) {
                    _this.isNeedRender = true;
                    _this.stopLazyRendering();
                }
            };
            setTimeout(function () {
                if (!!_this._scrollableParent &&
                    !!_this._scrollableParent.addEventListener) {
                    _this._scrollableParent.addEventListener("scroll", _this._updateVisibility);
                }
                _this.ensureVisibility();
            }, 10);
        }
    };
    QuestionRowModel.prototype.ensureVisibility = function () {
        if (!!this._updateVisibility) {
            this._updateVisibility();
        }
    };
    QuestionRowModel.prototype.stopLazyRendering = function () {
        if (!!this._scrollableParent &&
            !!this._updateVisibility &&
            !!this._scrollableParent.removeEventListener) {
            this._scrollableParent.removeEventListener("scroll", this._updateVisibility);
        }
        this._scrollableParent = undefined;
        this._updateVisibility = undefined;
    };
    QuestionRowModel.prototype.setIsLazyRendering = function (val) {
        this.isLazyRenderingValue = val;
        this.isNeedRender = !val;
    };
    QuestionRowModel.prototype.isLazyRendering = function () {
        return this.isLazyRenderingValue === true;
    };
    Object.defineProperty(QuestionRowModel.prototype, "id", {
        get: function () {
            return this.idValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRowModel.prototype, "elements", {
        get: function () {
            return this.getPropertyValue("elements");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRowModel.prototype, "visibleElements", {
        get: function () {
            return this.getPropertyValue("visibleElements");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRowModel.prototype, "visible", {
        get: function () {
            return this.getPropertyValue("visible", true);
        },
        set: function (val) {
            this.setPropertyValue("visible", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRowModel.prototype, "isNeedRender", {
        get: function () {
            return this.getPropertyValue("isneedrender", true);
        },
        set: function (val) {
            this.setPropertyValue("isneedrender", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionRowModel.prototype.updateVisible = function () {
        var isVisible = this.calcVisible();
        this.setWidth();
        this.visible = isVisible;
    };
    QuestionRowModel.prototype.addElement = function (q) {
        this.elements.push(q);
        this.updateVisible();
    };
    Object.defineProperty(QuestionRowModel.prototype, "index", {
        get: function () {
            return this.panel.rows.indexOf(this);
        },
        enumerable: false,
        configurable: true
    });
    QuestionRowModel.prototype.setWidth = function () {
        var _a;
        var visCount = this.visibleElements.length;
        if (visCount == 0)
            return;
        var isSingleInRow = this.visibleElements.length === 1;
        var counter = 0;
        var preSetWidthElements = [];
        for (var i = 0; i < this.elements.length; i++) {
            var el = this.elements[i];
            this.setElementMaxMinWidth(el);
            if (el.isVisible) {
                el.isSingleInRow = isSingleInRow;
                var width = this.getElementWidth(el);
                if (!!width) {
                    el.renderWidth = this.getRenderedWidthFromWidth(width);
                    preSetWidthElements.push(el);
                }
                if (!(this.panel.isDefaultV2Theme || ((_a = this.panel.parentQuestion) === null || _a === void 0 ? void 0 : _a.isDefaultV2Theme))) {
                    el.rightIndent = counter < visCount - 1 ? 1 : 0;
                }
                counter++;
            }
            else {
                el.renderWidth = "";
            }
        }
        for (var i = 0; i < this.elements.length; i++) {
            var el = this.elements[i];
            if (!el.isVisible || preSetWidthElements.indexOf(el) > -1)
                continue;
            if (preSetWidthElements.length == 0) {
                el.renderWidth = (100 / visCount).toFixed(6) + "%";
            }
            else {
                el.renderWidth = this.getRenderedCalcWidth(el, preSetWidthElements, visCount);
            }
        }
    };
    QuestionRowModel.prototype.setElementMaxMinWidth = function (el) {
        if (el.width &&
            typeof el.width === "string" &&
            el.width.indexOf("%") === -1) {
            el.minWidth = el.width;
            el.maxWidth = el.width;
        }
    };
    QuestionRowModel.prototype.getRenderedCalcWidth = function (el, preSetWidthElements, visCount) {
        var expression = "100%";
        for (var i = 0; i < preSetWidthElements.length; i++) {
            expression += " - " + preSetWidthElements[i].renderWidth;
        }
        var calcWidthEl = visCount - preSetWidthElements.length;
        if (calcWidthEl > 1) {
            expression = "(" + expression + ")/" + calcWidthEl.toString();
        }
        return "calc(" + expression + ")";
    };
    QuestionRowModel.prototype.getElementWidth = function (el) {
        var width = el.width;
        if (!width || typeof width !== "string")
            return "";
        return width.trim();
    };
    QuestionRowModel.prototype.getRenderedWidthFromWidth = function (width) {
        return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isNumber(width) ? width + "px" : width;
    };
    QuestionRowModel.prototype.calcVisible = function () {
        var visElements = [];
        for (var i = 0; i < this.elements.length; i++) {
            if (this.elements[i].isVisible) {
                visElements.push(this.elements[i]);
            }
        }
        if (this.needToUpdateVisibleElements(visElements)) {
            this.setPropertyValue("visibleElements", visElements);
        }
        return visElements.length > 0;
    };
    QuestionRowModel.prototype.needToUpdateVisibleElements = function (visElements) {
        if (visElements.length !== this.visibleElements.length)
            return true;
        for (var i = 0; i < visElements.length; i++) {
            if (visElements[i] !== this.visibleElements[i])
                return true;
        }
        return false;
    };
    QuestionRowModel.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.stopLazyRendering();
    };
    QuestionRowModel.prototype.getRowCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
            .append(this.panel.cssClasses.row)
            .append(this.panel.cssClasses.pageRow, this.panel.isPage)
            .append(this.panel.cssClasses.rowMultiple, this.visibleElements.length > 1)
            .toString();
    };
    QuestionRowModel.rowCounter = 100;
    return QuestionRowModel;
}(_base__WEBPACK_IMPORTED_MODULE_2__["Base"]));

/**
 * A base class for the [PanelModel](https://surveyjs.io/form-library/documentation/panelmodel) and [PageModel](https://surveyjs.io/form-library/documentation/pagemodel) classes.
 */
var PanelModelBase = /** @class */ (function (_super) {
    __extends(PanelModelBase, _super);
    function PanelModelBase(name) {
        if (name === void 0) { name = ""; }
        var _this = _super.call(this, name) || this;
        _this.isQuestionsReady = false;
        _this.questionsValue = new Array();
        _this.isRandomizing = false;
        _this.createNewArray("rows");
        _this.elementsValue = _this.createNewArray("elements", _this.onAddElement.bind(_this), _this.onRemoveElement.bind(_this));
        _this.id = PanelModelBase.getPanelId();
        _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
        _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
        _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
        _this.createLocalizableString("requiredErrorText", _this);
        _this.registerPropertyChangedHandlers(["questionTitleLocation"], function () {
            _this.onVisibleChanged.bind(_this);
            _this.updateElementCss(true);
        });
        _this.registerPropertyChangedHandlers(["questionStartIndex", "showQuestionNumbers"], function () {
            _this.updateVisibleIndexes();
        });
        return _this;
    }
    PanelModelBase.getPanelId = function () {
        return "sp_" + PanelModelBase.panelCounter++;
    };
    PanelModelBase.prototype.getType = function () {
        return "panelbase";
    };
    PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value, isLight);
        if (this.isDesignMode)
            this.onVisibleChanged();
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].setSurveyImpl(value, isLight);
        }
    };
    PanelModelBase.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        this.updateDescriptionVisibility(this.description);
        this.markQuestionListDirty();
        this.onRowsChanged();
    };
    Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
        get: function () {
            return ((this.canShowTitle() && this.title.length > 0) ||
                (this.showTitle && this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].allowShowEmptyTitleInDesignMode));
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.canShowTitle = function () { return true; };
    Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
        get: function () {
            return this.survey && this.survey.showPageTitles && this.hasDescription ||
                (this.showDescription && this.isDesignMode &&
                    _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].allowShowEmptyTitleInDesignMode &&
                    _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].allowShowEmptyDescriptionInDesignMode);
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].localeChanged();
        }
    };
    PanelModelBase.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].locStrsChanged();
        }
    };
    Object.defineProperty(PanelModelBase.prototype, "requiredText", {
        /**
         * Returns a character or text string that indicates a required panel/page.
         * @see SurveyModel.requiredText
         * @see isRequired
         */
        get: function () {
            return this.survey != null && this.isRequired
                ? this.survey.requiredText
                : "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "titlePattern", {
        get: function () {
            return !!this.survey ? this.survey.questionTitlePattern : "numTitleRequire";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "isRequireTextOnStart", {
        get: function () {
            return this.isRequired && this.titlePattern == "requireNumTitle";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "isRequireTextBeforeTitle", {
        get: function () {
            return this.isRequired && this.titlePattern == "numRequireTitle";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "isRequireTextAfterTitle", {
        get: function () {
            return this.isRequired && this.titlePattern == "numTitleRequire";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "requiredErrorText", {
        /**
         * Specifies a custom error message for a required panel/page.
         * @see isRequired
         * @see requiredIf
         */
        get: function () {
            return this.getLocalizableStringText("requiredErrorText");
        },
        set: function (val) {
            this.setLocalizableStringText("requiredErrorText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "locRequiredErrorText", {
        get: function () {
            return this.getLocalizableString("requiredErrorText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "questionsOrder", {
        /**
         * Specifies the sort order of questions in the panel/page.
         *
         * Possible values:
         *
         * - `"initial"` - Preserves the original order of questions.
         * - `"random"` - Displays questions in random order.
         * - `"default"` (default) - Inherits the setting from the Survey's `questionsOrder` property.
         * @see SurveyModel.questionsOrder
         * @see areQuestionsRandomized
         */
        get: function () {
            return this.getPropertyValue("questionsOrder");
        },
        set: function (val) {
            this.setPropertyValue("questionsOrder", val);
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.canRandomize = function (isRandom) {
        return isRandom && (this.questionsOrder !== "initial") || this.questionsOrder === "random";
    };
    PanelModelBase.prototype.randomizeElements = function (isRandom) {
        if (!this.canRandomize(isRandom) || this.isRandomizing)
            return;
        this.isRandomizing = true;
        var oldElements = [];
        var elements = this.elements;
        for (var i = 0; i < elements.length; i++) {
            oldElements.push(elements[i]);
        }
        var newElements = _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].randomizeArray(oldElements);
        this.setArrayPropertyDirectly("elements", newElements, false);
        this.updateRows();
        this.updateVisibleIndexes();
        this.isRandomizing = false;
    };
    Object.defineProperty(PanelModelBase.prototype, "areQuestionsRandomized", {
        /**
         * Returns `true` if elements in this panel/page are arranged in random order.
         * @see questionsOrder
         */
        get: function () {
            var order = this.questionsOrder == "default" && this.survey
                ? this.survey.questionsOrder
                : this.questionsOrder;
            return order == "random";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "parent", {
        /**
         * Returns a survey element (panel or page) that contains this panel and allows you to move this question to a different survey element.
         *
         * This property is always `null` for the `PageModel` object.
         */
        get: function () {
            return this.getPropertyValue("parent", null);
        },
        set: function (val) {
            this.setPropertyValue("parent", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "depth", {
        get: function () {
            if (this.parent == null)
                return 0;
            return this.parent.depth + 1;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "visibleIf", {
        /**
         * A Boolean expression. If it evaluates to `false`, this panel/page becomes hidden.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
         * @see visible
         * @see isVisible
         */
        get: function () {
            return this.getPropertyValue("visibleIf", "");
        },
        set: function (val) {
            this.setPropertyValue("visibleIf", val);
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.calcCssClasses = function (css) {
        var classes = { panel: {}, error: {}, row: "", rowMultiple: "" };
        this.copyCssClasses(classes.panel, css.panel);
        this.copyCssClasses(classes.error, css.error);
        if (!!css.row) {
            classes.row = css.row;
        }
        if (!!css.rowMultiple) {
            classes.rowMultiple = css.rowMultiple;
        }
        if (this.survey) {
            this.survey.updatePanelCssClasses(this, classes);
        }
        return classes;
    };
    Object.defineProperty(PanelModelBase.prototype, "id", {
        /**
         * An auto-generated unique element identifier.
         */
        get: function () {
            return this.getPropertyValue("id");
        },
        set: function (val) {
            this.setPropertyValue("id", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "isPanel", {
        /**
         * Returns `true` if the survey element is a panel.
         * @see Base.getType
         */
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.getPanel = function () {
        return this;
    };
    PanelModelBase.prototype.getLayoutType = function () {
        return "row";
    };
    PanelModelBase.prototype.isLayoutTypeSupported = function (layoutType) {
        return layoutType !== "flow";
    };
    Object.defineProperty(PanelModelBase.prototype, "questions", {
        /**
         * An array of all questions within this panel/page. Includes questions within nested panels.
         * @see elements
         */
        get: function () {
            if (!this.isQuestionsReady) {
                this.questionsValue = [];
                for (var i = 0; i < this.elements.length; i++) {
                    var el = this.elements[i];
                    if (el.isPanel) {
                        var qs = el.questions;
                        for (var j = 0; j < qs.length; j++) {
                            this.questionsValue.push(qs[j]);
                        }
                    }
                    else {
                        this.questionsValue.push(el);
                    }
                }
                this.isQuestionsReady = true;
            }
            return this.questionsValue;
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.getValidName = function (name) {
        if (!!name)
            return name.trim();
        return name;
    };
    /**
     * Returns a question with a specified `name`. This method does not find questions within nested panels.
     * @param name A question name.
     */
    PanelModelBase.prototype.getQuestionByName = function (name) {
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            if (questions[i].name == name)
                return questions[i];
        }
        return null;
    };
    /**
     * Returns a survey element with a specified `name`. This method can find survey elements within nested elements.
     * @param name An element name.
     */
    PanelModelBase.prototype.getElementByName = function (name) {
        var elements = this.elements;
        for (var i = 0; i < elements.length; i++) {
            var el = elements[i];
            if (el.name == name)
                return el;
            var pnl = el.getPanel();
            if (!!pnl) {
                var res = pnl.getElementByName(name);
                if (!!res)
                    return res;
            }
        }
        return null;
    };
    PanelModelBase.prototype.getQuestionByValueName = function (valueName) {
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            if (questions[i].getValueName() == valueName)
                return questions[i];
        }
        return null;
    };
    /**
     * Returns a JSON object with question values nested in the panel/page.
     * @see getDisplayValue
     */
    PanelModelBase.prototype.getValue = function () {
        var data = {};
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            if (q.isEmpty())
                continue;
            var valueName = q.getValueName();
            data[valueName] = q.value;
            if (!!this.data) {
                var comment = this.data.getComment(valueName);
                if (!!comment) {
                    data[valueName + _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentPrefix] = comment;
                }
            }
        }
        return data;
    };
    /**
     * Returns a JSON object with display texts that correspond to question values nested in the panel/page.
     * @param keysAsText Pass `true` if not only values in the object should be display texts, but also keys. Default value: `false`.
     * @see getValue
     */
    PanelModelBase.prototype.getDisplayValue = function (keysAsText) {
        var data = {};
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            if (q.isEmpty())
                continue;
            var valueName = keysAsText ? q.title : q.getValueName();
            data[valueName] = q.getDisplayValue(keysAsText);
        }
        return data;
    };
    /**
     * Returns a JSON object with comments left to questions within this panel/page. Question names are used as keys.
     */
    PanelModelBase.prototype.getComments = function () {
        var comments = {};
        if (!this.data)
            return comments;
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            var comment = this.data.getComment(q.getValueName());
            if (!!comment) {
                comments[q.getValueName()] = comment;
            }
        }
        return comments;
    };
    /**
     * Removes values that cannot be assigned to nested questions, for example, choices unlisted in the `choices` array.
     *
     * Call this method after you assign new question values in code to ensure that they are acceptable.
     *
     * > NOTE: This method does not remove values for invisible questions and values that fail validation. Call the `hasErrors()` method to validate newly assigned values.
     *
     * @see hasErrors
     */
    PanelModelBase.prototype.clearIncorrectValues = function () {
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].clearIncorrectValues();
        }
    };
    /**
     * Empties the `errors` array for this panel/page and all its child elements (panels and questions).
     * @see errors
     */
    PanelModelBase.prototype.clearErrors = function () {
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].clearErrors();
        }
        this.errors = [];
    };
    PanelModelBase.prototype.markQuestionListDirty = function () {
        this.isQuestionsReady = false;
        if (this.parent)
            this.parent.markQuestionListDirty();
    };
    Object.defineProperty(PanelModelBase.prototype, "elements", {
        /**
         * An array of all survey elements (questions or panels) within this panel/page. Does not include questions within nested panels.
         * @see questions
         */
        get: function () {
            return this.elementsValue;
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.getElementsInDesign = function (includeHidden) {
        if (includeHidden === void 0) { includeHidden = false; }
        return this.elements;
    };
    /**
     * Checks whether a given element belongs to this panel/page or nested panels.
     * @param element A survey element to check.
     */
    PanelModelBase.prototype.containsElement = function (element) {
        for (var i = 0; i < this.elements.length; i++) {
            var el = this.elements[i];
            if (el == element)
                return true;
            var pnl = el.getPanel();
            if (!!pnl) {
                if (pnl.containsElement(element))
                    return true;
            }
        }
        return false;
    };
    Object.defineProperty(PanelModelBase.prototype, "isRequired", {
        /**
         * Makes the panel/page require an answer at least in one nested question. If a respondent leaves the panel/page without any answers, the survey displays a validation error.
         * @see requiredIf
         * @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation)
         */
        get: function () {
            return this.getPropertyValue("isRequired", false);
        },
        set: function (val) {
            this.setPropertyValue("isRequired", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "requiredIf", {
        /**
         * A Boolean expression. If it evaluates to `true`, this panel/page becomes required (at least one question in the panel/page should have an answer).
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
         * @see isRequired
         */
        get: function () {
            return this.getPropertyValue("requiredIf", "");
        },
        set: function (val) {
            this.setPropertyValue("requiredIf", val);
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.searchText = function (text, founded) {
        _super.prototype.searchText.call(this, text, founded);
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].searchText(text, founded);
        }
    };
    /**
     * Returns true, if there is an error on this Page or inside the current Panel
     * @param fireCallback set it to true, to show errors in UI
     * @param focusOnFirstError set it to true to focus on the first question that doesn't pass the validation
     */
    PanelModelBase.prototype.hasErrors = function (fireCallback, focusOnFirstError, rec) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (focusOnFirstError === void 0) { focusOnFirstError = false; }
        if (rec === void 0) { rec = null; }
        rec = !!rec
            ? rec
            : {
                fireCallback: fireCallback,
                focuseOnFirstError: focusOnFirstError,
                firstErrorQuestion: null,
                result: false,
            };
        this.hasErrorsCore(rec);
        if (rec.firstErrorQuestion) {
            rec.firstErrorQuestion.focus(true);
        }
        return rec.result;
    };
    PanelModelBase.prototype.hasErrorsInPanels = function (rec) {
        var errors = [];
        this.hasRequiredError(rec, errors);
        if (this.survey) {
            var customError = this.survey.validatePanel(this);
            if (customError) {
                errors.push(customError);
                rec.result = true;
            }
        }
        if (!!rec.fireCallback) {
            if (!!this.survey) {
                this.survey.beforeSettingPanelErrors(this, errors);
            }
            this.errors = errors;
        }
    };
    //ISurveyErrorOwner
    PanelModelBase.prototype.getErrorCustomText = function (text, error) {
        if (!!this.survey)
            return this.survey.getSurveyErrorCustomText(this, text, error);
        return text;
    };
    PanelModelBase.prototype.hasRequiredError = function (rec, errors) {
        if (!this.isRequired)
            return;
        var visQuestions = [];
        this.addQuestionsToList(visQuestions, true);
        if (visQuestions.length == 0)
            return;
        for (var i = 0; i < visQuestions.length; i++) {
            if (!visQuestions[i].isEmpty())
                return;
        }
        rec.result = true;
        errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["OneAnswerRequiredError"](this.requiredErrorText, this));
        if (rec.focuseOnFirstError && !rec.firstErrorQuestion) {
            rec.firstErrorQuestion = visQuestions[0];
        }
    };
    PanelModelBase.prototype.hasErrorsCore = function (rec) {
        var elements = this.elements;
        var element = null;
        for (var i = 0; i < elements.length; i++) {
            element = elements[i];
            if (!element.isVisible)
                continue;
            if (element.isPanel) {
                element.hasErrorsCore(rec);
            }
            else {
                var question = element;
                if (question.isReadOnly)
                    continue;
                if (question.hasErrors(rec.fireCallback, rec)) {
                    if (rec.focuseOnFirstError && rec.firstErrorQuestion == null) {
                        rec.firstErrorQuestion = question;
                    }
                    rec.result = true;
                }
            }
        }
        this.hasErrorsInPanels(rec);
        this.updateContainsErrors();
    };
    PanelModelBase.prototype.getContainsErrors = function () {
        var res = _super.prototype.getContainsErrors.call(this);
        if (res)
            return res;
        var elements = this.elements;
        for (var i = 0; i < elements.length; i++) {
            if (elements[i].containsErrors)
                return true;
        }
        return false;
    };
    PanelModelBase.prototype.updateElementVisibility = function () {
        for (var i = 0; i < this.elements.length; i++) {
            var el = this.elements[i];
            el.setPropertyValue("isVisible", el.isVisible);
            if (el.isPanel) {
                el.updateElementVisibility();
            }
        }
    };
    PanelModelBase.prototype.getFirstQuestionToFocus = function (withError, ignoreCollapseState) {
        if (withError === void 0) { withError = false; }
        if (ignoreCollapseState === void 0) { ignoreCollapseState = false; }
        if (!withError && !ignoreCollapseState && this.isCollapsed)
            return null;
        var elements = this.elements;
        for (var i = 0; i < elements.length; i++) {
            var el = elements[i];
            if (!el.isVisible)
                continue;
            if (el.isPanel) {
                var res = el.getFirstQuestionToFocus(withError, ignoreCollapseState);
                if (!!res)
                    return res;
            }
            else {
                var q = el.getFirstQuestionToFocus(withError);
                if (!!q)
                    return q;
            }
        }
        return null;
    };
    /**
     * Sets focus on the input of the first question in this panel/page.
     */
    PanelModelBase.prototype.focusFirstQuestion = function () {
        var q = this.getFirstQuestionToFocus();
        if (!!q) {
            q.focus();
        }
    };
    /**
     * Sets focus on the input of the first question in this panel/page that has an error.
     * @see hasErrors
     */
    PanelModelBase.prototype.focusFirstErrorQuestion = function () {
        var q = this.getFirstQuestionToFocus(true);
        if (!!q) {
            q.focus();
        }
    };
    PanelModelBase.prototype.addQuestionsToList = function (list, visibleOnly, includingDesignTime) {
        if (visibleOnly === void 0) { visibleOnly = false; }
        if (includingDesignTime === void 0) { includingDesignTime = false; }
        this.addElementsToList(list, visibleOnly, includingDesignTime, false);
    };
    PanelModelBase.prototype.addPanelsIntoList = function (list, visibleOnly, includingDesignTime) {
        if (visibleOnly === void 0) { visibleOnly = false; }
        if (includingDesignTime === void 0) { includingDesignTime = false; }
        this.addElementsToList(list, visibleOnly, includingDesignTime, true);
    };
    PanelModelBase.prototype.addElementsToList = function (list, visibleOnly, includingDesignTime, isPanel) {
        if (visibleOnly && !this.visible)
            return;
        this.addElementsToListCore(list, this.elements, visibleOnly, includingDesignTime, isPanel);
    };
    PanelModelBase.prototype.addElementsToListCore = function (list, elements, visibleOnly, includingDesignTime, isPanel) {
        for (var i = 0; i < elements.length; i++) {
            var el = elements[i];
            if (visibleOnly && !el.visible)
                continue;
            if ((isPanel && el.isPanel) || (!isPanel && !el.isPanel)) {
                list.push(el);
            }
            if (el.isPanel) {
                el.addElementsToListCore(list, el.elements, visibleOnly, includingDesignTime, isPanel);
            }
            else {
                if (includingDesignTime) {
                    this.addElementsToListCore(list, el.getElementsInDesign(false), visibleOnly, includingDesignTime, isPanel);
                }
            }
        }
    };
    Object.defineProperty(PanelModelBase.prototype, "isActive", {
        /**
         * Returns `true` if this is the current page.
         * @see SurveyModel.currentPage
         */
        get: function () {
            return !this.survey || this.survey.currentPage == this.root;
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.updateCustomWidgets = function () {
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].updateCustomWidgets();
        }
    };
    Object.defineProperty(PanelModelBase.prototype, "questionTitleLocation", {
        /**
         * Sets a title location relative to the input field for questions that belong to this panel/page.
         *
         * Use this property to override the `questionTitleLocation` property specified for the survey. You can also set the `titleLocation` property for individual questions.
         *
         * Possible values:
         *
         * - `"default"` (default) - Inherits the setting from the `questionTitleLocation` property specified for the survey.
         * - `"top"` - Displays the title above the input field.
         * - `"bottom"` - Displays the title below the input field.
         * - `"left"` - Displays the title to the left of the input field.
         * - `"hidden"` - Hides the question title.
         *
         * > NOTE: Certain question types (Matrix, Multiple Text) do not support the `"left"` value. For them, the `"top"` value is used.
         * @see SurveyModel.questionTitleLocation
         */
        get: function () {
            return this.getPropertyValue("questionTitleLocation");
        },
        set: function (value) {
            this.setPropertyValue("questionTitleLocation", value.toLowerCase());
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.getQuestionTitleLocation = function () {
        if (this.onGetQuestionTitleLocation)
            return this.onGetQuestionTitleLocation();
        if (this.questionTitleLocation != "default")
            return this.questionTitleLocation;
        if (this.parent)
            return this.parent.getQuestionTitleLocation();
        return this.survey ? this.survey.questionTitleLocation : "top";
    };
    PanelModelBase.prototype.getStartIndex = function () {
        if (!!this.parent)
            return this.parent.getQuestionStartIndex();
        if (!!this.survey)
            return this.survey.questionStartIndex;
        return "";
    };
    PanelModelBase.prototype.getQuestionStartIndex = function () {
        return this.getStartIndex();
    };
    PanelModelBase.prototype.getChildrenLayoutType = function () {
        return "row";
    };
    PanelModelBase.prototype.getProgressInfo = function () {
        return _survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].getProgressInfoByElements(this.elements, this.isRequired);
    };
    Object.defineProperty(PanelModelBase.prototype, "root", {
        get: function () {
            var res = this;
            while (res.parent)
                res = res.parent;
            return res;
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.childVisibilityChanged = function () {
        var newIsVisibleValue = this.getIsPageVisible(null);
        var oldIsVisibleValue = this.getPropertyValue("isVisible", true);
        if (newIsVisibleValue !== oldIsVisibleValue) {
            this.onVisibleChanged();
        }
    };
    PanelModelBase.prototype.createRowAndSetLazy = function (index) {
        var row = this.createRow();
        row.setIsLazyRendering(this.isLazyRenderInRow(index));
        return row;
    };
    PanelModelBase.prototype.createRow = function () {
        return new QuestionRowModel(this);
    };
    PanelModelBase.prototype.onSurveyLoad = function () {
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].onSurveyLoad();
        }
        this.onElementVisibilityChanged(this);
    };
    PanelModelBase.prototype.onFirstRendering = function () {
        _super.prototype.onFirstRendering.call(this);
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].onFirstRendering();
        }
        this.onRowsChanged();
    };
    PanelModelBase.prototype.updateRows = function () {
        if (this.isLoadingFromJson)
            return;
        for (var i = 0; i < this.elements.length; i++) {
            if (this.elements[i].isPanel) {
                this.elements[i].updateRows();
            }
        }
        this.onRowsChanged();
    };
    Object.defineProperty(PanelModelBase.prototype, "rows", {
        get: function () {
            return this.getPropertyValue("rows");
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.ensureRowsVisibility = function () {
        this.rows.forEach(function (row) {
            row.ensureVisibility();
        });
    };
    PanelModelBase.prototype.onRowsChanged = function () {
        if (this.isLoadingFromJson)
            return;
        this.setArrayPropertyDirectly("rows", this.buildRows());
    };
    PanelModelBase.prototype.onAddElement = function (element, index) {
        var _this = this;
        element.setSurveyImpl(this.surveyImpl);
        element.parent = this;
        this.markQuestionListDirty();
        this.updateRowsOnElementAdded(element, index);
        if (element.isPanel) {
            var p = element;
            if (this.survey) {
                this.survey.panelAdded(p, index, this, this.root);
            }
        }
        else {
            if (this.survey) {
                var q = element;
                this.survey.questionAdded(q, index, this, this.root);
            }
        }
        if (!!this.addElementCallback)
            this.addElementCallback(element);
        var self = this;
        element.registerPropertyChangedHandlers(["visible", "isVisible"], function () {
            _this.onElementVisibilityChanged(element);
        }, this.id);
        element.registerPropertyChangedHandlers(["startWithNewLine"], function () {
            _this.onElementStartWithNewLineChanged(element);
        }, this.id);
        this.onElementVisibilityChanged(this);
    };
    PanelModelBase.prototype.onRemoveElement = function (element) {
        element.parent = null;
        this.markQuestionListDirty();
        element.unregisterPropertyChangedHandlers(["visible", "isVisible", "startWithNewLine"], this.id);
        this.updateRowsOnElementRemoved(element);
        if (this.isRandomizing)
            return;
        if (!element.isPanel) {
            if (this.survey)
                this.survey.questionRemoved(element);
        }
        else {
            if (this.survey)
                this.survey.panelRemoved(element);
        }
        if (!!this.removeElementCallback)
            this.removeElementCallback(element);
        this.onElementVisibilityChanged(this);
    };
    PanelModelBase.prototype.onElementVisibilityChanged = function (element) {
        if (this.isLoadingFromJson || this.isRandomizing)
            return;
        this.updateRowsVisibility(element);
        this.childVisibilityChanged();
        if (!!this.parent) {
            this.parent.onElementVisibilityChanged(this);
        }
    };
    PanelModelBase.prototype.onElementStartWithNewLineChanged = function (element) {
        this.onRowsChanged();
    };
    PanelModelBase.prototype.updateRowsVisibility = function (element) {
        var rows = this.rows;
        for (var i = 0; i < rows.length; i++) {
            var row = rows[i];
            if (row.elements.indexOf(element) > -1) {
                row.updateVisible();
                if (row.visible && !row.isNeedRender) {
                    row.isNeedRender = true;
                }
                break;
            }
        }
    };
    PanelModelBase.prototype.canBuildRows = function () {
        return !this.isLoadingFromJson && this.getChildrenLayoutType() == "row";
    };
    PanelModelBase.prototype.buildRows = function () {
        if (!this.canBuildRows())
            return [];
        var result = new Array();
        for (var i = 0; i < this.elements.length; i++) {
            var el = this.elements[i];
            var isNewRow = i == 0 || el.startWithNewLine;
            var row = isNewRow ? this.createRowAndSetLazy(result.length) : result[result.length - 1];
            if (isNewRow)
                result.push(row);
            row.addElement(el);
        }
        for (var i = 0; i < result.length; i++) {
            result[i].updateVisible();
        }
        return result;
    };
    PanelModelBase.prototype.isLazyRenderInRow = function (rowIndex) {
        if (!this.survey || !this.survey.isLazyRendering)
            return false;
        return (rowIndex >= _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].lazyRowsRenderingStartRow ||
            !this.canRenderFirstRows());
    };
    PanelModelBase.prototype.canRenderFirstRows = function () {
        return this.isPage;
    };
    PanelModelBase.prototype.getDragDropInfo = function () {
        var page = this.getPage(this.parent);
        return !!page ? page.getDragDropInfo() : undefined;
    };
    PanelModelBase.prototype.updateRowsOnElementAdded = function (element, index) {
        if (!this.canBuildRows())
            return;
        var dragDropInfo = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2 ? this.getDragDropInfo() : undefined;
        if (!dragDropInfo) {
            dragDropInfo = new DragDropInfo(null, element);
            dragDropInfo.target = element;
            dragDropInfo.isEdge = this.elements.length > 1;
            if (this.elements.length < 2) {
                dragDropInfo.destination = this;
            }
            else {
                dragDropInfo.isBottom = index > 0;
                if (index == 0) {
                    dragDropInfo.destination = this.elements[1];
                }
                else {
                    dragDropInfo.destination = this.elements[index - 1];
                }
            }
        }
        this.dragDropAddTargetToRow(dragDropInfo, null);
    };
    PanelModelBase.prototype.updateRowsOnElementRemoved = function (element) {
        if (!this.canBuildRows())
            return;
        this.updateRowsRemoveElementFromRow(element, this.findRowByElement(element));
    };
    PanelModelBase.prototype.updateRowsRemoveElementFromRow = function (element, row) {
        if (!row || !row.panel)
            return;
        var elIndex = row.elements.indexOf(element);
        if (elIndex < 0)
            return;
        row.elements.splice(elIndex, 1);
        if (row.elements.length > 0) {
            row.elements[0].startWithNewLine = true;
            row.updateVisible();
        }
        else {
            if (row.index >= 0) {
                row.panel.rows.splice(row.index, 1);
            }
        }
    };
    PanelModelBase.prototype.findRowByElement = function (el) {
        var rows = this.rows;
        for (var i = 0; i < rows.length; i++) {
            if (rows[i].elements.indexOf(el) > -1)
                return rows[i];
        }
        return null;
    };
    PanelModelBase.prototype.elementWidthChanged = function (el) {
        if (this.isLoadingFromJson)
            return;
        var row = this.findRowByElement(el);
        if (!!row) {
            row.updateVisible();
        }
    };
    Object.defineProperty(PanelModelBase.prototype, "processedTitle", {
        get: function () {
            return this.getRenderedTitle(this.locTitle.textOrHtml);
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.getRenderedTitle = function (str) {
        return this.textProcessor != null
            ? this.textProcessor.processText(str, true)
            : str;
    };
    Object.defineProperty(PanelModelBase.prototype, "visible", {
        /**
         * Gets or sets panel/page visibility.
         *
         * If you want to display or hide a survey element based on a condition, specify the `visibleIf` property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see visibleIf
         * @see isVisible
         */
        get: function () {
            return this.getPropertyValue("visible", true);
        },
        set: function (value) {
            if (value === this.visible)
                return;
            this.setPropertyValue("visible", value);
            this.setPropertyValue("isVisible", this.isVisible);
            if (!this.isLoadingFromJson)
                this.onVisibleChanged();
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.onVisibleChanged = function () {
        if (this.isRandomizing)
            return;
        this.setPropertyValue("isVisible", this.isVisible);
        if (!!this.survey &&
            this.survey.isClearValueOnHiddenContainer &&
            !this.isLoadingFromJson) {
            var questions = this.questions;
            for (var i = 0; i < questions.length; i++) {
                if (!this.isVisible) {
                    questions[i].clearValueIfInvisible();
                }
                else {
                    questions[i].updateValueWithDefaults();
                }
            }
        }
    };
    Object.defineProperty(PanelModelBase.prototype, "isVisible", {
        /**
         * Returns `true` if the panel/page is visible or the survey is currently in design mode.
         *
         * If you want to display or hide a question based on a condition, specify the `visibleIf` property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see visibleIf
         * @see visible
         */
        get: function () {
            return this.areInvisibleElementsShowing || this.getIsPageVisible(null);
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.getIsPageVisible = function (exceptionQuestion) {
        if (!this.visible)
            return false;
        for (var i = 0; i < this.elements.length; i++) {
            if (this.elements[i] == exceptionQuestion)
                continue;
            if (this.elements[i].isVisible)
                return true;
        }
        return false;
    };
    PanelModelBase.prototype.setVisibleIndex = function (index) {
        if (!this.isVisible || index < 0) {
            this.resetVisibleIndexes();
            return 0;
        }
        this.lastVisibleIndex = index;
        var startIndex = index;
        index += this.beforeSetVisibleIndex(index);
        var panelStartIndex = this.getPanelStartIndex(index);
        var panelIndex = panelStartIndex;
        for (var i = 0; i < this.elements.length; i++) {
            panelIndex += this.elements[i].setVisibleIndex(panelIndex);
        }
        if (this.isContinueNumbering()) {
            index += panelIndex - panelStartIndex;
        }
        return index - startIndex;
    };
    PanelModelBase.prototype.updateVisibleIndexes = function () {
        if (this.lastVisibleIndex === undefined)
            return;
        this.resetVisibleIndexes();
        this.setVisibleIndex(this.lastVisibleIndex);
    };
    PanelModelBase.prototype.resetVisibleIndexes = function () {
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].setVisibleIndex(-1);
        }
    };
    PanelModelBase.prototype.beforeSetVisibleIndex = function (index) {
        return 0;
    };
    PanelModelBase.prototype.getPanelStartIndex = function (index) {
        return index;
    };
    PanelModelBase.prototype.isContinueNumbering = function () {
        return true;
    };
    Object.defineProperty(PanelModelBase.prototype, "isReadOnly", {
        get: function () {
            var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
            var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
            return this.readOnly || isParentReadOnly || isSurveyReadOnly;
        },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.onReadOnlyChanged = function () {
        for (var i = 0; i < this.elements.length; i++) {
            var el = this.elements[i];
            el.setPropertyValue("isReadOnly", el.isReadOnly);
        }
        _super.prototype.onReadOnlyChanged.call(this);
    };
    PanelModelBase.prototype.updateElementCss = function (reNew) {
        _super.prototype.updateElementCss.call(this, reNew);
        for (var i = 0; i < this.elements.length; i++) {
            var el = this.elements[i];
            el.updateElementCss(reNew);
        }
    };
    Object.defineProperty(PanelModelBase.prototype, "enableIf", {
        /**
         * A Boolean expression. If it evaluates to `false`, this panel/page becomes read-only.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
         * @see readOnly
         * @see isReadOnly
         */
        get: function () {
            return this.getPropertyValue("enableIf", "");
        },
        set: function (val) {
            this.setPropertyValue("enableIf", val);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Adds a survey element (question or panel) to this panel/page. Returns `true` if the element was added successfully; `false` otherwise.
     * @param element A survey element to add.
     * @param index A desired index of this element in the `elements` array.
     * @see addNewQuestion
     * @see addNewPanel
     */
    PanelModelBase.prototype.addElement = function (element, index) {
        if (index === void 0) { index = -1; }
        if (!this.canAddElement(element))
            return false;
        if (index < 0 || index >= this.elements.length) {
            this.elements.push(element);
        }
        else {
            this.elements.splice(index, 0, element);
        }
        return true;
    };
    PanelModelBase.prototype.insertElementAfter = function (element, after) {
        var index = this.elements.indexOf(after);
        if (index >= 0)
            this.addElement(element, index + 1);
    };
    PanelModelBase.prototype.insertElementBefore = function (element, before) {
        var index = this.elements.indexOf(before);
        if (index >= 0)
            this.addElement(element, index);
    };
    PanelModelBase.prototype.canAddElement = function (element) {
        return (!!element && element.isLayoutTypeSupported(this.getChildrenLayoutType()));
    };
    PanelModelBase.prototype.addQuestion = function (question, index) {
        if (index === void 0) { index = -1; }
        return this.addElement(question, index);
    };
    PanelModelBase.prototype.addPanel = function (panel, index) {
        if (index === void 0) { index = -1; }
        return this.addElement(panel, index);
    };
    /**
     * Creates a new question of a given type and adds it to the `elements` array at a specified index.
     *
     * This method returns `null` if the question cannot be created or added to this panel/page; otherwise, the method returns the created question.
     *
     * @param questionType A [question type](https://surveyjs.io/form-library/documentation/question#getType).
     * @param name A question name.
     * @param index A desired index of the new question in the `elements` array.
     * @see elements
     * @see addElement
     */
    PanelModelBase.prototype.addNewQuestion = function (questionType, name, index) {
        if (name === void 0) { name = null; }
        if (index === void 0) { index = -1; }
        var question = _questionfactory__WEBPACK_IMPORTED_MODULE_5__["QuestionFactory"].Instance.createQuestion(questionType, name);
        if (!this.addQuestion(question, index))
            return null;
        return question;
    };
    /**
     * Creates a new panel and adds it to the end of the `elements` array.
     *
     * This method returns `null` if the panel cannot be created or added to this panel/page; otherwise, the method returns the created panel.
     * @param name A panel name.
     * @see elements
     * @see addElement
     */
    PanelModelBase.prototype.addNewPanel = function (name) {
        if (name === void 0) { name = null; }
        var panel = this.createNewPanel(name);
        if (!this.addPanel(panel))
            return null;
        return panel;
    };
    PanelModelBase.prototype.indexOf = function (element) {
        return this.elements.indexOf(element);
    };
    PanelModelBase.prototype.createNewPanel = function (name) {
        var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass("panel");
        res.name = name;
        return res;
    };
    /**
     * Deletes a survey element (question or panel) from this panel/page. Returns `true` if the element was deleted successfully; `false` otherwise.
     * @param element A survey element to delete.
     * @see elements
     */
    PanelModelBase.prototype.removeElement = function (element) {
        var index = this.elements.indexOf(element);
        if (index < 0) {
            for (var i = 0; i < this.elements.length; i++) {
                if (this.elements[i].removeElement(element))
                    return true;
            }
            return false;
        }
        this.elements.splice(index, 1);
        return true;
    };
    PanelModelBase.prototype.removeQuestion = function (question) {
        this.removeElement(question);
    };
    PanelModelBase.prototype.runCondition = function (values, properties) {
        if (this.isDesignMode || this.isLoadingFromJson)
            return;
        var elements = this.elements.slice();
        for (var i = 0; i < elements.length; i++) {
            elements[i].runCondition(values, properties);
        }
        this.runConditionCore(values, properties);
    };
    PanelModelBase.prototype.onAnyValueChanged = function (name) {
        var els = this.elements;
        for (var i = 0; i < els.length; i++) {
            els[i].onAnyValueChanged(name);
        }
    };
    PanelModelBase.prototype.checkBindings = function (valueName, value) {
        var els = this.elements;
        for (var i = 0; i < els.length; i++) {
            els[i].checkBindings(valueName, value);
        }
    };
    PanelModelBase.prototype.dragDropAddTarget = function (dragDropInfo) {
        var prevRow = this.dragDropFindRow(dragDropInfo.target);
        if (this.dragDropAddTargetToRow(dragDropInfo, prevRow)) {
            this.updateRowsRemoveElementFromRow(dragDropInfo.target, prevRow);
        }
    };
    PanelModelBase.prototype.dragDropFindRow = function (findElement) {
        if (!findElement || findElement.isPage)
            return null;
        var element = findElement;
        var rows = this.rows;
        for (var i = 0; i < rows.length; i++) {
            if (rows[i].elements.indexOf(element) > -1)
                return rows[i];
        }
        for (var i = 0; i < this.elements.length; i++) {
            var pnl = this.elements[i].getPanel();
            if (!pnl)
                continue;
            var row = pnl.dragDropFindRow(element);
            if (!!row)
                return row;
        }
        return null;
    };
    PanelModelBase.prototype.dragDropAddTargetToRow = function (dragDropInfo, prevRow) {
        if (!dragDropInfo.destination)
            return true;
        if (this.dragDropAddTargetToEmptyPanel(dragDropInfo))
            return true;
        var dest = dragDropInfo.destination;
        var destRow = this.dragDropFindRow(dest);
        if (!destRow)
            return true;
        if (_settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2 && this.isDesignMode) {
            if (destRow.elements.length > 1)
                return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
            else
                return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
        }
        if (!dragDropInfo.target.startWithNewLine)
            return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
        return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
    };
    PanelModelBase.prototype.dragDropAddTargetToEmptyPanel = function (dragDropInfo) {
        if (dragDropInfo.destination.isPage) {
            this.dragDropAddTargetToEmptyPanelCore(this.root, dragDropInfo.target, dragDropInfo.isBottom);
            return true;
        }
        var dest = dragDropInfo.destination;
        if (dest.isPanel && !dragDropInfo.isEdge) {
            var panel = dest;
            if (dragDropInfo.target["template"] === dest) {
                return false;
            }
            if (dragDropInfo.nestedPanelDepth < 0 ||
                dragDropInfo.nestedPanelDepth >= panel.depth) {
                this.dragDropAddTargetToEmptyPanelCore(dest, dragDropInfo.target, dragDropInfo.isBottom);
                return true;
            }
        }
        return false;
    };
    PanelModelBase.prototype.dragDropAddTargetToExistingRow = function (dragDropInfo, destRow, prevRow) {
        var index = destRow.elements.indexOf(dragDropInfo.destination);
        if (index == 0 &&
            !dragDropInfo.isBottom) {
            if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2) {
            }
            else if (destRow.elements[0].startWithNewLine) {
                if (destRow.index > 0) {
                    dragDropInfo.isBottom = true;
                    destRow = destRow.panel.rows[destRow.index - 1];
                    dragDropInfo.destination =
                        destRow.elements[destRow.elements.length - 1];
                    return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
                }
                else {
                    return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
                }
            }
        }
        var prevRowIndex = -1;
        if (prevRow == destRow) {
            prevRowIndex = destRow.elements.indexOf(dragDropInfo.target);
        }
        if (dragDropInfo.isBottom)
            index++;
        var srcRow = this.findRowByElement(dragDropInfo.source);
        if (srcRow == destRow &&
            srcRow.elements.indexOf(dragDropInfo.source) == index)
            return false;
        if (index == prevRowIndex)
            return false;
        if (prevRowIndex > -1) {
            destRow.elements.splice(prevRowIndex, 1);
            if (prevRowIndex < index)
                index--;
        }
        destRow.elements.splice(index, 0, dragDropInfo.target);
        destRow.updateVisible();
        return prevRowIndex < 0;
    };
    PanelModelBase.prototype.dragDropAddTargetToNewRow = function (dragDropInfo, destRow, prevRow) {
        var targetRow = destRow.panel.createRowAndSetLazy(destRow.panel.rows.length);
        if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2) {
            targetRow.setIsLazyRendering(false);
        }
        targetRow.addElement(dragDropInfo.target);
        var index = destRow.index;
        if (dragDropInfo.isBottom) {
            index++;
        }
        //same row
        if (!!prevRow && prevRow.panel == targetRow.panel && prevRow.index == index)
            return false;
        var srcRow = this.findRowByElement(dragDropInfo.source);
        if (!!srcRow &&
            srcRow.panel == targetRow.panel &&
            srcRow.elements.length == 1 &&
            srcRow.index == index)
            return false;
        destRow.panel.rows.splice(index, 0, targetRow);
        return true;
    };
    PanelModelBase.prototype.dragDropAddTargetToEmptyPanelCore = function (panel, target, isBottom) {
        var targetRow = panel.createRow();
        targetRow.addElement(target);
        if (panel.elements.length == 0 || isBottom) {
            panel.rows.push(targetRow);
        }
        else {
            panel.rows.splice(0, 0, targetRow);
        }
    };
    PanelModelBase.prototype.dragDropMoveElement = function (src, target, targetIndex) {
        var srcIndex = src.parent.elements.indexOf(src);
        if (targetIndex > srcIndex) {
            targetIndex--;
        }
        this.removeElement(src);
        this.addElement(target, targetIndex);
    };
    PanelModelBase.prototype.needResponsiveWidth = function () {
        var result = false;
        this.elements.forEach(function (e) {
            if (e.needResponsiveWidth())
                result = true;
        });
        this.rows.forEach(function (r) {
            if (r.elements.length > 1)
                result = true;
        });
        return result;
    };
    Object.defineProperty(PanelModelBase.prototype, "hasDescriptionUnderTitle", {
        get: function () {
            return this.hasDescription;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "cssHeader", {
        get: function () {
            return this.cssClasses.panel.header;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "cssDescription", {
        get: function () {
            return this.cssClasses.panel.description;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModelBase.prototype, "no", {
        //ITitleOwner
        get: function () { return ""; },
        enumerable: false,
        configurable: true
    });
    PanelModelBase.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        if (this.rows) {
            for (var i = 0; i < this.rows.length; i++) {
                this.rows[i].dispose();
            }
            this.rows.splice(0, this.rows.length);
        }
        for (var i = 0; i < this.elements.length; i++) {
            this.elements[i].dispose();
        }
        this.elements.splice(0, this.elements.length);
    };
    PanelModelBase.panelCounter = 100;
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
    ], PanelModelBase.prototype, "showTitle", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
    ], PanelModelBase.prototype, "showDescription", void 0);
    return PanelModelBase;
}(_survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"]));

/**
 * A class that describes the Panel container element.
 *
 * A panel can contain questions and other panels. Refer to the following help topic for an illustration: [Survey Structure](https://surveyjs.io/form-library/documentation/design-survey-create-a-simple-survey#survey-structure).
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-panel/ (linkStyle))
 */
var PanelModel = /** @class */ (function (_super) {
    __extends(PanelModel, _super);
    function PanelModel(name) {
        if (name === void 0) { name = ""; }
        var _this = _super.call(this, name) || this;
        _this.focusIn = function () {
            _this.survey.whenPanelFocusIn(_this);
        };
        _this.createNewArray("footerActions");
        _this.registerPropertyChangedHandlers(["width"], function () {
            if (!!_this.parent) {
                _this.parent.elementWidthChanged(_this);
            }
        });
        _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
        return _this;
    }
    PanelModel.prototype.getType = function () {
        return "panel";
    };
    Object.defineProperty(PanelModel.prototype, "contentId", {
        get: function () {
            return this.id + "_content";
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        if (live) {
            return !!this.parent ? this.parent.getSurvey(live) : null;
        }
        return _super.prototype.getSurvey.call(this, live);
    };
    PanelModel.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        this.onIndentChanged();
    };
    PanelModel.prototype.onSetData = function () {
        _super.prototype.onSetData.call(this);
        this.onIndentChanged();
    };
    Object.defineProperty(PanelModel.prototype, "isPanel", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModel.prototype, "page", {
        /**
         * Returns a page to which the panel belongs and allows you to move this panel to a different page.
         * @see PanelModelBase.parent
         */
        get: function () {
            return this.getPage(this.parent);
        },
        set: function (val) {
            this.setPage(this.parent, val);
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.delete = function () {
        if (!!this.parent) {
            this.removeSelfFromList(this.parent.elements);
        }
    };
    PanelModel.prototype.moveTo = function (container, insertBefore) {
        if (insertBefore === void 0) { insertBefore = null; }
        return this.moveToBase(this.parent, container, insertBefore);
    };
    Object.defineProperty(PanelModel.prototype, "visibleIndex", {
        /**
         * Returns the visible index of the panel in the survey. Commonly it is -1 and it doesn't show.
         * You have to set showNumber to true to show index/numbering for the Panel
         * @see showNumber
         */
        get: function () {
            return this.getPropertyValue("visibleIndex", -1);
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.getTitleOwner = function () { return this; };
    Object.defineProperty(PanelModel.prototype, "showNumber", {
        /**
         * Specifies whether to show the panel number in the title.
         *
         * Default value: `false`
         * @see SurveyModel.showQuestionNumbers
         * @see SurveyModel.questionTitlePattern
         */
        get: function () {
            return this.getPropertyValue("showNumber", false);
        },
        set: function (val) {
            this.setPropertyValue("showNumber", val);
            this.notifySurveyOnVisibilityChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModel.prototype, "showQuestionNumbers", {
        /**
         * Gets or sets a value that specifies how the elements numbers inside panel are displayed.
         *
         * The following options are available:
         *
         * - `default` - display questions numbers as defined in parent panel or survey
         * - `onpanel` - display questions numbers, start numbering from beginning of this page
         * - `off` - turn off the numbering for questions titles
         * @see showNumber
         */
        get: function () {
            return this.getPropertyValue("showQuestionNumbers");
        },
        set: function (value) {
            this.setPropertyValue("showQuestionNumbers", value);
            this.notifySurveyOnVisibilityChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModel.prototype, "questionStartIndex", {
        /**
         * Specifies a number or letter used to start numbering of elements inside the panel.
         *
         * You can include desired prefixes and postfixes alongside the number or letter:
         *
         * ```js
         * "questionStartIndex": "a.", // a., b., c., ...
         * "questionStartIndex": "#3", // #3, #4, #5, ...
         * "questionStartIndex": "(B)." // (B)., (C)., (D)., ...
         * ```
         * Default value: `"1."` (inherited from `SurveyModel`'s `questionStartIndex` property)
         * @see SurveyModel.questionStartIndex
         * @see showQuestionNumbers
         */
        get: function () {
            return this.getPropertyValue("questionStartIndex", "");
        },
        set: function (val) {
            this.setPropertyValue("questionStartIndex", val);
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.getQuestionStartIndex = function () {
        if (!!this.questionStartIndex)
            return this.questionStartIndex;
        return _super.prototype.getQuestionStartIndex.call(this);
    };
    Object.defineProperty(PanelModel.prototype, "no", {
        /**
         * A question number or letter (depends on the `questionStartIndex` property).
         *
         * When the question number, title, or the entire question is invisible, this property returns an empty string.
         * @see questionStartIndex
         * @see showNumber
         * @see visibleIf
         */
        get: function () {
            return this.getPropertyValue("no", "");
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.setNo = function (visibleIndex) {
        this.setPropertyValue("no", _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].getNumberByIndex(this.visibleIndex, this.getStartIndex()));
    };
    PanelModel.prototype.beforeSetVisibleIndex = function (index) {
        var visibleIndex = -1;
        if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty)) {
            visibleIndex = index;
        }
        this.setPropertyValue("visibleIndex", visibleIndex);
        this.setNo(visibleIndex);
        return visibleIndex < 0 ? 0 : 1;
    };
    PanelModel.prototype.getPanelStartIndex = function (index) {
        if (this.showQuestionNumbers == "off")
            return -1;
        if (this.showQuestionNumbers == "onpanel")
            return 0;
        return index;
    };
    PanelModel.prototype.isContinueNumbering = function () {
        return (this.showQuestionNumbers != "off" && this.showQuestionNumbers != "onpanel");
    };
    PanelModel.prototype.notifySurveyOnVisibilityChanged = function () {
        if (this.survey != null && !this.isLoadingFromJson) {
            this.survey.panelVisibilityChanged(this, this.isVisible);
        }
    };
    PanelModel.prototype.hasErrorsCore = function (rec) {
        _super.prototype.hasErrorsCore.call(this, rec);
        if (this.isCollapsed && rec.result && rec.fireCallback) {
            this.expand();
        }
    };
    PanelModel.prototype.getRenderedTitle = function (str) {
        if (!str) {
            if (this.isCollapsed || this.isExpanded)
                return this.name;
            if (this.isDesignMode)
                return "[" + this.name + "]";
        }
        return _super.prototype.getRenderedTitle.call(this, str);
    };
    Object.defineProperty(PanelModel.prototype, "innerIndent", {
        /**
         * Increases or decreases an indent of panel content from the left edge. Accepts positive integer values and 0.
         */
        get: function () {
            return this.getPropertyValue("innerIndent");
        },
        set: function (val) {
            this.setPropertyValue("innerIndent", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModel.prototype, "startWithNewLine", {
        /**
         * Disable this property if you want to render the current panel on the same line or row with the previous question or panel.
         */
        get: function () {
            return this.getPropertyValue("startWithNewLine");
        },
        set: function (value) {
            this.setPropertyValue("startWithNewLine", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModel.prototype, "allowAdaptiveActions", {
        get: function () {
            return this.getPropertyValue("allowAdaptiveActions");
        },
        set: function (val) {
            this.setPropertyValue("allowAdaptiveActions", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModel.prototype, "innerPaddingLeft", {
        get: function () {
            return this.getPropertyValue("innerPaddingLeft", "");
        },
        set: function (val) {
            this.setPropertyValue("innerPaddingLeft", val);
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.onIndentChanged = function () {
        if (!this.getSurvey())
            return;
        this.innerPaddingLeft = this.getIndentSize(this.innerIndent);
        this.paddingLeft = this.getIndentSize(this.indent);
        this.paddingRight = this.getIndentSize(this.rightIndent);
    };
    PanelModel.prototype.getIndentSize = function (indent) {
        if (indent < 1)
            return "";
        var css = this.survey["css"];
        if (!css || !css.question.indent)
            return "";
        return indent * css.question.indent + "px";
    };
    PanelModel.prototype.clearOnDeletingContainer = function () {
        this.elements.forEach(function (element) {
            if (element instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"] || element instanceof PanelModel) {
                element.clearOnDeletingContainer();
            }
        });
    };
    Object.defineProperty(PanelModel.prototype, "footerActions", {
        get: function () {
            return this.getPropertyValue("footerActions");
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.getFooterToolbar = function () {
        var _this = this;
        if (!this.footerToolbarValue) {
            var actions = this.footerActions;
            if (this.hasEditButton) {
                actions.push({
                    id: "cancel-preview",
                    title: this.survey.editText,
                    innerCss: this.survey.cssNavigationEdit,
                    action: function () { _this.cancelPreview(); }
                });
            }
            this.footerToolbarValue = this.createActionContainer(this.allowAdaptiveActions);
            if (!!this.cssClasses.panel) {
                this.footerToolbarValue.containerCss = this.cssClasses.panel.footer;
            }
            this.footerToolbarValue.setItems(actions);
        }
        return this.footerToolbarValue;
    };
    Object.defineProperty(PanelModel.prototype, "hasEditButton", {
        get: function () {
            if (this.survey && this.survey.state === "preview")
                return this.depth === 1;
            return false;
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.cancelPreview = function () {
        if (!this.hasEditButton)
            return;
        this.survey.cancelPreviewByPage(this);
    };
    Object.defineProperty(PanelModel.prototype, "cssTitle", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
                .append(this.cssClasses.panel.title)
                .append(this.cssClasses.panel.titleExpandable, this.state !== "default")
                .append(this.cssClasses.panel.titleExpanded, this.isExpanded)
                .append(this.cssClasses.panel.titleCollapsed, this.isCollapsed)
                .append(this.cssClasses.panel.titleDisabled, this.isReadOnly)
                .append(this.cssClasses.panel.titleOnError, this.containsErrors)
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PanelModel.prototype, "cssError", {
        get: function () {
            return this.getCssError(this.cssClasses);
        },
        enumerable: false,
        configurable: true
    });
    PanelModel.prototype.getCssError = function (cssClasses) {
        var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(this.cssClasses.error.root);
        return builder.append("panel-error-root", builder.isEmpty()).toString();
    };
    PanelModel.prototype.onVisibleChanged = function () {
        _super.prototype.onVisibleChanged.call(this);
        this.notifySurveyOnVisibilityChanged();
    };
    PanelModel.prototype.needResponsiveWidth = function () {
        if (!this.startWithNewLine) {
            return true;
        }
        else {
            return _super.prototype.needResponsiveWidth.call(this);
        }
    };
    PanelModel.prototype.getContainerCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(this.cssClasses.panel.container)
            .append(this.cssClasses.panel.withFrame, this.hasFrameV2)
            .append(this.cssClasses.panel.nested, !!((this.parent && this.parent.isPanel || !this.isSingleInRow) && !this.isDesignMode))
            .append(this.cssClasses.panel.collapsed, !!this.isCollapsed)
            .append(this.cssClasses.panel.expanded, !!this.isExpanded)
            .append(this.cssClasses.panel.invisible, !this.isDesignMode && this.areInvisibleElementsShowing && !this.visible)
            .toString();
    };
    return PanelModel;
}(PanelModelBase));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
    "name",
    {
        name: "elements",
        alternativeName: "questions",
        baseClassName: "question",
        visible: false,
        isLightSerializable: false,
    },
    { name: "visible:switch", default: true },
    "visibleIf:condition",
    "enableIf:condition",
    "requiredIf:condition",
    "readOnly:boolean",
    {
        name: "questionTitleLocation",
        default: "default",
        choices: ["default", "top", "bottom", "left", "hidden"],
    },
    { name: "title:text", serializationProperty: "locTitle" },
    { name: "description:text", serializationProperty: "locDescription" },
    {
        name: "questionsOrder",
        default: "default",
        choices: ["default", "initial", "random"],
    },
], function () {
    return new PanelModelBase();
});
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
    {
        name: "state",
        default: "default",
        choices: ["default", "collapsed", "expanded"],
    },
    "isRequired:switch",
    {
        name: "requiredErrorText:text",
        serializationProperty: "locRequiredErrorText",
    },
    { name: "startWithNewLine:boolean", default: true },
    "width",
    { name: "minWidth", default: "auto" },
    { name: "maxWidth", default: _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].maxWidth },
    { name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
    { name: "indent:number", default: 0, choices: [0, 1, 2, 3] },
    {
        name: "page",
        isSerializable: false,
        visibleIf: function (obj) {
            var survey = obj ? obj.survey : null;
            return !survey || !survey.pages || survey.pages.length > 1;
        },
        choices: function (obj) {
            var survey = obj ? obj.survey : null;
            return survey
                ? survey.pages.map(function (p) {
                    return { value: p.name, text: p.title };
                })
                : [];
        },
    },
    "showNumber:boolean",
    {
        name: "showQuestionNumbers",
        default: "default",
        choices: ["default", "onpanel", "off"],
    },
    "questionStartIndex",
    { name: "allowAdaptiveActions:boolean", default: true, visible: false },
], function () {
    return new PanelModel();
}, "panelbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_5__["ElementFactory"].Instance.registerElement("panel", function (name) {
    return new PanelModel(name);
});


/***/ }),

/***/ "./src/popup-dropdown-view-model.ts":
/*!******************************************!*\
  !*** ./src/popup-dropdown-view-model.ts ***!
  \******************************************/
/*! exports provided: PopupDropdownViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupDropdownViewModel", function() { return PopupDropdownViewModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _utils_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/popup */ "./src/utils/popup.ts");
/* harmony import */ var _popup_view_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popup-view-model */ "./src/popup-view-model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};



var PopupDropdownViewModel = /** @class */ (function (_super) {
    __extends(PopupDropdownViewModel, _super);
    function PopupDropdownViewModel(model, targetElement) {
        var _this = _super.call(this, model) || this;
        _this.targetElement = targetElement;
        _this.isAutoScroll = true;
        _this.scrollEventCallBack = function () {
            if (!_this.isAutoScroll) {
                _this.hidePopup();
            }
            else {
                _this.isAutoScroll = false;
            }
        };
        _this.model.onRecalculatePosition.add(function (_, options) {
            _this.updatePosition(options.isResetHeight);
        });
        return _this;
    }
    PopupDropdownViewModel.prototype._updatePosition = function () {
        if (!this.targetElement)
            return;
        var targetElementRect = this.targetElement.getBoundingClientRect();
        var background = this.container.children[0];
        var popupContainer = background.children[0];
        var scrollContent = background.children[0].querySelector(".sv-popup__scrolling-content");
        var popupComputedStyle = window.getComputedStyle(popupContainer);
        var marginLeft = (parseFloat(popupComputedStyle.marginLeft) || 0);
        var marginRight = (parseFloat(popupComputedStyle.marginRight) || 0);
        var height = popupContainer.offsetHeight - scrollContent.offsetHeight + scrollContent.scrollHeight;
        var width = popupContainer.getBoundingClientRect().width;
        this.model.setWidthByTarget && (this.minWidth = targetElementRect.width + "px");
        var verticalPosition = this.model.verticalPosition;
        var actualHorizontalPosition = this.getActualHorizontalPosition();
        if (!!window) {
            height = Math.ceil(Math.min(height, window.innerHeight * 0.9, window.visualViewport.height));
            verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.verticalPosition, this.model.showPointer, window.innerHeight);
        }
        this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
        var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.showHeader, this.model.positionMode);
        if (!!window) {
            var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalDimensions(pos.top, height, window.innerHeight);
            if (!!newVerticalDimensions) {
                this.height = newVerticalDimensions.height + "px";
                pos.top = newVerticalDimensions.top;
            }
            var newHorizontalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateHorizontalDimensions(pos.left, width, window.innerWidth, actualHorizontalPosition, this.model.positionMode, { left: marginLeft, right: marginRight });
            if (!!newHorizontalDimensions) {
                this.width = newHorizontalDimensions.width ? newHorizontalDimensions.width + "px" : undefined;
                pos.left = newHorizontalDimensions.left;
            }
        }
        this.left = pos.left + "px";
        this.top = pos.top + "px";
        if (this.showHeader) {
            this.pointerTarget = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePointerTarget(targetElementRect, pos.top, pos.left, verticalPosition, actualHorizontalPosition, marginLeft, marginRight);
        }
        this.pointerTarget.top += "px";
        this.pointerTarget.left += "px";
    };
    PopupDropdownViewModel.prototype.getActualHorizontalPosition = function () {
        var actualHorizontalPosition = this.model.horizontalPosition;
        var isRtl = !!document && document.defaultView.getComputedStyle(document.body).direction == "rtl";
        if (isRtl) {
            if (this.model.horizontalPosition === "left") {
                actualHorizontalPosition = "right";
            }
            else if (this.model.horizontalPosition === "right") {
                actualHorizontalPosition = "left";
            }
        }
        return actualHorizontalPosition;
    };
    PopupDropdownViewModel.prototype.hidePopup = function () {
        _super.prototype.hidePopup.call(this);
        this.isAutoScroll = true;
    };
    PopupDropdownViewModel.prototype.getStyleClass = function () {
        return _super.prototype.getStyleClass.call(this)
            .append("sv-popup--dropdown", !this.isOverlay)
            .append("sv-popup--show-pointer", !this.isOverlay && this.showHeader)
            .append("sv-popup--".concat(this.popupDirection), !this.isOverlay && this.showHeader);
    };
    PopupDropdownViewModel.prototype.getShowHeader = function () {
        return this.model.showPointer && !this.isOverlay;
    };
    PopupDropdownViewModel.prototype.getPopupHeaderTemplate = function () {
        return "popup-pointer";
    };
    PopupDropdownViewModel.prototype.updateOnShowing = function () {
        this.prevActiveElement = document.activeElement;
        if (this.isOverlay) {
            this.top = null;
            this.left = null;
            this.height = null;
            this.width = null;
            this.minWidth = null;
        }
        else {
            this.updatePosition(true, false);
        }
        this.switchFocus();
        window.addEventListener("scroll", this.scrollEventCallBack);
    };
    PopupDropdownViewModel.prototype.updatePosition = function (isResetHeight, isDelayUpdating) {
        var _this = this;
        if (isDelayUpdating === void 0) { isDelayUpdating = true; }
        if (isResetHeight) {
            this.height = "auto";
        }
        if (isDelayUpdating) {
            setTimeout(function () {
                _this._updatePosition();
            }, 1);
        }
        else {
            this._updatePosition();
        }
    };
    PopupDropdownViewModel.prototype.updateOnHiding = function () {
        _super.prototype.updateOnHiding.call(this);
        window.removeEventListener("scroll", this.scrollEventCallBack);
        if (!this.isDisposed) {
            this.top = undefined;
            this.left = undefined;
            this.height = undefined;
            this.width = undefined;
            this.minWidth = undefined;
        }
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "left" })
    ], PopupDropdownViewModel.prototype, "popupDirection", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: { left: "0px", top: "0px" } })
    ], PopupDropdownViewModel.prototype, "pointerTarget", void 0);
    return PopupDropdownViewModel;
}(_popup_view_model__WEBPACK_IMPORTED_MODULE_2__["PopupBaseViewModel"]));



/***/ }),

/***/ "./src/popup-modal-view-model.ts":
/*!***************************************!*\
  !*** ./src/popup-modal-view-model.ts ***!
  \***************************************/
/*! exports provided: PopupModalViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupModalViewModel", function() { return PopupModalViewModel; });
/* harmony import */ var _popup_view_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./popup-view-model */ "./src/popup-view-model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

var PopupModalViewModel = /** @class */ (function (_super) {
    __extends(PopupModalViewModel, _super);
    function PopupModalViewModel(model) {
        return _super.call(this, model) || this;
    }
    PopupModalViewModel.prototype.getStyleClass = function () {
        return _super.prototype.getStyleClass.call(this)
            .append("sv-popup--modal", !this.isOverlay);
    };
    PopupModalViewModel.prototype.getShowFooter = function () {
        return true;
    };
    PopupModalViewModel.prototype.createFooterActionBar = function () {
        var _this = this;
        _super.prototype.createFooterActionBar.call(this);
        this.footerToolbarValue.addAction({
            id: "apply",
            visibleIndex: 20,
            title: this.applyButtonText,
            innerCss: "sv-popup__body-footer-item sv-popup__button sv-popup__button--apply",
            action: function () { _this.apply(); }
        });
    };
    Object.defineProperty(PopupModalViewModel.prototype, "applyButtonText", {
        get: function () {
            return this.getLocalizationString("modalApplyButtonText");
        },
        enumerable: false,
        configurable: true
    });
    PopupModalViewModel.prototype.apply = function () {
        if (!!this.model.onApply && !this.model.onApply())
            return;
        this.hidePopup();
    };
    PopupModalViewModel.prototype.clickOutside = function () {
        return;
    };
    PopupModalViewModel.prototype.onKeyDown = function (event) {
        if (event.key === "Escape" || event.keyCode === 27) {
            this.model.onCancel();
        }
        _super.prototype.onKeyDown.call(this, event);
    };
    return PopupModalViewModel;
}(_popup_view_model__WEBPACK_IMPORTED_MODULE_0__["PopupBaseViewModel"]));



/***/ }),

/***/ "./src/popup-survey.ts":
/*!*****************************!*\
  !*** ./src/popup-survey.ts ***!
  \*****************************/
/*! exports provided: PopupSurveyModel, SurveyWindowModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupSurveyModel", function() { return PopupSurveyModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyWindowModel", function() { return SurveyWindowModel; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _survey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey */ "./src/survey.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};



/**
 * A Model for a survey running in the Popup Window.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/popup-survey/ (linkStyle))
 */
var PopupSurveyModel = /** @class */ (function (_super) {
    __extends(PopupSurveyModel, _super);
    function PopupSurveyModel(jsonObj, initialModel) {
        if (initialModel === void 0) { initialModel = null; }
        var _this = _super.call(this) || this;
        /**
         * Set this value to negative value, for example -1, to avoid closing the popup window on completing the survey. Leave it equals to 0 (default value) to close the popup window immediately, or set it to 3, 5, 10, ... to close the popup window in 3, 5, 10 seconds.
         */
        _this.closeOnCompleteTimeout = 0;
        if (initialModel) {
            _this.surveyValue = initialModel;
        }
        else {
            _this.surveyValue = _this.createSurvey(jsonObj);
        }
        _this.surveyValue.showTitle = false;
        if ("undefined" !== typeof document) {
            _this.windowElement = document.createElement("div");
        }
        _this.survey.onComplete.add(function (survey, options) {
            _this.onSurveyComplete();
        });
        _this.registerPropertyChangedHandlers(["isShowing"], function () {
            if (!!_this.showingChangedCallback)
                _this.showingChangedCallback();
        });
        _this.registerPropertyChangedHandlers(["isExpanded"], function () {
            _this.onExpandedChanged();
        });
        _this.width = new _base__WEBPACK_IMPORTED_MODULE_0__["ComputedUpdater"](function () { return _this.survey.width; });
        _this.width = _this.survey.width;
        _this.updateCss();
        _this.onCreating();
        return _this;
    }
    PopupSurveyModel.prototype.onCreating = function () { };
    PopupSurveyModel.prototype.getType = function () {
        return "popupsurvey";
    };
    Object.defineProperty(PopupSurveyModel.prototype, "survey", {
        /**
         * A survey object.
         * @see SurveyModel
         */
        get: function () {
            return this.surveyValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "isShowing", {
        /**
         * Returns true if the popup window is currently showing. Set it to true to show the popup window and false to hide it.
         * @see show
         * @see hide
         */
        get: function () {
            return this.getPropertyValue("isShowing", false);
        },
        set: function (val) {
            this.setPropertyValue("isShowing", val);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Show the popup window
     * @see hide
     * @see isShowing
     */
    PopupSurveyModel.prototype.show = function () {
        this.isShowing = true;
    };
    /**
     * Hide the popup window
     * @see show
     * @see isShowing
     */
    PopupSurveyModel.prototype.hide = function () {
        this.isShowing = false;
    };
    Object.defineProperty(PopupSurveyModel.prototype, "isExpanded", {
        /**
         * Returns true if the popup window is expanded. Set it to true to expand the popup window or false to collapse it.
         * @see expand
         * @see collapse
         */
        get: function () {
            return this.getPropertyValue("isExpanded", false);
        },
        set: function (val) {
            this.setPropertyValue("isExpanded", val);
        },
        enumerable: false,
        configurable: true
    });
    PopupSurveyModel.prototype.onExpandedChanged = function () {
        if (!!this.expandedChangedCallback) {
            this.expandedChangedCallback();
        }
        this.updateCssButton();
    };
    Object.defineProperty(PopupSurveyModel.prototype, "title", {
        /**
         * The popup window and survey title.
         */
        get: function () {
            return this.survey.title;
        },
        set: function (value) {
            this.survey.title = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "locTitle", {
        get: function () {
            return this.survey.locTitle;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Expand the popup window to show the survey.
     */
    PopupSurveyModel.prototype.expand = function () {
        this.isExpanded = true;
    };
    /**
     * Collapse the popup window and show survey title only.
     */
    PopupSurveyModel.prototype.collapse = function () {
        this.isExpanded = false;
    };
    PopupSurveyModel.prototype.changeExpandCollapse = function () {
        this.isExpanded = !this.isExpanded;
    };
    Object.defineProperty(PopupSurveyModel.prototype, "css", {
        get: function () {
            return this.survey.css;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "cssButton", {
        get: function () {
            return this.getPropertyValue("cssButton", "");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "cssRoot", {
        get: function () {
            return this.getPropertyValue("cssRoot", "");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "cssBody", {
        get: function () {
            return this.getPropertyValue("cssBody", "");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderRoot", {
        get: function () {
            return this.getPropertyValue("cssHeaderRoot", "");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderTitle", {
        get: function () {
            return this.getPropertyValue("cssHeaderTitle", "");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupSurveyModel.prototype, "renderedWidth", {
        get: function () {
            var width = this.getPropertyValue("width", "60%");
            if (width && !isNaN(width))
                width = width + "px";
            return width;
        },
        enumerable: false,
        configurable: true
    });
    PopupSurveyModel.prototype.updateCss = function () {
        if (!this.css || !this.css.window)
            return;
        var cssWindow = this.css.window;
        this.setPropertyValue("cssRoot", cssWindow.root);
        this.setPropertyValue("cssBody", cssWindow.body);
        var cssHeader = cssWindow.header;
        if (!cssHeader)
            return;
        this.setPropertyValue("cssHeaderRoot", cssHeader.root);
        this.setPropertyValue("cssHeaderTitle", cssHeader.title);
        this.updateCssButton();
    };
    PopupSurveyModel.prototype.updateCssButton = function () {
        var cssHeader = !!this.css.window ? this.css.window.header : null;
        if (!cssHeader)
            return;
        this.setCssButton(this.isExpanded ? cssHeader.buttonExpanded : cssHeader.buttonCollapsed);
    };
    PopupSurveyModel.prototype.setCssButton = function (val) {
        if (!val)
            return;
        this.setPropertyValue("cssButton", val);
    };
    PopupSurveyModel.prototype.createSurvey = function (jsonObj) {
        return new _survey__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"](jsonObj);
    };
    PopupSurveyModel.prototype.onSurveyComplete = function () {
        if (this.closeOnCompleteTimeout < 0)
            return;
        if (this.closeOnCompleteTimeout == 0) {
            this.hide();
        }
        else {
            var self = this;
            var timerId = null;
            var func = function () {
                self.hide();
                if (typeof window !== "undefined") {
                    window.clearInterval(timerId);
                }
            };
            timerId =
                typeof window !== "undefined"
                    ? window.setInterval(func, this.closeOnCompleteTimeout * 1000)
                    : 0;
        }
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], PopupSurveyModel.prototype, "width", void 0);
    return PopupSurveyModel;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));

/**
 * Obsolete. Please use PopupSurvey
 */
var SurveyWindowModel = /** @class */ (function (_super) {
    __extends(SurveyWindowModel, _super);
    function SurveyWindowModel() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return SurveyWindowModel;
}(PopupSurveyModel));



/***/ }),

/***/ "./src/popup-utils.ts":
/*!****************************!*\
  !*** ./src/popup-utils.ts ***!
  \****************************/
/*! exports provided: createPopupModalViewModel, createPopupViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPopupModalViewModel", function() { return createPopupModalViewModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPopupViewModel", function() { return createPopupViewModel; });
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
/* harmony import */ var _popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./popup-dropdown-view-model */ "./src/popup-dropdown-view-model.ts");
/* harmony import */ var _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popup-modal-view-model */ "./src/popup-modal-view-model.ts");



function createPopupModalViewModel(options) {
    var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_0__["PopupModel"](options.componentName, options.data, "top", "left", false, true, options.onCancel, options.onApply, options.onHide, options.onShow, options.cssClass, options.title);
    popupModel.displayMode = options.displayMode || "popup";
    var popupViewModel = new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_2__["PopupModalViewModel"](popupModel);
    popupViewModel.initializePopupContainer();
    return popupViewModel;
}
function createPopupViewModel(model, targetElement) {
    if (model.isModal) {
        return new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_2__["PopupModalViewModel"](model);
    }
    else {
        return new _popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_1__["PopupDropdownViewModel"](model, targetElement);
    }
}


/***/ }),

/***/ "./src/popup-view-model.ts":
/*!*********************************!*\
  !*** ./src/popup-view-model.ts ***!
  \*********************************/
/*! exports provided: FOCUS_INPUT_SELECTOR, PopupBaseViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS_INPUT_SELECTOR", function() { return FOCUS_INPUT_SELECTOR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupBaseViewModel", function() { return PopupBaseViewModel; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




var FOCUS_INPUT_SELECTOR = "input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^=\"-\"])";
var PopupBaseViewModel = /** @class */ (function (_super) {
    __extends(PopupBaseViewModel, _super);
    function PopupBaseViewModel(model) {
        var _this = _super.call(this) || this;
        _this.model = model;
        return _this;
    }
    PopupBaseViewModel.prototype.hidePopup = function () {
        this.model.isVisible = false;
    };
    PopupBaseViewModel.prototype.getStyleClass = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
            .append(this.model.cssClass)
            .append("sv-popup--".concat(this.model.displayMode), this.isOverlay);
    };
    PopupBaseViewModel.prototype.getShowFooter = function () {
        return this.isOverlay;
    };
    PopupBaseViewModel.prototype.getShowHeader = function () {
        return false;
    };
    PopupBaseViewModel.prototype.getPopupHeaderTemplate = function () {
        return undefined;
    };
    PopupBaseViewModel.prototype.createFooterActionBar = function () {
        var _this = this;
        this.footerToolbarValue = new _actions_container__WEBPACK_IMPORTED_MODULE_3__["ActionContainer"]();
        this.footerToolbar.updateCallback = function (isResetInitialized) {
            _this.footerToolbarValue.actions.forEach(function (action) { return action.cssClasses = {}; });
        };
        this.footerToolbarValue.addAction({
            id: "cancel",
            visibleIndex: 10,
            title: this.cancelButtonText,
            innerCss: "sv-popup__body-footer-item sv-popup__button sv-popup__button--cancel",
            action: function () { _this.cancel(); }
        });
    };
    PopupBaseViewModel.prototype.setupModel = function (model) {
        var _this = this;
        if (!!this.model) {
            this.model.unregisterPropertyChangedHandlers(["isVisible"], "PopupBaseViewModel");
        }
        this._model = model;
        var onIsVisibleChangedHandler = function () {
            if (!model.isVisible) {
                _this.updateOnHiding();
            }
            _this.isVisible = model.isVisible;
        };
        model.registerPropertyChangedHandlers(["isVisible"], onIsVisibleChangedHandler, "PopupBaseViewModel");
        onIsVisibleChangedHandler();
    };
    Object.defineProperty(PopupBaseViewModel.prototype, "model", {
        get: function () {
            return this._model;
        },
        set: function (model) {
            this.setupModel(model);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "title", {
        get: function () {
            return this.model.title;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "contentComponentName", {
        get: function () {
            return this.model.contentComponentName;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "contentComponentData", {
        get: function () {
            return this.model.contentComponentData;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "isModal", {
        get: function () {
            return this.model.isModal;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "isFocusedContent", {
        get: function () {
            return this.model.isFocusedContent;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "showFooter", {
        get: function () {
            return this.getShowFooter();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "showHeader", {
        get: function () {
            return this.getShowHeader();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "popupHeaderTemplate", {
        get: function () {
            return this.getPopupHeaderTemplate();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "isOverlay", {
        get: function () {
            return this.model.displayMode === "overlay";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "styleClass", {
        get: function () {
            return this.getStyleClass().toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "cancelButtonText", {
        get: function () {
            return this.getLocalizationString("modalCancelButtonText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PopupBaseViewModel.prototype, "footerToolbar", {
        get: function () {
            if (!this.footerToolbarValue) {
                this.createFooterActionBar();
            }
            return this.footerToolbarValue;
        },
        enumerable: false,
        configurable: true
    });
    PopupBaseViewModel.prototype.onKeyDown = function (event) {
        if (event.key === "Tab" || event.keyCode === 9) {
            this.trapFocus(event);
        }
        else if (event.key === "Escape" || event.keyCode === 27) {
            this.hidePopup();
        }
    };
    PopupBaseViewModel.prototype.trapFocus = function (event) {
        var focusableElements = this.container.querySelectorAll(FOCUS_INPUT_SELECTOR);
        var firstFocusableElement = focusableElements[0];
        var lastFocusableElement = focusableElements[focusableElements.length - 1];
        if (event.shiftKey) {
            if (document.activeElement === firstFocusableElement) {
                lastFocusableElement.focus();
                event.preventDefault();
            }
        }
        else {
            if (document.activeElement === lastFocusableElement) {
                firstFocusableElement.focus();
                event.preventDefault();
            }
        }
    };
    PopupBaseViewModel.prototype.switchFocus = function () {
        if (this.isFocusedContent) {
            this.focusFirstInput();
        }
    };
    PopupBaseViewModel.prototype.updateOnShowing = function () {
        this.prevActiveElement = document.activeElement;
        if (this.isOverlay) {
            this.top = null;
            this.left = null;
            this.height = null;
            this.width = null;
            this.minWidth = null;
        }
        this.switchFocus();
    };
    PopupBaseViewModel.prototype.updateOnHiding = function () {
        this.prevActiveElement && this.prevActiveElement.focus();
    };
    PopupBaseViewModel.prototype.focusFirstInput = function () {
        var _this = this;
        setTimeout(function () {
            if (!_this.container)
                return;
            var el = _this.container.querySelector(_this.model.focusFirstInputSelector || FOCUS_INPUT_SELECTOR);
            if (!!el)
                el.focus();
            else
                _this.container.children[0].focus();
        }, 100);
    };
    PopupBaseViewModel.prototype.clickOutside = function () {
        this.hidePopup();
    };
    PopupBaseViewModel.prototype.cancel = function () {
        this.model.onCancel();
        this.hidePopup();
    };
    PopupBaseViewModel.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.unmountPopupContainer();
        this.container = undefined;
        this.model.onVisibilityChanged.clear();
        this.model.onRecalculatePosition.clear();
    };
    PopupBaseViewModel.prototype.initializePopupContainer = function () {
        if (!this.container) {
            var container = document.createElement("div");
            this.container = container;
        }
        document.body.appendChild(this.container);
    };
    PopupBaseViewModel.prototype.unmountPopupContainer = function () {
        this.container.remove();
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "0px" })
    ], PopupBaseViewModel.prototype, "top", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "0px" })
    ], PopupBaseViewModel.prototype, "left", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "auto" })
    ], PopupBaseViewModel.prototype, "height", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "auto" })
    ], PopupBaseViewModel.prototype, "width", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "auto" })
    ], PopupBaseViewModel.prototype, "minWidth", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
    ], PopupBaseViewModel.prototype, "isVisible", void 0);
    return PopupBaseViewModel;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));



/***/ }),

/***/ "./src/popup.ts":
/*!**********************!*\
  !*** ./src/popup.ts ***!
  \**********************/
/*! exports provided: PopupModel, createDialogOptions */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupModel", function() { return PopupModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDialogOptions", function() { return createDialogOptions; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};


var PopupModel = /** @class */ (function (_super) {
    __extends(PopupModel, _super);
    function PopupModel(contentComponentName, contentComponentData, verticalPosition, horizontalPosition, showPointer, isModal, onCancel, onApply, onHide, onShow, cssClass, title) {
        if (verticalPosition === void 0) { verticalPosition = "bottom"; }
        if (horizontalPosition === void 0) { horizontalPosition = "left"; }
        if (showPointer === void 0) { showPointer = true; }
        if (isModal === void 0) { isModal = false; }
        if (onCancel === void 0) { onCancel = function () { }; }
        if (onApply === void 0) { onApply = function () { return true; }; }
        if (onHide === void 0) { onHide = function () { }; }
        if (onShow === void 0) { onShow = function () { }; }
        if (cssClass === void 0) { cssClass = ""; }
        if (title === void 0) { title = ""; }
        var _this = _super.call(this) || this;
        _this.focusFirstInputSelector = "";
        _this.onVisibilityChanged = _this.addEvent();
        _this.onRecalculatePosition = _this.addEvent();
        _this.contentComponentName = contentComponentName;
        _this.contentComponentData = contentComponentData;
        _this.verticalPosition = verticalPosition;
        _this.horizontalPosition = horizontalPosition;
        _this.showPointer = showPointer;
        _this.isModal = isModal;
        _this.onCancel = onCancel;
        _this.onApply = onApply;
        _this.onHide = onHide;
        _this.onShow = onShow;
        _this.cssClass = cssClass;
        _this.title = title;
        return _this;
    }
    Object.defineProperty(PopupModel.prototype, "isVisible", {
        get: function () {
            return this.getPropertyValue("isVisible", false);
        },
        set: function (value) {
            if (this.isVisible === value) {
                return;
            }
            this.setPropertyValue("isVisible", value);
            this.onVisibilityChanged.fire(this, { model: this, isVisible: value });
            if (this.isVisible) {
                var innerModel = this.contentComponentData["model"];
                innerModel && innerModel.refresh && innerModel.refresh();
                this.onShow();
            }
            else {
                this.onHide();
            }
        },
        enumerable: false,
        configurable: true
    });
    PopupModel.prototype.toggleVisibility = function () {
        this.isVisible = !this.isVisible;
    };
    PopupModel.prototype.recalculatePosition = function (isResetHeight) {
        this.onRecalculatePosition.fire(this, { isResetHeight: isResetHeight });
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], PopupModel.prototype, "contentComponentName", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], PopupModel.prototype, "contentComponentData", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "bottom" })
    ], PopupModel.prototype, "verticalPosition", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "left" })
    ], PopupModel.prototype, "horizontalPosition", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
    ], PopupModel.prototype, "showPointer", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
    ], PopupModel.prototype, "isModal", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
    ], PopupModel.prototype, "isFocusedContent", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
    ], PopupModel.prototype, "onCancel", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { return true; } })
    ], PopupModel.prototype, "onApply", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
    ], PopupModel.prototype, "onHide", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
    ], PopupModel.prototype, "onShow", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "" })
    ], PopupModel.prototype, "cssClass", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "" })
    ], PopupModel.prototype, "title", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "popup" })
    ], PopupModel.prototype, "displayMode", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "flex" })
    ], PopupModel.prototype, "positionMode", void 0);
    return PopupModel;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));

function createDialogOptions(componentName, data, onApply, onCancel, onHide, onShow, cssClass, title, displayMode) {
    if (onHide === void 0) { onHide = function () { }; }
    if (onShow === void 0) { onShow = function () { }; }
    if (displayMode === void 0) { displayMode = "popup"; }
    return {
        componentName: componentName,
        data: data,
        onApply: onApply,
        onCancel: onCancel,
        onHide: onHide,
        onShow: onShow,
        cssClass: cssClass,
        title: title,
        displayMode: displayMode
    };
}


/***/ }),

/***/ "./src/question.ts":
/*!*************************!*\
  !*** ./src/question.ts ***!
  \*************************/
/*! exports provided: Question */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Question", function() { return Question; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _validator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./validator */ "./src/validator.ts");
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _questionCustomWidgets__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./questionCustomWidgets */ "./src/questionCustomWidgets.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _rendererFactory__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./rendererFactory */ "./src/rendererFactory.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};












/**
 * A base class for all questions.
 */
var Question = /** @class */ (function (_super) {
    __extends(Question, _super);
    function Question(name) {
        var _this = _super.call(this, name) || this;
        _this.customWidgetData = { isNeedRender: true };
        _this.isReadyValue = true;
        /**
         * An event that is raised when the question's ready state has changed (expressions are evaluated, choices are loaded from a web resource specified by the `choicesByUrl` property, etc.).
         *
         * Parameters:
         *
         * - `sender` - A survey that contains the question whose ready state has changed.
         * - `options.isReady` - A Boolean value that indicates whether the question is ready.
         * - `options.oldIsReady` - A Boolean value that indicates the previous ready state.
         */
        _this.onReadyChanged = _this.addEvent();
        _this.focusIn = function () {
            _this.survey.whenQuestionFocusIn(_this);
        };
        _this.isRunningValidatorsValue = false;
        _this.isValueChangedInSurvey = false;
        _this.allowNotifyValueChanged = true;
        _this.id = Question.getQuestionId();
        _this.onCreating();
        _this.createNewArray("validators", function (validator) {
            validator.errorOwner = _this;
        });
        _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
        _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
        _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
        _this.createLocalizableString("commentText", _this, true, "otherItemText");
        _this.locTitle.onGetDefaultTextCallback = function () {
            return _this.name;
        };
        _this.locTitle.storeDefaultText = true;
        _this.createLocalizableString("requiredErrorText", _this);
        _this.registerPropertyChangedHandlers(["width"], function () {
            _this.updateQuestionCss();
            if (!!_this.parent) {
                _this.parent.elementWidthChanged(_this);
            }
        });
        _this.registerPropertyChangedHandlers(["isRequired"], function () {
            _this.locTitle.strChanged();
            _this.clearCssClasses();
        });
        _this.registerPropertyChangedHandlers(["indent", "rightIndent"], function () {
            _this.onIndentChanged();
        });
        _this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], function () {
            _this.initCommentFromSurvey();
        });
        _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
        return _this;
    }
    Question.getQuestionId = function () {
        return "sq_" + Question.questionCounter++;
    };
    Question.prototype.isReadOnlyRenderDiv = function () {
        return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].readOnlyCommentRenderMode === "div";
    };
    Question.prototype.createLocTitleProperty = function () {
        var _this = this;
        var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
        locTitleValue.onGetTextCallback = function (text) {
            if (!text) {
                text = _this.name;
            }
            if (!_this.survey)
                return text;
            return _this.survey.getUpdatedQuestionTitle(_this, text);
        };
        this.locProcessedTitle = new _localizablestring__WEBPACK_IMPORTED_MODULE_5__["LocalizableString"](this, true);
        this.locProcessedTitle.sharedData = locTitleValue;
        return locTitleValue;
    };
    Question.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        if (live) {
            return !!this.parent ? this.parent.getSurvey(live) : null;
        }
        if (!!this.onGetSurvey)
            return this.onGetSurvey();
        return _super.prototype.getSurvey.call(this);
    };
    Question.prototype.getValueName = function () {
        if (!!this.valueName)
            return this.valueName.toString();
        return this.name;
    };
    Object.defineProperty(Question.prototype, "valueName", {
        /**
         * Specifies an object property that should store the question value.
         *
         * Refer to the [Merge Question Values](https://surveyjs.io/form-library/documentation/design-survey-merge-question-values) help topic for more information.
         */
        get: function () {
            return this.getPropertyValue("valueName", "");
        },
        set: function (val) {
            var oldValueName = this.getValueName();
            this.setPropertyValue("valueName", val);
            this.onValueNameChanged(oldValueName);
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.onValueNameChanged = function (oldValue) {
        if (!this.survey)
            return;
        this.survey.questionRenamed(this, this.name, !!oldValue ? oldValue : this.name);
        this.initDataFromSurvey();
    };
    Question.prototype.onNameChanged = function (oldValue) {
        this.locTitle.strChanged();
        if (!this.survey)
            return;
        this.survey.questionRenamed(this, oldValue, this.valueName ? this.valueName : oldValue);
    };
    Object.defineProperty(Question.prototype, "isReady", {
        get: function () {
            return this.isReadyValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "ariaRequired", {
        get: function () {
            return this.isRequired ? "true" : "false";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "ariaInvalid", {
        get: function () {
            return this.errors.length > 0 ? "true" : "false";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "ariaLabelledBy", {
        get: function () {
            if (this.hasTitle) {
                return this.ariaTitleId;
            }
            else {
                return null;
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "ariaDescribedBy", {
        get: function () {
            return this.errors.length > 0 ? this.id + "_errors" : null;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.choicesLoaded = function () { };
    Object.defineProperty(Question.prototype, "page", {
        /**
         * Returns a page to which the question belongs and allows you to move this question to a different page.
         */
        get: function () {
            return this.getPage(this.parent);
        },
        set: function (val) {
            this.setPage(this.parent, val);
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getPanel = function () {
        return null;
    };
    Question.prototype.delete = function () {
        if (!!this.parent) {
            this.removeSelfFromList(this.parent.elements);
        }
    };
    Object.defineProperty(Question.prototype, "isFlowLayout", {
        get: function () {
            return this.getLayoutType() === "flow";
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getLayoutType = function () {
        if (!!this.parent)
            return this.parent.getChildrenLayoutType();
        return "row";
    };
    Question.prototype.isLayoutTypeSupported = function (layoutType) {
        return layoutType !== "flow";
    };
    Object.defineProperty(Question.prototype, "visible", {
        /**
         * Gets or sets question visibility.
         *
         * If you want to display or hide a question based on a condition, specify the [`visibleIf`](https://surveyjs.io/form-library/documentation/question#visibleIf) property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see isVisible
         * @see visibleIf
         */
        get: function () {
            return this.getPropertyValue("visible", true);
        },
        set: function (val) {
            if (val == this.visible)
                return;
            this.setPropertyValue("visible", val);
            this.onVisibleChanged();
            this.notifySurveyVisibilityChanged();
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.onVisibleChanged = function () {
        this.setPropertyValue("isVisible", this.isVisible);
        if (!this.isVisible && this.errors && this.errors.length > 0) {
            this.errors = [];
        }
    };
    Object.defineProperty(Question.prototype, "useDisplayValuesInDynamicTexts", {
        /**
         * Specifies whether to use display names for question values in placeholders.
         *
         * Default value: `true`
         *
         * This property applies to questions whose values are defined as objects with the `value` and `text` properties (for example, [choice items](https://surveyjs.io/form-library/documentation/questionradiogroupmodel#choices) in Radiogroup, Checkbox, and Dropdown questions).
         *
         * You can use question values as placeholders in the following places:
         *
         * - Survey element titles and descriptions
         * - The [`expression`](https://surveyjs.io/form-library/documentation/questionexpressionmodel#expression) property of the [Expression](https://surveyjs.io/form-library/documentation/questionexpressionmodel) question
         * - The [`html`](https://surveyjs.io/form-library/documentation/questionhtmlmodel#html) property of the [HTML](https://surveyjs.io/form-library/documentation/questionhtmlmodel) question
         *
         * To use a question value as a placeholder, specify the question `name` in curly brackets: `{questionName}`. Refer to the following help topic for more information: [Dynamic Texts - Question Values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#question-values).
         */
        get: function () {
            return this.getPropertyValue("useDisplayValuesInDynamicTexts");
        },
        set: function (val) {
            this.setPropertyValue("useDisplayValuesInDynamicTexts", val);
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getUseDisplayValuesInDynamicTexts = function () { return this.useDisplayValuesInDynamicTexts; };
    Object.defineProperty(Question.prototype, "visibleIf", {
        /**
         * A Boolean expression. If it evaluates to `false`, this question becomes hidden.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
         * @see visible
         * @see isVisible
         */
        get: function () {
            return this.getPropertyValue("visibleIf", "");
        },
        set: function (val) {
            this.setPropertyValue("visibleIf", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "isVisible", {
        /**
         * Returns `true` if the question is visible or the survey is currently in design mode.
         *
         * If you want to display or hide a question based on a condition, specify the [`visibleIf`](https://surveyjs.io/form-library/documentation/question#visibleIf) property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see visibleIf
         * @see visible
         * @see isParentVisible
         */
        get: function () {
            if (this.survey && this.survey.areEmptyElementsHidden && this.isEmpty())
                return false;
            return this.visible || this.areInvisibleElementsShowing;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "visibleIndex", {
        /**
         * Returns the visible index of the question in the survey. It can be from 0 to all visible questions count - 1
         * The visibleIndex is -1 if the title is 'hidden' or hideNumber is true
         * @see titleLocation
         * @see hideNumber
         */
        get: function () {
            return this.getPropertyValue("visibleIndex", -1);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hideNumber", {
        /**
         * Hides the question number from the title and excludes the question from numbering.
         *
         * If you want to disable question numbering in the entire survey, set SurveyModel's `showQuestionNumbers` property to `false`.
         * @see SurveyModel.showQuestionNumbers
         */
        get: function () {
            return this.getPropertyValue("hideNumber");
        },
        set: function (val) {
            this.setPropertyValue("hideNumber", val);
            this.notifySurveyVisibilityChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "isAllowTitleLeft", {
        /**
         * Returns `true` if the question can display its title to the left of the input field.
         * @see titleLocation
         * @see getTitleLocation
         * @see hasTitle
         */
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Returns the question type.
     * Possible values:
     * - [*"boolean"*](https://surveyjs.io/Documentation/Library?id=questionbooleanmodel)
     * - [*"checkbox"*](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel)
     * - [*"comment"*](https://surveyjs.io/Documentation/Library?id=questioncommentmodel)
     * - [*"dropdown"*](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel)
     * - [*"tagbox"*](https://surveyjs.io/form-library/documentation/questiontagboxmodel)
     * - [*"expression"*](https://surveyjs.io/Documentation/Library?id=questionexpressionmodel)
     * - [*"file"*](https://surveyjs.io/Documentation/Library?id=questionfilemodel)
     * - [*"html"*](https://surveyjs.io/Documentation/Library?id=questionhtmlmodel)
     * - [*"image"*](https://surveyjs.io/Documentation/Library?id=questionimagemodel)
     * - [*"imagepicker"*](https://surveyjs.io/Documentation/Library?id=questionimagepickermodel)
     * - [*"matrix"*](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel)
     * - [*"matrixdropdown"*](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel)
     * - [*"matrixdynamic"*](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel)
     * - [*"multipletext"*](https://surveyjs.io/Documentation/Library?id=questionmultipletextmodel)
     * - [*"panel"*](https://surveyjs.io/Documentation/Library?id=panelmodel)
     * - [*"paneldynamic"*](https://surveyjs.io/Documentation/Library?id=questionpaneldynamicmodel)
     * - [*"radiogroup"*](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel)
     * - [*"rating"*](https://surveyjs.io/Documentation/Library?id=questionratingmodel)
     * - [*"ranking"*](https://surveyjs.io/Documentation/Library?id=questionrankingmodel)
     * - [*"signaturepad"*](https://surveyjs.io/Documentation/Library?id=questionsignaturepadmodel)
     * - [*"text"*](https://surveyjs.io/Documentation/Library?id=questiontextmodel)
     */
    Question.prototype.getType = function () {
        return "question";
    };
    Object.defineProperty(Question.prototype, "isQuestion", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.moveTo = function (container, insertBefore) {
        if (insertBefore === void 0) { insertBefore = null; }
        return this.moveToBase(this.parent, container, insertBefore);
    };
    Question.prototype.getProgressInfo = function () {
        if (!this.hasInput)
            return _super.prototype.getProgressInfo.call(this);
        return {
            questionCount: 1,
            answeredQuestionCount: !this.isEmpty() ? 1 : 0,
            requiredQuestionCount: this.isRequired ? 1 : 0,
            requiredAnsweredQuestionCount: !this.isEmpty() && this.isRequired ? 1 : 0,
        };
    };
    Question.prototype.runConditions = function () {
        if (this.data && !this.isLoadingFromJson) {
            if (!this.isDesignMode) {
                this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
            }
            this.locStrsChanged();
        }
    };
    Question.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value);
        if (!this.survey)
            return;
        this.survey.questionCreated(this);
        if (isLight !== true) {
            this.runConditions();
        }
    };
    Object.defineProperty(Question.prototype, "parent", {
        /**
         * Returns a survey element (panel or page) that contains the question and allows you to move this question to a different survey element.
         */
        get: function () {
            return this.getPropertyValue("parent", null);
        },
        set: function (val) {
            if (this.parent === val)
                return;
            this.delete();
            this.setPropertyValue("parent", val);
            this.updateQuestionCss();
            this.onParentChanged();
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.onParentChanged = function () { };
    Object.defineProperty(Question.prototype, "hasTitle", {
        /**
         * Returns `false` if the `titleLocation` property is set to `"hidden"` or if the question cannot have a title (for example, an [HTML](https://surveyjs.io/form-library/documentation/questionhtmlmodel) question).
         *
         * If the `title` property is `undefined` or set to an empty string, the `hasTitle` property returns `true`, because the question uses its `name` as a title in this case.
         * @see title
         * @see titleLocation
         */
        get: function () {
            return this.getTitleLocation() !== "hidden";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "titleLocation", {
        /**
         * Sets question title location relative to the input field. Overrides the `questionTitleLocation` property specified for the question's container (survey, page, or panel).
         *
         * Possible values:
         *
         * - `"default"` (default) - Inherits the setting from the `questionTitleLocation` property specified for the question's container.
         * - `"top"` - Displays the title above the input field.
         * - `"bottom"` - Displays the title below the input field.
         * - `"left"` - Displays the title to the left of the input field.
         * - `"hidden"` - Hides the question title.
         *
         * > NOTE: Certain question types (Matrix, Multiple Text) do not support the `"left"` value. For them, the `"top"` value is used.
         * @see SurveyModel.questionTitleLocation
         * @see getTitleLocation
         * @see isAllowTitleLeft
         */
        get: function () {
            return this.getPropertyValue("titleLocation");
        },
        set: function (value) {
            var isVisibilityChanged = this.titleLocation == "hidden" || value == "hidden";
            this.setPropertyValue("titleLocation", value.toLowerCase());
            this.updateQuestionCss();
            if (isVisibilityChanged) {
                this.notifySurveyVisibilityChanged();
            }
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getTitleOwner = function () { return this; };
    Question.prototype.getIsTitleRenderedAsString = function () { return this.titleLocation === "hidden"; };
    Question.prototype.notifySurveyVisibilityChanged = function () {
        if (!this.survey || this.isLoadingFromJson)
            return;
        this.survey.questionVisibilityChanged(this, this.isVisible);
        if (this.isClearValueOnHidden) {
            if (!this.visible) {
                this.clearValueIfInvisible();
            }
            if (this.isVisible) {
                this.updateValueWithDefaults();
            }
        }
    };
    /**
     * Returns title location calculated based on the question's `titleLocation` property and the `questionTitleLocation` property of the question's containers (survey, page, or panel).
     * @see titleLocation
     * @see SurveyModel.questionTitleLocation
     */
    Question.prototype.getTitleLocation = function () {
        if (this.isFlowLayout)
            return "hidden";
        var location = this.getTitleLocationCore();
        if (location === "left" && !this.isAllowTitleLeft)
            location = "top";
        return location;
    };
    Question.prototype.getTitleLocationCore = function () {
        if (this.titleLocation !== "default")
            return this.titleLocation;
        if (!!this.parent)
            return this.parent.getQuestionTitleLocation();
        if (!!this.survey)
            return this.survey.questionTitleLocation;
        return "top";
    };
    Object.defineProperty(Question.prototype, "hasTitleOnLeft", {
        get: function () {
            return this.hasTitle && this.getTitleLocation() === "left";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasTitleOnTop", {
        get: function () {
            return this.hasTitle && this.getTitleLocation() === "top";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasTitleOnBottom", {
        get: function () {
            return this.hasTitle && this.getTitleLocation() === "bottom";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasTitleOnLeftTop", {
        get: function () {
            if (!this.hasTitle)
                return false;
            var location = this.getTitleLocation();
            return location === "left" || location === "top";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "errorLocation", {
        get: function () {
            return this.survey ? this.survey.questionErrorLocation : "top";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasInput", {
        /**
         * Returns `false` if the question has no input fields ([HTML](https://surveyjs.io/form-library/documentation/questionhtmlmodel), [Image](https://surveyjs.io/form-library/documentation/questionimagemodel), and similar question types).
         * @see hasSingleInput
         */
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasSingleInput", {
        /**
         * Returns `false` if the question has no input fields ([HTML](https://surveyjs.io/form-library/documentation/questionhtmlmodel), [Image](https://surveyjs.io/form-library/documentation/questionimagemodel)) or has multiple input fields ([Matrix](https://surveyjs.io/form-library/documentation/questionmatrixmodel), [Multiple Text](https://surveyjs.io/form-library/documentation/questionmultipletextmodel)).
         * @see hasInput
         */
        get: function () {
            return this.hasInput;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "inputId", {
        get: function () {
            return this.id + "i";
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getDefaultTitleValue = function () { return this.name; };
    Question.prototype.getDefaultTitleTagName = function () {
        return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].titleTags.question;
    };
    Object.defineProperty(Question.prototype, "descriptionLocation", {
        /**
         * Specifies where to display a question description.
         *
         * Possible values:
         *
         * - `"default"` (default) - Inherits the setting from the Survey's [`questionDescriptionLocation`](https://surveyjs.io/form-library/documentation/surveymodel#questionDescriptionLocation) property.
         * - `"underTitle"` - Displays the description under the question title.
         * - `"underInput"` - Displays the description under the interactive area.
         * @see description
         * @see hasDescription
         */
        get: function () {
            return this.getPropertyValue("descriptionLocation");
        },
        set: function (val) {
            this.setPropertyValue("descriptionLocation", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasDescriptionUnderTitle", {
        get: function () {
            return this.getDescriptionLocation() == "underTitle";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasDescriptionUnderInput", {
        get: function () {
            return this.getDescriptionLocation() == "underInput";
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getDescriptionLocation = function () {
        if (this.descriptionLocation !== "default")
            return this.descriptionLocation;
        return !!this.survey
            ? this.survey.questionDescriptionLocation
            : "underTitle";
    };
    Question.prototype.needClickTitleFunction = function () {
        return _super.prototype.needClickTitleFunction.call(this) || this.hasInput;
    };
    Question.prototype.processTitleClick = function () {
        var _this = this;
        _super.prototype.processTitleClick.call(this);
        if (this.isCollapsed)
            return;
        setTimeout(function () {
            _this.focus();
        }, 1);
        return true;
    };
    Object.defineProperty(Question.prototype, "requiredErrorText", {
        /**
         * Specifies a custom error message for a required form field.
         * @see isRequired
         */
        get: function () {
            return this.getLocalizableStringText("requiredErrorText");
        },
        set: function (val) {
            this.setLocalizableStringText("requiredErrorText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "locRequiredErrorText", {
        get: function () {
            return this.getLocalizableString("requiredErrorText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "commentText", {
        /**
         * Specifies a caption displayed above the comment area. Applies when the `showCommentArea` property is `true`.
         * @see showCommentArea
         * @see comment
         */
        get: function () {
            return this.getLocalizableStringText("commentText");
        },
        set: function (val) {
            this.setLocalizableStringText("commentText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "locCommentText", {
        get: function () {
            return this.getLocalizableString("commentText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "commentPlaceHolder", {
        get: function () {
            return this.commentPlaceholder;
        },
        set: function (newValue) {
            this.commentPlaceholder = newValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "commentOrOtherPlaceholder", {
        get: function () {
            return this.otherPlaceholder || this.commentPlaceholder;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getAllErrors = function () {
        return this.errors.slice();
    };
    Question.prototype.getErrorByType = function (errorType) {
        for (var i = 0; i < this.errors.length; i++) {
            if (this.errors[i].getErrorType() === errorType)
                return this.errors[i];
        }
        return null;
    };
    Object.defineProperty(Question.prototype, "customWidget", {
        get: function () {
            if (!this.isCustomWidgetRequested && !this.customWidgetValue) {
                this.isCustomWidgetRequested = true;
                this.updateCustomWidget();
            }
            return this.customWidgetValue;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.updateCustomWidget = function () {
        this.customWidgetValue = _questionCustomWidgets__WEBPACK_IMPORTED_MODULE_7__["CustomWidgetCollection"].Instance.getCustomWidget(this);
    };
    Question.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        if (!!this.localeChangedCallback) {
            this.localeChangedCallback();
        }
    };
    Object.defineProperty(Question.prototype, "isCompositeQuestion", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.updateCommentElement = function () {
        if (this.commentElement && this.autoGrowComment)
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["increaseHeightByContent"])(this.commentElement);
    };
    Question.prototype.onCommentInput = function (event) {
        if (this.isInputTextUpdate) {
            if (event.target) {
                this.comment = event.target.value;
            }
        }
        else {
            this.updateCommentElement();
        }
    };
    Question.prototype.onCommentChange = function (event) {
        this.comment = event.target.value;
        if (this.comment !== event.target.value) {
            event.target.value = this.comment;
        }
    };
    Question.prototype.afterRenderQuestionElement = function (el) {
        if (!this.survey || !this.hasSingleInput)
            return;
        this.survey.afterRenderQuestionInput(this, el);
    };
    Question.prototype.afterRender = function (el) {
        if (!this.survey)
            return;
        this.survey.afterRenderQuestion(this, el);
        if (!!this.afterRenderQuestionCallback) {
            this.afterRenderQuestionCallback(this, el);
        }
        if (this.supportComment() || this.supportOther()) {
            this.commentElement = (document.getElementById(this.id) && document.getElementById(this.id).querySelector("textarea")) || null;
            this.updateCommentElement();
        }
        this.checkForResponsiveness(el);
    };
    Question.prototype.beforeDestroyQuestionElement = function (el) { };
    Object.defineProperty(Question.prototype, "processedTitle", {
        get: function () {
            var res = this.locProcessedTitle.textOrHtml;
            return res ? res : this.name;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "fullTitle", {
        get: function () {
            return this.locTitle.renderedHtml;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "titlePattern", {
        get: function () {
            return !!this.survey ? this.survey.questionTitlePattern : "numTitleRequire";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "isRequireTextOnStart", {
        get: function () {
            return this.isRequired && this.titlePattern == "requireNumTitle";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "isRequireTextBeforeTitle", {
        get: function () {
            return this.isRequired && this.titlePattern == "numRequireTitle" && this.requiredText !== "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "isRequireTextAfterTitle", {
        get: function () {
            return this.isRequired && this.titlePattern == "numTitleRequire" && this.requiredText !== "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "startWithNewLine", {
        /**
         * Disable this property if you want to render the current question on the same line or row with the previous question or panel.
         */
        get: function () {
            return this.getPropertyValue("startWithNewLine");
        },
        set: function (val) {
            if (this.startWithNewLine == val)
                return;
            this.setPropertyValue("startWithNewLine", val);
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.calcCssClasses = function (css) {
        var classes = { error: {} };
        this.copyCssClasses(classes, css.question);
        this.copyCssClasses(classes.error, css.error);
        this.updateCssClasses(classes, css);
        if (this.survey) {
            this.survey.updateQuestionCssClasses(this, classes);
        }
        return classes;
    };
    Object.defineProperty(Question.prototype, "cssRoot", {
        get: function () {
            this.ensureElementCss();
            return this.getPropertyValue("cssRoot", "");
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.setCssRoot = function (val) {
        this.setPropertyValue("cssRoot", val);
    };
    Question.prototype.getCssRoot = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.isFlowLayout && !this.isDesignMode
            ? cssClasses.flowRoot
            : cssClasses.mainRoot)
            .append(cssClasses.titleLeftRoot, !this.isFlowLayout && this.hasTitleOnLeft)
            .append(cssClasses.hasError, this.errors.length > 0)
            .append(cssClasses.small, !this.width)
            .append(cssClasses.answered, this.isAnswered)
            .append(cssClasses.expanded, !!this.isExpanded)
            .append(cssClasses.collapsed, !!this.isCollapsed)
            .append(cssClasses.withFrame, this.hasFrameV2)
            .append(cssClasses.nested, (this.hasParent || !this.isSingleInRow) && this.isDefaultV2Theme)
            .toString();
    };
    Object.defineProperty(Question.prototype, "cssHeader", {
        get: function () {
            this.ensureElementCss();
            return this.getPropertyValue("cssHeader", "");
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.setCssHeader = function (val) {
        this.setPropertyValue("cssHeader", val);
    };
    Question.prototype.getCssHeader = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(cssClasses.header)
            .append(cssClasses.headerTop, this.hasTitleOnTop)
            .append(cssClasses.headerLeft, this.hasTitleOnLeft)
            .append(cssClasses.headerBottom, this.hasTitleOnBottom)
            .toString();
    };
    Object.defineProperty(Question.prototype, "cssContent", {
        get: function () {
            this.ensureElementCss();
            return this.getPropertyValue("cssContent", "");
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.setCssContent = function (val) {
        this.setPropertyValue("cssContent", val);
    };
    Question.prototype.getCssContent = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(cssClasses.content)
            .append(cssClasses.contentLeft, this.hasTitleOnLeft)
            .toString();
    };
    Object.defineProperty(Question.prototype, "cssTitle", {
        get: function () {
            this.ensureElementCss();
            return this.getPropertyValue("cssTitle", "");
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.setCssTitle = function (val) {
        this.setPropertyValue("cssTitle", val);
    };
    Question.prototype.getCssTitle = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(cssClasses.title)
            .append(cssClasses.titleExpandable, this.state !== "default")
            .append(cssClasses.titleExpanded, this.isExpanded)
            .append(cssClasses.titleCollapsed, this.isCollapsed)
            .append(cssClasses.titleDisabled, this.isReadOnly)
            .append(cssClasses.titleOnError, this.containsErrors)
            .append(cssClasses.titleOnAnswer, !this.containsErrors && this.isAnswered)
            .toString();
    };
    Object.defineProperty(Question.prototype, "cssDescription", {
        get: function () {
            this.ensureElementCss();
            return this.cssClasses.description;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.setCssDescription = function (val) {
        this.setPropertyValue("cssDescription", "");
    };
    Question.prototype.getCssDescription = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.cssClasses.descriptionUnderInput, this.hasDescriptionUnderInput)
            .append(this.cssClasses.description, this.hasDescriptionUnderTitle)
            .toString();
    };
    Question.prototype.getIsErrorsModeTooltip = function () {
        return _super.prototype.getIsErrorsModeTooltip.call(this) && !this.customWidget;
    };
    Question.prototype.showErrorOnCore = function (location) {
        return !this.isErrorsModeTooltip && !this.showErrorsAboveQuestion && !this.showErrorsBelowQuestion && this.errorLocation === location;
    };
    Object.defineProperty(Question.prototype, "showErrorOnTop", {
        get: function () {
            return this.showErrorOnCore("top");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "showErrorOnBottom", {
        get: function () {
            return this.showErrorOnCore("bottom");
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getIsTooltipErrorSupportedByParent = function () {
        if (this.parentQuestion) {
            return this.parentQuestion.getIsTooltipErrorInsideSupported();
        }
        else {
            return _super.prototype.getIsTooltipErrorSupportedByParent.call(this);
        }
    };
    Object.defineProperty(Question.prototype, "showErrorsOutsideQuestion", {
        get: function () {
            return this.isDefaultV2Theme && !(this.hasParent && this.getIsTooltipErrorSupportedByParent());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "showErrorsAboveQuestion", {
        get: function () {
            return this.showErrorsOutsideQuestion && this.errorLocation === "top";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "showErrorsBelowQuestion", {
        get: function () {
            return this.showErrorsOutsideQuestion && this.errorLocation === "bottom";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "cssError", {
        get: function () {
            this.ensureElementCss();
            return this.getPropertyValue("cssError", "");
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.setCssError = function (val) {
        this.setPropertyValue("cssError", val);
    };
    Question.prototype.getCssError = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(cssClasses.error.root)
            .append(cssClasses.error.outsideQuestion, this.showErrorsBelowQuestion || this.showErrorsAboveQuestion)
            .append(cssClasses.error.belowQuestion, this.showErrorsBelowQuestion)
            .append(cssClasses.error.aboveQuestion, this.showErrorsAboveQuestion)
            .append(cssClasses.error.tooltip, this.isErrorsModeTooltip)
            .append(cssClasses.error.locationTop, this.showErrorOnTop)
            .append(cssClasses.error.locationBottom, this.showErrorOnBottom)
            .toString();
    };
    Question.prototype.getRootCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.cssRoot)
            .append(this.cssClasses.disabled, this.isReadOnly)
            .append(this.cssClasses.invisible, !this.isDesignMode && this.areInvisibleElementsShowing && !this.visible)
            .toString();
    };
    Question.prototype.updateElementCss = function (reNew) {
        _super.prototype.updateElementCss.call(this, reNew);
        if (reNew) {
            this.updateQuestionCss(true);
        }
        this.onIndentChanged();
    };
    Question.prototype.updateQuestionCss = function (reNew) {
        if (this.isLoadingFromJson ||
            !this.survey ||
            (reNew !== true && !this.cssClassesValue))
            return;
        this.updateElementCssCore(this.cssClasses);
    };
    Question.prototype.ensureElementCss = function () {
        if (!this.cssClassesValue) {
            this.updateQuestionCss(true);
        }
    };
    Question.prototype.updateElementCssCore = function (cssClasses) {
        this.setCssRoot(this.getCssRoot(cssClasses));
        this.setCssHeader(this.getCssHeader(cssClasses));
        this.setCssContent(this.getCssContent(cssClasses));
        this.setCssTitle(this.getCssTitle(cssClasses));
        this.setCssDescription(this.getCssDescription(cssClasses));
        this.setCssError(this.getCssError(cssClasses));
    };
    Question.prototype.updateCssClasses = function (res, css) {
        if (!css.question)
            return;
        var objCss = css[this.getCssType()];
        var titleBuilder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]().append(res.title)
            .append(css.question.titleRequired, this.isRequired);
        res.title = titleBuilder.toString();
        var rootBuilder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]().append(res.root)
            .append(objCss, this.isRequired && !!css.question.required);
        if (objCss === undefined || objCss === null) {
            res.root = rootBuilder.toString();
        }
        else if (typeof objCss === "string" || objCss instanceof String) {
            res.root = rootBuilder.append(objCss.toString()).toString();
        }
        else {
            res.root = rootBuilder.toString();
            for (var key in objCss) {
                res[key] = objCss[key];
            }
        }
    };
    Question.prototype.getCssType = function () {
        return this.getType();
    };
    Object.defineProperty(Question.prototype, "renderCssRoot", {
        get: function () {
            return this.cssClasses.root || undefined;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.onIndentChanged = function () {
        this.paddingLeft = this.getIndentSize(this.indent);
        this.paddingRight = this.getIndentSize(this.rightIndent);
    };
    Question.prototype.getIndentSize = function (indent) {
        if (indent < 1 || !this.getSurvey() || !this.cssClasses || !this.cssClasses.indent)
            return "";
        return indent * this.cssClasses.indent + "px";
    };
    /**
     * Moves focus to the input field of this question.
     * @param onError Pass `true` if you want to focus an input field with the first validation error. Default value: `false` (focuses the first input field). Applies to question types with multiple input fields.
     */
    Question.prototype.focus = function (onError) {
        if (onError === void 0) { onError = false; }
        if (this.isDesignMode)
            return;
        if (!!this.survey) {
            this.expandAllPanels(this.parent);
            this.survey.scrollElementToTop(this, this, null, this.id);
        }
        var id = !onError
            ? this.getFirstInputElementId()
            : this.getFirstErrorInputElementId();
        if (_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].FocusElement(id)) {
            this.fireCallback(this.focusCallback);
        }
    };
    Question.prototype.expandAllPanels = function (panel) {
        if (!!panel && !!panel.parent) {
            if (panel.isCollapsed) {
                panel.expand();
            }
            this.expandAllPanels(panel.parent);
        }
    };
    Question.prototype.fireCallback = function (callback) {
        if (callback)
            callback();
    };
    Question.prototype.getOthersMaxLength = function () {
        if (!this.survey)
            return null;
        return this.survey.maxOthersLength > 0 ? this.survey.maxOthersLength : null;
    };
    Question.prototype.onCreating = function () { };
    Question.prototype.getFirstQuestionToFocus = function (withError) {
        return this.hasInput && (!withError || this.currentErrorCount > 0) ? this : null;
    };
    Question.prototype.getFirstInputElementId = function () {
        return this.inputId;
    };
    Question.prototype.getFirstErrorInputElementId = function () {
        return this.getFirstInputElementId();
    };
    Question.prototype.getProcessedTextValue = function (textValue) {
        var name = textValue.name.toLocaleLowerCase();
        textValue.isExists =
            Object.keys(Question.TextPreprocessorValuesMap).indexOf(name) !== -1 ||
                this[textValue.name] !== undefined;
        textValue.value = this[Question.TextPreprocessorValuesMap[name] || textValue.name];
    };
    Question.prototype.supportComment = function () {
        return false;
    };
    Question.prototype.supportOther = function () {
        return false;
    };
    Object.defineProperty(Question.prototype, "isRequired", {
        /**
         * Makes the question required. If a respondent skips a required question, the survey displays a validation error.
         * @see requiredIf
         * @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation)
         */
        get: function () {
            return this.getPropertyValue("isRequired");
        },
        set: function (val) {
            this.setPropertyValue("isRequired", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "requiredIf", {
        /**
         * A Boolean expression. If it evaluates to `true`, this question becomes required.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
         * @see isRequired
         */
        get: function () {
            return this.getPropertyValue("requiredIf", "");
        },
        set: function (val) {
            this.setPropertyValue("requiredIf", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "showCommentArea", {
        /**
         * Specifies whether to display a comment area. Incompatible with the `showOtherItem` property.
         * @see comment
         * @see commentText
         * @see showOtherItem
         */
        get: function () {
            return this.getPropertyValue("showCommentArea", false);
        },
        set: function (val) {
            if (!this.supportComment())
                return;
            this.setPropertyValue("showCommentArea", val);
            if (this.showCommentArea)
                this.hasOther = false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasComment", {
        get: function () {
            return this.showCommentArea;
        },
        set: function (val) {
            this.showCommentArea = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "id", {
        /**
         * A value to assign to the `id` attribute of the rendered HTML element. A default `id` is generated automatically.
         */
        get: function () {
            return this.getPropertyValue("id");
        },
        set: function (val) {
            this.setPropertyValue("id", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "ariaTitleId", {
        get: function () {
            return this.id + "_ariaTitle";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "ariaRole", {
        get: function () {
            return "textbox";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "showOtherItem", {
        /**
         * Specifies whether to display the "Other" choice item. Incompatible with the `showCommentArea` property.
         *
         * @see otherText
         * @see otherItem
         * @see otherErrorText
         * @see showCommentArea
         */
        get: function () {
            return this.getPropertyValue("showOtherItem", false);
        },
        set: function (val) {
            if (!this.supportOther() || this.showOtherItem == val)
                return;
            this.setPropertyValue("showOtherItem", val);
            if (this.showOtherItem)
                this.hasComment = false;
            this.hasOtherChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "hasOther", {
        get: function () {
            return this.showOtherItem;
        },
        set: function (val) {
            this.showOtherItem = val;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.hasOtherChanged = function () { };
    Object.defineProperty(Question.prototype, "requireUpdateCommentValue", {
        get: function () {
            return this.hasComment || this.hasOther;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "isReadOnly", {
        get: function () {
            var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
            var isPareQuestionReadOnly = !!this.parentQuestion && this.parentQuestion.isReadOnly;
            var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
            return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "isInputReadOnly", {
        get: function () {
            var isDesignModeV2 = _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].supportCreatorV2 && this.isDesignMode;
            return this.isReadOnly || isDesignModeV2;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "renderedInputReadOnly", {
        get: function () {
            return this.isInputReadOnly ? "" : undefined;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "renderedInputDisabled", {
        get: function () {
            return this.isInputReadOnly ? "" : undefined;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.onReadOnlyChanged = function () {
        this.setPropertyValue("isInputReadOnly", this.isInputReadOnly);
        _super.prototype.onReadOnlyChanged.call(this);
    };
    Object.defineProperty(Question.prototype, "enableIf", {
        /**
         * A Boolean expression. If it evaluates to `false`, this question becomes read-only.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
         * @see readOnly
         * @see isReadOnly
         */
        get: function () {
            return this.getPropertyValue("enableIf", "");
        },
        set: function (val) {
            this.setPropertyValue("enableIf", val);
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.surveyChoiceItemVisibilityChange = function () { };
    Question.prototype.runCondition = function (values, properties) {
        if (this.isDesignMode)
            return;
        if (!properties)
            properties = {};
        properties["question"] = this;
        this.runConditionCore(values, properties);
        if (!this.isValueChangedDirectly) {
            this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
            this.runDefaultValueExpression(this.defaultValueRunner, values, properties);
        }
    };
    Object.defineProperty(Question.prototype, "no", {
        /**
         * A question number or letter (depends on the `questionStartIndex` property of the question container (panel, page, or survey)).
         *
         * When the question number, title, or the entire question is invisible, this property returns an empty string.
         * @see SurveyModel.questionStartIndex
         * @see hideNumber
         * @see titleLocation
         * @see visibleIf
         */
        get: function () {
            return this.getPropertyValue("no");
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.calcNo = function () {
        if (!this.hasTitle || this.hideNumber)
            return "";
        var no = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getNumberByIndex(this.visibleIndex, this.getStartIndex());
        if (!!this.survey) {
            no = this.survey.getUpdatedQuestionNo(this, no);
        }
        return no;
    };
    Question.prototype.getStartIndex = function () {
        if (!!this.parent)
            return this.parent.getQuestionStartIndex();
        if (!!this.survey)
            return this.survey.questionStartIndex;
        return "";
    };
    Question.prototype.onSurveyLoad = function () {
        this.fireCallback(this.surveyLoadCallback);
        this.updateValueWithDefaults();
        if (this.isEmpty()) {
            this.initDataFromSurvey();
        }
    };
    Question.prototype.onSetData = function () {
        _super.prototype.onSetData.call(this);
        if (!this.survey)
            return;
        this.initDataFromSurvey();
        this.onSurveyValueChanged(this.value);
        this.updateValueWithDefaults();
        this.onIndentChanged();
        this.updateQuestionCss();
        this.updateIsAnswered();
    };
    Question.prototype.initDataFromSurvey = function () {
        if (!!this.data) {
            var val = this.data.getValue(this.getValueName());
            if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(val) || !this.isLoadingFromJson) {
                this.updateValueFromSurvey(val);
            }
            this.initCommentFromSurvey();
        }
    };
    Question.prototype.initCommentFromSurvey = function () {
        if (!!this.data && this.requireUpdateCommentValue) {
            this.updateCommentFromSurvey(this.data.getComment(this.getValueName()));
        }
        else {
            this.updateCommentFromSurvey("");
        }
    };
    Question.prototype.runExpression = function (expression) {
        if (!this.survey || !expression)
            return undefined;
        return this.survey.runExpression(expression);
    };
    Object.defineProperty(Question.prototype, "autoGrowComment", {
        get: function () {
            return this.survey && this.survey.autoGrowComment;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "questionValue", {
        get: function () {
            return this.getPropertyValue("value");
        },
        set: function (val) {
            this.setPropertyValue("value", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "questionComment", {
        get: function () {
            return this.getPropertyValue("comment");
        },
        set: function (val) {
            this.setPropertyValue("comment", val);
            this.fireCallback(this.commentChangedCallback);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "value", {
        /**
         * Gets or sets the question value.
         * @see SurveyModel.setValue
         * @see SurveyModel.getValue
         */
        get: function () {
            return this.getValueCore();
        },
        set: function (newValue) {
            this.setNewValue(newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "valueForSurvey", {
        get: function () {
            if (!!this.valueToDataCallback) {
                return this.valueToDataCallback(this.value);
            }
            return this.value;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Sets the question's `value` and `comment` properties to `undefined`.
     * @see value
     * @see comment
     */
    Question.prototype.clearValue = function () {
        if (this.value !== undefined) {
            this.value = undefined;
        }
        if (!!this.comment) {
            this.comment = undefined;
        }
    };
    Question.prototype.unbindValue = function () {
        this.clearValue();
    };
    Question.prototype.createValueCopy = function () {
        return this.getUnbindValue(this.value);
    };
    Question.prototype.getUnbindValue = function (value) {
        if (this.isValueSurveyElement(value))
            return value;
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getUnbindValue(value);
    };
    Question.prototype.isValueSurveyElement = function (val) {
        if (!val)
            return false;
        if (Array.isArray(val))
            return val.length > 0 ? this.isValueSurveyElement(val[0]) : false;
        return !!val.getType && !!val.onPropertyChanged;
    };
    Question.prototype.canClearValueAsInvisible = function () {
        if (this.isVisible && this.isParentVisible)
            return false;
        if (!!this.page && this.page.isStarted)
            return false;
        if (!this.survey || !this.valueName)
            return true;
        return !this.survey.hasVisibleQuestionByValueName(this.valueName);
    };
    Object.defineProperty(Question.prototype, "isParentVisible", {
        /**
         * Returns `true` if a parent element (page or panel) is visible.
         */
        get: function () {
            var parent = this.parent;
            while (parent) {
                if (!parent.isVisible)
                    return false;
                parent = parent.parent;
            }
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.clearValueIfInvisible = function (reason) {
        if (reason === void 0) { reason = "onHidden"; }
        if (this.clearIfInvisible === "none")
            return;
        if (reason === "onHidden" && this.clearIfInvisible === "onComplete")
            return;
        if (reason === "none" && (this.clearIfInvisible === "default" || this.clearIfInvisible === "none"))
            return;
        this.clearValueIfInvisibleCore();
    };
    Question.prototype.clearValueIfInvisibleCore = function () {
        if (this.canClearValueAsInvisible()) {
            this.clearValue();
        }
    };
    Object.defineProperty(Question.prototype, "clearIfInvisible", {
        /**
         * Specifies when to clear the question value if the question becomes invisible.
         *
         * Possible values:
         *
         * - `"default"` (default) - Inherits the setting from the Survey's [`clearInvisibleValues`](https://surveyjs.io/form-library/documentation/surveymodel#clearInvisibleValues) property.
         * - `"onHidden"` - Clears the value when the question becomes invisible. If a question is invisible on startup and has an initial value, this value will be cleared when the survey is complete.
         * - `"onComplete"` - Clears the value when the survey is complete.
         * - `"none"` - Never clears the value of an invisible question.
         * @see SurveyModel.clearInvisibleValues
         * @see visible
         * @see SurveyModel.onComplete
         */
        get: function () {
            return this.getPropertyValue("clearIfInvisible");
        },
        set: function (val) {
            this.setPropertyValue("clearIfInvisible", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "displayValue", {
        get: function () {
            if (this.isLoadingFromJson)
                return "";
            return this.getDisplayValue(true);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Returns a display text that corresponds to the question value. For example, if you call this method for a Dropdown question, it returns an item text instead of an item value.
     * @param keysAsText Applies when the question value is an object (in Matrix, Multiple Text, and similar questions). Pass `true` if not only values in the object should be display texts, but also keys. Default value: `false`.
     * @param value Specify this parameter to get a display text for a specific value, not for the current question value. If the question value is an object, this parameter should be a similar object.
     */
    Question.prototype.getDisplayValue = function (keysAsText, value) {
        if (value === void 0) { value = undefined; }
        var res = this.calcDisplayValue(keysAsText, value);
        return !!this.displayValueCallback ? this.displayValueCallback(res) : res;
    };
    Question.prototype.calcDisplayValue = function (keysAsText, value) {
        if (value === void 0) { value = undefined; }
        if (this.customWidget) {
            var res = this.customWidget.getDisplayValue(this, value);
            if (res)
                return res;
        }
        value = value == undefined ? this.createValueCopy() : value;
        if (this.isValueEmpty(value))
            return this.getDisplayValueEmpty();
        return this.getDisplayValueCore(keysAsText, value);
    };
    Question.prototype.getDisplayValueCore = function (keyAsText, value) {
        return value;
    };
    Question.prototype.getDisplayValueEmpty = function () {
        return "";
    };
    Object.defineProperty(Question.prototype, "defaultValue", {
        /**
         * A default value for the question. Ignored for question types that cannot have a [value](https://surveyjs.io/form-library/documentation/question#value) (for example, HTML).
         *
         * The default value is used as a question value in the following cases:
         *
         * - While the survey is being loaded from JSON.
         * - The question is just added to the survey and does not yet have an answer.
         * - The respondent left the answer empty.
         * @see defaultValueExpression
         */
        get: function () {
            return this.getPropertyValue("defaultValue");
        },
        set: function (val) {
            if (this.isValueExpression(val)) {
                this.defaultValueExpression = val.substring(1);
                return;
            }
            this.setPropertyValue("defaultValue", this.convertDefaultValue(val));
            this.updateValueWithDefaults();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "defaultValueExpression", {
        /**
         * An expression used to calculate the [defaultValue](https://surveyjs.io/form-library/documentation/question#defaultValue).
         *
         * This expression applies until the question [value](https://surveyjs.io/form-library/documentation/question#value) is specified by an end user or programmatically.
         *
         * An expression can reference other questions as follows:
         *
         * - `{other_question_name}`
         * - `{panel.other_question_name}` (to access questions inside the same dynamic panel)
         * - `{row.other_question_name}` (to access questions inside the same dynamic matrix or multi-column dropdown)
         *
         * An expression can also include built-in and custom functions for advanced calculations. For example, if the `defaultValue` should be today's date, set the `defaultValueExpression` to `"today()"`, and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: [Built-In Functions](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#built-in-functions).
         * @see defaultValue
         */
        get: function () {
            return this.getPropertyValue("defaultValueExpression");
        },
        set: function (val) {
            this.setPropertyValue("defaultValueExpression", val);
            this.defaultValueRunner = undefined;
            this.updateValueWithDefaults();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "resizeStyle", {
        get: function () {
            return this.autoGrowComment ? "none" : "both";
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Returns the question value as an object in which the question name, title, value, and other parameters are stored as individual properties.
     *
     * If the question can have more than one value (Matrix, Multiple Text), the object enables the `isNode` flag and stores information about these values in the `data` property. Refer to the following help topic for more information: [Access Full Survey Results](https://surveyjs.io/form-library/documentation/handle-survey-results-access#access-full-survey-results).
     *
     * Pass an object with the `includeEmpty` property set to `false` if you want to skip empty answers.
     */
    Question.prototype.getPlainData = function (options) {
        var _this = this;
        if (!options) {
            options = { includeEmpty: true, includeQuestionTypes: false };
        }
        if (options.includeEmpty || !this.isEmpty()) {
            var questionPlainData = {
                name: this.name,
                title: this.locTitle.renderedHtml,
                value: this.value,
                displayValue: this.displayValue,
                isNode: false,
                getString: function (val) {
                    return typeof val === "object" ? JSON.stringify(val) : val;
                },
            };
            if (options.includeQuestionTypes === true) {
                questionPlainData.questionType = this.getType();
            }
            (options.calculations || []).forEach(function (calculation) {
                questionPlainData[calculation.propertyName] = _this[calculation.propertyName];
            });
            if (this.hasComment) {
                questionPlainData.isNode = true;
                questionPlainData.data = [
                    {
                        name: 0,
                        isComment: true,
                        title: "Comment",
                        value: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].commentPrefix,
                        displayValue: this.comment,
                        getString: function (val) {
                            return typeof val === "object" ? JSON.stringify(val) : val;
                        },
                        isNode: false,
                    },
                ];
            }
            return questionPlainData;
        }
        return undefined;
    };
    Object.defineProperty(Question.prototype, "correctAnswer", {
        /**
         * A correct answer to this question. Specify this property if you want to [create a quiz](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
         * @see SurveyModel.getCorrectAnswerCount
         * @see SurveyModel.getInCorrectAnswerCount
         */
        get: function () {
            return this.getPropertyValue("correctAnswer");
        },
        set: function (val) {
            this.setPropertyValue("correctAnswer", this.convertDefaultValue(val));
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.convertDefaultValue = function (val) {
        return val;
    };
    Object.defineProperty(Question.prototype, "quizQuestionCount", {
        /**
         * The number of quiz questions. A question counts if it is visible, has an input field, and specifies `correctAnswer`.
         * @see [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz)
         * @see correctAnswer
         * @see SurveyModel.getQuizQuestions
         */
        get: function () {
            if (this.isVisible &&
                this.hasInput &&
                !this.isValueEmpty(this.correctAnswer))
                return this.getQuizQuestionCount();
            return 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "correctAnswerCount", {
        get: function () {
            if (!this.isEmpty() && !this.isValueEmpty(this.correctAnswer))
                return this.getCorrectAnswerCount();
            return 0;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getQuizQuestionCount = function () {
        return 1;
    };
    Question.prototype.getCorrectAnswerCount = function () {
        return this.isTwoValueEquals(this.value, this.correctAnswer, !_settings__WEBPACK_IMPORTED_MODULE_8__["settings"].comparator.caseSensitive, true)
            ? 1
            : 0;
    };
    Question.prototype.isAnswerCorrect = function () {
        return this.correctAnswerCount == this.quizQuestionCount;
    };
    Question.prototype.updateValueWithDefaults = function () {
        if (this.isLoadingFromJson || (!this.isDesignMode && this.isDefaultValueEmpty()))
            return;
        if (!this.isDesignMode && !this.isEmpty())
            return;
        if (this.isEmpty() && this.isDefaultValueEmpty())
            return;
        if (this.isClearValueOnHidden && !this.isVisible)
            return;
        if (this.isDesignMode && this.isContentElement && this.isDefaultValueEmpty())
            return;
        this.setDefaultValue();
    };
    Object.defineProperty(Question.prototype, "isClearValueOnHidden", {
        get: function () {
            if (this.clearIfInvisible === "none" || this.clearIfInvisible === "onComplete")
                return false;
            if (this.clearIfInvisible === "onHidden")
                return true;
            return !!this.survey && this.survey.isClearValueOnHidden;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getQuestionFromArray = function (name, index) {
        return null;
    };
    Question.prototype.getDefaultValue = function () {
        return this.defaultValue;
    };
    Question.prototype.isDefaultValueEmpty = function () {
        return !this.defaultValueExpression && this.isValueEmpty(this.defaultValue);
    };
    Question.prototype.getDefaultRunner = function (runner, expression) {
        if (!runner && !!expression) {
            runner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](expression);
        }
        if (!!runner) {
            runner.expression = expression;
        }
        return runner;
    };
    Question.prototype.setDefaultValue = function () {
        var _this = this;
        this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
        this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) {
            _this.value = val;
        });
    };
    Question.prototype.isValueExpression = function (val) {
        return !!val && typeof val == "string" && val.length > 0 && val[0] == "=";
    };
    Question.prototype.setValueAndRunExpression = function (runner, defaultValue, setFunc, values, properties) {
        var _this = this;
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        var func = function (val) {
            _this.runExpressionSetValue(val, setFunc);
        };
        if (!this.runDefaultValueExpression(runner, values, properties, func)) {
            func(defaultValue);
        }
    };
    Question.prototype.runExpressionSetValue = function (val, setFunc) {
        setFunc(_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(val));
    };
    Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
        var _this = this;
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        if (!runner || !this.data)
            return false;
        if (!setFunc) {
            setFunc = function (val) {
                _this.runExpressionSetValue(val, function (val) { _this.value = val; });
            };
        }
        if (!values)
            values = this.data.getFilteredValues();
        if (!properties)
            properties = this.data.getFilteredProperties();
        if (!!runner && runner.canRun) {
            runner.onRunComplete = function (res) {
                if (res == undefined)
                    res = _this.defaultValue;
                _this.isChangingViaDefaultValue = true;
                setFunc(res);
                _this.isChangingViaDefaultValue = false;
            };
            runner.run(values, properties);
        }
        return true;
    };
    Object.defineProperty(Question.prototype, "comment", {
        /**
         * A comment to the selected question value. Enable the `showCommentArea` property to allow users to leave comments.
         * @see showCommentArea
         * @see commentText
         */
        get: function () {
            return this.getQuestionComment();
        },
        set: function (newValue) {
            if (!!newValue) {
                var trimmedValue = newValue.toString().trim();
                if (trimmedValue !== newValue) {
                    newValue = trimmedValue;
                    if (newValue === this.comment) {
                        this.setPropertyValueDirectly("comment", newValue);
                    }
                }
            }
            if (this.comment == newValue)
                return;
            this.setQuestionComment(newValue);
            this.updateCommentElement();
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getQuestionComment = function () {
        return this.questionComment;
    };
    Question.prototype.setQuestionComment = function (newValue) {
        this.setNewComment(newValue);
    };
    /**
     * Returns `true` if the question value is an empty string, array, or object or if it equals `undefined` or `null`.
     */
    Question.prototype.isEmpty = function () {
        return this.isValueEmpty(this.value);
    };
    Object.defineProperty(Question.prototype, "isAnswered", {
        get: function () {
            return this.getPropertyValue("isAnswered");
        },
        set: function (val) {
            this.setPropertyValue("isAnswered", val);
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.updateIsAnswered = function () {
        var oldVal = this.isAnswered;
        this.setPropertyValue("isAnswered", this.getIsAnswered());
        if (oldVal !== this.isAnswered) {
            this.updateQuestionCss();
        }
    };
    Question.prototype.getIsAnswered = function () {
        return !this.isEmpty();
    };
    Object.defineProperty(Question.prototype, "validators", {
        /**
         * Question validators.
         * @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation)
         */
        get: function () {
            return this.getPropertyValue("validators");
        },
        set: function (val) {
            this.setPropertyValue("validators", val);
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getValidators = function () {
        return this.validators;
    };
    Question.prototype.getSupportedValidators = function () {
        var res = [];
        var className = this.getType();
        while (!!className) {
            var classValidators = _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].supportedValidators[className];
            if (!!classValidators) {
                for (var i = classValidators.length - 1; i >= 0; i--) {
                    res.splice(0, 0, classValidators[i]);
                }
            }
            var classInfo = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findClass(className);
            className = classInfo.parentName;
        }
        return res;
    };
    Question.prototype.addSupportedValidators = function (supportedValidators, classValidators) { };
    Question.prototype.addConditionObjectsByContext = function (objects, context) {
        objects.push({
            name: this.getValueName(),
            text: this.processedTitle,
            question: this,
        });
    };
    Question.prototype.getConditionJson = function (operator, path) {
        if (operator === void 0) { operator = null; }
        if (path === void 0) { path = null; }
        var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toJsonObject(this);
        json["type"] = this.getType();
        return json;
    };
    /**
     * Returns true if there is a validation error(s) in the question.
     * @param fireCallback set it to true to show an error in UI.
     */
    Question.prototype.hasErrors = function (fireCallback, rec) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (rec === void 0) { rec = null; }
        var oldHasErrors = this.errors.length > 0;
        var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true);
        if (fireCallback) {
            if (!!this.survey) {
                this.survey.beforeSettingQuestionErrors(this, errors);
            }
            this.errors = errors;
        }
        this.updateContainsErrors();
        if (oldHasErrors != errors.length > 0) {
            this.updateQuestionCss();
        }
        if (this.isCollapsed && rec && fireCallback && errors.length > 0) {
            this.expand();
        }
        return errors.length > 0;
    };
    Object.defineProperty(Question.prototype, "currentErrorCount", {
        get: function () {
            return this.errors.length;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Question.prototype, "requiredText", {
        /**
         * Returns a character or text string that indicates a required question.
         * @see SurveyModel.requiredText
         * @see isRequired
         */
        get: function () {
            return this.survey != null && this.isRequired
                ? this.survey.requiredText
                : "";
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.addError = function (error) {
        if (!error)
            return;
        var newError = null;
        if (typeof error === "string" || error instanceof String) {
            newError = new _error__WEBPACK_IMPORTED_MODULE_3__["CustomError"](error, this.survey);
        }
        else {
            newError = error;
        }
        this.errors.push(newError);
    };
    Question.prototype.removeError = function (error) {
        var errors = this.errors;
        var index = errors.indexOf(error);
        if (index !== -1)
            errors.splice(index, 1);
    };
    Question.prototype.checkForErrors = function (isOnValueChanged) {
        var qErrors = new Array();
        if (this.isVisible && this.canCollectErrors()) {
            this.collectErrors(qErrors, isOnValueChanged);
        }
        return qErrors;
    };
    Question.prototype.canCollectErrors = function () {
        return !this.isReadOnly;
    };
    Question.prototype.collectErrors = function (qErrors, isOnValueChanged) {
        this.onCheckForErrors(qErrors, isOnValueChanged);
        if (qErrors.length > 0 || !this.canRunValidators(isOnValueChanged))
            return;
        var errors = this.runValidators();
        if (errors.length > 0) {
            //validators may change the question value.
            qErrors.length = 0;
            for (var i = 0; i < errors.length; i++) {
                qErrors.push(errors[i]);
            }
        }
        if (this.survey && qErrors.length == 0) {
            var error = this.fireSurveyValidation();
            if (error) {
                qErrors.push(error);
            }
        }
    };
    Question.prototype.canRunValidators = function (isOnValueChanged) {
        return true;
    };
    Question.prototype.fireSurveyValidation = function () {
        if (this.validateValueCallback)
            return this.validateValueCallback();
        return this.survey ? this.survey.validateQuestion(this) : null;
    };
    Question.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
        var _this = this;
        if (!isOnValueChanged && this.hasRequiredError()) {
            var err = new _error__WEBPACK_IMPORTED_MODULE_3__["AnswerRequiredError"](this.requiredErrorText, this);
            err.onUpdateErrorTextCallback = function (err) { err.text = _this.requiredErrorText; };
            errors.push(err);
        }
    };
    Question.prototype.hasRequiredError = function () {
        return this.isRequired && this.isEmpty();
    };
    Object.defineProperty(Question.prototype, "isRunningValidators", {
        get: function () {
            return this.getIsRunningValidators();
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getIsRunningValidators = function () {
        return this.isRunningValidatorsValue;
    };
    Question.prototype.runValidators = function () {
        var _this = this;
        if (!!this.validatorRunner) {
            this.validatorRunner.onAsyncCompleted = null;
        }
        this.validatorRunner = new _validator__WEBPACK_IMPORTED_MODULE_4__["ValidatorRunner"]();
        this.isRunningValidatorsValue = true;
        this.validatorRunner.onAsyncCompleted = function (errors) {
            _this.doOnAsyncCompleted(errors);
        };
        return this.validatorRunner.run(this);
    };
    Question.prototype.doOnAsyncCompleted = function (errors) {
        for (var i = 0; i < errors.length; i++) {
            this.errors.push(errors[i]);
        }
        this.isRunningValidatorsValue = false;
        this.raiseOnCompletedAsyncValidators();
    };
    Question.prototype.raiseOnCompletedAsyncValidators = function () {
        if (!!this.onCompletedAsyncValidators && !this.isRunningValidators) {
            this.onCompletedAsyncValidators(this.getAllErrors().length > 0);
            this.onCompletedAsyncValidators = null;
        }
    };
    Question.prototype.setNewValue = function (newValue) {
        var oldAnswered = this.isAnswered;
        this.setNewValueInData(newValue);
        this.allowNotifyValueChanged && this.onValueChanged();
        if (this.isAnswered != oldAnswered) {
            this.updateQuestionCss();
        }
    };
    Question.prototype.isTextValue = function () {
        return false;
    };
    Object.defineProperty(Question.prototype, "isSurveyInputTextUpdate", {
        get: function () {
            return !!this.survey ? this.survey.isUpdateValueTextOnTyping : false;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getDataLocNotification = function () {
        return this.isInputTextUpdate ? "text" : false;
    };
    Object.defineProperty(Question.prototype, "isInputTextUpdate", {
        get: function () {
            return this.isSurveyInputTextUpdate && this.isTextValue();
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.setNewValueInData = function (newValue) {
        newValue = this.valueToData(newValue);
        if (!this.isValueChangedInSurvey) {
            this.setValueCore(newValue);
        }
    };
    Question.prototype.getValueCore = function () {
        return this.questionValue;
    };
    Question.prototype.setValueCore = function (newValue) {
        this.setQuestionValue(newValue);
        if (this.data != null && this.canSetValueToSurvey()) {
            newValue = this.valueForSurvey;
            this.data.setValue(this.getValueName(), newValue, this.getDataLocNotification(), this.allowNotifyValueChanged);
        }
    };
    Question.prototype.canSetValueToSurvey = function () {
        return true;
    };
    Question.prototype.valueFromData = function (val) {
        return val;
    };
    Question.prototype.valueToData = function (val) {
        return val;
    };
    Question.prototype.onValueChanged = function () { };
    Question.prototype.setNewComment = function (newValue) {
        if (this.questionComment === newValue)
            return;
        this.questionComment = newValue;
        if (this.data != null) {
            this.data.setComment(this.getValueName(), newValue, this.isSurveyInputTextUpdate ? "text" : false);
        }
    };
    Question.prototype.getValidName = function (name) {
        if (!name)
            return name;
        return name.trim().replace(/[\{\}]+/g, "");
    };
    //IQuestion
    Question.prototype.updateValueFromSurvey = function (newValue) {
        newValue = this.getUnbindValue(newValue);
        if (!!this.valueFromDataCallback) {
            newValue = this.valueFromDataCallback(newValue);
        }
        this.setQuestionValue(this.valueFromData(newValue));
        this.updateIsAnswered();
    };
    Question.prototype.updateCommentFromSurvey = function (newValue) {
        this.questionComment = newValue;
    };
    Question.prototype.onChangeQuestionValue = function (newValue) { };
    Question.prototype.setValueChangedDirectly = function () {
        this.isValueChangedDirectly = true;
    };
    Question.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        var isEqual = this.isTwoValueEquals(this.questionValue, newValue);
        if (!isEqual && !this.isChangingViaDefaultValue) {
            this.setValueChangedDirectly();
        }
        this.questionValue = newValue;
        if (!isEqual) {
            this.onChangeQuestionValue(newValue);
        }
        !isEqual && this.allowNotifyValueChanged &&
            this.fireCallback(this.valueChangedCallback);
        if (updateIsAnswered)
            this.updateIsAnswered();
    };
    Question.prototype.onSurveyValueChanged = function (newValue) { };
    Question.prototype.setVisibleIndex = function (val) {
        if (!this.isVisible ||
            (!this.hasTitle && !_settings__WEBPACK_IMPORTED_MODULE_8__["settings"].setQuestionVisibleIndexForHiddenTitle) ||
            (this.hideNumber && !_settings__WEBPACK_IMPORTED_MODULE_8__["settings"].setQuestionVisibleIndexForHiddenNumber)) {
            val = -1;
        }
        this.setPropertyValue("visibleIndex", val);
        this.setPropertyValue("no", this.calcNo());
        return val < 0 ? 0 : 1;
    };
    Question.prototype.removeElement = function (element) {
        return false;
    };
    Question.prototype.supportGoNextPageAutomatic = function () {
        return false;
    };
    Question.prototype.supportGoNextPageError = function () {
        return true;
    };
    /**
     * Removes values that cannot be assigned to this question, for example, choices unlisted in the `choices` array.
     *
     * Call this method after you assign new question values in code to ensure that they are acceptable.
     *
     * > NOTE: This method does not remove values that do not pass validation. Call the `hasErrors()` method to validate newly assigned values.
     *
     * @see hasErrors
     */
    Question.prototype.clearIncorrectValues = function () { };
    Question.prototype.clearOnDeletingContainer = function () { };
    /**
     * Empties the `errors` array.
     * @see errors
     */
    Question.prototype.clearErrors = function () {
        this.errors = [];
    };
    Question.prototype.clearUnusedValues = function () { };
    Question.prototype.onAnyValueChanged = function (name) { };
    Question.prototype.checkBindings = function (valueName, value) {
        if (this.bindings.isEmpty() || !this.data)
            return;
        var props = this.bindings.getPropertiesByValueName(valueName);
        for (var i = 0; i < props.length; i++) {
            var propName = props[i];
            if (this.isValueEmpty(value) && _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(this[propName])) {
                value = 0;
            }
            this[propName] = value;
        }
    };
    Question.prototype.getComponentName = function () {
        return _rendererFactory__WEBPACK_IMPORTED_MODULE_9__["RendererFactory"].Instance.getRendererByQuestion(this);
    };
    Question.prototype.isDefaultRendering = function () {
        return (!!this.customWidget ||
            this.renderAs === "default" ||
            this.getComponentName() === "default");
    };
    //ISurveyErrorOwner
    Question.prototype.getErrorCustomText = function (text, error) {
        if (!!this.survey)
            return this.survey.getSurveyErrorCustomText(this, text, error);
        return text;
    };
    //IValidatorOwner
    Question.prototype.getValidatorTitle = function () {
        return null;
    };
    Object.defineProperty(Question.prototype, "validatedValue", {
        get: function () {
            return this.value;
        },
        set: function (val) {
            this.value = val;
        },
        enumerable: false,
        configurable: true
    });
    Question.prototype.getAllValues = function () {
        return !!this.data ? this.data.getAllValues() : null;
    };
    Question.prototype.transformToMobileView = function () { };
    Question.prototype.transformToDesktopView = function () { };
    Question.prototype.needResponsiveWidth = function () {
        return false;
    };
    //responsiveness methods
    Question.prototype.supportResponsiveness = function () {
        return false;
    };
    Question.prototype.needResponsiveness = function () {
        return this.supportResponsiveness() && this.isDefaultV2Theme && !this.isDesignMode;
    };
    Question.prototype.checkForResponsiveness = function (el) {
        var _this = this;
        if (this.needResponsiveness()) {
            if (this.isCollapsed) {
                var onStateChanged = function () {
                    if (_this.isExpanded) {
                        _this.initResponsiveness(el);
                        _this.unregisterPropertyChangedHandlers(["state"], "for-responsiveness");
                    }
                };
                this.registerPropertyChangedHandlers(["state"], onStateChanged, "for-responsiveness");
            }
            else {
                this.initResponsiveness(el);
            }
        }
    };
    Question.prototype.getObservedElementSelector = function () {
        return ".sd-scrollable-container";
    };
    Question.prototype.onMobileChanged = function () {
        this.onMobileChangedCallback && this.onMobileChangedCallback();
    };
    Question.prototype.initResponsiveness = function (el) {
        var _this = this;
        this.destroyResizeObserver();
        if (!!el && this.isDefaultRendering()) {
            var scrollableSelector_1 = this.getObservedElementSelector();
            if (!scrollableSelector_1)
                return;
            var defaultRootEl = el.querySelector(scrollableSelector_1);
            if (!defaultRootEl)
                return;
            var isProcessed_1 = false;
            var requiredWidth_1 = undefined;
            this.resizeObserver = new ResizeObserver(function () {
                var rootEl = el.querySelector(scrollableSelector_1);
                if (!requiredWidth_1 && _this.isDefaultRendering()) {
                    requiredWidth_1 = rootEl.scrollWidth;
                }
                if (isProcessed_1 || !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["isContainerVisible"])(rootEl)) {
                    isProcessed_1 = false;
                }
                else {
                    isProcessed_1 = _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
                }
            });
            this.onMobileChangedCallback = function () {
                setTimeout(function () {
                    var rootEl = el.querySelector(scrollableSelector_1);
                    _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
                }, 0);
            };
            this.resizeObserver.observe(el);
        }
    };
    Question.prototype.getCompactRenderAs = function () {
        return "default";
    };
    Question.prototype.getDesktopRenderAs = function () {
        return "default";
    };
    Question.prototype.processResponsiveness = function (requiredWidth, availableWidth) {
        availableWidth = Math.round(availableWidth);
        if (Math.abs(requiredWidth - availableWidth) > 2) {
            var oldRenderAs = this.renderAs;
            if (requiredWidth > availableWidth) {
                this.renderAs = this.getCompactRenderAs();
            }
            else {
                this.renderAs = this.getDesktopRenderAs();
            }
            return oldRenderAs !== this.renderAs;
        }
        return false;
    };
    Question.prototype.destroyResizeObserver = function () {
        if (!!this.resizeObserver) {
            this.resizeObserver.disconnect();
            this.resizeObserver = undefined;
            this.onMobileChangedCallback = undefined;
            this.renderAs = this.getDesktopRenderAs();
        }
    };
    Question.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.destroyResizeObserver();
    };
    Question.TextPreprocessorValuesMap = {
        title: "processedTitle",
        require: "requiredText",
    };
    Question.questionCounter = 100;
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
    ], Question.prototype, "isMobile", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true })
    ], Question.prototype, "commentPlaceholder", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "default" })
    ], Question.prototype, "renderAs", void 0);
    return Question;
}(_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"]));

function removeConverChar(str) {
    if (!!str && str[0] === _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].expressionDisableConversionChar)
        return str.substring(1);
    return str;
}
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
    { name: "!name", onSettingValue: function (obj, val) { return removeConverChar(val); } },
    {
        name: "state",
        default: "default",
        choices: ["default", "collapsed", "expanded"],
    },
    { name: "visible:switch", default: true },
    { name: "useDisplayValuesInDynamicTexts:boolean", alternativeName: "useDisplayValuesInTitle", default: true, layout: "row" },
    "visibleIf:condition",
    { name: "width" },
    { name: "minWidth", default: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].minWidth },
    { name: "maxWidth", default: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].maxWidth },
    { name: "startWithNewLine:boolean", default: true, layout: "row" },
    { name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
    {
        name: "page",
        isSerializable: false,
        visibleIf: function (obj) {
            var survey = obj ? obj.survey : null;
            return !survey || !survey.pages || survey.pages.length > 1;
        },
        choices: function (obj) {
            var survey = obj ? obj.survey : null;
            return survey
                ? survey.pages.map(function (p) {
                    return { value: p.name, text: p.title };
                })
                : [];
        },
    },
    {
        name: "title:text", serializationProperty: "locTitle", layout: "row", dependsOn: "name",
        onPropertyEditorUpdate: function (obj, editor) {
            if (!!obj && !!editor) {
                editor.placeholder = obj.name;
            }
        }
    },
    {
        name: "titleLocation",
        default: "default",
        choices: ["default", "top", "bottom", "left", "hidden"],
        layout: "row",
    },
    {
        name: "description:text",
        serializationProperty: "locDescription",
        layout: "row",
    },
    {
        name: "descriptionLocation",
        default: "default",
        choices: ["default", "underInput", "underTitle"],
    },
    {
        name: "hideNumber:boolean",
        dependsOn: "titleLocation",
        visibleIf: function (obj) {
            if (!obj) {
                return true;
            }
            if (obj.titleLocation === "hidden") {
                return false;
            }
            var parent = obj ? obj.parent : null;
            var numberingAllowedByParent = !parent || parent.showQuestionNumbers !== "off";
            if (!numberingAllowedByParent) {
                return false;
            }
            var survey = obj ? obj.survey : null;
            return (!survey ||
                survey.showQuestionNumbers !== "off" ||
                (!!parent && parent.showQuestionNumbers === "onpanel"));
        },
    },
    { name: "valueName", onSettingValue: function (obj, val) { return removeConverChar(val); } },
    "enableIf:condition",
    "defaultValue:value",
    {
        name: "defaultValueExpression:expression",
        category: "logic",
    },
    "correctAnswer:value",
    {
        name: "clearIfInvisible",
        default: "default",
        choices: ["default", "none", "onComplete", "onHidden"],
    },
    "isRequired:switch",
    "requiredIf:condition",
    {
        name: "requiredErrorText:text",
        serializationProperty: "locRequiredErrorText",
    },
    "readOnly:switch",
    {
        name: "validators:validators",
        baseClassName: "surveyvalidator",
        classNamePart: "validator",
    },
    {
        name: "bindings:bindings",
        serializationProperty: "bindings",
        visibleIf: function (obj) {
            return obj.bindings.getNames().length > 0;
        },
    },
    { name: "renderAs", default: "default", visible: false },
    { name: "showCommentArea", visible: false, default: false, alternativeName: "hasComment" }
]);
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addAlterNativeClassName("question", "questionbase");


/***/ }),

/***/ "./src/questionCustomWidgets.ts":
/*!**************************************!*\
  !*** ./src/questionCustomWidgets.ts ***!
  \**************************************/
/*! exports provided: QuestionCustomWidget, CustomWidgetCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return QuestionCustomWidget; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return CustomWidgetCollection; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");

var QuestionCustomWidget = /** @class */ (function () {
    function QuestionCustomWidget(name, widgetJson) {
        this.name = name;
        this.widgetJson = widgetJson;
        this.htmlTemplate = widgetJson.htmlTemplate ? widgetJson.htmlTemplate : "";
    }
    QuestionCustomWidget.prototype.afterRender = function (question, el) {
        var _this = this;
        if (!this.widgetJson.afterRender)
            return;
        question.localeChangedCallback = function () {
            if (_this.widgetJson.willUnmount) {
                _this.widgetJson.willUnmount(question, el);
            }
            _this.widgetJson.afterRender(question, el);
        };
        this.widgetJson.afterRender(question, el);
    };
    QuestionCustomWidget.prototype.willUnmount = function (question, el) {
        if (this.widgetJson.willUnmount)
            this.widgetJson.willUnmount(question, el);
    };
    QuestionCustomWidget.prototype.getDisplayValue = function (question, value) {
        if (value === void 0) { value = undefined; }
        if (this.widgetJson.getDisplayValue)
            return this.widgetJson.getDisplayValue(question, value);
        return null;
    };
    QuestionCustomWidget.prototype.isFit = function (question) {
        if (this.isLibraryLoaded() && this.widgetJson.isFit)
            return this.widgetJson.isFit(question);
        return false;
    };
    Object.defineProperty(QuestionCustomWidget.prototype, "canShowInToolbox", {
        get: function () {
            if (this.widgetJson.showInToolbox === false)
                return false;
            if (CustomWidgetCollection.Instance.getActivatedBy(this.name) != "customtype")
                return false;
            return !this.widgetJson.widgetIsLoaded || this.widgetJson.widgetIsLoaded();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCustomWidget.prototype, "showInToolbox", {
        get: function () {
            return this.widgetJson.showInToolbox !== false;
        },
        set: function (val) {
            this.widgetJson.showInToolbox = val;
        },
        enumerable: false,
        configurable: true
    });
    QuestionCustomWidget.prototype.init = function () {
        if (this.widgetJson.init) {
            this.widgetJson.init();
        }
    };
    QuestionCustomWidget.prototype.activatedByChanged = function (activatedBy) {
        if (this.isLibraryLoaded() && this.widgetJson.activatedByChanged) {
            this.widgetJson.activatedByChanged(activatedBy);
        }
    };
    QuestionCustomWidget.prototype.isLibraryLoaded = function () {
        if (this.widgetJson.widgetIsLoaded)
            return this.widgetJson.widgetIsLoaded() == true;
        return true;
    };
    Object.defineProperty(QuestionCustomWidget.prototype, "isDefaultRender", {
        get: function () {
            return this.widgetJson.isDefaultRender;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCustomWidget.prototype, "pdfQuestionType", {
        get: function () {
            return this.widgetJson.pdfQuestionType;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCustomWidget.prototype, "pdfRender", {
        get: function () {
            return this.widgetJson.pdfRender;
        },
        enumerable: false,
        configurable: true
    });
    return QuestionCustomWidget;
}());

var CustomWidgetCollection = /** @class */ (function () {
    function CustomWidgetCollection() {
        this.widgetsValues = [];
        this.widgetsActivatedBy = {};
        this.onCustomWidgetAdded = new _base__WEBPACK_IMPORTED_MODULE_0__["Event"]();
    }
    Object.defineProperty(CustomWidgetCollection.prototype, "widgets", {
        get: function () {
            return this.widgetsValues;
        },
        enumerable: false,
        configurable: true
    });
    CustomWidgetCollection.prototype.add = function (widgetJson, activatedBy) {
        if (activatedBy === void 0) { activatedBy = "property"; }
        this.addCustomWidget(widgetJson, activatedBy);
    };
    CustomWidgetCollection.prototype.addCustomWidget = function (widgetJson, activatedBy) {
        if (activatedBy === void 0) { activatedBy = "property"; }
        var name = widgetJson.name;
        if (!name) {
            name = "widget_" + this.widgets.length + 1;
        }
        var customWidget = new QuestionCustomWidget(name, widgetJson);
        this.widgetsValues.push(customWidget);
        customWidget.init();
        this.widgetsActivatedBy[name] = activatedBy;
        customWidget.activatedByChanged(activatedBy);
        this.onCustomWidgetAdded.fire(customWidget, null);
        return customWidget;
    };
    /**
     * Returns the way the custom wiget is activated. It can be activated by a property ("property"), question type ("type") or by new/custom question type ("customtype").
     * @param widgetName the custom widget name
     * @see setActivatedBy
     */
    CustomWidgetCollection.prototype.getActivatedBy = function (widgetName) {
        var res = this.widgetsActivatedBy[widgetName];
        return res ? res : "property";
    };
    /**
     * Sets the way the custom wiget is activated. The activation types are: property ("property"), question type ("type") or new/custom question type ("customtype"). A custom wiget may support all or only some of this activation types.
     * @param widgetName
     * @param activatedBy there are three possible variants: "property", "type" and "customtype"
     */
    CustomWidgetCollection.prototype.setActivatedBy = function (widgetName, activatedBy) {
        if (!widgetName || !activatedBy)
            return;
        var widget = this.getCustomWidgetByName(widgetName);
        if (!widget)
            return;
        this.widgetsActivatedBy[widgetName] = activatedBy;
        widget.activatedByChanged(activatedBy);
    };
    CustomWidgetCollection.prototype.clear = function () {
        this.widgetsValues = [];
    };
    CustomWidgetCollection.prototype.getCustomWidgetByName = function (name) {
        for (var i = 0; i < this.widgets.length; i++) {
            if (this.widgets[i].name == name)
                return this.widgets[i];
        }
        return null;
    };
    CustomWidgetCollection.prototype.getCustomWidget = function (question) {
        for (var i = 0; i < this.widgetsValues.length; i++) {
            if (this.widgetsValues[i].isFit(question))
                return this.widgetsValues[i];
        }
        return null;
    };
    CustomWidgetCollection.Instance = new CustomWidgetCollection();
    return CustomWidgetCollection;
}());



/***/ }),

/***/ "./src/question_baseselect.ts":
/*!************************************!*\
  !*** ./src/question_baseselect.ts ***!
  \************************************/
/*! exports provided: QuestionSelectBase, QuestionCheckboxBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectBase", function() { return QuestionSelectBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxBase", function() { return QuestionCheckboxBase; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _survey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey */ "./src/survey.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _choicesRestful__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./choicesRestful */ "./src/choicesRestful.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};











/**
 * A base class for multiple-choice question types ([Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), etc.).
 */
var QuestionSelectBase = /** @class */ (function (_super) {
    __extends(QuestionSelectBase, _super);
    function QuestionSelectBase(name) {
        var _this = _super.call(this, name) || this;
        _this.otherItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]("other");
        _this.dependedQuestions = [];
        _this.noneItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]("none");
        _this.isSettingDefaultValue = false;
        _this.isSettingComment = false;
        _this.isRunningChoices = false;
        _this.isFirstLoadChoicesFromUrl = true;
        _this.isUpdatingChoicesDependedQuestions = false;
        _this.prevIsOtherSelected = false;
        var noneItemText = _this.createLocalizableString("noneText", _this.noneItemValue, true, "noneItemText");
        _this.noneItemValue.locOwner = _this;
        _this.noneItemValue.setLocText(noneItemText);
        _this.createItemValues("choices");
        _this.registerPropertyChangedHandlers(["choices"], function () {
            if (!_this.filterItems()) {
                _this.onVisibleChoicesChanged();
            }
        });
        _this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "showNoneItem"], function () {
            _this.onVisibleChoicesChanged();
        });
        _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
            _this.updateVisibilityBasedOnChoices();
        });
        _this.createNewArray("visibleChoices");
        _this.setNewRestfulProperty();
        var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
        _this.createLocalizableString("otherErrorText", _this, true, "otherRequiredError");
        _this.otherItemValue.locOwner = _this;
        _this.otherItemValue.setLocText(locOtherText);
        _this.choicesByUrl.createItemValue = function (value) {
            return _this.createItemValue(value);
        };
        _this.choicesByUrl.beforeSendRequestCallback = function () {
            _this.onBeforeSendRequest();
        };
        _this.choicesByUrl.getResultCallback = function (items) {
            _this.onLoadChoicesFromUrl(items);
        };
        _this.choicesByUrl.updateResultCallback = function (items, serverResult) {
            if (_this.survey) {
                return _this.survey.updateChoicesFromServer(_this, items, serverResult);
            }
            return items;
        };
        return _this;
    }
    QuestionSelectBase.prototype.getType = function () {
        return "selectbase";
    };
    QuestionSelectBase.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        for (var i = 0; i < this.dependedQuestions.length; i++) {
            this.dependedQuestions[i].choicesFromQuestion = "";
        }
        this.removeFromDependedQuestion(this.getQuestionWithChoices());
    };
    QuestionSelectBase.prototype.getItemValueType = function () {
        return "itemvalue";
    };
    QuestionSelectBase.prototype.createItemValue = function (value) {
        return _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), value);
    };
    QuestionSelectBase.prototype.supportGoNextPageError = function () {
        return !this.isOtherSelected || !!this.comment;
    };
    QuestionSelectBase.prototype.isLayoutTypeSupported = function (layoutType) {
        return true;
    };
    QuestionSelectBase.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        if (this.choicesOrder !== "none") {
            this.updateVisibleChoices();
        }
    };
    QuestionSelectBase.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        if (!!this.choicesFromUrl) {
            _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.choicesFromUrl);
            _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.visibleChoices);
        }
    };
    Object.defineProperty(QuestionSelectBase.prototype, "otherItem", {
        /**
         * Returns the "Other" choice item. Use this property to change the item's `value` or `text`.
         * @see showOtherItem
         */
        get: function () {
            return this.otherItemValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "isOtherSelected", {
        /**
         * Returns `true` if the "Other" choice item is selected.
         * @see showOtherItem
         */
        get: function () {
            return this.hasOther && this.getHasOther(this.renderedValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "isNoneSelected", {
        get: function () {
            return this.hasNone && this.selectedItem === this.noneItem;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "showNoneItem", {
        /**
         * Specifies whether to display the "None" choice item.
         *
         * When users select the "None" item in multi-select questions, all other items become unselected.
         * @see noneItem
         * @see noneText
         */
        get: function () {
            return this.getPropertyValue("showNoneItem", false);
        },
        set: function (val) {
            this.setPropertyValue("showNoneItem", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "hasNone", {
        get: function () {
            return this.showNoneItem;
        },
        set: function (val) {
            this.showNoneItem = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "noneItem", {
        /**
         * Returns the "None" choice item. Use this property to change the item's `value` or `text`.
         * @see showNoneItem
         */
        get: function () {
            return this.noneItemValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "noneText", {
        /**
         * Gets or sets a caption for the "None" choice item.
         * @see showNoneItem
         */
        get: function () {
            return this.getLocalizableStringText("noneText");
        },
        set: function (val) {
            this.setLocalizableStringText("noneText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "locNoneText", {
        get: function () {
            return this.getLocalizableString("noneText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "choicesVisibleIf", {
        /**
         * A Boolean expression that is evaluated against each choice item. If the expression evaluates to `false`, the choice item becomes hidden.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Use the `{item}` placeholder to reference the current choice item in the expression.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see visibleIf
         * @see choicesEnableIf
         */
        get: function () {
            return this.getPropertyValue("choicesVisibleIf", "");
        },
        set: function (val) {
            this.setPropertyValue("choicesVisibleIf", val);
            this.filterItems();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "choicesEnableIf", {
        /**
         * A Boolean expression that is evaluated against each choice item. If the expression evaluates to `false`, the choice item becomes read-only.
         *
         * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
         *
         * Use the `{item}` placeholder to reference the current choice item in the expression.
         *
         * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see enableIf
         * @see choicesVisibleIf
         */
        get: function () {
            return this.getPropertyValue("choicesEnableIf", "");
        },
        set: function (val) {
            this.setPropertyValue("choicesEnableIf", val);
            this.filterItems();
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.surveyChoiceItemVisibilityChange = function () {
        this.filterItems();
    };
    QuestionSelectBase.prototype.runCondition = function (values, properties) {
        _super.prototype.runCondition.call(this, values, properties);
        this.runItemsEnableCondition(values, properties);
        this.runItemsCondition(values, properties);
    };
    QuestionSelectBase.prototype.isTextValue = function () {
        return true; //for comments and others
    };
    QuestionSelectBase.prototype.setDefaultValue = function () {
        this.isSettingDefaultValue =
            !this.isValueEmpty(this.defaultValue) &&
                this.hasUnknownValue(this.defaultValue);
        this.prevCommentValue = undefined;
        _super.prototype.setDefaultValue.call(this);
        this.isSettingDefaultValue = false;
    };
    QuestionSelectBase.prototype.getIsMultipleValue = function () {
        return false;
    };
    QuestionSelectBase.prototype.convertDefaultValue = function (val) {
        if (val == null || val == undefined)
            return val;
        if (this.getIsMultipleValue()) {
            if (!Array.isArray(val))
                return [val];
        }
        else {
            if (Array.isArray(val) && val.length > 0)
                return val[0];
        }
        return val;
    };
    QuestionSelectBase.prototype.filterItems = function () {
        if (this.isLoadingFromJson ||
            !this.data ||
            this.areInvisibleElementsShowing)
            return false;
        var values = this.getDataFilteredValues();
        var properties = this.getDataFilteredProperties();
        this.runItemsEnableCondition(values, properties);
        return this.runItemsCondition(values, properties);
    };
    QuestionSelectBase.prototype.runItemsCondition = function (values, properties) {
        this.setConditionalChoicesRunner();
        var hasChanges = this.runConditionsForItems(values, properties);
        if (!!this.filteredChoicesValue &&
            this.filteredChoicesValue.length === this.activeChoices.length) {
            this.filteredChoicesValue = undefined;
        }
        if (hasChanges) {
            this.onVisibleChoicesChanged();
            this.clearIncorrectValues();
        }
        return hasChanges;
    };
    QuestionSelectBase.prototype.runItemsEnableCondition = function (values, properties) {
        var _this = this;
        this.setConditionalEnableChoicesRunner();
        var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].runEnabledConditionsForItems(this.activeChoices, this.conditionChoicesEnableIfRunner, values, properties, function (item, val) {
            return val && _this.onEnableItemCallBack(item);
        });
        if (hasChanged) {
            this.clearDisabledValues();
        }
        this.onAfterRunItemsEnableCondition();
    };
    QuestionSelectBase.prototype.onAfterRunItemsEnableCondition = function () { };
    QuestionSelectBase.prototype.onEnableItemCallBack = function (item) {
        return true;
    };
    QuestionSelectBase.prototype.setConditionalChoicesRunner = function () {
        if (this.choicesVisibleIf) {
            if (!this.conditionChoicesVisibleIfRunner) {
                this.conditionChoicesVisibleIfRunner = new _conditions__WEBPACK_IMPORTED_MODULE_7__["ConditionRunner"](this.choicesVisibleIf);
            }
            this.conditionChoicesVisibleIfRunner.expression = this.choicesVisibleIf;
        }
        else {
            this.conditionChoicesVisibleIfRunner = null;
        }
    };
    QuestionSelectBase.prototype.setConditionalEnableChoicesRunner = function () {
        if (this.choicesEnableIf) {
            if (!this.conditionChoicesEnableIfRunner) {
                this.conditionChoicesEnableIfRunner = new _conditions__WEBPACK_IMPORTED_MODULE_7__["ConditionRunner"](this.choicesEnableIf);
            }
            this.conditionChoicesEnableIfRunner.expression = this.choicesEnableIf;
        }
        else {
            this.conditionChoicesEnableIfRunner = null;
        }
    };
    QuestionSelectBase.prototype.canSurveyChangeItemVisibility = function () {
        return !!this.survey && this.survey.canChangeChoiceItemsVisibility();
    };
    QuestionSelectBase.prototype.changeItemVisisbility = function () {
        var _this = this;
        return this.canSurveyChangeItemVisibility() ?
            function (item, val) { return _this.survey.getChoiceItemVisibility(_this, item, val); }
            : null;
    };
    QuestionSelectBase.prototype.runConditionsForItems = function (values, properties) {
        this.filteredChoicesValue = [];
        var calcVisibility = this.changeItemVisisbility();
        return _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].runConditionsForItems(this.activeChoices, this.getFilteredChoices(), this.areInvisibleElementsShowing
            ? null
            : this.conditionChoicesVisibleIfRunner, values, properties, !this.survey || !this.survey.areInvisibleElementsShowing, function (item, val) {
            return !!calcVisibility ? calcVisibility(item, val) : val;
        });
    };
    QuestionSelectBase.prototype.getHasOther = function (val) {
        return val === this.otherItem.value;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "validatedValue", {
        get: function () {
            return this.rendredValueToDataCore(this.value);
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.createRestful = function () {
        return new _choicesRestful__WEBPACK_IMPORTED_MODULE_6__["ChoicesRestful"]();
    };
    QuestionSelectBase.prototype.setNewRestfulProperty = function () {
        this.setPropertyValue("choicesByUrl", this.createRestful());
        this.choicesByUrl.owner = this;
        this.choicesByUrl.loadingOwner = this;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "autoOtherMode", {
        get: function () {
            return this.getPropertyValue("autoOtherMode");
        },
        set: function (val) {
            this.setPropertyValue("autoOtherMode", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.getQuestionComment = function () {
        if (!!this.commentValue)
            return this.commentValue;
        if (this.hasComment || this.getStoreOthersAsComment())
            return _super.prototype.getQuestionComment.call(this);
        return this.commentValue;
    };
    QuestionSelectBase.prototype.selectOtherValueFromComment = function (val) {
        this.value = val ? this.otherItem.value : undefined;
    };
    QuestionSelectBase.prototype.setQuestionComment = function (newValue) {
        if (this.autoOtherMode) {
            this.prevCommentValue = undefined;
            var isSelected = this.isOtherSelected;
            if (!isSelected && !!newValue || isSelected && !newValue) {
                this.selectOtherValueFromComment(!!newValue);
            }
        }
        if (this.hasComment || this.getStoreOthersAsComment())
            _super.prototype.setQuestionComment.call(this, newValue);
        else {
            if (!this.isSettingComment && newValue != this.commentValue) {
                this.isSettingComment = true;
                this.commentValue = newValue;
                if (this.isOtherSelected && !this.isRenderedValueSetting) {
                    this.value = this.rendredValueToData(this.renderedValue);
                }
                this.isSettingComment = false;
            }
        }
        this.updateChoicesDependedQuestions();
    };
    QuestionSelectBase.prototype.clearValue = function () {
        _super.prototype.clearValue.call(this);
        this.prevCommentValue = undefined;
    };
    QuestionSelectBase.prototype.updateCommentFromSurvey = function (newValue) {
        _super.prototype.updateCommentFromSurvey.call(this, newValue);
        this.prevCommentValue = undefined;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "renderedValue", {
        get: function () {
            return this.getPropertyValue("renderedValue", null);
        },
        set: function (val) {
            this.setPropertyValue("renderedValue", val);
            var val = this.rendredValueToData(val);
            if (!this.isTwoValueEquals(val, this.value)) {
                this.value = val;
            }
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.setQuestionValue = function (newValue, updateIsAnswered, updateComment) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        if (updateComment === void 0) { updateComment = true; }
        if (this.isLoadingFromJson ||
            this.isTwoValueEquals(this.value, newValue))
            return;
        _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
        this.setPropertyValue("renderedValue", this.rendredValueFromData(newValue));
        if (this.hasComment || !updateComment)
            return;
        var isOtherSel = this.isOtherSelected;
        if (isOtherSel && !!this.prevCommentValue) {
            var oldComment = this.prevCommentValue;
            this.prevCommentValue = undefined;
            this.comment = oldComment;
        }
        if (!isOtherSel && !!this.comment) {
            if (this.getStoreOthersAsComment() && !this.autoOtherMode) {
                this.prevCommentValue = this.comment;
            }
            this.comment = "";
        }
    };
    QuestionSelectBase.prototype.setNewValue = function (newValue) {
        this.resetSelectedItemValues();
        newValue = this.valueFromData(newValue);
        if ((!this.choicesByUrl.isRunning &&
            !this.choicesByUrl.isWaitingForParameters) ||
            !this.isValueEmpty(newValue)) {
            this.cachedValueForUrlRequests = newValue;
        }
        _super.prototype.setNewValue.call(this, newValue);
    };
    QuestionSelectBase.prototype.valueFromData = function (val) {
        var choiceitem = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.activeChoices, val);
        if (!!choiceitem) {
            return choiceitem.value;
        }
        return _super.prototype.valueFromData.call(this, val);
    };
    QuestionSelectBase.prototype.rendredValueFromData = function (val) {
        if (this.getStoreOthersAsComment())
            return val;
        return this.renderedValueFromDataCore(val);
    };
    QuestionSelectBase.prototype.rendredValueToData = function (val) {
        if (this.getStoreOthersAsComment())
            return val;
        return this.rendredValueToDataCore(val);
    };
    QuestionSelectBase.prototype.renderedValueFromDataCore = function (val) {
        if (!this.hasUnknownValue(val, true, false))
            return this.valueFromData(val);
        this.comment = val;
        return this.otherItem.value;
    };
    QuestionSelectBase.prototype.rendredValueToDataCore = function (val) {
        if (val == this.otherItem.value && this.getQuestionComment()) {
            val = this.getQuestionComment();
        }
        return val;
    };
    QuestionSelectBase.prototype.updateSelectedItemValues = function () {
        var _this = this;
        if (!!this.survey && !this.isEmpty() && this.choices.length === 0) {
            var IsMultipleValue_1 = this.getIsMultipleValue();
            this.survey.getChoiceDisplayValue({
                question: this,
                values: IsMultipleValue_1 ? this.value : [this.value],
                setItems: function (displayValues) {
                    if (!displayValues || !displayValues.length)
                        return;
                    if (IsMultipleValue_1) {
                        _this.selectedItemValues = displayValues.map(function (displayValue, index) { return new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](_this.value[index], displayValue); });
                    }
                    else {
                        _this.selectedItemValues = new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](_this.value, displayValues[0]);
                    }
                }
            });
        }
    };
    QuestionSelectBase.prototype.resetSelectedItemValues = function () {
        this.selectedItemValues = null;
    };
    QuestionSelectBase.prototype.hasUnknownValue = function (val, includeOther, isFilteredChoices, checkEmptyValue) {
        if (includeOther === void 0) { includeOther = false; }
        if (isFilteredChoices === void 0) { isFilteredChoices = true; }
        if (checkEmptyValue === void 0) { checkEmptyValue = false; }
        if (!checkEmptyValue && this.isValueEmpty(val))
            return false;
        if (includeOther && val == this.otherItem.value)
            return false;
        if (this.hasNone && val == this.noneItem.value)
            return false;
        var choices = isFilteredChoices
            ? this.getFilteredChoices()
            : this.activeChoices;
        return _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(choices, val) == null;
    };
    QuestionSelectBase.prototype.isValueDisabled = function (val) {
        var itemValue = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.getFilteredChoices(), val);
        return !!itemValue && !itemValue.isEnabled;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
        /**
         * Configures access to a RESTful service that returns choice items. Refer to the [ChoicesRestful](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information.
         *
         * [View "Dropdown + RESTful" demo](https://surveyjs.io/form-library/examples/questiontype-dropdownrestfull/ (linkStyle))
         * @see choices
         */
        get: function () {
            return this.getPropertyValue("choicesByUrl");
        },
        set: function (val) {
            if (!val)
                return;
            this.setNewRestfulProperty();
            this.choicesByUrl.fromJSON(val.toJSON());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "choices", {
        /**
         * Gets or sets choice items. This property accepts an array of objects with the following structure:
         *
         * ```js
         * {
         *   "value": any, // A value to be saved in the survey results
         *   "text": String, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
         *   "imageLink": String // A link to the image or video that represents this choice value. Applies only to Image Picker questions.
         *   "customProperty": any // Any property that you find useful
         * }
         * ```
         *
         * Refer to the following help topic for information on how to add custom properties so that they are serialized into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
         *
         * If you need to specify only the `value` property, you can set the `choices` property to an array of primitive values, for example, `[ "item1", "item2", "item3" ]`. These values are both saved in survey results and used as display text.
         * @see choicesByUrl
         * @see choicesFromQuestion
         */
        get: function () {
            return this.getPropertyValue("choices");
        },
        set: function (newValue) {
            this.setPropertyValue("choices", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "choicesFromQuestion", {
        /**
         * Inherits choice items from a specified question. Accepts a question name.
         *
         * If you specify this property, the `choices`, `choicesVisibleIf`, `choicesEnableIf`, and `choicesOrder` properties do not apply because their values are inherited.
         *
         * In addition, you can specify the `choicesFromQuestionMode` property if you do not want to inherit all choice items.
         * @see choicesFromQuestionMode
         * @see choices
         */
        get: function () {
            return this.getPropertyValue("choicesFromQuestion");
        },
        set: function (val) {
            var question = this.getQuestionWithChoices();
            if (!!question) {
                question.removeFromDependedQuestion(this);
            }
            this.setPropertyValue("choicesFromQuestion", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.addIntoDependedQuestion = function (question) {
        if (!question || question.dependedQuestions.indexOf(this) > -1)
            return;
        question.dependedQuestions.push(this);
    };
    QuestionSelectBase.prototype.removeFromDependedQuestion = function (question) {
        if (!question)
            return;
        var index = question.dependedQuestions.indexOf(this);
        if (index > -1) {
            question.dependedQuestions.splice(index, 1);
        }
    };
    Object.defineProperty(QuestionSelectBase.prototype, "choicesFromQuestionMode", {
        /**
         * Specifies which choice items to inherit from another question. Applies only when the `choicesFromQuestion` property is specified.
         *
         * Possible values:
         *
         * - `"all"` (default) - Inherits all choice items.
         * - `"selected"` - Inherits only selected choice items.
         * - `"unselected"` - Inherits only unselected choice items.
         *
         * Use the `visibleChoices` property to access inherited choice items.
         * @see choicesFromQuestion
         * @see visibleChoices
         */
        get: function () {
            return this.getPropertyValue("choicesFromQuestionMode");
        },
        set: function (val) {
            this.setPropertyValue("choicesFromQuestionMode", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "hideIfChoicesEmpty", {
        /**
         * Specifies whether to hide the question if no choice items are visible.
         *
         * This property is useful if you show or hide choice items at runtime based on a [condition](https://surveyjs.io/form-library/documentation/questionselectbase#choicesVisibleIf).
         */
        get: function () {
            return this.getPropertyValue("hideIfChoicesEmpty", false);
        },
        set: function (val) {
            this.setPropertyValue("hideIfChoicesEmpty", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "keepIncorrectValues", {
        get: function () {
            return this.getPropertyValue("keepIncorrectValues", false);
        },
        set: function (val) {
            this.setPropertyValue("keepIncorrectValues", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "storeOthersAsComment", {
        get: function () {
            return this.getPropertyValue("storeOthersAsComment");
        },
        set: function (val) {
            this.setPropertyValue("storeOthersAsComment", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.hasOtherChanged = function () {
        this.onVisibleChoicesChanged();
    };
    Object.defineProperty(QuestionSelectBase.prototype, "choicesOrder", {
        /**
         * Specifies the sort order of choice items.
         *
         * Possible values:
         *
         * - `"none"` (default) - Preserves the original order of choice items.
         * - `"asc"`- Sorts choice items in ascending order.
         * - `"desc"`- Sorts choice items in ascending order.
         * - `"random"` - Displays choice items in random order.
         */
        get: function () {
            return this.getPropertyValue("choicesOrder");
        },
        set: function (val) {
            val = val.toLowerCase();
            if (val == this.choicesOrder)
                return;
            this.setPropertyValue("choicesOrder", val);
            this.onVisibleChoicesChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "otherText", {
        /**
         * Gets or sets a caption for the "Other" choice item.
         * @see showOtherItem
         */
        get: function () {
            return this.getLocalizableStringText("otherText");
        },
        set: function (val) {
            this.setLocalizableStringText("otherText", val);
            this.onVisibleChoicesChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "locOtherText", {
        get: function () {
            return this.getLocalizableString("otherText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "otherPlaceHolder", {
        get: function () {
            return this.otherPlaceholder;
        },
        set: function (newValue) {
            this.otherPlaceholder = newValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "otherErrorText", {
        /**
         * Get or sets an error message displayed when users select the "Other" choice item but leave the comment area empty.
         * @see showOtherItem
         */
        get: function () {
            return this.getLocalizableStringText("otherErrorText");
        },
        set: function (val) {
            this.setLocalizableStringText("otherErrorText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "locOtherErrorText", {
        get: function () {
            return this.getLocalizableString("otherErrorText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "visibleChoices", {
        /**
         * An array of visible choice items. Includes the "Select All", "Other", and "None" choice items if they are visible. Items are sorted according to the `choicesOrder` value.
         * @see showNoneItem
         * @see showOtherItem
         * @see choicesOrder
         * @see choices
         * @see enabledChoices
         */
        get: function () {
            return this.getPropertyValue("visibleChoices");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "enabledChoices", {
        /**
         * An array of choice items with which users can interact. Includes the "Select All", "Other", and "None" choice items if they are not disabled. Items are sorted according to the `choicesOrder` value.
         * @see showNoneItem
         * @see showOtherItem
         * @see choicesOrder
         * @see choices
         * @see visibleChoices
         */
        get: function () {
            var res = [];
            var items = this.visibleChoices;
            for (var i = 0; i < items.length; i++) {
                if (items[i].isEnabled)
                    res.push(items[i]);
            }
            return res;
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.updateVisibleChoices = function () {
        if (this.isLoadingFromJson)
            return;
        var newValue = new Array();
        var calcValue = this.calcVisibleChoices();
        if (!calcValue)
            calcValue = [];
        for (var i = 0; i < calcValue.length; i++) {
            newValue.push(calcValue[i]);
        }
        this.setPropertyValue("visibleChoices", newValue);
    };
    QuestionSelectBase.prototype.calcVisibleChoices = function () {
        if (this.canUseFilteredChoices())
            return this.getFilteredChoices();
        var res = this.sortVisibleChoices(this.getFilteredChoices().slice());
        this.addToVisibleChoices(res, this.isAddDefaultItems);
        return res;
    };
    QuestionSelectBase.prototype.canUseFilteredChoices = function () {
        return (!this.isAddDefaultItems &&
            !this.hasNone &&
            !this.hasOther &&
            this.choicesOrder == "none");
    };
    QuestionSelectBase.prototype.setCanShowOptionItemCallback = function (func) {
        this.canShowOptionItemCallback = func;
        if (!!func) {
            this.onVisibleChoicesChanged();
        }
    };
    Object.defineProperty(QuestionSelectBase.prototype, "newItem", {
        get: function () { return this.newItemValue; },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
        if (isAddAll) {
            if (!this.newItemValue) {
                this.newItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]("newitem"); //TODO
            }
            if (this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
                items.push(this.newItemValue);
            }
        }
        if (this.supportNone() && this.canShowOptionItem(this.noneItem, isAddAll, this.hasNone)) {
            items.push(this.noneItem);
        }
        if (this.supportOther() && this.canShowOptionItem(this.otherItem, isAddAll, this.hasOther)) {
            items.push(this.otherItem);
        }
    };
    QuestionSelectBase.prototype.canShowOptionItem = function (item, isAddAll, hasItem) {
        var res = (isAddAll && (!!this.canShowOptionItemCallback ? this.canShowOptionItemCallback(item) : true)) || hasItem;
        if (this.canSurveyChangeItemVisibility()) {
            var calc = this.changeItemVisisbility();
            return calc(item, res);
        }
        return res;
    };
    QuestionSelectBase.prototype.isItemInList = function (item) {
        if (item === this.otherItem)
            return this.hasOther;
        if (item === this.noneItem)
            return this.hasNone;
        if (item === this.newItemValue)
            return false;
        return true;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "isAddDefaultItems", {
        get: function () {
            return (_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].supportCreatorV2 && _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].showDefaultItemsInCreatorV2 && this.isDesignMode && !this.isContentElement);
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.getPlainData = function (options) {
        var _this = this;
        if (options === void 0) { options = {
            includeEmpty: true,
            includeQuestionTypes: false,
        }; }
        var questionPlainData = _super.prototype.getPlainData.call(this, options);
        if (!!questionPlainData) {
            var values = Array.isArray(this.value) ? this.value : [this.value];
            questionPlainData.isNode = true;
            questionPlainData.data = (questionPlainData.data || []).concat(values.map(function (dataValue, index) {
                var choice = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(_this.visibleChoices, dataValue);
                var choiceDataItem = {
                    name: index,
                    title: "Choice",
                    value: dataValue,
                    displayValue: _this.getChoicesDisplayValue(_this.visibleChoices, dataValue),
                    getString: function (val) {
                        return typeof val === "object" ? JSON.stringify(val) : val;
                    },
                    isNode: false,
                };
                if (!!choice) {
                    (options.calculations || []).forEach(function (calculation) {
                        choiceDataItem[calculation.propertyName] =
                            choice[calculation.propertyName];
                    });
                }
                if (_this.isOtherSelected && _this.otherItemValue === choice) {
                    choiceDataItem.isOther = true;
                    choiceDataItem.displayValue = _this.comment;
                }
                return choiceDataItem;
            }));
        }
        return questionPlainData;
    };
    QuestionSelectBase.prototype.getDisplayValueCore = function (keysAsText, value) {
        return this.getChoicesDisplayValue(this.visibleChoices, value);
    };
    QuestionSelectBase.prototype.getDisplayValueEmpty = function () {
        return _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getTextOrHtmlByValue(this.visibleChoices, undefined);
    };
    QuestionSelectBase.prototype.getChoicesDisplayValue = function (items, val) {
        if (val == this.otherItemValue.value)
            return this.comment ? this.comment : this.locOtherText.textOrHtml;
        var str = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getTextOrHtmlByValue(items, val);
        return str == "" && val ? val : str;
    };
    QuestionSelectBase.prototype.getDisplayArrayValue = function (keysAsText, value, onGetValueCallback) {
        var items = this.visibleChoices;
        var strs = [];
        for (var i = 0; i < value.length; i++) {
            var val = !onGetValueCallback ? value[i] : onGetValueCallback(i);
            var valStr = this.getChoicesDisplayValue(items, val);
            if (valStr) {
                strs.push(valStr);
            }
        }
        return strs.join(", ");
    };
    QuestionSelectBase.prototype.getFilteredChoices = function () {
        return this.filteredChoicesValue
            ? this.filteredChoicesValue
            : this.activeChoices;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "activeChoices", {
        get: function () {
            var question = this.getQuestionWithChoices();
            if (!!question) {
                this.addIntoDependedQuestion(question);
                return this.getChoicesFromQuestion(question);
            }
            return this.choicesFromUrl ? this.choicesFromUrl : this.getChoices();
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.getQuestionWithChoices = function () {
        if (!this.choicesFromQuestion || !this.survey)
            return null;
        var res = this.survey.getQuestionByName(this.choicesFromQuestion);
        return !!res && !!res.visibleChoices && res !== this ? res : null;
    };
    QuestionSelectBase.prototype.getChoicesFromQuestion = function (question) {
        var res = [];
        var isSelected = this.choicesFromQuestionMode == "selected"
            ? true
            : this.choicesFromQuestionMode == "unselected"
                ? false
                : undefined;
        var choices = question.visibleChoices;
        for (var i = 0; i < choices.length; i++) {
            if (this.isBuiltInChoice(choices[i], question))
                continue;
            if (isSelected === undefined) {
                res.push(choices[i]);
                continue;
            }
            var itemsSelected = question.isItemSelected(choices[i]);
            if ((itemsSelected && isSelected) || (!itemsSelected && !isSelected)) {
                res.push(choices[i]);
            }
        }
        return res;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "hasActiveChoices", {
        get: function () {
            var choices = this.visibleChoices;
            if (!choices || choices.length == 0) {
                this.onVisibleChoicesChanged();
                choices = this.visibleChoices;
            }
            for (var i = 0; i < choices.length; i++) {
                if (!this.isBuiltInChoice(choices[i], this))
                    return true;
            }
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.isHeadChoice = function (item, question) {
        return false;
    };
    QuestionSelectBase.prototype.isFootChoice = function (item, question) {
        return (item === question.noneItem ||
            item === question.otherItem ||
            item === question.newItemValue);
    };
    QuestionSelectBase.prototype.isBuiltInChoice = function (item, question) {
        return this.isHeadChoice(item, question) || this.isFootChoice(item, question);
    };
    QuestionSelectBase.prototype.getChoices = function () {
        return this.choices;
    };
    QuestionSelectBase.prototype.supportComment = function () {
        return true;
    };
    QuestionSelectBase.prototype.supportOther = function () {
        return this.isSupportProperty("showOtherItem");
    };
    QuestionSelectBase.prototype.supportNone = function () {
        return this.isSupportProperty("showNoneItem");
    };
    QuestionSelectBase.prototype.isSupportProperty = function (propName) {
        return (!this.isDesignMode ||
            _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].findProperty(this.getType(), propName).visible);
    };
    QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
        var _this = this;
        _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
        if (!this.hasOther || !this.isOtherSelected || this.comment)
            return;
        var otherEmptyError = new _error__WEBPACK_IMPORTED_MODULE_5__["OtherEmptyError"](this.otherErrorText, this);
        otherEmptyError.onUpdateErrorTextCallback = function (err) { err.text = _this.otherErrorText; };
        errors.push(otherEmptyError);
    };
    QuestionSelectBase.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value, isLight);
        this.runChoicesByUrl();
        if (this.isAddDefaultItems) {
            this.updateVisibleChoices();
        }
    };
    QuestionSelectBase.prototype.setSurveyCore = function (value) {
        _super.prototype.setSurveyCore.call(this, value);
        if (!!value && !!this.choicesFromQuestion) {
            this.onVisibleChoicesChanged();
        }
    };
    QuestionSelectBase.prototype.getStoreOthersAsComment = function () {
        if (this.isSettingDefaultValue)
            return false;
        return (this.storeOthersAsComment === true ||
            (this.storeOthersAsComment == "default" &&
                (this.survey != null ? this.survey.storeOthersAsComment : true)) ||
            (!this.choicesByUrl.isEmpty && !this.choicesFromUrl));
    };
    QuestionSelectBase.prototype.onSurveyLoad = function () {
        this.runChoicesByUrl();
        this.onVisibleChoicesChanged();
        _super.prototype.onSurveyLoad.call(this);
    };
    QuestionSelectBase.prototype.onAnyValueChanged = function (name) {
        _super.prototype.onAnyValueChanged.call(this, name);
        if (name != this.getValueName()) {
            this.runChoicesByUrl();
        }
        if (!!name && name == this.choicesFromQuestion) {
            this.onVisibleChoicesChanged();
        }
    };
    QuestionSelectBase.prototype.updateValueFromSurvey = function (newValue) {
        var newComment = "";
        if (this.hasOther &&
            !this.isRunningChoices &&
            !this.choicesByUrl.isRunning &&
            this.getStoreOthersAsComment()) {
            if (this.hasUnknownValue(newValue) && !this.getHasOther(newValue)) {
                newComment = this.getCommentFromValue(newValue);
                newValue = this.setOtherValueIntoValue(newValue);
            }
            else {
                newComment = this.data.getComment(this.getValueName());
            }
        }
        _super.prototype.updateValueFromSurvey.call(this, newValue);
        if (!!newComment) {
            this.setNewComment(newComment);
        }
    };
    QuestionSelectBase.prototype.getCommentFromValue = function (newValue) {
        return newValue;
    };
    QuestionSelectBase.prototype.setOtherValueIntoValue = function (newValue) {
        return this.otherItem.value;
    };
    QuestionSelectBase.prototype.runChoicesByUrl = function () {
        if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices)
            return;
        var processor = this.surveyImpl
            ? this.surveyImpl.getTextProcessor()
            : this.textProcessor;
        if (!processor)
            processor = this.survey;
        if (!processor)
            return;
        this.isReadyValue = this.isChoicesLoaded || this.choicesByUrl.isEmpty;
        this.isRunningChoices = true;
        this.choicesByUrl.run(processor);
        this.isRunningChoices = false;
    };
    QuestionSelectBase.prototype.onBeforeSendRequest = function () {
        if (_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].disableOnGettingChoicesFromWeb === true && !this.isReadOnly) {
            this.enableOnLoadingChoices = true;
            this.readOnly = true;
        }
    };
    QuestionSelectBase.prototype.onLoadChoicesFromUrl = function (array) {
        if (this.enableOnLoadingChoices) {
            this.readOnly = false;
        }
        if (!this.isReadOnly) {
            var errors = [];
            if (this.choicesByUrl && this.choicesByUrl.error) {
                errors.push(this.choicesByUrl.error);
            }
            this.errors = errors;
        }
        var newChoices = null;
        var checkCachedValuesOnExisting = true;
        if (this.isFirstLoadChoicesFromUrl &&
            !this.cachedValueForUrlRequests &&
            this.defaultValue) {
            this.cachedValueForUrlRequests = this.defaultValue;
            checkCachedValuesOnExisting = false;
        }
        if (this.isValueEmpty(this.cachedValueForUrlRequests)) {
            this.cachedValueForUrlRequests = this.value;
        }
        this.isFirstLoadChoicesFromUrl = false;
        var cachedValues = this.createCachedValueForUrlRequests(this.cachedValueForUrlRequests, checkCachedValuesOnExisting);
        if (array && (array.length > 0 || this.choicesByUrl.allowEmptyResponse)) {
            newChoices = new Array();
            _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].setData(newChoices, array);
        }
        if (!!newChoices) {
            for (var i = 0; i < newChoices.length; i++) {
                newChoices[i].locOwner = this;
            }
        }
        this.choicesFromUrl = newChoices;
        this.filterItems();
        this.onVisibleChoicesChanged();
        if (newChoices) {
            var newValue = this.updateCachedValueForUrlRequests(cachedValues, newChoices);
            if (!!newValue && !this.isReadOnly) {
                var hasChanged = !this.isTwoValueEquals(this.value, newValue.value);
                try {
                    if (!this.isValueEmpty(newValue.value)) {
                        this.allowNotifyValueChanged = false;
                        this.setQuestionValue(undefined, true, false);
                    }
                    this.allowNotifyValueChanged = hasChanged;
                    if (hasChanged) {
                        this.value = newValue.value;
                    }
                    else {
                        this.setQuestionValue(newValue.value);
                    }
                }
                finally {
                    this.allowNotifyValueChanged = true;
                }
            }
        }
        this.choicesLoaded();
    };
    QuestionSelectBase.prototype.createCachedValueForUrlRequests = function (val, checkOnExisting) {
        if (this.isValueEmpty(val))
            return null;
        if (Array.isArray(val)) {
            var res = [];
            for (var i = 0; i < val.length; i++) {
                res.push(this.createCachedValueForUrlRequests(val[i], true));
            }
            return res;
        }
        var isExists = checkOnExisting ? !this.hasUnknownValue(val) : true;
        return { value: val, isExists: isExists };
    };
    QuestionSelectBase.prototype.updateCachedValueForUrlRequests = function (val, newChoices) {
        if (this.isValueEmpty(val))
            return null;
        if (Array.isArray(val)) {
            var res = [];
            for (var i = 0; i < val.length; i++) {
                var updatedValue = this.updateCachedValueForUrlRequests(val[i], newChoices);
                if (updatedValue && !this.isValueEmpty(updatedValue.value)) {
                    var newValue = updatedValue.value;
                    var item = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(newChoices, updatedValue.value);
                    if (!!item) {
                        newValue = item.value;
                    }
                    res.push(newValue);
                }
            }
            return { value: res };
        }
        var value = val.isExists && this.hasUnknownValue(val.value) ? null : val.value;
        var item = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(newChoices, value);
        if (!!item) {
            value = item.value;
        }
        return { value: value };
    };
    QuestionSelectBase.prototype.updateChoicesDependedQuestions = function () {
        if (this.isUpdatingChoicesDependedQuestions)
            return;
        this.isUpdatingChoicesDependedQuestions = true;
        for (var i = 0; i < this.dependedQuestions.length; i++) {
            this.dependedQuestions[i].onVisibleChoicesChanged();
            this.dependedQuestions[i].updateChoicesDependedQuestions();
        }
        this.isUpdatingChoicesDependedQuestions = false;
    };
    QuestionSelectBase.prototype.onSurveyValueChanged = function (newValue) {
        _super.prototype.onSurveyValueChanged.call(this, newValue);
        if (this.isLoadingFromJson)
            return;
        this.updateChoicesDependedQuestions();
    };
    QuestionSelectBase.prototype.onVisibleChoicesChanged = function () {
        if (this.isLoadingFromJson)
            return;
        this.updateVisibleChoices();
        this.updateVisibilityBasedOnChoices();
        if (!!this.visibleChoicesChangedCallback) {
            this.visibleChoicesChangedCallback();
        }
        this.updateChoicesDependedQuestions();
    };
    QuestionSelectBase.prototype.updateVisibilityBasedOnChoices = function () {
        if (this.hideIfChoicesEmpty) {
            var filteredChoices = this.getFilteredChoices();
            this.visible = !filteredChoices || filteredChoices.length > 0;
        }
    };
    QuestionSelectBase.prototype.sortVisibleChoices = function (array) {
        var order = this.choicesOrder.toLowerCase();
        if (order == "asc")
            return this.sortArray(array, 1);
        if (order == "desc")
            return this.sortArray(array, -1);
        if (order == "random")
            return this.randomizeArray(array);
        return array;
    };
    QuestionSelectBase.prototype.sortArray = function (array, mult) {
        return array.sort(function (a, b) {
            if (a.calculatedText < b.calculatedText)
                return -1 * mult;
            if (a.calculatedText > b.calculatedText)
                return 1 * mult;
            return 0;
        });
    };
    QuestionSelectBase.prototype.randomizeArray = function (array) {
        return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].randomizeArray(array);
    };
    QuestionSelectBase.prototype.clearIncorrectValues = function () {
        if (!this.hasValueToClearIncorrectValues())
            return;
        if (!!this.survey &&
            this.survey.questionCountByValueName(this.getValueName()) > 1)
            return;
        if (!!this.choicesByUrl &&
            !this.choicesByUrl.isEmpty &&
            (!this.choicesFromUrl || this.choicesFromUrl.length == 0))
            return;
        if (this.clearIncorrectValuesCallback) {
            this.clearIncorrectValuesCallback();
        }
        else {
            this.clearIncorrectValuesCore();
        }
    };
    QuestionSelectBase.prototype.hasValueToClearIncorrectValues = function () {
        return !this.keepIncorrectValues && !this.isEmpty();
    };
    QuestionSelectBase.prototype.clearValueIfInvisibleCore = function () {
        _super.prototype.clearValueIfInvisibleCore.call(this);
        this.clearIncorrectValues();
    };
    /**
     * Returns `true` if a passed choice item is selected.
     *
     * To obtain a choice item to check, use the `noneItem` or `otherItem` property or the `choices` array.
     * @param item A choice item.
     * @see noneItem
     * @see otherItem
     * @see choices
     */
    QuestionSelectBase.prototype.isItemSelected = function (item) {
        if (item === this.otherItem)
            return this.isOtherSelected;
        return this.isItemSelectedCore(item);
    };
    QuestionSelectBase.prototype.isItemSelectedCore = function (item) {
        return item.value === this.value;
    };
    QuestionSelectBase.prototype.clearDisabledValues = function () {
        if (!this.survey || !this.survey.clearValueOnDisableItems)
            return;
        this.clearDisabledValuesCore();
    };
    QuestionSelectBase.prototype.clearIncorrectValuesCore = function () {
        var val = this.value;
        if (this.canClearValueAnUnknow(val)) {
            this.clearValue();
        }
    };
    QuestionSelectBase.prototype.canClearValueAnUnknow = function (val) {
        if (!this.getStoreOthersAsComment() && this.isOtherSelected)
            return false;
        return this.hasUnknownValue(val, true, true, true);
    };
    QuestionSelectBase.prototype.clearDisabledValuesCore = function () {
        if (this.isValueDisabled(this.value)) {
            this.clearValue();
        }
    };
    QuestionSelectBase.prototype.clearUnusedValues = function () {
        _super.prototype.clearUnusedValues.call(this);
        if (!this.isOtherSelected && !this.hasComment) {
            this.comment = "";
        }
    };
    QuestionSelectBase.prototype.getColumnClass = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.cssClasses.column)
            .append("sv-q-column-" + this.colCount, this.hasColumns)
            .toString();
    };
    QuestionSelectBase.prototype.getItemIndex = function (item) {
        return this.visibleChoices.indexOf(item);
    };
    QuestionSelectBase.prototype.getItemClass = function (item) {
        var options = { item: item };
        var res = this.getItemClassCore(item, options);
        options.css = res;
        if (!!this.survey) {
            this.survey.updateChoiceItemCss(this, options);
        }
        return options.css;
    };
    QuestionSelectBase.prototype.getCurrentColCount = function () {
        return this.colCount;
    };
    QuestionSelectBase.prototype.getItemClassCore = function (item, options) {
        var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.cssClasses.item)
            .append(this.cssClasses.itemInline, !this.hasColumns && this.colCount === 0)
            .append("sv-q-col-" + this.getCurrentColCount(), !this.hasColumns && this.colCount !== 0)
            .append(this.cssClasses.itemOnError, this.errors.length > 0);
        var isDisabled = this.isReadOnly || !item.isEnabled;
        var isChecked = this.isItemSelected(item) ||
            (this.isOtherSelected && this.otherItem.value === item.value);
        var allowHover = !isDisabled && !isChecked && !(!!this.survey && this.survey.isDesignMode);
        var isNone = item === this.noneItem;
        options.isDisabled = isDisabled;
        options.isChecked = isChecked;
        options.isNone = isNone;
        return builder.append(this.cssClasses.itemDisabled, isDisabled)
            .append(this.cssClasses.itemChecked, isChecked)
            .append(this.cssClasses.itemHover, allowHover)
            .append(this.cssClasses.itemNone, isNone)
            .toString();
    };
    QuestionSelectBase.prototype.getLabelClass = function (item) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.cssClasses.label)
            .append(this.cssClasses.labelChecked, this.isItemSelected(item))
            .toString();
    };
    QuestionSelectBase.prototype.getControlLabelClass = function (item) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.cssClasses.controlLabel)
            .append(this.cssClasses.controlLabelChecked, this.isItemSelected(item))
            .toString() || undefined;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
        get: function () {
            var _this = this;
            return (this.separateSpecialChoices || this.isDesignMode) ?
                this.visibleChoices.filter(function (choice) { return _this.isHeadChoice(choice, _this); }) : [];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "footItems", {
        get: function () {
            var _this = this;
            return (this.separateSpecialChoices || this.isDesignMode) ?
                this.visibleChoices.filter(function (choice) { return _this.isFootChoice(choice, _this); }) : [];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "dataChoices", {
        get: function () {
            var _this = this;
            return this.visibleChoices.filter(function (item) { return !_this.isBuiltInChoice(item, _this); });
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "bodyItems", {
        get: function () {
            return (this.hasHeadItems || this.hasFootItems) ? this.dataChoices : this.visibleChoices;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "hasHeadItems", {
        get: function () {
            return this.headItems.length > 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "hasFootItems", {
        get: function () {
            return this.footItems.length > 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "columns", {
        get: function () {
            var columns = [];
            var colCount = this.getCurrentColCount();
            if (this.hasColumns && this.visibleChoices.length > 0) {
                var choicesToBuildColumns = (!this.separateSpecialChoices && !this.isDesignMode) ?
                    this.visibleChoices : this.dataChoices;
                if (_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].showItemsInOrder == "column") {
                    var prevIndex = 0;
                    var leftElementsCount = choicesToBuildColumns.length % colCount;
                    for (var i = 0; i < colCount; i++) {
                        var column = [];
                        for (var j = prevIndex; j < prevIndex + Math.floor(choicesToBuildColumns.length / colCount); j++) {
                            column.push(choicesToBuildColumns[j]);
                        }
                        if (leftElementsCount > 0) {
                            leftElementsCount--;
                            column.push(choicesToBuildColumns[j]);
                            j++;
                        }
                        prevIndex = j;
                        columns.push(column);
                    }
                }
                else {
                    for (var i = 0; i < colCount; i++) {
                        var column = [];
                        for (var j = i; j < choicesToBuildColumns.length; j += colCount) {
                            column.push(choicesToBuildColumns[j]);
                        }
                        columns.push(column);
                    }
                }
            }
            return columns;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
        get: function () {
            return !this.isMobile &&
                (this.getCurrentColCount() > 1);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "rowLayout", {
        get: function () {
            return this.getCurrentColCount() == 0 && !(this.hasFootItems || this.hasHeadItems);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSelectBase.prototype, "blockedRow", {
        get: function () {
            return this.getCurrentColCount() == 0 && (this.hasFootItems || this.hasHeadItems);
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.choicesLoaded = function () {
        this.isChoicesLoaded = true;
        var oldIsReady = this.isReadyValue;
        this.isReadyValue = true;
        this.onReadyChanged &&
            this.onReadyChanged.fire(this, {
                question: this,
                isReady: true,
                oldIsReady: oldIsReady,
            });
        if (this.survey) {
            this.survey.loadedChoicesFromServer(this);
        }
        if (this.loadedChoicesFromServerCallback) {
            this.loadedChoicesFromServerCallback();
        }
    };
    QuestionSelectBase.prototype.getItemValueWrapperComponentName = function (item) {
        var survey = this.survey;
        if (survey) {
            return survey.getItemValueWrapperComponentName(item, this);
        }
        return _survey__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"].TemplateRendererComponentName;
    };
    QuestionSelectBase.prototype.getItemValueWrapperComponentData = function (item) {
        var survey = this.survey;
        if (survey) {
            return survey.getItemValueWrapperComponentData(item, this);
        }
        return item;
    };
    QuestionSelectBase.prototype.ariaItemChecked = function (item) {
        return this.renderedValue === item.value ? "true" : "false";
    };
    QuestionSelectBase.prototype.isOtherItem = function (item) {
        return this.hasOther && item.value == this.otherItem.value;
    };
    Object.defineProperty(QuestionSelectBase.prototype, "itemSvgIcon", {
        get: function () {
            return this.cssClasses.itemSvgIconId;
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.getSelectBaseRootCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
            .append(this.cssClasses.root)
            .append(this.cssClasses.rootRow, this.rowLayout)
            .toString();
    };
    QuestionSelectBase.prototype.getAriaItemLabel = function (item) {
        return item.locText.renderedHtml;
    };
    QuestionSelectBase.prototype.getItemId = function (item) {
        return this.inputId + "_" + this.getItemIndex(item);
    };
    Object.defineProperty(QuestionSelectBase.prototype, "questionName", {
        get: function () {
            return this.name + "_" + this.id;
        },
        enumerable: false,
        configurable: true
    });
    QuestionSelectBase.prototype.getItemEnabled = function (item) {
        return !this.isInputReadOnly && item.isEnabled;
    };
    QuestionSelectBase.prototype.afterRender = function (el) {
        _super.prototype.afterRender.call(this, el);
        this.rootElement = el;
    };
    QuestionSelectBase.prototype.focusOtherComment = function () {
        var _this = this;
        if (!!this.rootElement) {
            setTimeout(function () {
                var commentEl = _this.rootElement.querySelector("textarea");
                if (!!commentEl) {
                    commentEl.focus();
                }
            }, 10);
        }
    };
    QuestionSelectBase.prototype.onValueChanged = function () {
        _super.prototype.onValueChanged.call(this);
        if (!this.isDesignMode && !this.prevIsOtherSelected && this.isOtherSelected) {
            this.focusOtherComment();
        }
        this.prevIsOtherSelected = this.isOtherSelected;
    };
    QuestionSelectBase.prototype.getDefaultItemComponent = function () {
        return "";
    };
    Object.defineProperty(QuestionSelectBase.prototype, "itemComponent", {
        /**
         * The name of a component used to render items.
         */
        get: function () {
            return this.getPropertyValue("itemComponent", this.getDefaultItemComponent());
        },
        set: function (value) {
            this.setPropertyValue("itemComponent", value);
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], QuestionSelectBase.prototype, "selectedItemValues", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], QuestionSelectBase.prototype, "separateSpecialChoices", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
    ], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
    return QuestionSelectBase;
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));

/**
 * A base class for multiple-selection question types that can display choice items in multiple columns ([Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), [Image Picker](https://surveyjs.io/form-library/documentation/questionimagepickermodel)).
 */
var QuestionCheckboxBase = /** @class */ (function (_super) {
    __extends(QuestionCheckboxBase, _super);
    function QuestionCheckboxBase(name) {
        return _super.call(this, name) || this;
    }
    Object.defineProperty(QuestionCheckboxBase.prototype, "colCount", {
        /**
         * Get or sets the number of columns used to arrange choice items.
         *
         * Set this property to 0 if you want to display all items in one line. The default value depends on the available width.
         * @see separateSpecialChoices
         */
        get: function () {
            return this.getPropertyValue("colCount", this.isFlowLayout ? 0 : 1);
        },
        set: function (value) {
            if (value < 0 || value > 5 || this.isFlowLayout)
                return;
            this.setPropertyValue("colCount", value);
            this.fireCallback(this.colCountChangedCallback);
        },
        enumerable: false,
        configurable: true
    });
    QuestionCheckboxBase.prototype.onParentChanged = function () {
        _super.prototype.onParentChanged.call(this);
        if (this.isFlowLayout) {
            this.setPropertyValue("colCount", null);
        }
    };
    QuestionCheckboxBase.prototype.onParentQuestionChanged = function () {
        this.onVisibleChoicesChanged();
    };
    QuestionCheckboxBase.prototype.getSearchableItemValueKeys = function (keys) {
        keys.push("choices");
    };
    return QuestionCheckboxBase;
}(QuestionSelectBase));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("selectbase", [
    { name: "showCommentArea:switch", layout: "row", visible: true },
    {
        name: "commentText",
        dependsOn: "showCommentArea",
        visibleIf: function (obj) {
            return obj.hasComment;
        },
        serializationProperty: "locCommentText",
        layout: "row",
    },
    "choicesFromQuestion:question_selectbase",
    {
        name: "choices:itemvalue[]", uniqueProperty: "value",
        baseValue: function () {
            return _surveyStrings__WEBPACK_IMPORTED_MODULE_4__["surveyLocalization"].getString("choices_Item");
        },
        dependsOn: "choicesFromQuestion",
        visibleIf: function (obj) {
            return !obj.choicesFromQuestion;
        },
    },
    {
        name: "choicesFromQuestionMode",
        default: "all",
        choices: ["all", "selected", "unselected"],
        dependsOn: "choicesFromQuestion",
        visibleIf: function (obj) {
            return !!obj.choicesFromQuestion;
        },
    },
    {
        name: "choicesOrder",
        default: "none",
        choices: ["none", "asc", "desc", "random"],
        dependsOn: "choicesFromQuestion",
        visibleIf: function (obj) {
            return !obj.choicesFromQuestion;
        },
    },
    {
        name: "choicesByUrl:restfull",
        className: "ChoicesRestful",
        onGetValue: function (obj) {
            return obj.choicesByUrl.getData();
        },
        onSetValue: function (obj, value) {
            obj.choicesByUrl.setData(value);
        },
    },
    "hideIfChoicesEmpty:boolean",
    {
        name: "choicesVisibleIf:condition",
        dependsOn: "choicesFromQuestion",
        visibleIf: function (obj) {
            return !obj.choicesFromQuestion;
        },
    },
    {
        name: "choicesEnableIf:condition",
        dependsOn: "choicesFromQuestion",
        visibleIf: function (obj) {
            return !obj.choicesFromQuestion;
        },
    },
    { name: "separateSpecialChoices:boolean", visible: false },
    { name: "showOtherItem:boolean", alternativeName: "hasOther" },
    { name: "showNoneItem:boolean", alternativeName: "hasNone" },
    {
        name: "otherPlaceholder",
        alternativeName: "otherPlaceHolder",
        serializationProperty: "locOtherPlaceholder",
        dependsOn: "showOtherItem",
        visibleIf: function (obj) {
            return obj.hasOther;
        },
    },
    {
        name: "commentPlaceholder",
        alternativeName: "commentPlaceHolder",
        serializationProperty: "locCommentPlaceholder",
        dependsOn: "showCommentArea",
        visibleIf: function (obj) {
            return obj.hasComment;
        },
    },
    {
        name: "noneText",
        serializationProperty: "locNoneText",
        dependsOn: "showNoneItem",
        visibleIf: function (obj) {
            return obj.hasNone;
        },
    },
    {
        name: "otherText",
        serializationProperty: "locOtherText",
        dependsOn: "showOtherItem",
        visibleIf: function (obj) {
            return obj.hasOther;
        },
    },
    {
        name: "otherErrorText",
        serializationProperty: "locOtherErrorText",
        dependsOn: "showOtherItem",
        visibleIf: function (obj) {
            return obj.hasOther;
        },
    },
    {
        name: "storeOthersAsComment",
        default: "default",
        choices: ["default", true, false],
        visible: false,
    },
    // { name: "itemComponent", visible: false }
], null, "question");
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkboxbase", [
    {
        name: "colCount:number",
        default: 1,
        choices: [0, 1, 2, 3, 4, 5],
        layout: "row",
    }
], null, "selectbase");


/***/ }),

/***/ "./src/question_boolean.ts":
/*!*********************************!*\
  !*** ./src/question_boolean.ts ***!
  \*********************************/
/*! exports provided: QuestionBooleanModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionBooleanModel", function() { return QuestionBooleanModel; });
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





/**
 * A class that describes the Boolean question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-boolean/ (linkStyle))
 */
var QuestionBooleanModel = /** @class */ (function (_super) {
    __extends(QuestionBooleanModel, _super);
    function QuestionBooleanModel(name) {
        var _this = _super.call(this, name) || this;
        _this.createLocalizableString("labelFalse", _this, true, "booleanUncheckedLabel");
        _this.createLocalizableString("labelTrue", _this, true, "booleanCheckedLabel");
        return _this;
    }
    QuestionBooleanModel.prototype.getType = function () {
        return "boolean";
    };
    QuestionBooleanModel.prototype.isLayoutTypeSupported = function (layoutType) {
        return true;
    };
    QuestionBooleanModel.prototype.supportGoNextPageAutomatic = function () {
        return this.renderAs !== "checkbox";
    };
    Object.defineProperty(QuestionBooleanModel.prototype, "isIndeterminate", {
        get: function () {
            return this.isEmpty();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "hasTitle", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "booleanValue", {
        /**
         * Gets or sets the question value as a Boolean value.
         *
         * If you set the `valueTrue` and `valueFalse` properties, the `value` property contains their values instead of Boolean values. This may be inconvenient when you operate the question value in code. To access the standard Boolean values, use the `booleanValue` property.
         * @see valueTrue
         * @see valueFalse
         */
        get: function () {
            if (this.isEmpty())
                return null;
            return this.value == this.getValueTrue();
        },
        set: function (val) {
            if (this.isReadOnly) {
                return;
            }
            this.setBooleanValue(val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "checkedValue", {
        get: function () { return this.booleanValue; },
        set: function (val) { this.booleanValue = val; },
        enumerable: false,
        configurable: true
    });
    QuestionBooleanModel.prototype.setBooleanValue = function (val) {
        if (this.isValueEmpty(val)) {
            this.value = null;
        }
        else {
            this.value = val == true ? this.getValueTrue() : this.getValueFalse();
        }
    };
    Object.defineProperty(QuestionBooleanModel.prototype, "defaultValue", {
        get: function () {
            return this.getPropertyValue("defaultValue");
        },
        set: function (val) {
            if (val === true)
                val = "true";
            if (val === false)
                val = "false";
            if (val === undefined)
                val = "indeterminate";
            this.setPropertyValue("defaultValue", val);
            this.updateValueWithDefaults();
        },
        enumerable: false,
        configurable: true
    });
    QuestionBooleanModel.prototype.getDefaultValue = function () {
        if (this.defaultValue == "indeterminate")
            return null;
        if (this.defaultValue === undefined)
            return null;
        return this.defaultValue == "true"
            ? this.getValueTrue()
            : this.getValueFalse();
    };
    Object.defineProperty(QuestionBooleanModel.prototype, "locTitle", {
        get: function () {
            var original = this.getLocalizableString("title");
            if (!this.isValueEmpty(this.locLabel.text) && (this.isValueEmpty(original.text) || this.isLabelRendered && !this.showTitle))
                return this.locLabel;
            return original;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "labelRenderedAriaID", {
        get: function () {
            return this.isLabelRendered ? this.ariaTitleId : null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "isLabelRendered", {
        get: function () {
            return this.titleLocation === "hidden";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "canRenderLabelDescription", {
        get: function () {
            return this.isLabelRendered && this.hasDescription && (this.hasDescriptionUnderTitle || this.hasDescriptionUnderInput);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "labelTrue", {
        /**
         * Gets or sets a text label that corresponds to a positive answer.
         *
         * Default value: "Yes"
         * @see valueTrue
         * @see valueFalse
         */
        get: function () {
            return this.getLocalizableStringText("labelTrue");
        },
        set: function (val) {
            this.setLocalizableStringText("labelTrue", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "locLabelTrue", {
        get: function () {
            return this.getLocalizableString("labelTrue");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "isDeterminated", {
        get: function () {
            return this.booleanValue !== null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "labelFalse", {
        /**
         * Gets or sets a text label that corresponds to a negative answer.
         *
         * Default value: "No"
         * @see valueTrue
         * @see valueFalse
         */
        get: function () {
            return this.getLocalizableStringText("labelFalse");
        },
        set: function (val) {
            this.setLocalizableStringText("labelFalse", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "locLabelFalse", {
        get: function () {
            return this.getLocalizableString("labelFalse");
        },
        enumerable: false,
        configurable: true
    });
    QuestionBooleanModel.prototype.getValueTrue = function () {
        return this.valueTrue ? this.valueTrue : true;
    };
    QuestionBooleanModel.prototype.getValueFalse = function () {
        return this.valueFalse ? this.valueFalse : false;
    };
    QuestionBooleanModel.prototype.setDefaultValue = function () {
        if (this.isDefaultValueSet("true", this.valueTrue))
            this.setBooleanValue(true);
        if (this.isDefaultValueSet("false", this.valueFalse))
            this.setBooleanValue(false);
        if (this.defaultValue == "indeterminate")
            this.setBooleanValue(null);
    };
    QuestionBooleanModel.prototype.isDefaultValueSet = function (defaultValueCheck, valueTrueOrFalse) {
        return this.defaultValue == defaultValueCheck || (valueTrueOrFalse !== undefined && this.defaultValue === valueTrueOrFalse);
    };
    QuestionBooleanModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        if (value == this.getValueTrue())
            return this.locLabelTrue.textOrHtml;
        return this.locLabelFalse.textOrHtml;
    };
    QuestionBooleanModel.prototype.getItemCssValue = function (css) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
            .append(css.item)
            .append(css.itemOnError, this.errors.length > 0)
            .append(css.itemDisabled, this.isReadOnly)
            .append(css.itemChecked, !!this.booleanValue)
            .append(css.itemIndeterminate, this.booleanValue === null)
            .toString();
    };
    QuestionBooleanModel.prototype.getItemCss = function () {
        return this.getItemCssValue(this.cssClasses);
    };
    QuestionBooleanModel.prototype.getCheckboxItemCss = function () {
        return this.getItemCssValue({
            item: this.cssClasses.checkboxItem,
            itemOnError: this.cssClasses.checkboxItemOnError,
            itemDisabled: this.cssClasses.checkboxItemDisabled,
            itemChecked: this.cssClasses.checkboxItemChecked,
            itemIndeterminate: this.cssClasses.checkboxItemIndeterminate
        });
    };
    QuestionBooleanModel.prototype.getLabelCss = function (checked) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
            .append(this.cssClasses.label)
            .append(this.cssClasses.disabledLabel, this.booleanValue === !checked || this.isReadOnly)
            .toString();
    };
    Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
        get: function () {
            if (this.booleanValue && this.cssClasses.svgIconCheckedId)
                return this.cssClasses.svgIconCheckedId;
            if (this.booleanValue === null && this.cssClasses.svgIconIndId)
                return this.cssClasses.svgIconIndId;
            if (!this.booleanValue && this.cssClasses.svgIconUncheckedId)
                return this.cssClasses.svgIconUncheckedId;
            return this.cssClasses.svgIconId;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionBooleanModel.prototype, "allowClick", {
        get: function () {
            return this.isIndeterminate && !this.isInputReadOnly;
        },
        enumerable: false,
        configurable: true
    });
    QuestionBooleanModel.prototype.getCheckedLabel = function () {
        if (this.booleanValue === true) {
            return this.locLabelTrue;
        }
        else if (this.booleanValue === false) {
            return this.locLabelFalse;
        }
    };
    QuestionBooleanModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        if (newValue === "true" && this.valueTrue !== "true")
            newValue = true;
        if (newValue === "false" && this.valueFalse !== "false")
            newValue = false;
        if (newValue === "indeterminate")
            newValue = null;
        _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
    };
    /* #region web-based methods */
    QuestionBooleanModel.prototype.onLabelClick = function (event, value) {
        if (this.allowClick) {
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["preventDefaults"])(event);
            this.booleanValue = value;
        }
        return true;
    };
    QuestionBooleanModel.prototype.calculateBooleanValueByEvent = function (event, isRightClick) {
        var isRtl = document.defaultView.getComputedStyle(event.target).direction == "rtl";
        this.booleanValue = isRtl ? !isRightClick : isRightClick;
    };
    QuestionBooleanModel.prototype.onSwitchClickModel = function (event) {
        if (this.allowClick) {
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["preventDefaults"])(event);
            var isRightClick = event.offsetX / event.target.offsetWidth > 0.5;
            this.calculateBooleanValueByEvent(event, isRightClick);
            return;
        }
        return true;
    };
    QuestionBooleanModel.prototype.onKeyDownCore = function (event) {
        if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["preventDefaults"])(event);
            this.calculateBooleanValueByEvent(event, event.key === "ArrowRight");
            return;
        }
        return true;
    };
    /* #endregion */
    QuestionBooleanModel.prototype.getRadioItemClass = function (css, value) {
        var className = undefined;
        if (css.radioItem) {
            className = css.radioItem;
        }
        if (css.radioItemChecked && value === this.value) {
            className = (className ? className + " " : "") + css.radioItemChecked;
        }
        return className;
    };
    QuestionBooleanModel.prototype.supportResponsiveness = function () {
        return true;
    };
    QuestionBooleanModel.prototype.getCompactRenderAs = function () {
        return "radio";
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], QuestionBooleanModel.prototype, "showTitle", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true })
    ], QuestionBooleanModel.prototype, "label", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], QuestionBooleanModel.prototype, "valueTrue", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], QuestionBooleanModel.prototype, "valueFalse", void 0);
    return QuestionBooleanModel;
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("boolean", [
    { name: "label:text", serializationProperty: "locLabel", isSerializable: false, visible: false },
    {
        name: "labelTrue:text",
        serializationProperty: "locLabelTrue",
    },
    {
        name: "labelFalse:text",
        serializationProperty: "locLabelFalse",
    },
    "valueTrue",
    "valueFalse",
    { name: "renderAs", default: "default", visible: false },
], function () {
    return new QuestionBooleanModel("");
}, "question");
_questionfactory__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("boolean", function (name) {
    return new QuestionBooleanModel(name);
});


/***/ }),

/***/ "./src/question_buttongroup.ts":
/*!*************************************!*\
  !*** ./src/question_buttongroup.ts ***!
  \*************************************/
/*! exports provided: ButtonGroupItemValue, QuestionButtonGroupModel, ButtonGroupItemModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemValue", function() { return ButtonGroupItemValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionButtonGroupModel", function() { return QuestionButtonGroupModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupItemModel", function() { return ButtonGroupItemModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_baseselect */ "./src/question_baseselect.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




var ButtonGroupItemValue = /** @class */ (function (_super) {
    __extends(ButtonGroupItemValue, _super);
    function ButtonGroupItemValue(value, text, typeName) {
        if (text === void 0) { text = null; }
        if (typeName === void 0) { typeName = "buttongroupitemvalue"; }
        var _this = _super.call(this, value, text, typeName) || this;
        _this.typeName = typeName;
        return _this;
    }
    ButtonGroupItemValue.prototype.getType = function () {
        return !!this.typeName ? this.typeName : "buttongroupitemvalue";
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], ButtonGroupItemValue.prototype, "iconName", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], ButtonGroupItemValue.prototype, "iconSize", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], ButtonGroupItemValue.prototype, "showCaption", void 0);
    return ButtonGroupItemValue;
}(_itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"]));

/**
 * A Model for a button group question.
 */
var QuestionButtonGroupModel = /** @class */ (function (_super) {
    __extends(QuestionButtonGroupModel, _super);
    function QuestionButtonGroupModel(name) {
        return _super.call(this, name) || this;
    }
    QuestionButtonGroupModel.prototype.getType = function () {
        return "buttongroup";
    };
    QuestionButtonGroupModel.prototype.getItemValueType = function () {
        return "buttongroupitemvalue";
    };
    QuestionButtonGroupModel.prototype.supportOther = function () {
        return false;
    };
    return QuestionButtonGroupModel;
}(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("buttongroup", [
    {
        name: "choices:buttongroupitemvalue[]",
    },
], function () {
    return new QuestionButtonGroupModel("");
}, "checkboxbase");
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("buttongroupitemvalue", [
    { name: "showCaption:boolean", default: true },
    { name: "iconName:text" },
    { name: "iconSize:number" },
], function (value) { return new ButtonGroupItemValue(value); }, "itemvalue");
// QuestionFactory.Instance.registerQuestion("buttongroup", name => {
//   var q = new QuestionButtonGroupModel(name);
//   q.choices = QuestionFactory.DefaultChoices;
//   return q;
// });
var ButtonGroupItemModel = /** @class */ (function () {
    function ButtonGroupItemModel(question, item, index) {
        this.question = question;
        this.item = item;
        this.index = index;
    }
    Object.defineProperty(ButtonGroupItemModel.prototype, "value", {
        get: function () {
            return this.item.value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "iconName", {
        get: function () {
            return this.item.iconName;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "iconSize", {
        get: function () {
            return this.item.iconSize || 24;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "caption", {
        get: function () {
            return this.item.locText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "showCaption", {
        get: function () {
            return this.item.showCaption || this.item.showCaption === undefined;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "isRequired", {
        get: function () {
            return this.question.isRequired;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "selected", {
        get: function () {
            return this.question.isItemSelected(this.item);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "readOnly", {
        get: function () {
            return this.question.isInputReadOnly || !this.item.isEnabled;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "name", {
        get: function () {
            return this.question.name + "_" + this.question.id;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "id", {
        get: function () {
            return this.question.inputId + "_" + this.index;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "hasErrors", {
        get: function () {
            return this.question.errors.length > 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "describedBy", {
        get: function () {
            return this.question.errors.length > 0
                ? this.question.id + "_errors"
                : null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "labelClass", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
                .append(this.question.cssClasses.item)
                .append(this.question.cssClasses.itemSelected, this.selected)
                .append(this.question.cssClasses.itemHover, !this.readOnly && !this.selected)
                .append(this.question.cssClasses.itemDisabled, this.question.isReadOnly || !this.item.isEnabled)
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ButtonGroupItemModel.prototype, "css", {
        get: function () {
            return {
                label: this.labelClass,
                icon: this.question.cssClasses.itemIcon,
                control: this.question.cssClasses.itemControl,
                caption: this.question.cssClasses.itemCaption,
                decorator: this.question.cssClasses.itemDecorator,
            };
        },
        enumerable: false,
        configurable: true
    });
    ButtonGroupItemModel.prototype.onChange = function () {
        this.question.renderedValue = this.item.value;
    };
    return ButtonGroupItemModel;
}());



/***/ }),

/***/ "./src/question_checkbox.ts":
/*!**********************************!*\
  !*** ./src/question_checkbox.ts ***!
  \**********************************/
/*! exports provided: QuestionCheckboxModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCheckboxModel", function() { return QuestionCheckboxModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_baseselect */ "./src/question_baseselect.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * A class that describes the Checkbox question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-checkbox/ (linkStyle))
 */
var QuestionCheckboxModel = /** @class */ (function (_super) {
    __extends(QuestionCheckboxModel, _super);
    function QuestionCheckboxModel(name) {
        var _this = _super.call(this, name) || this;
        _this.selectAllItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"]("selectall");
        _this.invisibleOldValues = {};
        _this.isChangingValueOnClearIncorrect = false;
        var selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
        _this.selectAllItem.locOwner = _this;
        _this.selectAllItem.setLocText(selectAllItemText);
        _this.registerPropertyChangedHandlers(["showSelectAllItem", "selectAllText"], function () {
            _this.onVisibleChoicesChanged();
        });
        return _this;
    }
    QuestionCheckboxModel.prototype.getDefaultItemComponent = function () {
        return "survey-checkbox-item";
    };
    Object.defineProperty(QuestionCheckboxModel.prototype, "ariaRole", {
        get: function () {
            return "listbox";
        },
        enumerable: false,
        configurable: true
    });
    QuestionCheckboxModel.prototype.getType = function () {
        return "checkbox";
    };
    QuestionCheckboxModel.prototype.onCreating = function () {
        _super.prototype.onCreating.call(this);
        this.createNewArray("renderedValue");
        this.createNewArray("value");
    };
    QuestionCheckboxModel.prototype.getFirstInputElementId = function () {
        return this.inputId + "_0";
    };
    Object.defineProperty(QuestionCheckboxModel.prototype, "valuePropertyName", {
        /**
         * Specifies a property name used to store selected values.
         *
         * Set this property if you want to store selected values in an array of objects instead of an array of primitive values. For example, if you set `valuePropertyName` to `"car"`, the `value` property will contain an array of objects `[{ car: "Ford" }, { car: "Tesla" }]`, not an array of string values `[ "Ford", "Tesla" ]`.
         */
        get: function () {
            return this.getPropertyValue("valuePropertyName");
        },
        set: function (val) {
            this.setPropertyValue("valuePropertyName", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionCheckboxModel.prototype.getQuestionFromArray = function (name, index) {
        if (!!name && name === this.valuePropertyName) {
            var v = this.value;
            if (Array.isArray(v) && index < v.length)
                return this;
        }
        return null;
    };
    Object.defineProperty(QuestionCheckboxModel.prototype, "selectAllItem", {
        /**
         * Returns the "Select All" choice item. Use this property to change the item's `value` or `text`.
         * @see showSelectAllItem
         */
        get: function () {
            return this.selectAllItemValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCheckboxModel.prototype, "selectAllText", {
        /**
         * Gets or sets a caption for the "Select All" choice item.
         * @see showSelectAllItem
         */
        get: function () {
            return this.getLocalizableStringText("selectAllText");
        },
        set: function (val) {
            this.setLocalizableStringText("selectAllText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCheckboxModel.prototype, "locSelectAllText", {
        get: function () {
            return this.getLocalizableString("selectAllText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCheckboxModel.prototype, "showSelectAllItem", {
        /**
         * Enable this property to display a "Select All" item. When users select it, all other choice items, except "Other" and "None", also become selected.
         * @see selectAll
         * @see isAllSelected
         * @see separateSpecialChoices
         */
        get: function () {
            return this.getPropertyValue("showSelectAllItem", false);
        },
        set: function (val) {
            this.setPropertyValue("showSelectAllItem", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCheckboxModel.prototype, "hasSelectAll", {
        get: function () {
            return this.showSelectAllItem;
        },
        set: function (val) {
            this.showSelectAllItem = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCheckboxModel.prototype, "isAllSelected", {
        /**
         * Returns `true` if all choice items, except "Other" and "None", are selected.
         * @see showSelectAllItem
         */
        get: function () {
            var val = this.value;
            if (!val || !Array.isArray(val))
                return false;
            if (this.isItemSelected(this.noneItem))
                return false;
            var allItemCount = this.visibleChoices.length;
            if (this.hasOther)
                allItemCount--;
            if (this.hasNone)
                allItemCount--;
            if (this.hasSelectAll)
                allItemCount--;
            var selectedCount = val.length;
            if (this.isOtherSelected)
                selectedCount--;
            return selectedCount === allItemCount;
        },
        set: function (val) {
            if (val) {
                this.selectAll();
            }
            else {
                this.clearValue();
            }
        },
        enumerable: false,
        configurable: true
    });
    QuestionCheckboxModel.prototype.toggleSelectAll = function () {
        this.isAllSelected = !this.isAllSelected;
    };
    /**
     * Selects all choice items, except "Other" and "None".
     *
     * To clear selection, call the `clearValue()` method.
     * @see clearValue
     */
    QuestionCheckboxModel.prototype.selectAll = function () {
        var val = [];
        for (var i = 0; i < this.visibleChoices.length; i++) {
            var item = this.visibleChoices[i];
            if (item === this.noneItem ||
                item === this.otherItem ||
                item === this.selectAllItem)
                continue;
            val.push(item.value);
        }
        this.renderedValue = val;
    };
    QuestionCheckboxModel.prototype.isItemSelectedCore = function (item) {
        if (item === this.selectAllItem)
            return this.isAllSelected;
        var val = this.renderedValue;
        if (!val || !Array.isArray(val))
            return false;
        for (var i = 0; i < val.length; i++) {
            if (this.isTwoValueEquals(val[i], item.value))
                return true;
        }
        return false;
    };
    QuestionCheckboxModel.prototype.getRealValue = function (val) {
        if (!val)
            return val;
        return !this.valuePropertyName ? val : val[this.valuePropertyName];
    };
    Object.defineProperty(QuestionCheckboxModel.prototype, "maxSelectedChoices", {
        /**
         * Sets a limit on the number of selected choices.
         *
         * Default value: 0 (unlimited)
         *
         * > NOTE: This property only limits the number of choice items that can be selected by users. You can select any number of choice items in code, regardless of the `maxSelectedChoices` value.
         */
        get: function () {
            return this.getPropertyValue("maxSelectedChoices");
        },
        set: function (val) {
            if (val < 0)
                val = 0;
            this.setPropertyValue("maxSelectedChoices", val);
            this.filterItems();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCheckboxModel.prototype, "selectedChoices", {
        /**
         * An array of selected choice items. Includes the "Other" and "None" choice items if they are selected, but not "Select All". Items are sorted in the order they were selected.
         * @see visibleChoices
         * @see enabledChoices
         */
        get: function () {
            var selectedItemValues = this.selectedItemValues;
            if (this.isEmpty())
                return [];
            var val = this.renderedValue;
            var allChoices = !!this.initialSelectedItemValues ? [].concat(this.initialSelectedItemValues, this.visibleChoices) : this.visibleChoices;
            var itemValues = val.map(function (item) { return _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"].getItemByValue(allChoices, item); }).filter(function (item) { return !!item; });
            if (!itemValues.length && !selectedItemValues) {
                this.updateSelectedItemValues();
            }
            if (!!itemValues.length)
                return itemValues;
            if (!!selectedItemValues && !!selectedItemValues.length) {
                this.initialSelectedItemValues = [].concat(selectedItemValues);
                return selectedItemValues;
            }
            return val.map(function (item) { return new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"](item); });
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCheckboxModel.prototype, "selectedItems", {
        get: function () { return this.selectedChoices; },
        enumerable: false,
        configurable: true
    });
    QuestionCheckboxModel.prototype.onEnableItemCallBack = function (item) {
        if (!this.shouldCheckMaxSelectedChoices())
            return true;
        return this.isItemSelected(item);
    };
    QuestionCheckboxModel.prototype.onAfterRunItemsEnableCondition = function () {
        if (this.maxSelectedChoices < 1)
            return;
        if (this.hasSelectAll) {
            this.selectAllItem.setIsEnabled(this.maxSelectedChoices >= this.activeChoices.length);
        }
        if (this.hasOther) {
            this.otherItem.setIsEnabled(!this.shouldCheckMaxSelectedChoices() || this.isOtherSelected);
        }
    };
    QuestionCheckboxModel.prototype.shouldCheckMaxSelectedChoices = function () {
        if (this.maxSelectedChoices < 1)
            return false;
        var val = this.value;
        var len = !Array.isArray(val) ? 0 : val.length;
        return len >= this.maxSelectedChoices;
    };
    QuestionCheckboxModel.prototype.getItemClassCore = function (item, options) {
        var __dummy_value = this.value; //trigger dependencies from koValue for knockout
        options.isSelectAllItem = item === this.selectAllItem;
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(_super.prototype.getItemClassCore.call(this, item, options))
            .append(this.cssClasses.itemSelectAll, options.isSelectAllItem)
            .toString();
    };
    QuestionCheckboxModel.prototype.updateValueFromSurvey = function (newValue) {
        _super.prototype.updateValueFromSurvey.call(this, newValue);
        this.invisibleOldValues = {};
    };
    QuestionCheckboxModel.prototype.setDefaultValue = function () {
        _super.prototype.setDefaultValue.call(this);
        var val = this.defaultValue;
        if (Array.isArray(val)) {
            for (var i = 0; i < val.length; i++) {
                var rVal = this.getRealValue(val[i]);
                if (this.canClearValueAnUnknow(rVal)) {
                    this.addIntoInvisibleOldValues(rVal);
                }
            }
        }
    };
    QuestionCheckboxModel.prototype.addIntoInvisibleOldValues = function (val) {
        this.invisibleOldValues[val] = val;
    };
    QuestionCheckboxModel.prototype.hasValueToClearIncorrectValues = function () {
        return _super.prototype.hasValueToClearIncorrectValues.call(this) || !_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isValueEmpty(this.invisibleOldValues);
    };
    QuestionCheckboxModel.prototype.setNewValue = function (newValue) {
        if (!this.isChangingValueOnClearIncorrect) {
            this.invisibleOldValues = {};
        }
        newValue = this.valueFromData(newValue);
        var value = this.value;
        if (!newValue)
            newValue = [];
        if (!value)
            value = [];
        if (this.isTwoValueEquals(value, newValue))
            return;
        if (this.hasNone) {
            var prevNoneIndex = this.noneIndexInArray(value);
            var newNoneIndex = this.noneIndexInArray(newValue);
            if (prevNoneIndex > -1) {
                if (newNoneIndex > -1 && newValue.length > 1) {
                    newValue.splice(newNoneIndex, 1);
                }
            }
            else {
                if (newNoneIndex > -1) {
                    newValue.splice(0, newValue.length);
                    newValue.push(this.noneItem.value);
                }
            }
        }
        _super.prototype.setNewValue.call(this, newValue);
    };
    QuestionCheckboxModel.prototype.getIsMultipleValue = function () {
        return true;
    };
    QuestionCheckboxModel.prototype.getCommentFromValue = function (newValue) {
        var ind = this.getFirstUnknownIndex(newValue);
        if (ind < 0)
            return "";
        return newValue[ind];
    };
    QuestionCheckboxModel.prototype.setOtherValueIntoValue = function (newValue) {
        var ind = this.getFirstUnknownIndex(newValue);
        if (ind < 0)
            return newValue;
        newValue.splice(ind, 1, this.otherItem.value);
        return newValue;
    };
    QuestionCheckboxModel.prototype.getFirstUnknownIndex = function (newValue) {
        if (!Array.isArray(newValue))
            return -1;
        for (var i = 0; i < newValue.length; i++) {
            if (this.hasUnknownValue(newValue[i], false, false))
                return i;
        }
        return -1;
    };
    QuestionCheckboxModel.prototype.noneIndexInArray = function (val) {
        if (!val || !Array.isArray(val))
            return -1;
        var noneValue = this.noneItem.value;
        for (var i = 0; i < val.length; i++) {
            if (val[i] == noneValue)
                return i;
        }
        return -1;
    };
    QuestionCheckboxModel.prototype.canUseFilteredChoices = function () {
        return !this.hasSelectAll && _super.prototype.canUseFilteredChoices.call(this);
    };
    QuestionCheckboxModel.prototype.supportSelectAll = function () {
        return this.isSupportProperty("showSelectAllItem");
    };
    QuestionCheckboxModel.prototype.addToVisibleChoices = function (items, isAddAll) {
        if (this.supportSelectAll() && this.canShowOptionItem(this.selectAllItem, isAddAll, this.hasSelectAll)) {
            items.unshift(this.selectAllItem);
        }
        _super.prototype.addToVisibleChoices.call(this, items, isAddAll);
    };
    QuestionCheckboxModel.prototype.isHeadChoice = function (item, question) {
        return (item === question.selectAllItem);
    };
    QuestionCheckboxModel.prototype.isItemInList = function (item) {
        if (item == this.selectAllItem)
            return this.hasSelectAll;
        return _super.prototype.isItemInList.call(this, item);
    };
    QuestionCheckboxModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        if (!Array.isArray(value))
            return _super.prototype.getDisplayValueCore.call(this, keysAsText, value);
        var valuePropName = this.valuePropertyName;
        var onGetValueCallback = function (index) {
            var val = value[index];
            if (!!valuePropName && !!val[valuePropName]) {
                val = val[valuePropName];
            }
            return val;
        };
        return this.getDisplayArrayValue(keysAsText, value, onGetValueCallback);
    };
    QuestionCheckboxModel.prototype.clearIncorrectValuesCore = function () {
        this.clearIncorrectAndDisabledValues(false);
    };
    QuestionCheckboxModel.prototype.clearDisabledValuesCore = function () {
        this.clearIncorrectAndDisabledValues(true);
    };
    QuestionCheckboxModel.prototype.clearIncorrectAndDisabledValues = function (clearDisabled) {
        var val = this.value;
        var hasChanged = false;
        var restoredValues = this.restoreValuesFromInvisible();
        if (!val && restoredValues.length == 0)
            return;
        if (!Array.isArray(val) || val.length == 0) {
            this.isChangingValueOnClearIncorrect = true;
            if (!clearDisabled) {
                if (this.hasComment) {
                    this.value = null;
                }
                else {
                    this.clearValue();
                }
            }
            this.isChangingValueOnClearIncorrect = false;
            if (restoredValues.length == 0)
                return;
            val = [];
        }
        var newValue = [];
        for (var i = 0; i < val.length; i++) {
            var rItemVal = this.getRealValue(val[i]);
            var isUnkown = this.canClearValueAnUnknow(rItemVal);
            if ((!clearDisabled && !isUnkown) ||
                (clearDisabled && !this.isValueDisabled(rItemVal))) {
                newValue.push(val[i]);
            }
            else {
                hasChanged = true;
                if (isUnkown) {
                    this.addIntoInvisibleOldValues(val[i]);
                }
            }
        }
        for (var i = 0; i < restoredValues.length; i++) {
            newValue.push(restoredValues[i]);
            hasChanged = true;
        }
        if (!hasChanged)
            return;
        this.isChangingValueOnClearIncorrect = true;
        if (newValue.length == 0) {
            this.clearValue();
        }
        else {
            this.value = newValue;
        }
        this.isChangingValueOnClearIncorrect = false;
    };
    QuestionCheckboxModel.prototype.restoreValuesFromInvisible = function () {
        var res = [];
        var visItems = this.visibleChoices;
        for (var i = 0; i < visItems.length; i++) {
            var val = visItems[i].value;
            if (_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isTwoValueEquals(val, this.invisibleOldValues[val])) {
                if (!this.isItemSelected(visItems[i])) {
                    res.push(val);
                }
                delete this.invisibleOldValues[val];
            }
        }
        return res;
    };
    QuestionCheckboxModel.prototype.getConditionJson = function (operator, path) {
        if (operator === void 0) { operator = null; }
        if (path === void 0) { path = null; }
        var json = _super.prototype.getConditionJson.call(this);
        if (operator == "contains" || operator == "notcontains") {
            json["type"] = "radiogroup";
        }
        return json;
    };
    QuestionCheckboxModel.prototype.isAnswerCorrect = function () {
        return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isArrayContainsEqual(this.value, this.correctAnswer);
    };
    QuestionCheckboxModel.prototype.setDefaultValueWithOthers = function () {
        this.value = this.renderedValueFromDataCore(this.defaultValue);
    };
    QuestionCheckboxModel.prototype.getHasOther = function (val) {
        if (!val || !Array.isArray(val))
            return false;
        return val.indexOf(this.otherItem.value) >= 0;
    };
    QuestionCheckboxModel.prototype.valueFromData = function (val) {
        if (!val)
            return val;
        if (!Array.isArray(val))
            return [_super.prototype.valueFromData.call(this, val)];
        var value = [];
        for (var i = 0; i < val.length; i++) {
            var choiceitem = _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"].getItemByValue(this.activeChoices, val[i]);
            if (!!choiceitem) {
                value.push(choiceitem.value);
            }
            else {
                value.push(val[i]);
            }
        }
        return value;
    };
    QuestionCheckboxModel.prototype.rendredValueFromData = function (val) {
        val = this.convertValueFromObject(val);
        return _super.prototype.rendredValueFromData.call(this, val);
    };
    QuestionCheckboxModel.prototype.rendredValueToData = function (val) {
        val = _super.prototype.rendredValueToData.call(this, val);
        return this.convertValueToObject(val);
    };
    QuestionCheckboxModel.prototype.convertValueFromObject = function (val) {
        if (!this.valuePropertyName)
            return val;
        return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].convertArrayObjectToValue(val, this.valuePropertyName);
    };
    QuestionCheckboxModel.prototype.convertValueToObject = function (val) {
        if (!this.valuePropertyName)
            return val;
        var dest = undefined;
        if (!!this.survey && this.survey.questionCountByValueName(this.getValueName()) > 1) {
            dest = this.data.getValue(this.getValueName());
        }
        return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].convertArrayValueToObject(val, this.valuePropertyName, dest);
    };
    QuestionCheckboxModel.prototype.renderedValueFromDataCore = function (val) {
        if (!val || !Array.isArray(val))
            val = [];
        if (!this.hasActiveChoices)
            return val;
        for (var i = 0; i < val.length; i++) {
            if (val[i] == this.otherItem.value)
                return val;
            if (this.hasUnknownValue(val[i], true, false)) {
                this.comment = val[i];
                var newVal = val.slice();
                newVal[i] = this.otherItem.value;
                return newVal;
            }
        }
        return val;
    };
    QuestionCheckboxModel.prototype.rendredValueToDataCore = function (val) {
        if (!val || !val.length)
            return val;
        for (var i = 0; i < val.length; i++) {
            if (val[i] == this.otherItem.value) {
                if (this.getQuestionComment()) {
                    var newVal = val.slice();
                    newVal[i] = this.getQuestionComment();
                    return newVal;
                }
            }
        }
        return val;
    };
    QuestionCheckboxModel.prototype.selectOtherValueFromComment = function (val) {
        var newVal = [];
        var rendVal = this.renderedValue;
        if (Array.isArray(rendVal)) {
            for (var i = 0; i < rendVal.length; i++) {
                if (rendVal[i] !== this.otherItem.value) {
                    newVal.push(rendVal[i]);
                }
            }
        }
        if (val) {
            newVal.push(this.otherItem.value);
        }
        this.value = newVal;
    };
    Object.defineProperty(QuestionCheckboxModel.prototype, "checkBoxSvgPath", {
        get: function () {
            return "M5,13l2-2l3,3l7-7l2,2l-9,9L5,13z";
        },
        enumerable: false,
        configurable: true
    });
    return QuestionCheckboxModel;
}(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkbox", [
    { name: "showSelectAllItem:boolean", alternativeName: "hasSelectAll" },
    { name: "separateSpecialChoices", visible: true },
    { name: "maxSelectedChoices:number", default: 0 },
    {
        name: "selectAllText",
        serializationProperty: "locSelectAllText",
        dependsOn: "showSelectAllItem",
        visibleIf: function (obj) {
            return obj.hasSelectAll;
        }
    },
    {
        name: "valuePropertyName",
        category: "data"
    },
    { name: "itemComponent", visible: false, default: "survey-checkbox-item" }
], function () {
    return new QuestionCheckboxModel("");
}, "checkboxbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("checkbox", function (name) {
    var q = new QuestionCheckboxModel(name);
    q.choices = _questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/question_comment.ts":
/*!*********************************!*\
  !*** ./src/question_comment.ts ***!
  \*********************************/
/*! exports provided: QuestionCommentModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCommentModel", function() { return QuestionCommentModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question_textbase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_textbase */ "./src/question_textbase.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * A class that describes the Comment question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-comment/ (linkStyle))
 */
var QuestionCommentModel = /** @class */ (function (_super) {
    __extends(QuestionCommentModel, _super);
    function QuestionCommentModel() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Object.defineProperty(QuestionCommentModel.prototype, "rows", {
        /**
         * Specifies the visible height of the comment area, measured in lines.
         *
         * The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
         * @see cols
         */
        get: function () {
            return this.getPropertyValue("rows");
        },
        set: function (val) {
            this.setPropertyValue("rows", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCommentModel.prototype, "cols", {
        /**
         * Specifies the visible width of the comment area, measured in average character width.
         *
         * The value of this property is passed on to the `cols` attribute of the underlying `<textarea>` element.
         * @see rows
         */
        get: function () {
            return this.getPropertyValue("cols");
        },
        set: function (val) {
            this.setPropertyValue("cols", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCommentModel.prototype, "acceptCarriageReturn", {
        /**
         * Specifies whether the question allows line breaks.
         *
         * When this property is enabled, a user can press Enter to insert line breaks. They are saved as `\n` in survey results. The Comment question also recognizes and interprets the `\n` sequence as a line break when you set the question `value` in code.
         */
        get: function () {
            return this.getPropertyValue("acceptCarriageReturn");
        },
        set: function (val) {
            this.setPropertyValue("acceptCarriageReturn", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCommentModel.prototype, "autoGrow", {
        /**
         * Specifies whether the comment area automatically increases its height to accomodate multi-line content.
         *
         * Default value: `false` (inherited from `SurveyModel`'s [`autoGrowComment`](https://surveyjs.io/form-library/documentation/surveymodel#autoGrowComment) property)
         */
        get: function () {
            return this.getPropertyValue("autoGrow") || (this.survey && this.survey.autoGrowComment);
        },
        set: function (val) {
            this.setPropertyValue("autoGrow", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionCommentModel.prototype.getType = function () {
        return "comment";
    };
    QuestionCommentModel.prototype.afterRenderQuestionElement = function (el) {
        this.element = document.getElementById(this.inputId) || el;
        this.updateElement();
        _super.prototype.afterRenderQuestionElement.call(this, el);
    };
    QuestionCommentModel.prototype.updateElement = function () {
        var _this = this;
        if (this.element && this.autoGrow) {
            setTimeout(function () { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["increaseHeightByContent"])(_this.element); }, 1);
        }
    };
    QuestionCommentModel.prototype.onInput = function (event) {
        if (this.isInputTextUpdate)
            this.value = event.target.value;
        else
            this.updateElement();
    };
    QuestionCommentModel.prototype.onKeyDown = function (event) {
        if (!this.acceptCarriageReturn && (event.key === "Enter" || event.keyCode === 13)) {
            event.preventDefault();
            event.stopPropagation();
        }
    };
    QuestionCommentModel.prototype.onValueChanged = function () {
        _super.prototype.onValueChanged.call(this);
        this.updateElement();
    };
    QuestionCommentModel.prototype.setNewValue = function (newValue) {
        if (!this.acceptCarriageReturn && !!newValue) {
            // eslint-disable-next-line no-control-regex
            newValue = newValue.replace(new RegExp("(\r\n|\n|\r)", "gm"), "");
        }
        _super.prototype.setNewValue.call(this, newValue);
    };
    Object.defineProperty(QuestionCommentModel.prototype, "className", {
        get: function () {
            return (this.cssClasses ? this.getControlClass() : "panel-comment-root") || undefined;
        },
        enumerable: false,
        configurable: true
    });
    return QuestionCommentModel;
}(_question_textbase__WEBPACK_IMPORTED_MODULE_2__["QuestionTextBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("comment", [
    { name: "maxLength:number", default: -1 },
    { name: "cols:number", default: 50 },
    { name: "rows:number", default: 4 },
    { name: "placeholder",
        alternativeName: "placeHolder",
        serializationProperty: "locPlaceholder" },
    {
        name: "textUpdateMode",
        default: "default",
        choices: ["default", "onBlur", "onTyping"],
    },
    { name: "autoGrow:boolean" },
    { name: "acceptCarriageReturn:boolean", default: true, visible: false }
], function () {
    return new QuestionCommentModel("");
}, "textbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("comment", function (name) {
    return new QuestionCommentModel(name);
});


/***/ }),

/***/ "./src/question_custom.ts":
/*!********************************!*\
  !*** ./src/question_custom.ts ***!
  \********************************/
/*! exports provided: ComponentQuestionJSON, ComponentCollection, QuestionCustomModelBase, QuestionCustomModel, QuestionCompositeModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentQuestionJSON", function() { return ComponentQuestionJSON; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentCollection", function() { return ComponentCollection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomModelBase", function() { return QuestionCustomModelBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCustomModel", function() { return QuestionCustomModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionCompositeModel", function() { return QuestionCompositeModel; });
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






var ComponentQuestionJSON = /** @class */ (function () {
    function ComponentQuestionJSON(name, json) {
        this.name = name;
        this.json = json;
        var self = this;
        _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass(name, [], function (json) {
            return ComponentCollection.Instance.createQuestion(!!json ? json.name : "", self);
        }, "question");
        this.onInit();
    }
    ComponentQuestionJSON.prototype.onInit = function () {
        if (!this.json.onInit)
            return;
        this.json.onInit();
    };
    ComponentQuestionJSON.prototype.onCreated = function (question) {
        if (!this.json.onCreated)
            return;
        this.json.onCreated(question);
    };
    ComponentQuestionJSON.prototype.onLoaded = function (question) {
        if (!this.json.onLoaded)
            return;
        this.json.onLoaded(question);
    };
    ComponentQuestionJSON.prototype.onAfterRender = function (question, htmlElement) {
        if (!this.json.onAfterRender)
            return;
        this.json.onAfterRender(question, htmlElement);
    };
    ComponentQuestionJSON.prototype.onAfterRenderContentElement = function (question, element, htmlElement) {
        if (!this.json.onAfterRenderContentElement)
            return;
        this.json.onAfterRenderContentElement(question, element, htmlElement);
    };
    ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
        if (!this.json.onPropertyChanged)
            return;
        this.json.onPropertyChanged(question, propertyName, newValue);
    };
    ComponentQuestionJSON.prototype.onValueChanged = function (question, name, newValue) {
        if (!this.json.onValueChanged)
            return;
        this.json.onValueChanged(question, name, newValue);
    };
    ComponentQuestionJSON.prototype.onItemValuePropertyChanged = function (question, item, propertyName, name, newValue) {
        if (!this.json.onItemValuePropertyChanged)
            return;
        this.json.onItemValuePropertyChanged(question, {
            obj: item,
            propertyName: propertyName,
            name: name,
            newValue: newValue,
        });
    };
    ComponentQuestionJSON.prototype.getDisplayValue = function (keyAsText, value, question) {
        if (!this.json.getDisplayValue)
            return question.getDisplayValue(keyAsText, value);
        return this.json.getDisplayValue(question);
    };
    Object.defineProperty(ComponentQuestionJSON.prototype, "isComposite", {
        get: function () {
            return !!this.json.elementsJSON || !!this.json.createElements;
        },
        enumerable: false,
        configurable: true
    });
    return ComponentQuestionJSON;
}());

var ComponentCollection = /** @class */ (function () {
    function ComponentCollection() {
        this.customQuestionValues = [];
    }
    ComponentCollection.prototype.add = function (json) {
        if (!json)
            return;
        var name = json.name;
        if (!name) {
            throw "Attribute name is missed";
        }
        name = name.toLowerCase();
        if (!!this.getCustomQuestionByName(name)) {
            throw "There is already registered custom question with name '" +
                name +
                "'";
        }
        if (!!_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findClass(name)) {
            throw "There is already class with name '" + name + "'";
        }
        var customQuestion = new ComponentQuestionJSON(name, json);
        if (!!this.onAddingJson)
            this.onAddingJson(name, customQuestion.isComposite);
        this.customQuestionValues.push(customQuestion);
    };
    Object.defineProperty(ComponentCollection.prototype, "items", {
        get: function () {
            return this.customQuestionValues;
        },
        enumerable: false,
        configurable: true
    });
    ComponentCollection.prototype.getCustomQuestionByName = function (name) {
        for (var i = 0; i < this.customQuestionValues.length; i++) {
            if (this.customQuestionValues[i].name == name)
                return this.customQuestionValues[i];
        }
        return null;
    };
    ComponentCollection.prototype.clear = function () {
        for (var i = 0; i < this.customQuestionValues.length; i++) {
            _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(this.customQuestionValues[i].name);
        }
        this.customQuestionValues = [];
    };
    ComponentCollection.prototype.createQuestion = function (name, questionJSON) {
        if (!!questionJSON.isComposite)
            return this.createCompositeModel(name, questionJSON);
        return this.createCustomModel(name, questionJSON);
    };
    ComponentCollection.prototype.createCompositeModel = function (name, questionJSON) {
        if (!!this.onCreateComposite)
            return this.onCreateComposite(name, questionJSON);
        return new QuestionCompositeModel(name, questionJSON);
    };
    ComponentCollection.prototype.createCustomModel = function (name, questionJSON) {
        if (!!this.onCreateCustom)
            return this.onCreateCustom(name, questionJSON);
        return new QuestionCustomModel(name, questionJSON);
    };
    ComponentCollection.Instance = new ComponentCollection();
    return ComponentCollection;
}());

var QuestionCustomModelBase = /** @class */ (function (_super) {
    __extends(QuestionCustomModelBase, _super);
    function QuestionCustomModelBase(name, customQuestion) {
        var _this = _super.call(this, name) || this;
        _this.customQuestion = customQuestion;
        _jsonobject__WEBPACK_IMPORTED_MODULE_1__["CustomPropertiesCollection"].createProperties(_this);
        _survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].CreateDisabledDesignElements = true;
        _this.createWrapper();
        _survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].CreateDisabledDesignElements = false;
        if (!!_this.customQuestion) {
            _this.customQuestion.onCreated(_this);
        }
        return _this;
    }
    QuestionCustomModelBase.prototype.getType = function () {
        return !!this.customQuestion ? this.customQuestion.name : "custom";
    };
    QuestionCustomModelBase.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        if (!!this.getElement()) {
            this.getElement().locStrsChanged();
        }
    };
    QuestionCustomModelBase.prototype.createWrapper = function () { };
    QuestionCustomModelBase.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
        _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
        if (!!this.customQuestion && !this.isLoadingFromJson) {
            this.customQuestion.onPropertyChanged(this, name, newValue);
        }
    };
    QuestionCustomModelBase.prototype.itemValuePropertyChanged = function (item, name, oldValue, newValue) {
        _super.prototype.itemValuePropertyChanged.call(this, item, name, oldValue, newValue);
        if (!!this.customQuestion && !this.isLoadingFromJson) {
            this.customQuestion.onItemValuePropertyChanged(this, item, item.ownerPropertyName, name, newValue);
        }
    };
    QuestionCustomModelBase.prototype.onFirstRendering = function () {
        var el = this.getElement();
        if (!!el) {
            el.onFirstRendering();
        }
        _super.prototype.onFirstRendering.call(this);
    };
    QuestionCustomModelBase.prototype.initElement = function (el) {
        if (!el)
            return;
        el.setSurveyImpl(this);
        el.disableDesignActions = true;
    };
    QuestionCustomModelBase.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value, isLight);
        this.initElement(this.getElement());
    };
    QuestionCustomModelBase.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        if (!!this.getElement()) {
            this.getElement().onSurveyLoad();
            this.customQuestion.onLoaded(this);
        }
    };
    QuestionCustomModelBase.prototype.afterRenderQuestionElement = function (el) {
        //Do nothing
    };
    QuestionCustomModelBase.prototype.afterRender = function (el) {
        _super.prototype.afterRender.call(this, el);
        if (!!this.customQuestion) {
            this.customQuestion.onAfterRender(this, el);
        }
    };
    QuestionCustomModelBase.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
        this.updateElementCss();
    };
    QuestionCustomModelBase.prototype.setNewValue = function (newValue) {
        _super.prototype.setNewValue.call(this, newValue);
        this.updateElementCss();
    };
    //ISurveyImpl
    QuestionCustomModelBase.prototype.getSurveyData = function () {
        return this;
    };
    // getSurvey(): ISurvey {
    //   return this.survey;
    // }
    QuestionCustomModelBase.prototype.getTextProcessor = function () {
        return this.textProcessor;
    };
    //ISurveyData
    QuestionCustomModelBase.prototype.getValue = function (name) {
        return this.value;
    };
    QuestionCustomModelBase.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
        if (!this.data)
            return;
        var newName = this.convertDataName(name);
        this.data.setValue(newName, this.convertDataValue(name, newValue), locNotification, allowNotifyValueChanged);
        this.updateIsAnswered();
        this.updateElementCss();
        if (!!this.customQuestion) {
            this.customQuestion.onValueChanged(this, name, newValue);
        }
    };
    QuestionCustomModelBase.prototype.convertDataName = function (name) {
        return this.getValueName();
    };
    QuestionCustomModelBase.prototype.convertDataValue = function (name, newValue) {
        return newValue;
    };
    QuestionCustomModelBase.prototype.getVariable = function (name) {
        return !!this.data ? this.data.getVariable(name) : null;
    };
    QuestionCustomModelBase.prototype.setVariable = function (name, newValue) {
        if (!this.data)
            return;
        this.data.setVariable(name, newValue);
    };
    QuestionCustomModelBase.prototype.getComment = function (name) {
        return !!this.data ? this.data.getComment(this.getValueName()) : "";
    };
    QuestionCustomModelBase.prototype.setComment = function (name, newValue, locNotification) {
        if (!this.data)
            return;
        this.data.setComment(this.getValueName(), newValue, locNotification);
    };
    QuestionCustomModelBase.prototype.getAllValues = function () {
        return !!this.data ? this.data.getAllValues() : {};
    };
    QuestionCustomModelBase.prototype.getFilteredValues = function () {
        return !!this.data ? this.data.getFilteredValues() : {};
    };
    QuestionCustomModelBase.prototype.getFilteredProperties = function () {
        return !!this.data ? this.data.getFilteredProperties() : {};
    };
    //IPanel
    QuestionCustomModelBase.prototype.addElement = function (element, index) { };
    QuestionCustomModelBase.prototype.removeElement = function (element) {
        return false;
    };
    QuestionCustomModelBase.prototype.getQuestionTitleLocation = function () {
        return "left";
    };
    QuestionCustomModelBase.prototype.getQuestionStartIndex = function () {
        return this.getStartIndex();
    };
    QuestionCustomModelBase.prototype.getChildrenLayoutType = function () {
        return "row";
    };
    QuestionCustomModelBase.prototype.elementWidthChanged = function (el) { };
    Object.defineProperty(QuestionCustomModelBase.prototype, "elements", {
        get: function () {
            return [];
        },
        enumerable: false,
        configurable: true
    });
    QuestionCustomModelBase.prototype.indexOf = function (el) {
        return -1;
    };
    QuestionCustomModelBase.prototype.ensureRowsVisibility = function () {
        // do nothing
    };
    QuestionCustomModelBase.prototype.getContentDisplayValueCore = function (keyAsText, value, question) {
        if (!question)
            return _super.prototype.getDisplayValueCore.call(this, keyAsText, value);
        return this.customQuestion.getDisplayValue(keyAsText, value, question);
    };
    return QuestionCustomModelBase;
}(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));

var QuestionCustomModel = /** @class */ (function (_super) {
    __extends(QuestionCustomModel, _super);
    function QuestionCustomModel() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    QuestionCustomModel.prototype.getTemplate = function () {
        return "custom";
    };
    QuestionCustomModel.prototype.createWrapper = function () {
        this.questionWrapper = this.createQuestion();
    };
    QuestionCustomModel.prototype.getElement = function () {
        return this.contentQuestion;
    };
    QuestionCustomModel.prototype.onAnyValueChanged = function (name) {
        _super.prototype.onAnyValueChanged.call(this, name);
        if (!!this.contentQuestion) {
            this.contentQuestion.onAnyValueChanged(name);
        }
    };
    QuestionCustomModel.prototype.hasErrors = function (fireCallback, rec) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (rec === void 0) { rec = null; }
        if (!this.contentQuestion)
            return false;
        var res = this.contentQuestion.hasErrors(fireCallback, rec);
        this.errors = [];
        for (var i = 0; i < this.contentQuestion.errors.length; i++) {
            this.errors.push(this.contentQuestion.errors[i]);
        }
        if (!res) {
            res = _super.prototype.hasErrors.call(this, fireCallback, rec);
        }
        this.updateElementCss();
        return res;
    };
    QuestionCustomModel.prototype.focus = function (onError) {
        if (onError === void 0) { onError = false; }
        if (!!this.contentQuestion) {
            this.contentQuestion.focus(onError);
        }
        else {
            _super.prototype.focus.call(this, onError);
        }
    };
    Object.defineProperty(QuestionCustomModel.prototype, "contentQuestion", {
        get: function () {
            return this.questionWrapper;
        },
        enumerable: false,
        configurable: true
    });
    QuestionCustomModel.prototype.createQuestion = function () {
        var json = this.customQuestion.json;
        var res = null;
        if (!!json.questionJSON) {
            var qType = json.questionJSON.type;
            if (!qType || !_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findClass(qType))
                throw "type attribute in questionJSON is empty or incorrect";
            res = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(qType);
            this.initElement(res);
            res.fromJSON(json.questionJSON);
        }
        else {
            if (!!json.createQuestion) {
                res = json.createQuestion();
                this.initElement(res);
            }
        }
        if (!!res) {
            res.isContentElement = true;
            if (!res.name) {
                res.name = "question";
            }
        }
        return res;
    };
    QuestionCustomModel.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        if (!this.contentQuestion)
            return;
        if (this.isEmpty() && !this.contentQuestion.isEmpty()) {
            this.value = this.contentQuestion.value;
        }
    };
    QuestionCustomModel.prototype.runCondition = function (values, properties) {
        _super.prototype.runCondition.call(this, values, properties);
        if (!!this.contentQuestion) {
            this.contentQuestion.runCondition(values, properties);
        }
    };
    QuestionCustomModel.prototype.convertDataName = function (name) {
        if (!this.contentQuestion)
            return _super.prototype.convertDataName.call(this, name);
        var newName = name.replace(this.contentQuestion.getValueName(), this.getValueName());
        return newName.indexOf(this.getValueName()) == 0
            ? newName
            : _super.prototype.convertDataName.call(this, name);
    };
    QuestionCustomModel.prototype.convertDataValue = function (name, newValue) {
        return this.convertDataName(name) == _super.prototype.convertDataName.call(this, name)
            ? this.contentQuestion.value
            : newValue;
    };
    QuestionCustomModel.prototype.canSetValueToSurvey = function () {
        return false;
    };
    QuestionCustomModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
        if (!this.isLoadingFromJson && !!this.contentQuestion &&
            !this.isTwoValueEquals(this.contentQuestion.value, newValue)) {
            this.contentQuestion.value = this.getUnbindValue(newValue);
        }
    };
    QuestionCustomModel.prototype.onSurveyValueChanged = function (newValue) {
        _super.prototype.onSurveyValueChanged.call(this, newValue);
        if (!!this.contentQuestion) {
            this.contentQuestion.onSurveyValueChanged(newValue);
        }
    };
    QuestionCustomModel.prototype.getValueCore = function () {
        if (!!this.contentQuestion)
            return this.contentQuestion.value;
        return _super.prototype.getValueCore.call(this);
    };
    QuestionCustomModel.prototype.initElement = function (el) {
        var _this = this;
        _super.prototype.initElement.call(this, el);
        if (!!el) {
            el.parent = this;
            el.afterRenderQuestionCallback = function (question, element) {
                if (!!_this.customQuestion) {
                    _this.customQuestion.onAfterRenderContentElement(_this, question, element);
                }
            };
        }
    };
    QuestionCustomModel.prototype.updateElementCss = function (reNew) {
        if (!!this.contentQuestion) {
            this.questionWrapper.updateElementCss(reNew);
        }
        _super.prototype.updateElementCss.call(this, reNew);
    };
    QuestionCustomModel.prototype.updateElementCssCore = function (cssClasses) {
        if (!!this.contentQuestion) {
            cssClasses = this.contentQuestion.cssClasses;
        }
        _super.prototype.updateElementCssCore.call(this, cssClasses);
    };
    QuestionCustomModel.prototype.getDisplayValueCore = function (keyAsText, value) {
        return _super.prototype.getContentDisplayValueCore.call(this, keyAsText, value, this.contentQuestion);
    };
    return QuestionCustomModel;
}(QuestionCustomModelBase));

var QuestionCompositeTextProcessor = /** @class */ (function (_super) {
    __extends(QuestionCompositeTextProcessor, _super);
    function QuestionCompositeTextProcessor(composite, variableName) {
        var _this = _super.call(this, variableName) || this;
        _this.composite = composite;
        _this.variableName = variableName;
        return _this;
    }
    Object.defineProperty(QuestionCompositeTextProcessor.prototype, "survey", {
        get: function () {
            return this.composite.survey;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionCompositeTextProcessor.prototype, "panel", {
        get: function () {
            return this.composite.contentPanel;
        },
        enumerable: false,
        configurable: true
    });
    return QuestionCompositeTextProcessor;
}(_textPreProcessor__WEBPACK_IMPORTED_MODULE_4__["QuestionTextProcessor"]));
var QuestionCompositeModel = /** @class */ (function (_super) {
    __extends(QuestionCompositeModel, _super);
    function QuestionCompositeModel(name, customQuestion) {
        var _this = _super.call(this, name, customQuestion) || this;
        _this.customQuestion = customQuestion;
        _this.settingNewValue = false;
        _this.textProcessing = new QuestionCompositeTextProcessor(_this, QuestionCompositeModel.ItemVariableName);
        return _this;
    }
    QuestionCompositeModel.prototype.createWrapper = function () {
        this.panelWrapper = this.createPanel();
    };
    QuestionCompositeModel.prototype.getTemplate = function () {
        return "composite";
    };
    QuestionCompositeModel.prototype.getElement = function () {
        return this.contentPanel;
    };
    QuestionCompositeModel.prototype.getCssRoot = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(_super.prototype.getCssRoot.call(this, cssClasses)).append(cssClasses.composite).toString();
    };
    Object.defineProperty(QuestionCompositeModel.prototype, "contentPanel", {
        get: function () {
            return this.panelWrapper;
        },
        enumerable: false,
        configurable: true
    });
    QuestionCompositeModel.prototype.hasErrors = function (fireCallback, rec) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (rec === void 0) { rec = null; }
        var res = _super.prototype.hasErrors.call(this, fireCallback, rec);
        if (!this.contentPanel)
            return res;
        return this.contentPanel.hasErrors(fireCallback, false, rec) || res;
    };
    QuestionCompositeModel.prototype.updateElementCss = function (reNew) {
        _super.prototype.updateElementCss.call(this, reNew);
        if (this.contentPanel) {
            this.contentPanel.updateElementCss(reNew);
        }
    };
    QuestionCompositeModel.prototype.getTextProcessor = function () {
        return this.textProcessing;
    };
    QuestionCompositeModel.prototype.clearValueIfInvisibleCore = function () {
        _super.prototype.clearValueIfInvisibleCore.call(this);
        var questions = this.contentPanel.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].clearValueIfInvisible();
        }
    };
    QuestionCompositeModel.prototype.onAnyValueChanged = function (name) {
        _super.prototype.onAnyValueChanged.call(this, name);
        var questions = this.contentPanel.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].onAnyValueChanged(name);
        }
    };
    QuestionCompositeModel.prototype.createPanel = function () {
        var res = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass("panel");
        res.showQuestionNumbers = "off";
        res.renderWidth = "100%";
        var json = this.customQuestion.json;
        if (!!json.elementsJSON) {
            res.fromJSON({ elements: json.elementsJSON });
        }
        if (!!json.createElements) {
            json.createElements(res, this);
        }
        this.initElement(res);
        res.readOnly = this.isReadOnly;
        this.setAfterRenderCallbacks(res);
        return res;
    };
    QuestionCompositeModel.prototype.onReadOnlyChanged = function () {
        if (!!this.contentPanel) {
            this.contentPanel.readOnly = this.isReadOnly;
        }
        _super.prototype.onReadOnlyChanged.call(this);
    };
    QuestionCompositeModel.prototype.onSurveyLoad = function () {
        if (!!this.contentPanel) {
            this.contentPanel.readOnly = this.isReadOnly;
            this.setIsContentElement(this.contentPanel);
        }
        _super.prototype.onSurveyLoad.call(this);
        if (!!this.contentPanel) {
            var val = this.contentPanel.getValue();
            if (!_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isValueEmpty(val)) {
                this.value = val;
            }
        }
    };
    QuestionCompositeModel.prototype.setIsContentElement = function (panel) {
        panel.isContentElement = true;
        var elements = panel.elements;
        for (var i = 0; i < elements.length; i++) {
            var el = elements[i];
            if (el.isPanel) {
                this.setIsContentElement(el);
            }
            else {
                el.isContentElement = true;
            }
        }
    };
    QuestionCompositeModel.prototype.setVisibleIndex = function (val) {
        var res = _super.prototype.setVisibleIndex.call(this, val);
        if (this.isVisible && !!this.contentPanel) {
            res += this.contentPanel.setVisibleIndex(val);
        }
        return res;
    };
    QuestionCompositeModel.prototype.runCondition = function (values, properties) {
        _super.prototype.runCondition.call(this, values, properties);
        if (!!this.contentPanel) {
            var oldComposite = values[QuestionCompositeModel.ItemVariableName];
            values[QuestionCompositeModel.ItemVariableName] = this.contentPanel.getValue();
            this.contentPanel.runCondition(values, properties);
            delete values[QuestionCompositeModel.ItemVariableName];
            if (!!oldComposite) {
                values[QuestionCompositeModel.ItemVariableName] = oldComposite;
            }
        }
    };
    QuestionCompositeModel.prototype.getValue = function (name) {
        var val = this.value;
        return !!val ? val[name] : null;
    };
    QuestionCompositeModel.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
        if (this.settingNewValue)
            return;
        this.settingNewValue = true;
        if (!this.isEditingSurveyElement && !!this.contentPanel) {
            var panelValue = this.contentPanel.getValue();
            if (!this.isTwoValueEquals(this.getValueCore(), panelValue)) {
                this.setValueCore(panelValue);
            }
        }
        _super.prototype.setValue.call(this, name, newValue, locNotification, allowNotifyValueChanged);
        if (!!this.contentPanel) {
            var q = this.contentPanel.getQuestionByName(name);
            if (!!q && !this.isTwoValueEquals(newValue, q.value)) {
                q.value = newValue;
            }
        }
        this.settingNewValue = false;
    };
    QuestionCompositeModel.prototype.addConditionObjectsByContext = function (objects, context) {
        if (!this.contentPanel)
            return;
        var questions = this.contentPanel.questions;
        var prefixName = this.name;
        var prefixText = this.title;
        for (var i = 0; i < questions.length; i++) {
            objects.push({
                name: prefixName + "." + questions[i].name,
                text: prefixText + "." + questions[i].title,
                question: questions[i],
            });
        }
    };
    QuestionCompositeModel.prototype.convertDataValue = function (name, newValue) {
        var val = this.value;
        if (!val)
            val = {};
        if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
            delete val[name];
        }
        else {
            val[name] = newValue;
        }
        return val;
    };
    QuestionCompositeModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
        this.settingNewValue = true;
        var questions = this.contentPanel.questions;
        for (var i = 0; i < questions.length; i++) {
            var key = questions[i].getValueName();
            questions[i].value = !!newValue ? newValue[key] : undefined;
        }
        this.settingNewValue = false;
    };
    QuestionCompositeModel.prototype.getDisplayValueCore = function (keyAsText, value) {
        return _super.prototype.getContentDisplayValueCore.call(this, keyAsText, value, this.contentPanel);
    };
    QuestionCompositeModel.prototype.setAfterRenderCallbacks = function (panel) {
        var _this = this;
        if (!panel || !this.customQuestion)
            return;
        var questions = panel.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].afterRenderQuestionCallback = function (question, element) {
                _this.customQuestion.onAfterRenderContentElement(_this, question, element);
            };
        }
    };
    QuestionCompositeModel.ItemVariableName = "composite";
    return QuestionCompositeModel;
}(QuestionCustomModelBase));



/***/ }),

/***/ "./src/question_dropdown.ts":
/*!**********************************!*\
  !*** ./src/question_dropdown.ts ***!
  \**********************************/
/*! exports provided: QuestionDropdownModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionDropdownModel", function() { return QuestionDropdownModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_baseselect */ "./src/question_baseselect.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _dropdownListModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dropdownListModel */ "./src/dropdownListModel.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};







/**
 * A class that describes the Dropdown question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdown/ (linkStyle))
 */
var QuestionDropdownModel = /** @class */ (function (_super) {
    __extends(QuestionDropdownModel, _super);
    function QuestionDropdownModel(name) {
        var _this = _super.call(this, name) || this;
        _this.lastSelectedItemValue = null;
        _this.minMaxChoices = [];
        _this.onOpened = _this.addEvent();
        _this.createLocalizableString("placeholder", _this, false, true);
        _this.createLocalizableString("clearCaption", _this, false, true);
        _this.registerPropertyChangedHandlers(["choicesMin", "choicesMax", "choicesStep"], function () {
            _this.onVisibleChoicesChanged();
        });
        _this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices"], function () {
            _this.updateReadOnlyText();
        });
        _this.updateReadOnlyText();
        return _this;
    }
    QuestionDropdownModel.prototype.updateReadOnlyText = function () {
        var result = !!this.selectedItem ? "" : this.placeholder;
        if (this.renderAs == "select") {
            if (this.isOtherSelected) {
                result = this.otherText;
            }
            else if (this.isNoneSelected) {
                result = this.noneText;
            }
            else if (!!this.selectedItem) {
                result = this.selectedItemText;
            }
        }
        this.readOnlyText = result;
    };
    QuestionDropdownModel.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        this.updateReadOnlyText();
    };
    Object.defineProperty(QuestionDropdownModel.prototype, "showOptionsCaption", {
        get: function () {
            return this.allowClear;
        },
        set: function (val) {
            this.allowClear = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "optionsCaption", {
        get: function () {
            return this.placeholder;
        },
        set: function (val) {
            this.placeholder = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "placeholder", {
        /**
         * A placeholder for the input field.
         */
        get: function () {
            return this.getLocalizableStringText("placeholder");
        },
        set: function (val) {
            this.setLocalizableStringText("placeholder", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "locPlaceholder", {
        get: function () {
            return this.getLocalizableString("placeholder");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "clearCaption", {
        get: function () {
            return this.getLocalizableStringText("clearCaption");
        },
        set: function (value) {
            this.setLocalizableStringText("clearCaption", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "locClearCaption", {
        get: function () {
            return this.getLocalizableString("clearCaption");
        },
        enumerable: false,
        configurable: true
    });
    QuestionDropdownModel.prototype.getType = function () {
        return "dropdown";
    };
    Object.defineProperty(QuestionDropdownModel.prototype, "selectedItem", {
        get: function () {
            var selectedItemValues = this.selectedItemValues;
            if (this.isEmpty())
                return null;
            var itemValue = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.visibleChoices, this.value);
            if (!!itemValue) {
                this.lastSelectedItemValue = itemValue;
            }
            else if (!selectedItemValues) {
                this.updateSelectedItemValues();
            }
            return this.lastSelectedItemValue || selectedItemValues || new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value);
        },
        enumerable: false,
        configurable: true
    });
    QuestionDropdownModel.prototype.supportGoNextPageAutomatic = function () {
        return true;
    };
    QuestionDropdownModel.prototype.getChoices = function () {
        var items = _super.prototype.getChoices.call(this);
        if (this.choicesMax <= this.choicesMin)
            return items;
        var res = [];
        for (var i = 0; i < items.length; i++) {
            res.push(items[i]);
        }
        if (this.minMaxChoices.length === 0 ||
            this.minMaxChoices.length !==
                (this.choicesMax - this.choicesMin) / this.choicesStep + 1) {
            this.minMaxChoices = [];
            for (var i = this.choicesMin; i <= this.choicesMax; i += this.choicesStep) {
                this.minMaxChoices.push(new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](i));
            }
        }
        res = res.concat(this.minMaxChoices);
        return res;
    };
    Object.defineProperty(QuestionDropdownModel.prototype, "choicesMin", {
        /**
         * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
         *
         * ```js
         * "choicesMin": 10,
         * "choicesMax": 30
         * "choicesStep": 10
         * ```
         * @see choicesMax
         * @see choicesStep
         */
        get: function () {
            return this.getPropertyValue("choicesMin");
        },
        set: function (val) {
            this.setPropertyValue("choicesMin", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "choicesMax", {
        /**
         * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
         *
         * ```js
         * "choicesMin": 10,
         * "choicesMax": 30
         * "choicesStep": 10
         * ```
         * @see choicesMin
         * @see choicesStep
         */
        get: function () {
            return this.getPropertyValue("choicesMax");
        },
        set: function (val) {
            this.setPropertyValue("choicesMax", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "choicesStep", {
        /**
         * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
         *
         * ```js
         * "choicesMin": 10,
         * "choicesMax": 30
         * "choicesStep": 10
         * ```
         *
         * The default value of the `choicesStep` property is 1.
         * @see choicesMin
         * @see choicesMax
         */
        get: function () {
            return this.getPropertyValue("choicesStep");
        },
        set: function (val) {
            if (val < 1)
                val = 1;
            this.setPropertyValue("choicesStep", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "autocomplete", {
        get: function () {
            return this.getPropertyValue("autocomplete", "");
        },
        set: function (val) {
            this.setPropertyValue("autocomplete", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionDropdownModel.prototype.getControlClass = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
            .append(this.cssClasses.control)
            .append(this.cssClasses.controlEmpty, this.isEmpty())
            .append(this.cssClasses.onError, this.errors.length > 0)
            .append(this.cssClasses.controlDisabled, this.isReadOnly)
            .append(this.cssClasses.controlInputFieldComponent, !!this.inputFieldComponentName)
            .toString();
    };
    Object.defineProperty(QuestionDropdownModel.prototype, "selectedItemLocText", {
        get: function () {
            var item = this.selectedItem;
            return item === null || item === void 0 ? void 0 : item.locText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "inputFieldComponentName", {
        get: function () {
            return this.inputFieldComponent || this.itemComponent;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "showSelectedItemLocText", {
        get: function () {
            return !this.inputHasValue && !this.inputFieldComponentName && !!this.selectedItemLocText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "showInputFieldComponent", {
        get: function () {
            return !this.inputHasValue && !!this.inputFieldComponentName && !this.isEmpty();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "selectedItemText", {
        get: function () {
            var item = this.selectedItem;
            return !!item ? item.text : "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionDropdownModel.prototype, "popupModel", {
        get: function () {
            var _a;
            if (this.renderAs !== "select" && !this.dropdownListModel) {
                this.dropdownListModel = new _dropdownListModel__WEBPACK_IMPORTED_MODULE_5__["DropdownListModel"](this);
            }
            return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
        },
        enumerable: false,
        configurable: true
    });
    QuestionDropdownModel.prototype.onOpenedCallBack = function () {
        this.onOpened.fire(this, { question: this, choices: this.choices });
    };
    QuestionDropdownModel.prototype.onVisibleChoicesChanged = function () {
        _super.prototype.onVisibleChoicesChanged.call(this);
        if (this.popupModel) {
            this.dropdownListModel.updateItems();
        }
    };
    QuestionDropdownModel.prototype.getFirstInputElementId = function () {
        return this.inputId + (this.searchEnabled ? "_0" : "");
    };
    QuestionDropdownModel.prototype.getInputId = function () {
        return this.inputId + "_0";
    };
    QuestionDropdownModel.prototype.clearValue = function () {
        _super.prototype.clearValue.call(this);
        this.lastSelectedItemValue = null;
    };
    QuestionDropdownModel.prototype.onClick = function (e) {
        !!this.onOpenedCallBack && this.onOpenedCallBack();
    };
    QuestionDropdownModel.prototype.onKeyUp = function (event) {
        var char = event.which || event.keyCode;
        if (char === 46) {
            this.clearValue();
            event.preventDefault();
            event.stopPropagation();
        }
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
    ], QuestionDropdownModel.prototype, "allowClear", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
            defaultValue: true,
            onSet: function (newValue, target) {
                if (!!target.dropdownListModel) {
                    target.dropdownListModel.setSearchEnabled(newValue);
                }
            }
        })
    ], QuestionDropdownModel.prototype, "searchEnabled", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], QuestionDropdownModel.prototype, "inputHasValue", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
    ], QuestionDropdownModel.prototype, "readOnlyText", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], QuestionDropdownModel.prototype, "choicesLazyLoadEnabled", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 25 })
    ], QuestionDropdownModel.prototype, "choicesLazyLoadPageSize", void 0);
    return QuestionDropdownModel;
}(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionSelectBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("dropdown", [
    { name: "placeholder", alternativeName: "optionsCaption", serializationProperty: "locPlaceholder" },
    { name: "allowClear:boolean", alternativeName: "showOptionsCaption", default: true },
    { name: "choicesMin:number", default: 0 },
    { name: "choicesMax:number", default: 0 },
    { name: "choicesStep:number", default: 1, minValue: 1 },
    { name: "autocomplete", alternativeName: "autoComplete", choices: _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].questions.dataList, },
    { name: "renderAs", default: "default", visible: false },
    { name: "searchEnabled:boolean", default: true, visible: false },
    { name: "choicesLazyLoadEnabled:boolean", default: false, visible: false },
    { name: "choicesLazyLoadPageSize:number", default: 25, visible: false },
    { name: "inputFieldComponent", visible: false },
    { name: "itemComponent", visible: false, default: "" }
], function () {
    return new QuestionDropdownModel("");
}, "selectbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("dropdown", function (name) {
    var q = new QuestionDropdownModel(name);
    q.choices = _questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/question_empty.ts":
/*!*******************************!*\
  !*** ./src/question_empty.ts ***!
  \*******************************/
/*! exports provided: QuestionEmptyModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionEmptyModel", function() { return QuestionEmptyModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./question */ "./src/question.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * A Model for an question that renders empty "div" tag. It used as a base class for some custom widgets
 */
var QuestionEmptyModel = /** @class */ (function (_super) {
    __extends(QuestionEmptyModel, _super);
    function QuestionEmptyModel(name) {
        return _super.call(this, name) || this;
    }
    QuestionEmptyModel.prototype.getType = function () {
        return "empty";
    };
    return QuestionEmptyModel;
}(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("empty", [], function () {
    return new QuestionEmptyModel("");
}, "question");


/***/ }),

/***/ "./src/question_expression.ts":
/*!************************************!*\
  !*** ./src/question_expression.ts ***!
  \************************************/
/*! exports provided: QuestionExpressionModel, getCurrecyCodes */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionExpressionModel", function() { return QuestionExpressionModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrecyCodes", function() { return getCurrecyCodes; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





/**
 * A class that describes the Expression question type. It is a read-only question type that calculates a value based on a specified expression.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-expression/ (linkStyle))
 */
var QuestionExpressionModel = /** @class */ (function (_super) {
    __extends(QuestionExpressionModel, _super);
    function QuestionExpressionModel(name) {
        var _this = _super.call(this, name) || this;
        _this.createLocalizableString("format", _this);
        _this.registerPropertyChangedHandlers(["expression"], function () {
            if (_this.expressionRunner) {
                _this.expressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_4__["ExpressionRunner"](_this.expression);
            }
        });
        _this.registerPropertyChangedHandlers(["format", "currency", "displayStyle"], function () {
            _this.updateFormatedValue();
        });
        return _this;
    }
    QuestionExpressionModel.prototype.getType = function () {
        return "expression";
    };
    Object.defineProperty(QuestionExpressionModel.prototype, "hasInput", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "format", {
        /**
         * A string that formats a question value. Use `{0}` to reference the question value in the format string.
         * @see displayStyle
         */
        get: function () {
            return this.getLocalizableStringText("format", "");
        },
        set: function (val) {
            this.setLocalizableStringText("format", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "locFormat", {
        get: function () {
            return this.getLocalizableString("format");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "expression", {
        /**
         * An expression used to calculate the question value.
         *
         * Refer to the following help topic for more information: [Expressions](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#expressions).
         */
        get: function () {
            return this.getPropertyValue("expression", "");
        },
        set: function (val) {
            this.setPropertyValue("expression", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionExpressionModel.prototype.locCalculation = function () {
        this.expressionIsRunning = true;
    };
    QuestionExpressionModel.prototype.unlocCalculation = function () {
        this.expressionIsRunning = false;
    };
    QuestionExpressionModel.prototype.runCondition = function (values, properties) {
        var _this = this;
        _super.prototype.runCondition.call(this, values, properties);
        if (!this.expression ||
            this.expressionIsRunning ||
            (!this.runIfReadOnly && this.isReadOnly))
            return;
        this.locCalculation();
        if (!this.expressionRunner) {
            this.expressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_4__["ExpressionRunner"](this.expression);
        }
        this.expressionRunner.onRunComplete = function (newValue) {
            if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(newValue, _this.value)) {
                _this.value = newValue;
            }
            _this.unlocCalculation();
        };
        this.expressionRunner.run(values, properties);
    };
    QuestionExpressionModel.prototype.canCollectErrors = function () {
        return true;
    };
    QuestionExpressionModel.prototype.hasRequiredError = function () {
        return false;
    };
    Object.defineProperty(QuestionExpressionModel.prototype, "maximumFractionDigits", {
        /**
         * The maximum number of fraction digits. Applies only if the `displayStyle` property is not `"none"`. Accepts values in the range from -1 to 20, where -1 disables the property.
         *
         * Default value: -1
         * @see displayStyle
         * @see minimumFractionDigits
         */
        get: function () {
            return this.getPropertyValue("maximumFractionDigits");
        },
        set: function (val) {
            if (val < -1 || val > 20)
                return;
            this.setPropertyValue("maximumFractionDigits", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "minimumFractionDigits", {
        /**
         * The minimum number of fraction digits. Applies only if the `displayStyle` property is not `"none"`. Accepts values in the range from -1 to 20, where -1 disables the property.
         *
         * Default value: -1
         * @see displayStyle
         * @see maximumFractionDigits
         */
        get: function () {
            return this.getPropertyValue("minimumFractionDigits");
        },
        set: function (val) {
            if (val < -1 || val > 20)
                return;
            this.setPropertyValue("minimumFractionDigits", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "runIfReadOnly", {
        get: function () {
            return this.runIfReadOnlyValue === true;
        },
        set: function (val) {
            this.runIfReadOnlyValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "formatedValue", {
        get: function () {
            return this.getPropertyValue("formatedValue", "");
        },
        enumerable: false,
        configurable: true
    });
    QuestionExpressionModel.prototype.updateFormatedValue = function () {
        this.setPropertyValue("formatedValue", this.getDisplayValueCore(false, this.value));
    };
    QuestionExpressionModel.prototype.onValueChanged = function () {
        this.updateFormatedValue();
    };
    QuestionExpressionModel.prototype.updateValueFromSurvey = function (newValue) {
        _super.prototype.updateValueFromSurvey.call(this, newValue);
        this.updateFormatedValue();
    };
    QuestionExpressionModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        var val = this.isValueEmpty(value) ? this.defaultValue : value;
        var res = "";
        if (!this.isValueEmpty(val)) {
            var str = this.getValueAsStr(val);
            res = !this.format ? str : this.format["format"](str);
        }
        if (!!this.survey) {
            res = this.survey.getExpressionDisplayValue(this, val, res);
        }
        return res;
    };
    Object.defineProperty(QuestionExpressionModel.prototype, "displayStyle", {
        /**
         * Specifies a display style for the question value.
         *
         * Possible values:
         *
         * - `"decimal"`
         * - `"currency"`
         * - `"percent"`
         * - `"date"`
         * - `"none"` (default)
         *
         * If you use the `"currency"` display style, you can also set the `currency` property to specify a currency other than USD.
         * @see currency
         * @see minimumFractionDigits
         * @see maximumFractionDigits
         * @see format
         */
        get: function () {
            return this.getPropertyValue("displayStyle");
        },
        set: function (val) {
            this.setPropertyValue("displayStyle", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "currency", {
        /**
         * A three-letter currency code. Applies only if the `displayStyle` property is set to `"currency"`.
         *
         * Default value: "USD".
         * @see displayStyle
         * @see minimumFractionDigits
         * @see maximumFractionDigits
         * @see format
         */
        get: function () {
            return this.getPropertyValue("currency");
        },
        set: function (val) {
            if (getCurrecyCodes().indexOf(val) < 0)
                return;
            this.setPropertyValue("currency", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionExpressionModel.prototype, "useGrouping", {
        /**
         * Specifies whether to use grouping separators in number representation. Separators depend on the selected [locale](https://surveyjs.io/form-library/documentation/surveymodel#locale).
         *
         * Default value: `true`
         */
        get: function () {
            return this.getPropertyValue("useGrouping");
        },
        set: function (val) {
            this.setPropertyValue("useGrouping", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionExpressionModel.prototype.getValueAsStr = function (val) {
        if (this.displayStyle == "date") {
            var d = new Date(val);
            if (!!d && !!d.toLocaleDateString)
                return d.toLocaleDateString();
        }
        if (this.displayStyle != "none" && _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val)) {
            var locale = this.getLocale();
            if (!locale)
                locale = "en";
            var options = {
                style: this.displayStyle,
                currency: this.currency,
                useGrouping: this.useGrouping,
            };
            if (this.maximumFractionDigits > -1) {
                options["maximumFractionDigits"] = this.maximumFractionDigits;
            }
            if (this.minimumFractionDigits > -1) {
                options["minimumFractionDigits"] = this.minimumFractionDigits;
            }
            return val.toLocaleString(locale, options);
        }
        return val.toString();
    };
    return QuestionExpressionModel;
}(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));

function getCurrecyCodes() {
    return [
        "AED",
        "AFN",
        "ALL",
        "AMD",
        "ANG",
        "AOA",
        "ARS",
        "AUD",
        "AWG",
        "AZN",
        "BAM",
        "BBD",
        "BDT",
        "BGN",
        "BHD",
        "BIF",
        "BMD",
        "BND",
        "BOB",
        "BOV",
        "BRL",
        "BSD",
        "BTN",
        "BWP",
        "BYN",
        "BZD",
        "CAD",
        "CDF",
        "CHE",
        "CHF",
        "CHW",
        "CLF",
        "CLP",
        "CNY",
        "COP",
        "COU",
        "CRC",
        "CUC",
        "CUP",
        "CVE",
        "CZK",
        "DJF",
        "DKK",
        "DOP",
        "DZD",
        "EGP",
        "ERN",
        "ETB",
        "EUR",
        "FJD",
        "FKP",
        "GBP",
        "GEL",
        "GHS",
        "GIP",
        "GMD",
        "GNF",
        "GTQ",
        "GYD",
        "HKD",
        "HNL",
        "HRK",
        "HTG",
        "HUF",
        "IDR",
        "ILS",
        "INR",
        "IQD",
        "IRR",
        "ISK",
        "JMD",
        "JOD",
        "JPY",
        "KES",
        "KGS",
        "KHR",
        "KMF",
        "KPW",
        "KRW",
        "KWD",
        "KYD",
        "KZT",
        "LAK",
        "LBP",
        "LKR",
        "LRD",
        "LSL",
        "LYD",
        "MAD",
        "MDL",
        "MGA",
        "MKD",
        "MMK",
        "MNT",
        "MOP",
        "MRO",
        "MUR",
        "MVR",
        "MWK",
        "MXN",
        "MXV",
        "MYR",
        "MZN",
        "NAD",
        "NGN",
        "NIO",
        "NOK",
        "NPR",
        "NZD",
        "OMR",
        "PAB",
        "PEN",
        "PGK",
        "PHP",
        "PKR",
        "PLN",
        "PYG",
        "QAR",
        "RON",
        "RSD",
        "RUB",
        "RWF",
        "SAR",
        "SBD",
        "SCR",
        "SDG",
        "SEK",
        "SGD",
        "SHP",
        "SLL",
        "SOS",
        "SRD",
        "SSP",
        "STD",
        "SVC",
        "SYP",
        "SZL",
        "THB",
        "TJS",
        "TMT",
        "TND",
        "TOP",
        "TRY",
        "TTD",
        "TWD",
        "TZS",
        "UAH",
        "UGX",
        "USD",
        "USN",
        "UYI",
        "UYU",
        "UZS",
        "VEF",
        "VND",
        "VUV",
        "WST",
        "XAF",
        "XAG",
        "XAU",
        "XBA",
        "XBB",
        "XBC",
        "XBD",
        "XCD",
        "XDR",
        "XOF",
        "XPD",
        "XPF",
        "XPT",
        "XSU",
        "XTS",
        "XUA",
        "XXX",
        "YER",
        "ZAR",
        "ZMW",
        "ZWL",
    ];
}
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("expression", [
    "expression:expression",
    { name: "format", serializationProperty: "locFormat" },
    {
        name: "displayStyle",
        default: "none",
        choices: ["none", "decimal", "currency", "percent", "date"],
    },
    {
        name: "currency",
        choices: function () {
            return getCurrecyCodes();
        },
        default: "USD",
    },
    { name: "maximumFractionDigits:number", default: -1 },
    { name: "minimumFractionDigits:number", default: -1 },
    { name: "useGrouping:boolean", default: true },
    { name: "enableIf", visible: false },
    { name: "isRequired", visible: false },
    { name: "readOnly", visible: false },
    { name: "requiredErrorText", visible: false },
    { name: "defaultValueExpression", visible: false },
    { name: "defaultValue", visible: false },
    { name: "correctAnswer", visible: false },
    { name: "requiredIf", visible: false },
], function () {
    return new QuestionExpressionModel("");
}, "question");
_questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].Instance.registerQuestion("expression", function (name) {
    return new QuestionExpressionModel(name);
});


/***/ }),

/***/ "./src/question_file.ts":
/*!******************************!*\
  !*** ./src/question_file.ts ***!
  \******************************/
/*! exports provided: QuestionFileModel, FileLoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return QuestionFileModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileLoader", function() { return FileLoader; });
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};









/**
 * A class that describes the File question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-file/ (linkStyle))
 */
var QuestionFileModel = /** @class */ (function (_super) {
    __extends(QuestionFileModel, _super);
    function QuestionFileModel(name) {
        var _this = _super.call(this, name) || this;
        _this.isUploading = false;
        _this.isDragging = false;
        /**
         * An event that is raised after the upload state has changed.
         *
         * Parameters:
         *
         * - `sender` - A question instance that raised the event.
         * - `options.state` - Current upload state: `"empty"`, `"loading"`, `"loaded"`, or `"error"`.
         */
        _this.onUploadStateChanged = _this.addEvent();
        _this.onStateChanged = _this.addEvent();
        _this.mobileFileNavigator = new _actions_container__WEBPACK_IMPORTED_MODULE_6__["ActionContainer"]();
        _this.dragCounter = 0;
        _this.onDragEnter = function (event) {
            if (!_this.isInputReadOnly) {
                event.preventDefault();
                _this.isDragging = true;
                _this.dragCounter++;
            }
        };
        _this.onDragOver = function (event) {
            if (_this.isInputReadOnly) {
                event.returnValue = false;
                return false;
            }
            event.dataTransfer.dropEffect = "copy";
            event.preventDefault();
        };
        _this.onDrop = function (event) {
            if (!_this.isInputReadOnly) {
                _this.isDragging = false;
                _this.dragCounter = 0;
                event.preventDefault();
                var src = event.dataTransfer;
                _this.onChange(src);
            }
        };
        _this.onDragLeave = function (event) {
            if (!_this.isInputReadOnly) {
                _this.dragCounter--;
                if (_this.dragCounter === 0) {
                    _this.isDragging = false;
                }
            }
        };
        _this.doChange = function (event) {
            var src = event.target || event.srcElement;
            _this.onChange(src);
        };
        _this.doClean = function (event) {
            var src = event.currentTarget || event.srcElement;
            if (_this.needConfirmRemoveFile) {
                var isConfirmed = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["confirmAction"])(_this.confirmRemoveAllMessage);
                if (!isConfirmed)
                    return;
            }
            if (_this.rootElement) {
                _this.rootElement.querySelectorAll("input")[0].value = "";
            }
            _this.clear();
        };
        _this.doDownloadFile = function (event, data) {
            if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["detectIEOrEdge"])()) {
                event.preventDefault();
                Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["loadFileFromBase64"])(data.content, data.name);
            }
        };
        _this.fileIndexAction = new _actions_action__WEBPACK_IMPORTED_MODULE_7__["Action"]({
            id: "fileIndex",
            title: _this.getFileIndexCaption(),
            enabled: false
        });
        _this.prevFileAction = new _actions_action__WEBPACK_IMPORTED_MODULE_7__["Action"]({
            id: "prevPage",
            iconSize: 16,
            action: function () {
                _this.indexToShow = _this.previewValue.length && ((_this.indexToShow - 1 + _this.previewValue.length) % _this.previewValue.length) || 0;
                _this.fileIndexAction.title = _this.getFileIndexCaption();
            }
        });
        _this.nextFileAction = new _actions_action__WEBPACK_IMPORTED_MODULE_7__["Action"]({
            id: "nextPage",
            iconSize: 16,
            action: function () {
                _this.indexToShow = _this.previewValue.length && ((_this.indexToShow + 1) % _this.previewValue.length) || 0;
                _this.fileIndexAction.title = _this.getFileIndexCaption();
            }
        });
        _this.mobileFileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
        return _this;
    }
    Object.defineProperty(QuestionFileModel.prototype, "mobileFileNavigatorVisible", {
        get: function () {
            return this.isMobile && this.containsMultiplyFiles;
        },
        enumerable: false,
        configurable: true
    });
    QuestionFileModel.prototype.updateElementCssCore = function (cssClasses) {
        _super.prototype.updateElementCssCore.call(this, cssClasses);
        this.prevFileAction.iconName = this.cssClasses.leftIconId;
        this.nextFileAction.iconName = this.cssClasses.rightIconId;
        //this.mobileFileNavigator.cssClasses = this.survey.getCss().actionBar;
    };
    QuestionFileModel.prototype.getFileIndexCaption = function () {
        return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.previewValue.length);
    };
    QuestionFileModel.prototype.isPreviewVisible = function (index) {
        return !this.isMobile || index === this.indexToShow;
    };
    QuestionFileModel.prototype.getType = function () {
        return "file";
    };
    QuestionFileModel.prototype.clearOnDeletingContainer = function () {
        if (!this.survey)
            return;
        this.survey.clearFiles(this, this.name, this.value, null, function () { });
    };
    Object.defineProperty(QuestionFileModel.prototype, "showPreview", {
        /**
         * Disable this property only to implement a custom preview.
         *
         * [View "Custom Preview" Demo](https://surveyjs.io/form-library/examples/file-custom-preview/ (linkStyle))
         * @see allowImagesPreview
         */
        get: function () {
            return this.getPropertyValue("showPreview");
        },
        set: function (val) {
            this.setPropertyValue("showPreview", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "allowMultiple", {
        /**
         * Specifies whether users can upload multiple files.
         *
         * Default value: `false`
         */
        get: function () {
            return this.getPropertyValue("allowMultiple", false);
        },
        set: function (val) {
            this.setPropertyValue("allowMultiple", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "imageHeight", {
        /**
         * The image height.
         */
        get: function () {
            return this.getPropertyValue("imageHeight");
        },
        set: function (val) {
            this.setPropertyValue("imageHeight", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "imageWidth", {
        /**
         * The image width.
         */
        get: function () {
            return this.getPropertyValue("imageWidth");
        },
        set: function (val) {
            this.setPropertyValue("imageWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "acceptedTypes", {
        /**
         * An [accept](https://www.w3schools.com/tags/att_input_accept.asp) attribute value for the underlying `<input>` element.
         */
        get: function () {
            return this.getPropertyValue("acceptedTypes");
        },
        set: function (val) {
            this.setPropertyValue("acceptedTypes", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "storeDataAsText", {
        /**
         * Specifies whether to store file content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
         *
         * If you disable this property, implement `SurveyModel`'s [`onUploadFiles`](https://surveyjs.io/form-library/documentation/surveymodel#onUploadFiles) event handler to specify how to store file content.
         */
        get: function () {
            return this.getPropertyValue("storeDataAsText");
        },
        set: function (val) {
            this.setPropertyValue("storeDataAsText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "waitForUpload", {
        /**
         * Enable this property if you want to wait until files are uploaded to complete the survey.
         *
         * Default value: `false`
         */
        get: function () {
            return this.getPropertyValue("waitForUpload");
        },
        set: function (val) {
            this.setPropertyValue("waitForUpload", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "allowImagesPreview", {
        /**
         * Specifies whether to show a preview of image files.
         */
        get: function () {
            return this.getPropertyValue("allowImagesPreview");
        },
        set: function (val) {
            this.setPropertyValue("allowImagesPreview", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "maxSize", {
        /**
         * Maximum allowed file size, measured in bytes.
         *
         * Default value: 0 (unlimited)
         */
        get: function () {
            return this.getPropertyValue("maxSize");
        },
        set: function (val) {
            this.setPropertyValue("maxSize", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "needConfirmRemoveFile", {
        /**
         * Specifies whether users should confirm file deletion.
         *
         * Default value: `false`
         */
        get: function () {
            return this.getPropertyValue("needConfirmRemoveFile");
        },
        set: function (val) {
            this.setPropertyValue("needConfirmRemoveFile", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionFileModel.prototype.getConfirmRemoveMessage = function (fileName) {
        return this.confirmRemoveMessage.format(fileName);
    };
    Object.defineProperty(QuestionFileModel.prototype, "inputTitle", {
        get: function () {
            if (this.isUploading)
                return this.loadingFileTitle;
            if (this.isEmpty())
                return this.chooseFileTitle;
            return " ";
        },
        enumerable: false,
        configurable: true
    });
    QuestionFileModel.prototype.clear = function (doneCallback) {
        var _this = this;
        if (!this.survey)
            return;
        this.containsMultiplyFiles = false;
        this.survey.clearFiles(this, this.name, this.value, null, function (status, data) {
            if (status === "success") {
                _this.value = undefined;
                _this.errors = [];
                !!doneCallback && doneCallback();
                _this.indexToShow = 0;
                _this.fileIndexAction.title = _this.getFileIndexCaption();
            }
        });
    };
    Object.defineProperty(QuestionFileModel.prototype, "multipleRendered", {
        get: function () {
            return this.allowMultiple ? "multiple" : undefined;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "showRemoveButton", {
        get: function () {
            return !this.isReadOnly && !this.isEmpty() && this.cssClasses.removeButton;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFileModel.prototype, "showRemoveButtonBottom", {
        get: function () {
            return !this.isReadOnly && !this.isEmpty() && this.cssClasses.removeButtonBottom;
        },
        enumerable: false,
        configurable: true
    });
    QuestionFileModel.prototype.defaultImage = function (data) {
        return !this.canPreviewImage(data) && !!this.cssClasses.defaultImage;
    };
    /**
     * Removes a file with a specified name.
     */
    QuestionFileModel.prototype.removeFile = function (name) {
        this.removeFileByContent(this.value.filter(function (f) { return f.name === name; })[0]);
    };
    QuestionFileModel.prototype.removeFileByContent = function (content) {
        var _this = this;
        if (!this.survey)
            return;
        this.survey.clearFiles(this, this.name, this.value, content.name, function (status, data) {
            if (status === "success") {
                var oldValue = _this.value;
                if (Array.isArray(oldValue)) {
                    _this.value = oldValue.filter(function (f) { return !_helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isTwoValueEquals(f, content, true); });
                }
                else {
                    _this.value = undefined;
                }
            }
        });
    };
    /**
     * Loads multiple files into the question.
     * @param files An array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
     */
    QuestionFileModel.prototype.loadFiles = function (files) {
        var _this = this;
        if (!this.survey) {
            return;
        }
        this.errors = [];
        if (!this.allFilesOk(files)) {
            return;
        }
        var loadFilesProc = function () {
            _this.stateChanged("loading");
            var content = [];
            if (_this.storeDataAsText) {
                files.forEach(function (file) {
                    var fileReader = new FileReader();
                    fileReader.onload = function (e) {
                        content = content.concat([
                            { name: file.name, type: file.type, content: fileReader.result },
                        ]);
                        if (content.length === files.length) {
                            _this.value = (_this.value || []).concat(content);
                        }
                    };
                    fileReader.readAsDataURL(file);
                });
            }
            else {
                if (_this.survey) {
                    _this.survey.uploadFiles(_this, _this.name, files, function (status, data) {
                        if (status === "error") {
                            _this.stateChanged("error");
                        }
                        if (status === "success") {
                            _this.value = (_this.value || []).concat(data.map(function (r) {
                                return {
                                    name: r.file.name,
                                    type: r.file.type,
                                    content: r.content,
                                };
                            }));
                        }
                    });
                }
            }
        };
        if (this.allowMultiple) {
            loadFilesProc();
        }
        else {
            this.clear(loadFilesProc);
        }
    };
    QuestionFileModel.prototype.canPreviewImage = function (fileItem) {
        return this.allowImagesPreview && !!fileItem && this.isFileImage(fileItem);
    };
    QuestionFileModel.prototype.loadPreview = function (newValue) {
        var _this = this;
        this.previewValue.splice(0, this.previewValue.length);
        if (!this.showPreview || !newValue)
            return;
        var newValues = Array.isArray(newValue)
            ? newValue
            : !!newValue
                ? [newValue]
                : [];
        if (this.storeDataAsText) {
            newValues.forEach(function (value) {
                var content = value.content || value;
                _this.previewValue.push({
                    name: value.name,
                    type: value.type,
                    content: content,
                });
            });
        }
        else {
            if (!!this._previewLoader) {
                this._previewLoader.dispose();
            }
            this.isReadyValue = false;
            this._previewLoader = new FileLoader(this, function (status, loaded) {
                if (status === "loaded") {
                    loaded.forEach(function (val) {
                        _this.previewValue.push(val);
                    });
                }
                _this.isReadyValue = true;
                _this.onReadyChanged &&
                    _this.onReadyChanged.fire(_this, {
                        question: _this,
                        isReady: true,
                        oldIsReady: false,
                    });
                _this._previewLoader.dispose();
                _this._previewLoader = undefined;
            });
            this._previewLoader.load(newValues);
        }
        this.indexToShow = this.previewValue.length > 0 ? (this.indexToShow > 0 ? this.indexToShow - 1 : 0) : 0;
        this.fileIndexAction.title = this.getFileIndexCaption();
        this.containsMultiplyFiles = this.previewValue.length > 1;
    };
    QuestionFileModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
        _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
        if (this.isUploading && this.waitForUpload) {
            errors.push(new _error__WEBPACK_IMPORTED_MODULE_3__["UploadingFileError"](this.getLocalizationString("uploadingFile"), this));
        }
    };
    QuestionFileModel.prototype.stateChanged = function (state) {
        if (this.currentState == state) {
            return;
        }
        if (state === "loading") {
            this.isUploading = true;
        }
        if (state === "loaded") {
            this.isUploading = false;
        }
        if (state === "error") {
            this.isUploading = false;
        }
        this.currentState = state;
        this.onStateChanged.fire(this, { state: state });
        this.onUploadStateChanged.fire(this, { state: state });
    };
    QuestionFileModel.prototype.allFilesOk = function (files) {
        var _this = this;
        var errorLength = this.errors ? this.errors.length : 0;
        (files || []).forEach(function (file) {
            if (_this.maxSize > 0 && file.size > _this.maxSize) {
                _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_3__["ExceedSizeError"](_this.maxSize, _this));
            }
        });
        return errorLength === this.errors.length;
    };
    QuestionFileModel.prototype.isFileImage = function (file) {
        if (!file)
            return false;
        var imagePrefix = "data:image";
        var subStr = file.content && file.content.substring(0, imagePrefix.length);
        subStr = subStr && subStr.toLowerCase();
        var result = subStr === imagePrefix ||
            (!!file.type && file.type.toLowerCase().indexOf("image/") === 0);
        return result;
    };
    QuestionFileModel.prototype.getPlainData = function (options) {
        if (options === void 0) { options = {
            includeEmpty: true,
        }; }
        var questionPlainData = _super.prototype.getPlainData.call(this, options);
        if (!!questionPlainData && !this.isEmpty()) {
            questionPlainData.isNode = false;
            var values = Array.isArray(this.value) ? this.value : [this.value];
            questionPlainData.data = values.map(function (dataValue, index) {
                return {
                    name: index,
                    title: "File",
                    value: (dataValue.content && dataValue.content) || dataValue,
                    displayValue: (dataValue.name && dataValue.name) || dataValue,
                    getString: function (val) {
                        return typeof val === "object" ? JSON.stringify(val) : val;
                    },
                    isNode: false,
                };
            });
        }
        return questionPlainData;
    };
    QuestionFileModel.prototype.supportComment = function () {
        return true;
    };
    QuestionFileModel.prototype.getChooseFileCss = function () {
        var isAnswered = this.isAnswered;
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
            .append(this.cssClasses.chooseFile)
            .append(this.cssClasses.controlDisabled, this.isReadOnly)
            .append(this.cssClasses.chooseFileAsText, !isAnswered)
            .append(this.cssClasses.chooseFileAsTextDisabled, !isAnswered && this.isInputReadOnly)
            .append(this.cssClasses.chooseFileAsIcon, isAnswered)
            .toString();
    };
    QuestionFileModel.prototype.getReadOnlyFileCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
            .append("form-control")
            .append(this.cssClasses.placeholderInput)
            .toString();
    };
    Object.defineProperty(QuestionFileModel.prototype, "fileRootCss", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
                .append(this.cssClasses.root)
                .append(this.cssClasses.single, !this.allowMultiple)
                .append(this.cssClasses.singleImage, !this.allowMultiple && this.isAnswered && this.canPreviewImage(this.value[0]))
                .append(this.cssClasses.mobile, this.isMobile)
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    QuestionFileModel.prototype.getFileDecoratorCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
            .append(this.cssClasses.fileDecorator)
            .append(this.cssClasses.onError, this.errors.length > 0)
            .append(this.cssClasses.fileDecoratorDrag, this.isDragging)
            .toString();
    };
    QuestionFileModel.prototype.onChange = function (src) {
        if (!window["FileReader"])
            return;
        if (!src || !src.files || src.files.length < 1)
            return;
        var files = [];
        var allowCount = this.allowMultiple ? src.files.length : 1;
        for (var i = 0; i < allowCount; i++) {
            files.push(src.files[i]);
        }
        src.value = "";
        this.loadFiles(files);
    };
    QuestionFileModel.prototype.onChangeQuestionValue = function (newValue) {
        _super.prototype.onChangeQuestionValue.call(this, newValue);
        this.stateChanged(this.isEmpty() ? "empty" : "loaded");
        this.loadPreview(newValue);
    };
    QuestionFileModel.prototype.afterRender = function (el) {
        this.rootElement = el;
        _super.prototype.afterRender.call(this, el);
    };
    QuestionFileModel.prototype.doRemoveFile = function (data) {
        if (this.needConfirmRemoveFile) {
            var isConfirmed = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["confirmAction"])(this.getConfirmRemoveMessage(data.name));
            if (!isConfirmed)
                return;
        }
        var previewIndex = this.previewValue.indexOf(data);
        this.removeFileByContent(previewIndex === -1 ? data : this.value[previewIndex]);
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], QuestionFileModel.prototype, "isDragging", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["propertyArray"])({})
    ], QuestionFileModel.prototype, "previewValue", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "empty" })
    ], QuestionFileModel.prototype, "currentState", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: 0 })
    ], QuestionFileModel.prototype, "indexToShow", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
    ], QuestionFileModel.prototype, "containsMultiplyFiles", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "confirmRemoveFile" } })
    ], QuestionFileModel.prototype, "confirmRemoveMessage", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "confirmRemoveAllFiles" } })
    ], QuestionFileModel.prototype, "confirmRemoveAllMessage", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "noFileChosen" } })
    ], QuestionFileModel.prototype, "noFileChosenCaption", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "chooseFileCaption" } })
    ], QuestionFileModel.prototype, "chooseButtonCaption", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "clearCaption" } })
    ], QuestionFileModel.prototype, "clearButtonCaption", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "removeFileCaption" } })
    ], QuestionFileModel.prototype, "removeFileCaption", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "loadingFile" } })
    ], QuestionFileModel.prototype, "loadingFileTitle", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "chooseFile" } })
    ], QuestionFileModel.prototype, "chooseFileTitle", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "fileDragAreaPlaceholder" } })
    ], QuestionFileModel.prototype, "dragAreaPlaceholder", void 0);
    return QuestionFileModel;
}(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("file", [
    { name: "showCommentArea:switch", layout: "row", visible: true },
    {
        name: "commentText",
        dependsOn: "showCommentArea",
        visibleIf: function (obj) {
            return obj.hasComment;
        },
        serializationProperty: "locCommentText",
        layout: "row",
    },
    {
        name: "commentPlaceholder",
        alternativeName: "commentPlaceHolder",
        serializationProperty: "locCommentPlaceholder",
        dependsOn: "showCommentArea",
        visibleIf: function (obj) {
            return obj.hasComment;
        },
    },
    { name: "showPreview:boolean", default: true },
    "allowMultiple:boolean",
    { name: "allowImagesPreview:boolean", default: true },
    "imageHeight",
    "imageWidth",
    "acceptedTypes",
    { name: "storeDataAsText:boolean", default: true },
    { name: "waitForUpload:boolean", default: false },
    { name: "maxSize:number", default: 0 },
    { name: "defaultValue", visible: false },
    { name: "correctAnswer", visible: false },
    { name: "validators", visible: false },
    { name: "needConfirmRemoveFile:boolean" },
], function () {
    return new QuestionFileModel("");
}, "question");
_questionfactory__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].Instance.registerQuestion("file", function (name) {
    return new QuestionFileModel(name);
});
var FileLoader = /** @class */ (function () {
    function FileLoader(fileQuestion, callback) {
        this.fileQuestion = fileQuestion;
        this.callback = callback;
        this.loaded = [];
    }
    FileLoader.prototype.load = function (files) {
        var _this = this;
        files.forEach(function (value) {
            if (_this.fileQuestion.survey) {
                _this.fileQuestion.survey.downloadFile(_this.fileQuestion, _this.fileQuestion.name, value, function (status, data) {
                    if (!_this.fileQuestion || !_this.callback) {
                        return;
                    }
                    if (status === "success") {
                        _this.loaded.push({
                            content: data,
                            name: value.name,
                            type: value.type,
                        });
                        if (_this.loaded.length === files.length) {
                            _this.callback("loaded", _this.loaded);
                        }
                    }
                    else {
                        _this.callback("error", _this.loaded);
                    }
                });
            }
        });
    };
    FileLoader.prototype.dispose = function () {
        this.fileQuestion = undefined;
        this.callback = undefined;
    };
    return FileLoader;
}());



/***/ }),

/***/ "./src/question_html.ts":
/*!******************************!*\
  !*** ./src/question_html.ts ***!
  \******************************/
/*! exports provided: QuestionHtmlModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionHtmlModel", function() { return QuestionHtmlModel; });
/* harmony import */ var _questionnonvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./questionnonvalue */ "./src/questionnonvalue.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
  * A class that describes the Html question type. Unlike other question types, Html cannot have a title or value.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-html/ (linkStyle))
 */
var QuestionHtmlModel = /** @class */ (function (_super) {
    __extends(QuestionHtmlModel, _super);
    function QuestionHtmlModel(name) {
        var _this = _super.call(this, name) || this;
        var locHtml = _this.createLocalizableString("html", _this);
        locHtml.onGetTextCallback = function (str) {
            return !!_this.survey && !_this.ignoreHtmlProgressing
                ? _this.survey.processHtml(str)
                : str;
        };
        return _this;
    }
    QuestionHtmlModel.prototype.getType = function () {
        return "html";
    };
    Object.defineProperty(QuestionHtmlModel.prototype, "isCompositeQuestion", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    QuestionHtmlModel.prototype.getProcessedText = function (text) {
        if (this.ignoreHtmlProgressing)
            return text;
        return _super.prototype.getProcessedText.call(this, text);
    };
    Object.defineProperty(QuestionHtmlModel.prototype, "html", {
        /**
         * HTML markup to display.
         *
         * > IMPORTANT: If you get the markup from a third party, ensure that it does not contain malicious code.
         */
        get: function () {
            return this.getLocalizableStringText("html", "");
        },
        set: function (val) {
            this.setLocalizableStringText("html", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionHtmlModel.prototype, "locHtml", {
        get: function () {
            return this.getLocalizableString("html");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionHtmlModel.prototype, "processedHtml", {
        get: function () {
            return this.survey ? this.survey.processHtml(this.html) : this.html;
        },
        enumerable: false,
        configurable: true
    });
    return QuestionHtmlModel;
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("html", [{ name: "html:html", serializationProperty: "locHtml" }], function () {
    return new QuestionHtmlModel("");
}, "nonvalue");
_questionfactory__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].Instance.registerQuestion("html", function (name) {
    return new QuestionHtmlModel(name);
});


/***/ }),

/***/ "./src/question_image.ts":
/*!*******************************!*\
  !*** ./src/question_image.ts ***!
  \*******************************/
/*! exports provided: QuestionImageModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionImageModel", function() { return QuestionImageModel; });
/* harmony import */ var _questionnonvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./questionnonvalue */ "./src/questionnonvalue.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var youtubeTags = ["youtube.com", "youtu.be"];
var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
var youtubeUrl = "https://www.youtube.com/";
var youtubeEmbed = "embed";
function isUrlYoutubeVideo(url) {
    if (!url)
        return false;
    url = url.toLowerCase();
    for (var i = 0; i < youtubeTags.length; i++) {
        if (url.indexOf(youtubeTags[i]) !== -1)
            return true;
    }
    return false;
}
/**
  * A class that describes the Image question type. Unlike other question types, Image cannot have a title or value.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-image/ (linkStyle))
 */
var QuestionImageModel = /** @class */ (function (_super) {
    __extends(QuestionImageModel, _super);
    function QuestionImageModel(name) {
        var _this = _super.call(this, name) || this;
        var locImageLink = _this.createLocalizableString("imageLink", _this, false);
        locImageLink.onGetTextCallback = function (text) {
            return getCorrectImageLink(text);
        };
        _this.createLocalizableString("altText", _this, false);
        _this.registerPropertyChangedHandlers(["contentMode", "imageLink"], function () { return _this.calculateRenderedMode(); });
        return _this;
    }
    QuestionImageModel.prototype.getType = function () {
        return "image";
    };
    Object.defineProperty(QuestionImageModel.prototype, "isCompositeQuestion", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionImageModel.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        this.calculateRenderedMode();
    };
    Object.defineProperty(QuestionImageModel.prototype, "imageLink", {
        /**
         * Specifies an image or video URL.
         * @see contentMode
         */
        get: function () {
            return this.getLocalizableStringText("imageLink");
        },
        set: function (val) {
            this.setLocalizableStringText("imageLink", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "locImageLink", {
        get: function () {
            return this.getLocalizableString("imageLink");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "altText", {
        /**
         * Specifies a value for the `alt` attribute of the underlying `<img>` element.
         */
        get: function () {
            return this.getLocalizableStringText("altText");
        },
        set: function (val) {
            this.setLocalizableStringText("altText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "locAltText", {
        get: function () {
            return this.getLocalizableString("altText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "imageHeight", {
        /**
         * Specifies the height of a container for the image or video. Accepts positive numbers and CSS values.
         *
         * Default value: 150
         *
         * Use the `imageFit` property to specify how to fit the image or video into the container.
         * @see imageWidth
         * @see imageFit
         */
        get: function () {
            return this.getPropertyValue("imageHeight");
        },
        set: function (val) {
            this.setPropertyValue("imageHeight", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "renderedHeight", {
        get: function () {
            return this.imageHeight ? this.imageHeight + "px" : undefined;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "imageWidth", {
        /**
         * Specifies the width of a container for the image or video. Accepts positive numbers and CSS values.
         *
         * Default value: 200
         *
         * Use the `imageFit` property to specify how to fit the image or video into the container.
         * @see imageHeight
         * @see imageFit
         */
        get: function () {
            return this.getPropertyValue("imageWidth");
        },
        set: function (val) {
            this.setPropertyValue("imageWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "renderedWidth", {
        get: function () {
            return this.imageWidth ? this.imageWidth + "px" : undefined;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "imageFit", {
        /**
         * Specifies how to resize the image or video to fit it into its container.
         *
         * Refer to the [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property description for information on accepted values.
         * @see imageHeight
         * @see imageWidth
         */
        get: function () {
            return this.getPropertyValue("imageFit");
        },
        set: function (val) {
            this.setPropertyValue("imageFit", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "contentMode", {
        /**
         * Specifies the type of content that the Image question displays.
         *
         * Possible values:
         *
         * - `"image"` - An image in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
         * - `"video"` - A video in one of the following formats: MP4, MOV, WMV, FLV, AVI, MKV.
         * - `"youtube"` - A link to a YouTube video.
         * - `"auto"` (default) - Selects one of the above based on the [`imageLink`](https://surveyjs.io/form-library/documentation/questionimagemodel#imageLink) property.
         */
        get: function () {
            return this.getPropertyValue("contentMode");
        },
        set: function (val) {
            this.setPropertyValue("contentMode", val);
            if (val === "video") {
                this.showLabel = true;
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImageModel.prototype, "renderedMode", {
        /**
         * Returns the type of content that the Image question displays: `"image"`, `"video"`, or `"youtube"`.
         * @see contentMode
         */
        get: function () {
            return this.getPropertyValue("renderedMode", "image");
        },
        enumerable: false,
        configurable: true
    });
    QuestionImageModel.prototype.getImageCss = function () {
        var imageHeightProperty = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty("image", "imageHeight");
        var imageWidthProperty = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty("image", "imageWidth");
        var isDefaultSize = imageHeightProperty.isDefaultValue(this.imageHeight) && imageWidthProperty.isDefaultValue(this.imageWidth);
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
            .append(this.cssClasses.image)
            .append(this.cssClasses.adaptive, isDefaultSize)
            .toString();
    };
    QuestionImageModel.prototype.setRenderedMode = function (val) {
        this.setPropertyValue("renderedMode", val);
    };
    QuestionImageModel.prototype.calculateRenderedMode = function () {
        if (this.contentMode !== "auto") {
            this.setRenderedMode(this.contentMode);
        }
        else {
            if (this.isYoutubeVideo()) {
                this.setRenderedMode("youtube");
            }
            else if (this.isVideo()) {
                this.setRenderedMode("video");
            }
            else {
                this.setRenderedMode("image");
            }
        }
    };
    QuestionImageModel.prototype.isYoutubeVideo = function () {
        return isUrlYoutubeVideo(this.imageLink);
    };
    QuestionImageModel.prototype.isVideo = function () {
        var link = this.imageLink;
        if (!link)
            return false;
        link = link.toLowerCase();
        for (var i = 0; i < videoSuffics.length; i++) {
            if (link.endsWith(videoSuffics[i]))
                return true;
        }
        return false;
    };
    return QuestionImageModel;
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));

function getCorrectImageLink(val) {
    if (!val || !isUrlYoutubeVideo(val))
        return val;
    var res = val.toLocaleLowerCase();
    if (res.indexOf(youtubeEmbed) > -1)
        return val;
    var id = "";
    for (var i = val.length - 1; i >= 0; i--) {
        if (val[i] === "=" || val[i] === "/")
            break;
        id = val[i] + id;
    }
    return youtubeUrl + youtubeEmbed + "/" + id;
}
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("image", [
    { name: "imageLink", serializationProperty: "locImageLink" },
    { name: "altText", serializationProperty: "locAltText", alternativeName: "text", category: "general" },
    {
        name: "contentMode",
        default: "auto",
        choices: ["auto", "image", "video", "youtube"],
    },
    {
        name: "imageFit",
        default: "contain",
        choices: ["none", "contain", "cover", "fill"],
    },
    { name: "imageHeight:number", default: 150, minValue: 0 },
    { name: "imageWidth:number", default: 200, minValue: 0 },
], function () {
    return new QuestionImageModel("");
}, "nonvalue");
_questionfactory__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].Instance.registerQuestion("image", function (name) {
    return new QuestionImageModel(name);
});


/***/ }),

/***/ "./src/question_imagepicker.ts":
/*!*************************************!*\
  !*** ./src/question_imagepicker.ts ***!
  \*************************************/
/*! exports provided: ImageItemValue, QuestionImagePickerModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImageItemValue", function() { return ImageItemValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionImagePickerModel", function() { return QuestionImagePickerModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_baseselect */ "./src/question_baseselect.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};








var ImageItemValue = /** @class */ (function (_super) {
    __extends(ImageItemValue, _super);
    function ImageItemValue(value, text, typeName) {
        if (text === void 0) { text = null; }
        if (typeName === void 0) { typeName = "imageitemvalue"; }
        var _this = _super.call(this, value, text, typeName) || this;
        _this.typeName = typeName;
        _this.createLocalizableString("imageLink", _this, false);
        return _this;
    }
    ImageItemValue.prototype.getType = function () {
        return !!this.typeName ? this.typeName : "itemvalue";
    };
    Object.defineProperty(ImageItemValue.prototype, "imageLink", {
        /**
         * The image or video link property.
         */
        get: function () {
            return this.getLocalizableStringText("imageLink");
        },
        set: function (val) {
            this.setLocalizableStringText("imageLink", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ImageItemValue.prototype, "locImageLink", {
        get: function () {
            return this.getLocalizableString("imageLink");
        },
        enumerable: false,
        configurable: true
    });
    ImageItemValue.prototype.getLocale = function () {
        return !!this.locOwner ? this.locOwner.getLocale() : "";
    };
    ImageItemValue.prototype.getMarkdownHtml = function (text, name) {
        return !!this.locOwner ? this.locOwner.getMarkdownHtml(text, name) : undefined;
    };
    ImageItemValue.prototype.getRenderer = function (name) {
        return !!this.locOwner ? this.locOwner.getRenderer(name) : null;
    };
    ImageItemValue.prototype.getRendererContext = function (locStr) {
        return !!this.locOwner ? this.locOwner.getRendererContext(locStr) : locStr;
    };
    ImageItemValue.prototype.getProcessedText = function (text) {
        return !!this.locOwner ? this.locOwner.getProcessedText(text) : text;
    };
    return ImageItemValue;
}(_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]));

/**
  * A class that describes the Image Picker question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/image-picker-question/ (linkStyle))
 */
var QuestionImagePickerModel = /** @class */ (function (_super) {
    __extends(QuestionImagePickerModel, _super);
    function QuestionImagePickerModel(name) {
        var _this = _super.call(this, name) || this;
        //responsive mode
        _this.isResponsiveValue = false;
        _this.onContentLoaded = function (item, event) {
            var content = event.target;
            if (_this.contentMode == "video") {
                item["aspectRatio"] = content.videoWidth / content.videoHeight;
            }
            else {
                item["aspectRatio"] = content.naturalWidth / content.naturalHeight;
            }
            _this._width && _this.processResponsiveness(0, _this._width);
        };
        _this.colCount = 0;
        _this.registerPropertyChangedHandlers(["minImageWidth", "maxImageWidth", "minImageHeight", "maxImageHeight", "visibleChoices", "colCount", "isResponsiveValue"], function () {
            if (!!_this._width) {
                _this.processResponsiveness(0, _this._width);
            }
        });
        _this.registerPropertyChangedHandlers(["imageWidth", "imageHeight"], function () {
            _this.calcIsResponsive();
        });
        _this.calcIsResponsive();
        return _this;
    }
    QuestionImagePickerModel.prototype.getType = function () {
        return "imagepicker";
    };
    QuestionImagePickerModel.prototype.supportGoNextPageAutomatic = function () {
        return !this.multiSelect;
    };
    Object.defineProperty(QuestionImagePickerModel.prototype, "hasSingleInput", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionImagePickerModel.prototype.getItemValueType = function () {
        return "imageitemvalue";
    };
    Object.defineProperty(QuestionImagePickerModel.prototype, "isCompositeQuestion", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    QuestionImagePickerModel.prototype.supportOther = function () {
        return false;
    };
    QuestionImagePickerModel.prototype.supportNone = function () {
        return false;
    };
    QuestionImagePickerModel.prototype.isAnswerCorrect = function () {
        if (!this.multiSelect)
            return _super.prototype.isAnswerCorrect.call(this);
        return _helpers__WEBPACK_IMPORTED_MODULE_4__["Helpers"].isArrayContainsEqual(this.value, this.correctAnswer);
    };
    Object.defineProperty(QuestionImagePickerModel.prototype, "multiSelect", {
        /**
         * Specifies whether users can select multiple images or videos.
         *
         * Default value: `false`
         */
        get: function () {
            return this.getPropertyValue("multiSelect");
        },
        set: function (newValue) {
            this.setPropertyValue("multiSelect", newValue);
        },
        enumerable: false,
        configurable: true
    });
    QuestionImagePickerModel.prototype.isItemSelected = function (item) {
        var val = this.value;
        if (this.isValueEmpty(val))
            return false;
        if (!this.multiSelect)
            return this.isTwoValueEquals(val, item.value);
        if (!Array.isArray(val))
            return false;
        for (var i = 0; i < val.length; i++) {
            if (this.isTwoValueEquals(val[i], item.value))
                return true;
        }
        return false;
    };
    QuestionImagePickerModel.prototype.clearIncorrectValues = function () {
        if (this.multiSelect) {
            var val = this.value;
            if (!val)
                return;
            if (!Array.isArray(val) || val.length == 0) {
                this.clearValue();
                return;
            }
            var newValue = [];
            for (var i = 0; i < val.length; i++) {
                if (!this.hasUnknownValue(val[i], true)) {
                    newValue.push(val[i]);
                }
            }
            if (newValue.length == val.length)
                return;
            if (newValue.length == 0) {
                this.clearValue();
            }
            else {
                this.value = newValue;
            }
        }
        else {
            _super.prototype.clearIncorrectValues.call(this);
        }
    };
    QuestionImagePickerModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        if (!this.multiSelect && !Array.isArray(value))
            return _super.prototype.getDisplayValueCore.call(this, keysAsText, value);
        return this.getDisplayArrayValue(keysAsText, value);
    };
    Object.defineProperty(QuestionImagePickerModel.prototype, "showLabel", {
        /**
         * Specifies whether to display labels under images or videos. Labels text are taken from the `text` property of each object in the `choices` array.
         * @see choices
         */
        get: function () {
            return this.getPropertyValue("showLabel");
        },
        set: function (newValue) {
            this.setPropertyValue("showLabel", newValue);
        },
        enumerable: false,
        configurable: true
    });
    QuestionImagePickerModel.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        if (!this.isDesignMode && this.multiSelect) {
            this.createNewArray("renderedValue");
            this.createNewArray("value");
        }
        this.calcIsResponsive();
    };
    QuestionImagePickerModel.prototype.getValueCore = function () {
        var value = _super.prototype.getValueCore.call(this);
        if (value !== undefined) {
            return value;
        }
        if (this.multiSelect) {
            return [];
        }
        return value;
    };
    QuestionImagePickerModel.prototype.convertValToArrayForMultSelect = function (val) {
        if (!this.multiSelect)
            return val;
        if (this.isValueEmpty(val) || Array.isArray(val))
            return val;
        return [val];
    };
    QuestionImagePickerModel.prototype.renderedValueFromDataCore = function (val) {
        return this.convertValToArrayForMultSelect(val);
    };
    QuestionImagePickerModel.prototype.rendredValueToDataCore = function (val) {
        return this.convertValToArrayForMultSelect(val);
    };
    Object.defineProperty(QuestionImagePickerModel.prototype, "imageHeight", {
        /**
         * Specifies the height of containers for images or videos. Accepts positive numbers and CSS values.
         *
         * Default value: undefined
         *
         * Use the `imageFit` property to specify how to fit the images or videos into their containers.
         * @see imageWidth
         * @see imageFit
         */
        get: function () {
            return this.getPropertyValue("imageHeight");
        },
        set: function (val) {
            this.setPropertyValue("imageHeight", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageHeight", {
        get: function () {
            var height = this.isResponsive ? this.responsiveImageHeight : this.imageHeight;
            return (height ? height : 150) + "px";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImagePickerModel.prototype, "imageWidth", {
        /**
         * Specifies the width of containers for images or videos. Accepts positive numbers and CSS values.
         *
         * Default value: 200
         *
         * Use the `imageFit` property to specify how to fit the images or videos into their containers.
         * @see imageHeight
         * @see imageFit
         */
        get: function () {
            return this.getPropertyValue("imageWidth");
        },
        set: function (val) {
            this.setPropertyValue("imageWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageWidth", {
        get: function () {
            var width = this.isResponsive ? this.responsiveImageWidth : this.imageWidth;
            return (width ? width : 200) + "px";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImagePickerModel.prototype, "imageFit", {
        /**
         * Specifies how to resize images or videos to fit them into their containers.
         *
         * Refer to the [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property description for information on accepted values.
         * @see imageHeight
         * @see imageWidth
         */
        get: function () {
            return this.getPropertyValue("imageFit");
        },
        set: function (val) {
            this.setPropertyValue("imageFit", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImagePickerModel.prototype, "contentMode", {
        /**
         * Specifies the type of content that choice items display.
         *
         * Possible values:
         *
         * - `"image"` - Images in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
         * - `"video"` - Videos in one of the following formats: MP4, MOV, WMV, FLV, AVI, MKV.
         * - `"youtube"` - Links to YouTube videos.
         * - `"auto"` (default) - Selects one of the above based on the `imageLink` property value of each choice item.
         */
        get: function () {
            return this.getPropertyValue("contentMode");
        },
        set: function (val) {
            this.setPropertyValue("contentMode", val);
            if (val === "video") {
                this.showLabel = true;
            }
        },
        enumerable: false,
        configurable: true
    });
    QuestionImagePickerModel.prototype.convertDefaultValue = function (val) {
        return val;
    };
    Object.defineProperty(QuestionImagePickerModel.prototype, "inputType", {
        get: function () {
            return this.multiSelect ? "checkbox" : "radio";
        },
        enumerable: false,
        configurable: true
    });
    QuestionImagePickerModel.prototype.isFootChoice = function (_item, _question) {
        return false;
    };
    QuestionImagePickerModel.prototype.getSelectBaseRootCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(_super.prototype.getSelectBaseRootCss.call(this)).append(this.cssClasses.rootColumn, this.getCurrentColCount() == 1).toString();
    };
    Object.defineProperty(QuestionImagePickerModel.prototype, "isResponsive", {
        get: function () {
            return this.isResponsiveValue && this.isDefaultV2Theme;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionImagePickerModel.prototype, "exactSizesAreEmpty", {
        get: function () {
            var _this = this;
            return !(["imageHeight", "imageWidth"].some(function (propName) { return _this[propName] !== undefined && _this[propName] !== null; }));
        },
        enumerable: false,
        configurable: true
    });
    QuestionImagePickerModel.prototype.calcIsResponsive = function () {
        this.isResponsiveValue = this.exactSizesAreEmpty;
    };
    QuestionImagePickerModel.prototype.getObservedElementSelector = function () {
        return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_7__["classesToSelector"])(this.cssClasses.root);
    };
    QuestionImagePickerModel.prototype.supportResponsiveness = function () {
        return true;
    };
    QuestionImagePickerModel.prototype.needResponsiveness = function () {
        return this.supportResponsiveness() && this.isDefaultV2Theme;
    };
    QuestionImagePickerModel.prototype.getCurrentColCount = function () {
        if (this.responsiveColCount === undefined || this.colCount === 0) {
            return this.colCount;
        }
        return this.responsiveColCount;
    };
    QuestionImagePickerModel.prototype.processResponsiveness = function (_, availableWidth) {
        this._width = availableWidth = Math.floor(availableWidth);
        var calcAvailableColumnsCount = function (availableWidth, minWidth, gap) {
            var itemsInRow = Math.floor(availableWidth / (minWidth + gap));
            if ((itemsInRow + 1) * (minWidth + gap) - gap <= availableWidth)
                itemsInRow++;
            return itemsInRow;
        };
        if (this.isResponsive) {
            var itemsCount = this.choices.length + (this.isDesignMode ? 1 : 0);
            var gap = this.gapBetweenItems || 0;
            var minWidth = this.minImageWidth;
            var maxWidth = this.maxImageWidth;
            var maxHeight = this.maxImageHeight;
            var minHeight = this.minImageHeight;
            var colCount = this.colCount;
            var width_1;
            if (colCount === 0) {
                if ((gap + minWidth) * itemsCount - gap > availableWidth) {
                    var itemsInRow = calcAvailableColumnsCount(availableWidth, minWidth, gap);
                    width_1 = Math.floor((availableWidth - gap * (itemsInRow - 1)) / itemsInRow);
                }
                else {
                    width_1 = Math.floor(((availableWidth - gap * (itemsCount - 1)) / itemsCount));
                }
            }
            else {
                var availableColumnsCount = calcAvailableColumnsCount(availableWidth, minWidth, gap);
                if (availableColumnsCount < colCount) {
                    this.responsiveColCount = availableColumnsCount >= 1 ? availableColumnsCount : 1;
                    colCount = this.responsiveColCount;
                }
                else {
                    this.responsiveColCount = colCount;
                }
                width_1 = Math.floor((availableWidth - gap * (colCount - 1)) / colCount);
            }
            width_1 = Math.max(minWidth, Math.min(width_1, maxWidth));
            var height_1 = Number.MIN_VALUE;
            this.choices.forEach(function (item) {
                var tempHeight = width_1 / item["aspectRatio"];
                height_1 = tempHeight > height_1 ? tempHeight : height_1;
            });
            if (height_1 > maxHeight) {
                height_1 = maxHeight;
            }
            else if (height_1 < minHeight) {
                height_1 = minHeight;
            }
            var oldResponsiveImageWidth = this.responsiveImageWidth;
            var oldResponsiveImageHeight = this.responsiveImageHeight;
            this.responsiveImageWidth = width_1;
            this.responsiveImageHeight = height_1;
            return oldResponsiveImageWidth !== this.responsiveImageWidth || oldResponsiveImageHeight !== this.responsiveImageHeight;
        }
        return false;
    };
    QuestionImagePickerModel.prototype.afterRender = function (el) {
        _super.prototype.afterRender.call(this, el);
        var variables = this.survey.getCss().variables;
        if (!!variables) {
            this.gapBetweenItems = Number.parseInt(window.getComputedStyle(el).getPropertyValue(variables.imagepickerGapBetweenItems)) || 0;
        }
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "responsiveImageHeight", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "responsiveImageWidth", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "isResponsiveValue", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "maxImageWidth", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "minImageWidth", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "maxImageHeight", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "minImageHeight", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
    ], QuestionImagePickerModel.prototype, "responsiveColCount", void 0);
    return QuestionImagePickerModel;
}(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imageitemvalue", [], function (value) { return new ImageItemValue(value); }, "itemvalue");
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperty("imageitemvalue", {
    name: "imageLink",
    serializationProperty: "locImageLink",
});
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("responsiveImageSize", [], undefined, "number");
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imagepicker", [
    { name: "showOtherItem", visible: false },
    { name: "otherText", visible: false },
    { name: "showNoneItem", visible: false },
    { name: "noneText", visible: false },
    { name: "optionsCaption", visible: false },
    { name: "otherErrorText", visible: false },
    { name: "storeOthersAsComment", visible: false },
    {
        name: "contentMode",
        default: "image",
        choices: ["image", "video"],
    },
    {
        name: "imageFit",
        default: "contain",
        choices: ["none", "contain", "cover", "fill"],
    },
    { name: "imageHeight:number", minValue: 0 },
    { name: "imageWidth:number", minValue: 0 },
    { name: "minImageWidth:responsiveImageSize", default: 200, minValue: 0, visibleIf: function () { return _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].supportCreatorV2; } },
    { name: "minImageHeight:responsiveImageSize", default: 133, minValue: 0, visibleIf: function () { return _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].supportCreatorV2; } },
    { name: "maxImageWidth:responsiveImageSize", default: 400, minValue: 0, visibleIf: function () { return _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].supportCreatorV2; } },
    { name: "maxImageHeight:responsiveImageSize", default: 266, minValue: 0, visibleIf: function () { return _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].supportCreatorV2; } },
], function () {
    return new QuestionImagePickerModel("");
}, "checkboxbase");
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperty("imagepicker", {
    name: "showLabel:boolean",
    default: false,
});
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperty("imagepicker", {
    name: "colCount:number",
    default: 0,
    choices: [0, 1, 2, 3, 4, 5],
});
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperty("imagepicker", {
    name: "multiSelect:boolean",
    default: false,
});
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperty("imagepicker", {
    name: "choices:imageitemvalue[]",
});
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("imagepicker", function (name) {
    var q = new QuestionImagePickerModel(name);
    //q.choices = QuestionFactory.DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/question_matrix.ts":
/*!********************************!*\
  !*** ./src/question_matrix.ts ***!
  \********************************/
/*! exports provided: MatrixRowModel, MatrixCells, QuestionMatrixModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixRowModel", function() { return MatrixRowModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixCells", function() { return MatrixCells; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixModel", function() { return QuestionMatrixModel; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _martixBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./martixBase */ "./src/martixBase.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
/* harmony import */ var _question_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./question_dropdown */ "./src/question_dropdown.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();












var MatrixRowModel = /** @class */ (function (_super) {
    __extends(MatrixRowModel, _super);
    function MatrixRowModel(item, fullName, data, value) {
        var _this = _super.call(this) || this;
        _this.fullName = fullName;
        _this.item = item;
        _this.data = data;
        _this.value = value;
        _this.cellClick = function (column) {
            _this.value = column.value;
        };
        _this.registerPropertyChangedHandlers(["value"], function () {
            if (_this.data)
                _this.data.onMatrixRowChanged(_this);
        });
        return _this;
    }
    Object.defineProperty(MatrixRowModel.prototype, "name", {
        get: function () {
            return this.item.value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixRowModel.prototype, "text", {
        get: function () {
            return this.item.text;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixRowModel.prototype, "locText", {
        get: function () {
            return this.item.locText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixRowModel.prototype, "value", {
        get: function () {
            return this.getPropertyValue("value");
        },
        set: function (newValue) {
            newValue = this.data.getCorrectedRowValue(newValue);
            this.setPropertyValue("value", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixRowModel.prototype, "rowClasses", {
        get: function () {
            var cssClasses = this.data.cssClasses;
            var hasError = !!this.data.getErrorByType("requiredinallrowserror");
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(cssClasses.row)
                .append(cssClasses.rowError, hasError && this.isValueEmpty(this.value))
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    return MatrixRowModel;
}(_base__WEBPACK_IMPORTED_MODULE_4__["Base"]));

var MatrixCells = /** @class */ (function () {
    function MatrixCells(cellsOwner) {
        this.cellsOwner = cellsOwner;
        this.values = {};
    }
    Object.defineProperty(MatrixCells.prototype, "isEmpty", {
        get: function () {
            return Object.keys(this.values).length == 0;
        },
        enumerable: false,
        configurable: true
    });
    MatrixCells.prototype.valuesChanged = function () {
        if (!!this.onValuesChanged) {
            this.onValuesChanged();
        }
    };
    MatrixCells.prototype.setCellText = function (row, column, val) {
        row = this.getCellRowColumnValue(row, this.rows);
        column = this.getCellRowColumnValue(column, this.columns);
        if (!row || !column)
            return;
        if (val) {
            if (!this.values[row])
                this.values[row] = {};
            if (!this.values[row][column])
                this.values[row][column] = this.createString();
            this.values[row][column].text = val;
        }
        else {
            if (this.values[row] && this.values[row][column]) {
                var loc = this.values[row][column];
                loc.text = "";
                if (loc.isEmpty) {
                    delete this.values[row][column];
                    if (Object.keys(this.values[row]).length == 0) {
                        delete this.values[row];
                    }
                }
            }
        }
        this.valuesChanged();
    };
    MatrixCells.prototype.setDefaultCellText = function (column, val) {
        this.setCellText(_settings__WEBPACK_IMPORTED_MODULE_10__["settings"].matrixDefaultRowName, column, val);
    };
    MatrixCells.prototype.getCellLocText = function (row, column) {
        row = this.getCellRowColumnValue(row, this.rows);
        column = this.getCellRowColumnValue(column, this.columns);
        if (!row || !column)
            return null;
        if (!this.values[row])
            return null;
        if (!this.values[row][column])
            return null;
        return this.values[row][column];
    };
    MatrixCells.prototype.getDefaultCellLocText = function (column, val) {
        return this.getCellLocText(_settings__WEBPACK_IMPORTED_MODULE_10__["settings"].matrixDefaultRowName, column);
    };
    MatrixCells.prototype.getCellDisplayLocText = function (row, column) {
        var cellText = this.getCellLocText(row, column);
        if (cellText && !cellText.isEmpty)
            return cellText;
        cellText = this.getCellLocText(_settings__WEBPACK_IMPORTED_MODULE_10__["settings"].matrixDefaultRowName, column);
        if (cellText && !cellText.isEmpty)
            return cellText;
        if (typeof column == "number") {
            column =
                column >= 0 && column < this.columns.length
                    ? this.columns[column]
                    : null;
        }
        if (column && column.locText)
            return column.locText;
        return null;
    };
    MatrixCells.prototype.getCellText = function (row, column) {
        var loc = this.getCellLocText(row, column);
        return loc ? loc.calculatedText : null;
    };
    MatrixCells.prototype.getDefaultCellText = function (column) {
        var loc = this.getCellLocText(_settings__WEBPACK_IMPORTED_MODULE_10__["settings"].matrixDefaultRowName, column);
        return loc ? loc.calculatedText : null;
    };
    MatrixCells.prototype.getCellDisplayText = function (row, column) {
        var loc = this.getCellDisplayLocText(row, column);
        return loc ? loc.calculatedText : null;
    };
    Object.defineProperty(MatrixCells.prototype, "rows", {
        get: function () {
            return this.cellsOwner ? this.cellsOwner.getRows() : [];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixCells.prototype, "columns", {
        get: function () {
            return this.cellsOwner ? this.cellsOwner.getColumns() : [];
        },
        enumerable: false,
        configurable: true
    });
    MatrixCells.prototype.getCellRowColumnValue = function (val, values) {
        if (val === null || val === undefined)
            return null;
        if (typeof val == "number") {
            if (val < 0 || val >= values.length)
                return null;
            val = values[val].value;
        }
        if (val.value)
            return val.value;
        return val;
    };
    MatrixCells.prototype.getJson = function () {
        if (this.isEmpty)
            return null;
        var res = {};
        for (var row in this.values) {
            var resRow = {};
            var rowValues = this.values[row];
            for (var col in rowValues) {
                resRow[col] = rowValues[col].getJson();
            }
            res[row] = resRow;
        }
        return res;
    };
    MatrixCells.prototype.setJson = function (value) {
        this.values = {};
        if (!!value) {
            for (var row in value) {
                if (row == "pos")
                    continue;
                var rowValues = value[row];
                this.values[row] = {};
                for (var col in rowValues) {
                    if (col == "pos")
                        continue;
                    var loc = this.createString();
                    loc.setJson(rowValues[col]);
                    this.values[row][col] = loc;
                }
            }
        }
        this.valuesChanged();
    };
    MatrixCells.prototype.createString = function () {
        return new _localizablestring__WEBPACK_IMPORTED_MODULE_8__["LocalizableString"](this.cellsOwner, true);
    };
    return MatrixCells;
}());

/**
  * A class that describes the Single-Choice Matrix question type.
  *
  * [View Demo](https://surveyjs.io/form-library/examples/single-selection-matrix-table-question/ (linkStyle))
  */
var QuestionMatrixModel = /** @class */ (function (_super) {
    __extends(QuestionMatrixModel, _super);
    function QuestionMatrixModel(name) {
        var _this = _super.call(this, name) || this;
        _this.isRowChanging = false;
        _this.emptyLocalizableString = new _localizablestring__WEBPACK_IMPORTED_MODULE_8__["LocalizableString"](_this);
        _this.cellsValue = new MatrixCells(_this);
        _this.cellsValue.onValuesChanged = function () {
            _this.updateHasCellText();
            _this.propertyValueChanged("cells", _this.cells, _this.cells);
        };
        _this.registerPropertyChangedHandlers(["columns"], function () {
            _this.onColumnsChanged();
        });
        _this.registerPropertyChangedHandlers(["rows"], function () {
            if (!_this.filterItems()) {
                _this.onRowsChanged();
            }
        });
        _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
            _this.updateVisibilityBasedOnRows();
        });
        return _this;
    }
    QuestionMatrixModel.prototype.getType = function () {
        return "matrix";
    };
    Object.defineProperty(QuestionMatrixModel.prototype, "hasSingleInput", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixModel.prototype, "isAllRowRequired", {
        /**
         * Specifies whether each row requires an answer. If a respondent skips a row, the question displays a validation error.
         * @see isRequired
         */
        get: function () {
            return this.getPropertyValue("isAllRowRequired", false);
        },
        set: function (val) {
            this.setPropertyValue("isAllRowRequired", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixModel.prototype, "hasRows", {
        get: function () {
            return this.rows.length > 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixModel.prototype, "rowsOrder", {
        /**
         * Specifies a sort order for matrix rows.
         *
         * Possible values:
         *
         * - "initial" (default) - Preserves the original order of the `rows` array.
         * - "random" - Arranges matrix rows in random order each time the question is displayed.
         * @see rows
         */
        get: function () {
            return this.getPropertyValue("rowsOrder");
        },
        set: function (val) {
            val = val.toLowerCase();
            if (val == this.rowsOrder)
                return;
            this.setPropertyValue("rowsOrder", val);
            this.onRowsChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixModel.prototype, "hideIfRowsEmpty", {
        /**
         * Specifies whether to hide the question when the matrix has no visible rows.
         * @see rowsVisibleIf
         */
        get: function () {
            return this.getPropertyValue("hideIfRowsEmpty");
        },
        set: function (val) {
            this.setPropertyValue("hideIfRowsEmpty", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixModel.prototype.getRows = function () {
        return this.rows;
    };
    QuestionMatrixModel.prototype.getColumns = function () {
        return this.visibleColumns;
    };
    QuestionMatrixModel.prototype.addColumn = function (value, text) {
        var col = new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](value, text);
        this.columns.push(col);
        return col;
    };
    QuestionMatrixModel.prototype.getItemClass = function (row, column) {
        var isChecked = row.value == column.value;
        var isDisabled = this.isReadOnly;
        var allowHover = !isChecked && !isDisabled;
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]()
            .append(this.cssClasses.cell, this.hasCellText)
            .append(this.hasCellText ? this.cssClasses.cellText : this.cssClasses.label)
            .append(this.cssClasses.itemOnError, !this.hasCellText && this.errors.length > 0)
            .append(this.hasCellText ? this.cssClasses.cellTextSelected : this.cssClasses.itemChecked, isChecked)
            .append(this.hasCellText ? this.cssClasses.cellTextDisabled : this.cssClasses.itemDisabled, isDisabled)
            .append(this.cssClasses.itemHover, allowHover && !this.hasCellText)
            .toString();
    };
    Object.defineProperty(QuestionMatrixModel.prototype, "itemSvgIcon", {
        get: function () {
            return this.cssClasses.itemSvgIconId;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixModel.prototype.getQuizQuestionCount = function () {
        var res = 0;
        for (var i = 0; i < this.rows.length; i++) {
            if (!this.isValueEmpty(this.correctAnswer[this.rows[i].value]))
                res++;
        }
        return res;
    };
    QuestionMatrixModel.prototype.getCorrectAnswerCount = function () {
        var res = 0;
        var value = this.value;
        for (var i = 0; i < this.rows.length; i++) {
            var row = this.rows[i].value;
            if (!this.isValueEmpty(value[row]) &&
                this.isTwoValueEquals(this.correctAnswer[row], value[row]))
                res++;
        }
        return res;
    };
    QuestionMatrixModel.prototype.getVisibleRows = function () {
        var result = new Array();
        var val = this.value;
        if (!val)
            val = {};
        var rows = !!this.filteredRows ? this.filteredRows : this.rows;
        for (var i = 0; i < rows.length; i++) {
            var row = rows[i];
            if (this.isValueEmpty(row.value))
                continue;
            result.push(this.createMatrixRow(row, this.id + "_" + row.value.toString().replace(/\s/g, "_"), val[row.value]));
        }
        if (result.length == 0 && !this.filteredRows) {
            result.push(this.createMatrixRow(new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](null), this.name.replace(/\s/g, "_"), val));
        }
        this.generatedVisibleRows = result;
        return result;
    };
    QuestionMatrixModel.prototype.sortVisibleRows = function (array) {
        if (!!this.survey && this.survey.isDesignMode)
            return array;
        var order = this.rowsOrder.toLowerCase();
        if (order === "random")
            return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].randomizeArray(array);
        return array;
    };
    QuestionMatrixModel.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        this.rows = this.sortVisibleRows(this.rows);
    };
    QuestionMatrixModel.prototype.processRowsOnSet = function (newRows) {
        return this.sortVisibleRows(newRows);
    };
    Object.defineProperty(QuestionMatrixModel.prototype, "visibleRows", {
        get: function () {
            return this.getVisibleRows();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixModel.prototype, "cells", {
        get: function () {
            return this.cellsValue;
        },
        set: function (value) {
            this.cells.setJson(value && value.getJson ? value.getJson() : null);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixModel.prototype, "hasCellText", {
        get: function () {
            return this.getPropertyValue("hasCellText", false);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixModel.prototype.updateHasCellText = function () {
        this.setPropertyValue("hasCellText", !this.cells.isEmpty);
    };
    QuestionMatrixModel.prototype.setCellText = function (row, column, val) {
        this.cells.setCellText(row, column, val);
    };
    QuestionMatrixModel.prototype.getCellText = function (row, column) {
        return this.cells.getCellText(row, column);
    };
    QuestionMatrixModel.prototype.setDefaultCellText = function (column, val) {
        this.cells.setDefaultCellText(column, val);
    };
    QuestionMatrixModel.prototype.getDefaultCellText = function (column) {
        return this.cells.getDefaultCellText(column);
    };
    QuestionMatrixModel.prototype.getCellDisplayText = function (row, column) {
        return this.cells.getCellDisplayText(row, column);
    };
    QuestionMatrixModel.prototype.getCellDisplayLocText = function (row, column) {
        var loc = this.cells.getCellDisplayLocText(row, column);
        return loc ? loc : this.emptyLocalizableString;
    };
    QuestionMatrixModel.prototype.supportGoNextPageAutomatic = function () {
        return this.hasValuesInAllRows();
    };
    QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
        _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
        if ((!isOnValueChanged || this.errors.length > 0) &&
            this.hasErrorInRows()) {
            errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["RequiredInAllRowsError"](null, this));
        }
    };
    QuestionMatrixModel.prototype.hasErrorInRows = function () {
        if (!this.isAllRowRequired)
            return false;
        return !this.hasValuesInAllRows();
    };
    QuestionMatrixModel.prototype.hasValuesInAllRows = function () {
        var rows = this.generatedVisibleRows;
        if (!rows)
            rows = this.visibleRows;
        if (!rows)
            return true;
        for (var i = 0; i < rows.length; i++) {
            if (this.isValueEmpty(rows[i].value))
                return false;
        }
        return true;
    };
    QuestionMatrixModel.prototype.getIsAnswered = function () {
        return _super.prototype.getIsAnswered.call(this) && this.hasValuesInAllRows();
    };
    QuestionMatrixModel.prototype.createMatrixRow = function (item, fullName, value) {
        var row = new MatrixRowModel(item, fullName, this, value);
        this.onMatrixRowCreated(row);
        return row;
    };
    QuestionMatrixModel.prototype.onMatrixRowCreated = function (row) { };
    QuestionMatrixModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        _super.prototype.setQuestionValue.call(this, newValue, this.isRowChanging || updateIsAnswered);
        if (!this.generatedVisibleRows || this.generatedVisibleRows.length == 0)
            return;
        this.isRowChanging = true;
        var val = this.value;
        if (!val)
            val = {};
        if (this.rows.length == 0) {
            this.generatedVisibleRows[0].value = val;
        }
        else {
            for (var i = 0; i < this.generatedVisibleRows.length; i++) {
                var row = this.generatedVisibleRows[i];
                var rowVal = val[row.name];
                if (this.isValueEmpty(rowVal))
                    rowVal = null;
                this.generatedVisibleRows[i].value = rowVal;
            }
        }
        this.updateIsAnswered();
        this.isRowChanging = false;
    };
    QuestionMatrixModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        var res = {};
        for (var key in value) {
            var newKey = keysAsText
                ? _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getTextOrHtmlByValue(this.rows, key)
                : key;
            if (!newKey)
                newKey = key;
            var newValue = _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getTextOrHtmlByValue(this.columns, value[key]);
            if (!newValue)
                newValue = value[key];
            res[newKey] = newValue;
        }
        return res;
    };
    QuestionMatrixModel.prototype.getPlainData = function (options) {
        var _this = this;
        if (options === void 0) { options = {
            includeEmpty: true,
        }; }
        var questionPlainData = _super.prototype.getPlainData.call(this, options);
        if (!!questionPlainData) {
            var values = this.createValueCopy();
            questionPlainData.isNode = true;
            questionPlainData.data = Object.keys(values || {}).map(function (rowName) {
                var row = _this.rows.filter(function (r) { return r.value === rowName; })[0];
                var rowDataItem = {
                    name: rowName,
                    title: !!row ? row.text : "row",
                    value: values[rowName],
                    displayValue: _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getTextOrHtmlByValue(_this.visibleColumns, values[rowName]),
                    getString: function (val) {
                        return typeof val === "object" ? JSON.stringify(val) : val;
                    },
                    isNode: false,
                };
                var item = _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(_this.visibleColumns, values[rowName]);
                if (!!item) {
                    (options.calculations || []).forEach(function (calculation) {
                        rowDataItem[calculation.propertyName] =
                            item[calculation.propertyName];
                    });
                }
                return rowDataItem;
            });
        }
        return questionPlainData;
    };
    QuestionMatrixModel.prototype.addConditionObjectsByContext = function (objects, context) {
        for (var i = 0; i < this.rows.length; i++) {
            var row = this.rows[i];
            if (!!row.value) {
                objects.push({
                    name: this.getValueName() + "." + row.value,
                    text: this.processedTitle + "." + row.calculatedText,
                    question: this,
                });
            }
        }
    };
    QuestionMatrixModel.prototype.getConditionJson = function (operator, path) {
        if (operator === void 0) { operator = null; }
        if (path === void 0) { path = null; }
        if (!path)
            return _super.prototype.getConditionJson.call(this);
        var question = new _question_dropdown__WEBPACK_IMPORTED_MODULE_9__["QuestionDropdownModel"](path);
        question.choices = this.columns;
        var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_3__["JsonObject"]().toJsonObject(question);
        json["type"] = question.getType();
        return json;
    };
    QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function () {
        _super.prototype.clearValueIfInvisibleCore.call(this);
        if (this.hasRows) {
            this.clearInvisibleValuesInRows();
        }
    };
    QuestionMatrixModel.prototype.getFirstInputElementId = function () {
        var rows = this.generatedVisibleRows;
        if (!rows)
            rows = this.visibleRows;
        if (rows.length > 0 && this.visibleColumns.length > 0) {
            return this.inputId + "_" + rows[0].name + "_" + 0;
        }
        return _super.prototype.getFirstInputElementId.call(this);
    };
    //IMatrixData
    QuestionMatrixModel.prototype.onMatrixRowChanged = function (row) {
        if (this.isRowChanging)
            return;
        this.isRowChanging = true;
        if (!this.hasRows) {
            this.setNewValue(row.value);
        }
        else {
            var newValue = this.value;
            if (!newValue) {
                newValue = {};
            }
            newValue[row.name] = row.value;
            this.setNewValue(newValue);
        }
        this.isRowChanging = false;
    };
    QuestionMatrixModel.prototype.getCorrectedRowValue = function (value) {
        for (var i = 0; i < this.columns.length; i++) {
            if (value === this.columns[i].value)
                return value;
        }
        for (var i = 0; i < this.columns.length; i++) {
            if (this.isTwoValueEquals(value, this.columns[i].value))
                return this.columns[i].value;
        }
        return value;
    };
    QuestionMatrixModel.prototype.getSearchableItemValueKeys = function (keys) {
        keys.push("columns");
        keys.push("rows");
    };
    Object.defineProperty(QuestionMatrixModel.prototype, "SurveyModel", {
        get: function () {
            return this.survey;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixModel.prototype.getColumnHeaderWrapperComponentName = function (cell) {
        return this.SurveyModel.getElementWrapperComponentName({ column: cell }, "column-header");
    };
    QuestionMatrixModel.prototype.getColumnHeaderWrapperComponentData = function (cell) {
        return this.SurveyModel.getElementWrapperComponentData({ column: cell }, "column-header");
    };
    QuestionMatrixModel.prototype.getRowHeaderWrapperComponentName = function (cell) {
        return this.SurveyModel.getElementWrapperComponentName({ row: cell }, "row-header");
    };
    QuestionMatrixModel.prototype.getRowHeaderWrapperComponentData = function (cell) {
        return this.SurveyModel.getElementWrapperComponentData({ row: cell }, "row-header");
    };
    return QuestionMatrixModel;
}(_martixBase__WEBPACK_IMPORTED_MODULE_2__["QuestionMatrixBaseModel"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("matrix", [
    {
        name: "columns:itemvalue[]", uniqueProperty: "value",
        baseValue: function () {
            return _surveyStrings__WEBPACK_IMPORTED_MODULE_5__["surveyLocalization"].getString("matrix_column");
        },
    },
    {
        name: "rows:itemvalue[]", uniqueProperty: "value",
        baseValue: function () {
            return _surveyStrings__WEBPACK_IMPORTED_MODULE_5__["surveyLocalization"].getString("matrix_row");
        },
    },
    { name: "cells:cells", serializationProperty: "cells" },
    {
        name: "rowsOrder",
        default: "initial",
        choices: ["initial", "random"],
    },
    "isAllRowRequired:boolean",
    "hideIfRowsEmpty:boolean",
], function () {
    return new QuestionMatrixModel("");
}, "matrixbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_7__["QuestionFactory"].Instance.registerQuestion("matrix", function (name) {
    var q = new QuestionMatrixModel(name);
    q.rows = _questionfactory__WEBPACK_IMPORTED_MODULE_7__["QuestionFactory"].DefaultRows;
    q.columns = _questionfactory__WEBPACK_IMPORTED_MODULE_7__["QuestionFactory"].DefaultColums;
    return q;
});


/***/ }),

/***/ "./src/question_matrixdropdown.ts":
/*!****************************************!*\
  !*** ./src/question_matrixdropdown.ts ***!
  \****************************************/
/*! exports provided: MatrixDropdownRowModel, QuestionMatrixDropdownModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModel", function() { return MatrixDropdownRowModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModel", function() { return QuestionMatrixDropdownModel; });
/* harmony import */ var _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./question_matrixdropdownbase */ "./src/question_matrixdropdownbase.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var MatrixDropdownRowModel = /** @class */ (function (_super) {
    __extends(MatrixDropdownRowModel, _super);
    function MatrixDropdownRowModel(name, item, data, value) {
        var _this = _super.call(this, data, value) || this;
        _this.name = name;
        _this.item = item;
        _this.buildCells(value);
        return _this;
    }
    Object.defineProperty(MatrixDropdownRowModel.prototype, "rowName", {
        get: function () {
            return this.name;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModel.prototype, "text", {
        get: function () {
            return this.item.text;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModel.prototype, "locText", {
        get: function () {
            return this.item.locText;
        },
        enumerable: false,
        configurable: true
    });
    return MatrixDropdownRowModel;
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]));

/**
  * A class that describes the Multiple-Choice Matrix question type. Multiple-Choice Matrix allows you to use the [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), [Text](https://surveyjs.io/form-library/documentation/questiontextmodel), and [Comment](https://surveyjs.io/form-library/documentation/questioncommentmodel) question types as cell editors.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/ (linkStyle))
 */
var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
    __extends(QuestionMatrixDropdownModel, _super);
    function QuestionMatrixDropdownModel(name) {
        var _this = _super.call(this, name) || this;
        _this.createLocalizableString("totalText", _this, true);
        _this.registerPropertyChangedHandlers(["rows"], function () {
            _this.clearGeneratedRows();
            _this.resetRenderedTable();
            if (!_this.filterItems()) {
                _this.onRowsChanged();
            }
        });
        _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
            _this.updateVisibilityBasedOnRows();
        });
        return _this;
    }
    QuestionMatrixDropdownModel.prototype.getType = function () {
        return "matrixdropdown";
    };
    Object.defineProperty(QuestionMatrixDropdownModel.prototype, "totalText", {
        /**
         * A title for the total row. Applies if at least one column displays total values.
         * @see rowTitleWidth
         * @see columns
         */
        get: function () {
            return this.getLocalizableStringText("totalText", "");
        },
        set: function (val) {
            this.setLocalizableStringText("totalText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModel.prototype, "locTotalText", {
        get: function () {
            return this.getLocalizableString("totalText");
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModel.prototype.getFooterText = function () {
        return this.locTotalText;
    };
    Object.defineProperty(QuestionMatrixDropdownModel.prototype, "rowTitleWidth", {
        /**
         * A width for the column that displays row titles (first column). Accepts CSS values.
         */
        get: function () {
            return this.getPropertyValue("rowTitleWidth", "");
        },
        set: function (val) {
            this.setPropertyValue("rowTitleWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModel.prototype.getRowTitleWidth = function () {
        return this.rowTitleWidth;
    };
    Object.defineProperty(QuestionMatrixDropdownModel.prototype, "hideIfRowsEmpty", {
        /**
         * Specifies whether to hide the question when the matrix has no visible rows.
         * @see rowsVisibleIf
         */
        get: function () {
            return this.getPropertyValue("hideIfRowsEmpty", false);
        },
        set: function (val) {
            this.setPropertyValue("hideIfRowsEmpty", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        if (!value)
            return value;
        var rows = this.visibleRows;
        var res = {};
        if (!rows)
            return res;
        for (var i = 0; i < rows.length; i++) {
            var rowValue = rows[i].rowName;
            var val = value[rowValue];
            if (!val)
                continue;
            if (keysAsText) {
                var displayRowValue = _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getTextOrHtmlByValue(this.rows, rowValue);
                if (!!displayRowValue) {
                    rowValue = displayRowValue;
                }
            }
            res[rowValue] = this.getRowDisplayValue(keysAsText, rows[i], val);
        }
        return res;
    };
    QuestionMatrixDropdownModel.prototype.getConditionObjectRowName = function (index) {
        return "." + this.rows[index].value;
    };
    QuestionMatrixDropdownModel.prototype.getConditionObjectRowText = function (index) {
        return "." + this.rows[index].calculatedText;
    };
    QuestionMatrixDropdownModel.prototype.getConditionObjectsRowIndeces = function () {
        var res = [];
        for (var i = 0; i < this.rows.length; i++)
            res.push(i);
        return res;
    };
    QuestionMatrixDropdownModel.prototype.setNewValue = function (newValue) {
        if (!!newValue && typeof newValue !== "object")
            return;
        _super.prototype.setNewValue.call(this, newValue);
    };
    QuestionMatrixDropdownModel.prototype.clearIncorrectValues = function () {
        var val = this.value;
        if (!val)
            return;
        var newVal = null;
        var isChanged = false;
        var rows = !!this.filteredRows ? this.filteredRows : this.rows;
        for (var key in val) {
            if (_itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getItemByValue(rows, key)) {
                if (newVal == null)
                    newVal = {};
                newVal[key] = val[key];
            }
            else {
                isChanged = true;
            }
        }
        if (isChanged) {
            this.value = newVal;
        }
        _super.prototype.clearIncorrectValues.call(this);
    };
    QuestionMatrixDropdownModel.prototype.clearValueIfInvisibleCore = function () {
        _super.prototype.clearValueIfInvisibleCore.call(this);
        this.clearInvisibleValuesInRows();
    };
    QuestionMatrixDropdownModel.prototype.generateRows = function () {
        var result = new Array();
        var rows = !!this.filteredRows ? this.filteredRows : this.rows;
        if (!rows || rows.length === 0)
            return result;
        var val = this.value;
        if (!val)
            val = {};
        for (var i = 0; i < rows.length; i++) {
            if (!rows[i].value)
                continue;
            result.push(this.createMatrixRow(rows[i], val[rows[i].value]));
        }
        return result;
    };
    QuestionMatrixDropdownModel.prototype.createMatrixRow = function (item, value) {
        return new MatrixDropdownRowModel(item.value, item, this, value);
    };
    QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
        keys.push("rows");
    };
    QuestionMatrixDropdownModel.prototype.updateProgressInfoByValues = function (res) {
        var val = this.value;
        if (!val)
            val = {};
        for (var i = 0; i < this.rows.length; i++) {
            var row = this.rows[i];
            var rowValue = val[row.value];
            this.updateProgressInfoByRow(res, !!rowValue ? rowValue : {});
        }
    };
    return QuestionMatrixDropdownModel;
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownModelBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("matrixdropdown", [
    {
        name: "rows:itemvalue[]", uniqueProperty: "value"
    },
    "rowsVisibleIf:condition",
    "rowTitleWidth",
    { name: "totalText", serializationProperty: "locTotalText" },
    "hideIfRowsEmpty:boolean"
], function () {
    return new QuestionMatrixDropdownModel("");
}, "matrixdropdownbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].Instance.registerQuestion("matrixdropdown", function (name) {
    var q = new QuestionMatrixDropdownModel(name);
    q.choices = [1, 2, 3, 4, 5];
    q.rows = _questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].DefaultRows;
    _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["QuestionMatrixDropdownModelBase"].addDefaultColumns(q);
    return q;
});


/***/ }),

/***/ "./src/question_matrixdropdownbase.ts":
/*!********************************************!*\
  !*** ./src/question_matrixdropdownbase.ts ***!
  \********************************************/
/*! exports provided: MatrixDropdownCell, MatrixDropdownTotalCell, MatrixDropdownRowModelBase, MatrixDropdownTotalRowModel, QuestionMatrixDropdownModelBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownCell", function() { return MatrixDropdownCell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownTotalCell", function() { return MatrixDropdownTotalCell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownRowModelBase", function() { return MatrixDropdownRowModelBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownTotalRowModel", function() { return MatrixDropdownTotalRowModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownModelBase", function() { return QuestionMatrixDropdownModelBase; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _martixBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./martixBase */ "./src/martixBase.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
/* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _functionsfactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./functionsfactory */ "./src/functionsfactory.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./question_matrixdropdowncolumn */ "./src/question_matrixdropdowncolumn.ts");
/* harmony import */ var _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./question_matrixdropdownrendered */ "./src/question_matrixdropdownrendered.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();














var MatrixDropdownCell = /** @class */ (function () {
    function MatrixDropdownCell(column, row, data) {
        this.column = column;
        this.row = row;
        this.data = data;
        this.questionValue = this.createQuestion(column, row, data);
        this.questionValue.updateCustomWidget();
    }
    MatrixDropdownCell.prototype.locStrsChanged = function () {
        this.question.locStrsChanged();
    };
    MatrixDropdownCell.prototype.createQuestion = function (column, row, data) {
        var res = data.createQuestion(this.row, this.column);
        res.validateValueCallback = function () {
            return data.validateCell(row, column.name, row.value);
        };
        _jsonobject__WEBPACK_IMPORTED_MODULE_0__["CustomPropertiesCollection"].getProperties(column.getType()).forEach(function (property) {
            var propertyName = property.name;
            if (column[propertyName] !== undefined) {
                res[propertyName] = column[propertyName];
            }
        });
        return res;
    };
    Object.defineProperty(MatrixDropdownCell.prototype, "question", {
        get: function () {
            return this.questionValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownCell.prototype, "value", {
        get: function () {
            return this.question.value;
        },
        set: function (value) {
            this.question.value = value;
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownCell.prototype.runCondition = function (values, properties) {
        this.question.runCondition(values, properties);
    };
    return MatrixDropdownCell;
}());

var MatrixDropdownTotalCell = /** @class */ (function (_super) {
    __extends(MatrixDropdownTotalCell, _super);
    function MatrixDropdownTotalCell(column, row, data) {
        var _this = _super.call(this, column, row, data) || this;
        _this.column = column;
        _this.row = row;
        _this.data = data;
        _this.updateCellQuestion();
        return _this;
    }
    MatrixDropdownTotalCell.prototype.createQuestion = function (column, row, data) {
        var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass("expression");
        res.setSurveyImpl(row);
        return res;
    };
    MatrixDropdownTotalCell.prototype.locStrsChanged = function () {
        this.updateCellQuestion();
        _super.prototype.locStrsChanged.call(this);
    };
    MatrixDropdownTotalCell.prototype.updateCellQuestion = function () {
        this.question.locCalculation();
        this.column.updateCellQuestion(this.question, null, function (json) {
            delete json["defaultValue"];
        });
        this.question.expression = this.getTotalExpression();
        this.question.format = this.column.totalFormat;
        this.question.currency = this.column.totalCurrency;
        this.question.displayStyle = this.column.totalDisplayStyle;
        this.question.maximumFractionDigits = this.column.totalMaximumFractionDigits;
        this.question.minimumFractionDigits = this.column.totalMinimumFractionDigits;
        this.question.unlocCalculation();
        this.question.runIfReadOnly = true;
    };
    MatrixDropdownTotalCell.prototype.getTotalExpression = function () {
        if (!!this.column.totalExpression)
            return this.column.totalExpression;
        if (this.column.totalType == "none")
            return "";
        var funName = this.column.totalType + "InArray";
        if (!_functionsfactory__WEBPACK_IMPORTED_MODULE_8__["FunctionFactory"].Instance.hasFunction(funName))
            return "";
        return funName + "({self}, '" + this.column.name + "')";
    };
    return MatrixDropdownTotalCell;
}(MatrixDropdownCell));

var MatrixDropdownRowTextProcessor = /** @class */ (function (_super) {
    __extends(MatrixDropdownRowTextProcessor, _super);
    function MatrixDropdownRowTextProcessor(row, variableName, parentTextProcessor) {
        var _this = _super.call(this, variableName) || this;
        _this.row = row;
        _this.variableName = variableName;
        _this.parentTextProcessor = parentTextProcessor;
        return _this;
    }
    MatrixDropdownRowTextProcessor.prototype.getParentTextProcessor = function () { return this.parentTextProcessor; };
    Object.defineProperty(MatrixDropdownRowTextProcessor.prototype, "survey", {
        get: function () {
            return this.row.getSurvey();
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownRowTextProcessor.prototype.getValues = function () {
        return this.row.value;
    };
    MatrixDropdownRowTextProcessor.prototype.getQuestionByName = function (name) {
        return this.row.getQuestionByName(name);
    };
    MatrixDropdownRowTextProcessor.prototype.onCustomProcessText = function (textValue) {
        if (textValue.name == MatrixDropdownRowModelBase.IndexVariableName) {
            textValue.isExists = true;
            textValue.value = this.row.rowIndex;
            return true;
        }
        if (textValue.name == MatrixDropdownRowModelBase.RowValueVariableName) {
            textValue.isExists = true;
            textValue.value = this.row.rowName;
            return true;
        }
        return false;
    };
    return MatrixDropdownRowTextProcessor;
}(_textPreProcessor__WEBPACK_IMPORTED_MODULE_5__["QuestionTextProcessor"]));
var MatrixDropdownRowModelBase = /** @class */ (function () {
    function MatrixDropdownRowModelBase(data, value) {
        var _this = this;
        this.isSettingValue = false;
        this.detailPanelValue = null;
        this.cells = [];
        this.isCreatingDetailPanel = false;
        this.data = data;
        this.subscribeToChanges(value);
        this.textPreProcessor = new MatrixDropdownRowTextProcessor(this, MatrixDropdownRowModelBase.RowVariableName, !!data ? data.getParentTextProcessor() : null);
        this.showHideDetailPanelClick = function () {
            if (_this.getSurvey().isDesignMode)
                return true;
            _this.showHideDetailPanel();
        };
        this.idValue = MatrixDropdownRowModelBase.getId();
    }
    MatrixDropdownRowModelBase.getId = function () {
        return "srow_" + MatrixDropdownRowModelBase.idCounter++;
    };
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "id", {
        get: function () {
            return this.idValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "rowName", {
        get: function () {
            return null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "text", {
        get: function () {
            return this.rowName;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
        get: function () {
            var result = {};
            var questions = this.questions;
            for (var i = 0; i < questions.length; i++) {
                var question = questions[i];
                if (!question.isEmpty()) {
                    result[question.getValueName()] = question.value;
                }
                if (!!question.comment &&
                    !!this.getSurvey() &&
                    this.getSurvey().storeOthersAsComment) {
                    result[question.getValueName() + _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].commentPrefix] =
                        question.comment;
                }
            }
            return result;
        },
        set: function (value) {
            this.isSettingValue = true;
            this.subscribeToChanges(value);
            var questions = this.questions;
            for (var i = 0; i < questions.length; i++) {
                var question = questions[i];
                var val = this.getCellValue(value, question.getValueName());
                var oldComment = question.comment;
                var comment = !!value
                    ? value[question.getValueName() + _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].commentPrefix]
                    : "";
                if (comment == undefined)
                    comment = "";
                question.updateValueFromSurvey(val);
                if (!!comment || this.isTwoValueEquals(oldComment, question.comment)) {
                    question.updateCommentFromSurvey(comment);
                }
                question.onSurveyValueChanged(val);
            }
            this.isSettingValue = false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "locText", {
        get: function () {
            return null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "hasPanel", {
        get: function () {
            if (!this.data)
                return false;
            return this.data.hasDetailPanel(this);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "detailPanel", {
        get: function () {
            return this.detailPanelValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "detailPanelId", {
        get: function () {
            return !!this.detailPanel ? this.detailPanel.id : "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "isDetailPanelShowing", {
        get: function () {
            return !!this.data ? this.data.getIsDetailPanelShowing(this) : false;
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownRowModelBase.prototype.setIsDetailPanelShowing = function (val) {
        if (!!this.data) {
            this.data.setIsDetailPanelShowing(this, val);
        }
        if (!!this.onDetailPanelShowingChanged) {
            this.onDetailPanelShowingChanged();
        }
    };
    MatrixDropdownRowModelBase.prototype.showHideDetailPanel = function () {
        if (this.isDetailPanelShowing) {
            this.hideDetailPanel();
        }
        else {
            this.showDetailPanel();
        }
    };
    MatrixDropdownRowModelBase.prototype.showDetailPanel = function () {
        this.ensureDetailPanel();
        if (!this.detailPanelValue)
            return;
        this.setIsDetailPanelShowing(true);
    };
    MatrixDropdownRowModelBase.prototype.hideDetailPanel = function (destroyPanel) {
        if (destroyPanel === void 0) { destroyPanel = false; }
        this.setIsDetailPanelShowing(false);
        if (destroyPanel) {
            this.detailPanelValue = null;
        }
    };
    MatrixDropdownRowModelBase.prototype.ensureDetailPanel = function () {
        if (this.isCreatingDetailPanel)
            return;
        if (!!this.detailPanelValue || !this.hasPanel || !this.data)
            return;
        this.isCreatingDetailPanel = true;
        this.detailPanelValue = this.data.createRowDetailPanel(this);
        var questions = this.detailPanelValue.questions;
        var value = this.data.getRowValue(this.data.getRowIndex(this));
        if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value)) {
            for (var i = 0; i < questions.length; i++) {
                var key = questions[i].getValueName();
                if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value[key])) {
                    questions[i].value = value[key];
                }
            }
        }
        this.detailPanelValue.setSurveyImpl(this);
        this.isCreatingDetailPanel = false;
    };
    MatrixDropdownRowModelBase.prototype.getAllValues = function () {
        return this.value;
    };
    MatrixDropdownRowModelBase.prototype.getFilteredValues = function () {
        var allValues = this.getAllValues();
        var values = { row: allValues };
        for (var key in allValues) {
            values[key] = allValues[key];
        }
        return values;
    };
    MatrixDropdownRowModelBase.prototype.getFilteredProperties = function () {
        return { survey: this.getSurvey(), row: this };
    };
    MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
        if (!!this.data) {
            values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
        }
        values[MatrixDropdownRowModelBase.IndexVariableName] = this.rowIndex;
        values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
        if (!properties)
            properties = {};
        properties[MatrixDropdownRowModelBase.RowVariableName] = this;
        for (var i = 0; i < this.cells.length; i++) {
            values[MatrixDropdownRowModelBase.RowVariableName] = this.value;
            this.cells[i].runCondition(values, properties);
        }
        if (!!this.detailPanel) {
            this.detailPanel.runCondition(values, properties);
        }
    };
    MatrixDropdownRowModelBase.prototype.clearValue = function () {
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].clearValue();
        }
    };
    MatrixDropdownRowModelBase.prototype.onAnyValueChanged = function (name) {
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].onAnyValueChanged(name);
        }
    };
    MatrixDropdownRowModelBase.prototype.getDataValueCore = function (valuesHash, key) {
        var survey = this.getSurvey();
        if (!!survey) {
            return survey.getDataValueCore(valuesHash, key);
        }
        else {
            return valuesHash[key];
        }
    };
    MatrixDropdownRowModelBase.prototype.getValue = function (name) {
        var question = this.getQuestionByName(name);
        return !!question ? question.value : null;
    };
    MatrixDropdownRowModelBase.prototype.setValue = function (name, newColumnValue) {
        this.setValueCore(name, newColumnValue, false);
    };
    MatrixDropdownRowModelBase.prototype.getVariable = function (name) {
        return undefined;
    };
    MatrixDropdownRowModelBase.prototype.setVariable = function (name, newValue) { };
    MatrixDropdownRowModelBase.prototype.getComment = function (name) {
        var question = this.getQuestionByName(name);
        return !!question ? question.comment : "";
    };
    MatrixDropdownRowModelBase.prototype.setComment = function (name, newValue, locNotification) {
        this.setValueCore(name, newValue, true);
    };
    MatrixDropdownRowModelBase.prototype.setValueCore = function (name, newColumnValue, isComment) {
        if (this.isSettingValue)
            return;
        this.updateQuestionsValue(name, newColumnValue, isComment);
        var newValue = this.value;
        var changedName = isComment ? name + _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].commentPrefix : name;
        var changedValue = newColumnValue;
        var changedQuestion = this.getQuestionByName(name);
        var changingValue = this.data.onRowChanging(this, changedName, newValue);
        if (!!changedQuestion &&
            !this.isTwoValueEquals(changingValue, changedValue)) {
            if (isComment) {
                changedQuestion.comment = changingValue;
            }
            else {
                changedQuestion.value = changingValue;
            }
        }
        else {
            if (this.data.isValidateOnValueChanging &&
                this.hasQuestonError(changedQuestion))
                return;
            var isDeleting = newColumnValue == null && !changedQuestion ||
                isComment && !newColumnValue && !!changedQuestion && changedQuestion.autoOtherMode;
            this.data.onRowChanged(this, changedName, newValue, isDeleting);
            this.onAnyValueChanged(MatrixDropdownRowModelBase.RowVariableName);
        }
    };
    MatrixDropdownRowModelBase.prototype.updateQuestionsValue = function (name, newColumnValue, isComment) {
        if (!this.detailPanel)
            return;
        var colQuestion = this.getQuestionByColumnName(name);
        var detailQuestion = this.detailPanel.getQuestionByName(name);
        if (!colQuestion || !detailQuestion)
            return;
        var isColQuestion = this.isTwoValueEquals(newColumnValue, isComment ? colQuestion.comment : colQuestion.value);
        var question = isColQuestion ? detailQuestion : colQuestion;
        this.isSettingValue = true;
        if (!isComment) {
            question.value = newColumnValue;
        }
        else {
            question.comment = newColumnValue;
        }
        this.isSettingValue = false;
    };
    MatrixDropdownRowModelBase.prototype.hasQuestonError = function (question) {
        if (!question)
            return false;
        if (question.hasErrors(true, {
            isOnValueChanged: !this.data.isValidateOnValueChanging,
        }))
            return true;
        if (question.isEmpty())
            return false;
        var cell = this.getCellByColumnName(question.name);
        if (!cell || !cell.column || !cell.column.isUnique)
            return false;
        return this.data.checkIfValueInRowDuplicated(this, question);
    };
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "isEmpty", {
        get: function () {
            var val = this.value;
            if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(val))
                return true;
            for (var key in val) {
                if (val[key] !== undefined && val[key] !== null)
                    return false;
            }
            return true;
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownRowModelBase.prototype.getQuestionByColumn = function (column) {
        var cell = this.getCellByColumn(column);
        return !!cell ? cell.question : null;
    };
    MatrixDropdownRowModelBase.prototype.getCellByColumn = function (column) {
        for (var i = 0; i < this.cells.length; i++) {
            if (this.cells[i].column == column)
                return this.cells[i];
        }
        return null;
    };
    MatrixDropdownRowModelBase.prototype.getCellByColumnName = function (columnName) {
        for (var i = 0; i < this.cells.length; i++) {
            if (this.cells[i].column.name == columnName)
                return this.cells[i];
        }
        return null;
    };
    MatrixDropdownRowModelBase.prototype.getQuestionByColumnName = function (columnName) {
        var cell = this.getCellByColumnName(columnName);
        return !!cell ? cell.question : null;
    };
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "questions", {
        get: function () {
            var res = [];
            for (var i = 0; i < this.cells.length; i++) {
                res.push(this.cells[i].question);
            }
            var detailQuestions = !!this.detailPanel ? this.detailPanel.questions : [];
            for (var i = 0; i < detailQuestions.length; i++) {
                res.push(detailQuestions[i]);
            }
            return res;
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownRowModelBase.prototype.getQuestionByName = function (name) {
        var res = this.getQuestionByColumnName(name);
        if (!!res)
            return res;
        return !!this.detailPanel ? this.detailPanel.getQuestionByName(name) : null;
    };
    MatrixDropdownRowModelBase.prototype.getQuestionsByName = function (name) {
        var res = [];
        var q = this.getQuestionByColumnName(name);
        if (!!q)
            res.push(q);
        if (!!this.detailPanel) {
            q = this.detailPanel.getQuestionByName(name);
            if (!!q)
                res.push(q);
        }
        return res;
    };
    MatrixDropdownRowModelBase.prototype.getSharedQuestionByName = function (columnName) {
        return !!this.data
            ? this.data.getSharedQuestionByName(columnName, this)
            : null;
    };
    MatrixDropdownRowModelBase.prototype.clearIncorrectValues = function (val) {
        for (var key in val) {
            var question = this.getQuestionByName(key);
            if (question) {
                var qVal = question.value;
                question.clearIncorrectValues();
                if (!this.isTwoValueEquals(qVal, question.value)) {
                    this.setValue(key, question.value);
                }
            }
            else {
                if (!this.getSharedQuestionByName(key) &&
                    key.indexOf(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].matrixTotalValuePostFix) < 0) {
                    this.setValue(key, null);
                }
            }
        }
    };
    MatrixDropdownRowModelBase.prototype.getLocale = function () {
        return this.data ? this.data.getLocale() : "";
    };
    MatrixDropdownRowModelBase.prototype.getMarkdownHtml = function (text, name) {
        return this.data ? this.data.getMarkdownHtml(text, name) : undefined;
    };
    MatrixDropdownRowModelBase.prototype.getRenderer = function (name) {
        return this.data ? this.data.getRenderer(name) : null;
    };
    MatrixDropdownRowModelBase.prototype.getRendererContext = function (locStr) {
        return this.data ? this.data.getRendererContext(locStr) : locStr;
    };
    MatrixDropdownRowModelBase.prototype.getProcessedText = function (text) {
        return this.data ? this.data.getProcessedText(text) : text;
    };
    MatrixDropdownRowModelBase.prototype.locStrsChanged = function () {
        for (var i = 0; i < this.cells.length; i++) {
            this.cells[i].locStrsChanged();
        }
        if (!!this.detailPanel) {
            this.detailPanel.locStrsChanged();
        }
    };
    MatrixDropdownRowModelBase.prototype.updateCellQuestionOnColumnChanged = function (column, name, newValue) {
        var cell = this.getCellByColumn(column);
        if (!cell)
            return;
        this.updateCellOnColumnChanged(cell, name, newValue);
    };
    MatrixDropdownRowModelBase.prototype.updateCellQuestionOnColumnItemValueChanged = function (column, propertyName, obj, name, newValue, oldValue) {
        var cell = this.getCellByColumn(column);
        if (!cell)
            return;
        this.updateCellOnColumnItemValueChanged(cell, propertyName, obj, name, newValue, oldValue);
    };
    MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function (parentIsReadOnly) {
        var questions = this.questions;
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            q.setPropertyValue("isReadOnly", q.isReadOnly);
        }
        if (!!this.detailPanel) {
            this.detailPanel.readOnly = parentIsReadOnly;
        }
    };
    MatrixDropdownRowModelBase.prototype.hasErrors = function (fireCallback, rec, raiseOnCompletedAsyncValidators) {
        var res = false;
        var cells = this.cells;
        if (!cells)
            return res;
        for (var colIndex = 0; colIndex < cells.length; colIndex++) {
            if (!cells[colIndex])
                continue;
            var question = cells[colIndex].question;
            if (!question || !question.visible)
                continue;
            question.onCompletedAsyncValidators = function (hasErrors) {
                raiseOnCompletedAsyncValidators();
            };
            if (!!rec && rec.isOnValueChanged === true && question.isEmpty())
                continue;
            res = question.hasErrors(fireCallback, rec) || res;
        }
        if (this.hasPanel) {
            this.ensureDetailPanel();
            var panelHasError = this.detailPanel.hasErrors(fireCallback, false, rec);
            if (!rec.hideErroredPanel && panelHasError && fireCallback) {
                if (rec.isSingleDetailPanel) {
                    rec.hideErroredPanel = true;
                }
                this.showDetailPanel();
            }
            res = panelHasError || res;
        }
        return res;
    };
    MatrixDropdownRowModelBase.prototype.updateCellOnColumnChanged = function (cell, name, newValue) {
        cell.question[name] = newValue;
    };
    MatrixDropdownRowModelBase.prototype.updateCellOnColumnItemValueChanged = function (cell, propertyName, obj, name, newValue, oldValue) {
        var items = cell.question[propertyName];
        if (!Array.isArray(items))
            return;
        var val = name === "value" ? oldValue : obj["value"];
        var item = _itemvalue__WEBPACK_IMPORTED_MODULE_6__["ItemValue"].getItemByValue(items, val);
        if (!item)
            return;
        item[name] = newValue;
    };
    MatrixDropdownRowModelBase.prototype.buildCells = function (value) {
        this.isSettingValue = true;
        var columns = this.data.columns;
        for (var i = 0; i < columns.length; i++) {
            var column = columns[i];
            if (!column.isVisible)
                continue;
            var cell = this.createCell(column);
            this.cells.push(cell);
            var cellValue = this.getCellValue(value, column.name);
            if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(cellValue)) {
                cell.question.value = cellValue;
                var commentKey = column.name + _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].commentPrefix;
                if (!!value && !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value[commentKey])) {
                    cell.question.comment = value[commentKey];
                }
            }
        }
        this.isSettingValue = false;
    };
    MatrixDropdownRowModelBase.prototype.isTwoValueEquals = function (val1, val2) {
        return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(val1, val2, false, true, false);
    };
    MatrixDropdownRowModelBase.prototype.getCellValue = function (value, name) {
        if (!!this.editingObj)
            return _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].getObjPropertyValue(this.editingObj, name);
        return !!value ? value[name] : undefined;
    };
    MatrixDropdownRowModelBase.prototype.createCell = function (column) {
        return new MatrixDropdownCell(column, this, this.data);
    };
    MatrixDropdownRowModelBase.prototype.getSurveyData = function () {
        return this;
    };
    MatrixDropdownRowModelBase.prototype.getSurvey = function () {
        return this.data ? this.data.getSurvey() : null;
    };
    MatrixDropdownRowModelBase.prototype.getTextProcessor = function () {
        return this.textPreProcessor;
    };
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "rowIndex", {
        get: function () {
            return !!this.data ? this.data.getRowIndex(this) + 1 : -1;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownRowModelBase.prototype, "editingObj", {
        get: function () {
            return this.editingObjValue;
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownRowModelBase.prototype.dispose = function () {
        if (!!this.editingObj) {
            this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
            this.editingObjValue = null;
        }
    };
    MatrixDropdownRowModelBase.prototype.subscribeToChanges = function (value) {
        var _this = this;
        if (!value || !value.getType || !value.onPropertyChanged)
            return;
        if (value === this.editingObj)
            return;
        this.editingObjValue = value;
        this.onEditingObjPropertyChanged = function (sender, options) {
            _this.updateOnSetValue(options.name, options.newValue);
        };
        this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged);
    };
    MatrixDropdownRowModelBase.prototype.updateOnSetValue = function (name, newValue) {
        this.isSettingValue = true;
        var questions = this.getQuestionsByName(name);
        for (var i = 0; i < questions.length; i++) {
            questions[i].value = newValue;
        }
        this.isSettingValue = false;
    };
    MatrixDropdownRowModelBase.RowVariableName = "row";
    MatrixDropdownRowModelBase.OwnerVariableName = "self";
    MatrixDropdownRowModelBase.IndexVariableName = "rowIndex";
    MatrixDropdownRowModelBase.RowValueVariableName = "rowValue";
    MatrixDropdownRowModelBase.idCounter = 1;
    return MatrixDropdownRowModelBase;
}());

var MatrixDropdownTotalRowModel = /** @class */ (function (_super) {
    __extends(MatrixDropdownTotalRowModel, _super);
    function MatrixDropdownTotalRowModel(data) {
        var _this = _super.call(this, data, null) || this;
        _this.buildCells(null);
        return _this;
    }
    MatrixDropdownTotalRowModel.prototype.createCell = function (column) {
        return new MatrixDropdownTotalCell(column, this, this.data);
    };
    MatrixDropdownTotalRowModel.prototype.setValue = function (name, newValue) {
        if (!!this.data && !this.isSettingValue) {
            this.data.onTotalValueChanged();
        }
    };
    MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties) {
        var counter = 0;
        var prevValue;
        do {
            prevValue = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].getUnbindValue(this.value);
            _super.prototype.runCondition.call(this, values, properties);
            counter++;
        } while (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(prevValue, this.value) && counter < 3);
    };
    MatrixDropdownTotalRowModel.prototype.updateCellOnColumnChanged = function (cell, name, newValue) {
        cell.updateCellQuestion();
    };
    return MatrixDropdownTotalRowModel;
}(MatrixDropdownRowModelBase));

/**
 * A base class for the [QuestionMatrixDropdownModel](https://surveyjs.io/form-library/documentation/questionmatrixdropdownmodel) and [QuestionMatrixDynamicModel](https://surveyjs.io/form-library/documentation/questionmatrixdynamicmodel) classes.
 */
var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
    __extends(QuestionMatrixDropdownModelBase, _super);
    function QuestionMatrixDropdownModelBase(name) {
        var _this = _super.call(this, name) || this;
        _this.isRowChanging = false;
        _this.lockResetRenderedTable = false;
        _this.isDoingonAnyValueChanged = false;
        _this.createItemValues("choices");
        _this.createLocalizableString("placeholder", _this, false, true);
        _this.createLocalizableString("keyDuplicationError", _this, false, true);
        _this.detailPanelValue = _this.createNewDetailPanel();
        _this.detailPanel.selectedElementInDesign = _this;
        _this.detailPanel.renderWidth = "100%";
        _this.detailPanel.isInteractiveDesignElement = false;
        _this.detailPanel.showTitle = false;
        _this.registerPropertyChangedHandlers(["columns", "cellType"], function () { _this.updateColumnsAndRows(); });
        _this.registerPropertyChangedHandlers(["placeholder", "columnColCount", "rowTitleWidth", "choices"], function () {
            _this.clearRowsAndResetRenderedTable();
        });
        _this.registerPropertyChangedHandlers([
            "columnLayout",
            "addRowLocation",
            "hideColumnsIfEmpty",
            "showHeader",
            "minRowCount",
            "isReadOnly",
            "rowCount",
            "hasFooter",
            "detailPanelMode",
        ], function () {
            _this.resetRenderedTable();
        });
        _this.registerPropertyChangedHandlers(["isMobile"], function () {
            if (_this.columnLayout === "vertical") {
                _this.resetRenderedTable();
            }
        });
        return _this;
    }
    Object.defineProperty(QuestionMatrixDropdownModelBase, "defaultCellType", {
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].matrixDefaultCellType;
        },
        set: function (val) {
            _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].matrixDefaultCellType = val;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.addDefaultColumns = function (matrix) {
        var colNames = _questionfactory__WEBPACK_IMPORTED_MODULE_7__["QuestionFactory"].DefaultColums;
        for (var i = 0; i < colNames.length; i++)
            matrix.addColumn(colNames[i]);
    };
    QuestionMatrixDropdownModelBase.prototype.createColumnValues = function () {
        var _this = this;
        return this.createNewArray("columns", function (item) {
            item.colOwner = _this;
            if (_this.onAddColumn)
                _this.onAddColumn(item);
        }, function (item) {
            item.colOwner = null;
            if (_this.onRemoveColumn)
                _this.onRemoveColumn(item);
        });
    };
    QuestionMatrixDropdownModelBase.prototype.getType = function () {
        return "matrixdropdownbase";
    };
    QuestionMatrixDropdownModelBase.prototype.dispose = function () {
        _super.prototype.dispose.call(this);
        this.clearGeneratedRows();
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasSingleInput", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "isRowsDynamic", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "isUpdateLocked", {
        get: function () {
            return this.isLoadingFromJson || this.isUpdating;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.beginUpdate = function () {
        this.isUpdating = true;
    };
    QuestionMatrixDropdownModelBase.prototype.endUpdate = function () {
        this.isUpdating = false;
        this.updateColumnsAndRows();
    };
    QuestionMatrixDropdownModelBase.prototype.updateColumnsAndRows = function () {
        this.updateColumnsIndexes(this.columns);
        this.updateColumnsCellType();
        this.generatedTotalRow = null;
        this.clearRowsAndResetRenderedTable();
    };
    QuestionMatrixDropdownModelBase.prototype.itemValuePropertyChanged = function (item, name, oldValue, newValue) {
        _super.prototype.itemValuePropertyChanged.call(this, item, name, oldValue, newValue);
        if (item.ownerPropertyName === "choices") {
            this.clearRowsAndResetRenderedTable();
        }
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "columnLayout", {
        /**
         * Specifies the matrix layout. Set this property to `"vertical"` if you want to display columns instead of rows and rows instead of columns.
         *
         * Default value: `"horizontal"`
         * @see columns
         * @see rows
         * @see isColumnLayoutHorizontal
         */
        get: function () {
            return this.getPropertyValue("columnLayout");
        },
        set: function (val) {
            this.setPropertyValue("columnLayout", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "columnsLocation", {
        get: function () {
            return this.columnLayout;
        },
        set: function (val) {
            this.columnLayout = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "isColumnLayoutHorizontal", {
        /**
         * Returns `true` if columns are placed in the horizontal direction and rows in the vertical direction.
         *
         * To specify the layout, use the `columnLayout` property. If you set it to `"vertical"`, the survey applies it only when the screen has enough space. Otherwise, the survey falls back to the horizontal layout, but the `columnLayout` property remains set to `"vertical"`. Unlike `columnLayout`, the `isColumnLayoutHorizontal` property always indicates the current layout.
         * @see columnLayout
         */
        get: function () {
            if (this.isMobile)
                return true;
            return this.columnLayout != "vertical";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "isUniqueCaseSensitive", {
        /**
         * Enables case-sensitive comparison in columns with the `isUnique` property set to `true`.
         *
         * When this property is `true`, `"ABC"` and `"abc"` are considered different values.
         *
         * Default value: `false`
         * @see keyDuplicationError
         */
        get: function () {
            return this.isUniqueCaseSensitiveValue !== undefined ? this.isUniqueCaseSensitiveValue : _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].comparator.caseSensitive;
        },
        set: function (val) {
            this.isUniqueCaseSensitiveValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "detailPanelMode", {
        /**
         * Specifies the location of detail sections.
         *
         * Possible values:
         *
         * - `"underRow"` - Displays detail sections under their respective rows. Users can expand any number of detail sections.
         * - `"underRowSingle"` - Displays detail sections under their respective rows, but only one detail section can be expanded at a time.
         * - `"none"` (default) - Hides detail sections.
         *
         * Use the `detailElements` property to specify content of detail sections.
         * @see detailElements
         * @see detailPanel
         */
        get: function () {
            return this.getPropertyValue("detailPanelMode");
        },
        set: function (val) {
            this.setPropertyValue("detailPanelMode", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "detailPanel", {
        /**
         * Contains a [`PanelModel`](https://surveyjs.io/form-library/documentation/panelmodel) instance that represents a detail section template.
         * @see detailElements
         * @see detailPanelMode
         */
        get: function () {
            return this.detailPanelValue;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getPanel = function () {
        return this.detailPanel;
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "detailElements", {
        /**
         * An array of survey elements (questions and panels) to be displayed in detail sections.
         *
         * Detail sections are expandable panels displayed under each matrix row. You can use them to display questions that do not fit into the row.
         *
         * Set the `detailPanelMode` property to `"underRow"` or `"underRowSingle"` to display detail sections.
         * @see detailPanelMode
         * @see detailPanel
         */
        get: function () {
            return this.detailPanel.elements;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.createNewDetailPanel = function () {
        return _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass("panel");
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasRowText", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getFooterText = function () {
        return null;
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "canAddRow", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "canRemoveRows", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.canRemoveRow = function (row) {
        return true;
    };
    QuestionMatrixDropdownModelBase.prototype.onPointerDown = function (pointerDownEvent, row) { };
    QuestionMatrixDropdownModelBase.prototype.onRowsChanged = function () {
        this.resetRenderedTable();
        _super.prototype.onRowsChanged.call(this);
    };
    QuestionMatrixDropdownModelBase.prototype.onStartRowAddingRemoving = function () {
        this.lockResetRenderedTable = true;
        this.setValueChangedDirectly();
    };
    QuestionMatrixDropdownModelBase.prototype.onEndRowAdding = function () {
        this.lockResetRenderedTable = false;
        if (!this.renderedTable)
            return;
        if (this.renderedTable.isRequireReset()) {
            this.resetRenderedTable();
        }
        else {
            this.renderedTable.onAddedRow();
        }
    };
    QuestionMatrixDropdownModelBase.prototype.onEndRowRemoving = function (row) {
        this.lockResetRenderedTable = false;
        if (this.renderedTable.isRequireReset()) {
            this.resetRenderedTable();
        }
        else {
            if (!!row) {
                this.renderedTable.onRemovedRow(row);
            }
        }
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "renderedTableValue", {
        get: function () {
            return this.getPropertyValue("renderedTable", null);
        },
        set: function (val) {
            this.setPropertyValue("renderedTable", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.clearRowsAndResetRenderedTable = function () {
        this.clearGeneratedRows();
        this.resetRenderedTable();
        this.fireCallback(this.columnsChangedCallback);
    };
    QuestionMatrixDropdownModelBase.prototype.resetRenderedTable = function () {
        if (this.lockResetRenderedTable || this.isUpdateLocked)
            return;
        this.renderedTableValue = null;
        this.fireCallback(this.onRenderedTableResetCallback);
    };
    QuestionMatrixDropdownModelBase.prototype.clearGeneratedRows = function () {
        if (!this.generatedVisibleRows)
            return;
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            this.generatedVisibleRows[i].dispose();
        }
        _super.prototype.clearGeneratedRows.call(this);
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "renderedTable", {
        get: function () {
            if (!this.renderedTableValue) {
                this.renderedTableValue = this.createRenderedTable();
                if (!!this.onRenderedTableCreatedCallback) {
                    this.onRenderedTableCreatedCallback(this.renderedTableValue);
                }
            }
            return this.renderedTableValue;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.createRenderedTable = function () {
        return new _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_13__["QuestionMatrixDropdownRenderedTable"](this);
    };
    QuestionMatrixDropdownModelBase.prototype.onMatrixRowCreated = function (row) {
        if (!this.survey)
            return;
        var options = {
            rowValue: row.value,
            row: row,
            column: null,
            columnName: null,
            cell: null,
            cellQuestion: null,
            value: null,
        };
        for (var i = 0; i < this.visibleColumns.length; i++) {
            options.column = this.visibleColumns[i];
            options.columnName = options.column.name;
            var cell = row.cells[i];
            options.cell = cell;
            options.cellQuestion = cell.question;
            options.value = cell.value;
            if (!!this.onCellCreatedCallback) {
                this.onCellCreatedCallback(options);
            }
            this.survey.matrixCellCreated(this, options);
        }
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "cellType", {
        /**
         * Specifies the type of matrix cells. You can override this property for individual columns.
         *
         * Possible values:
         *
         * - `"dropdown"`
         * - `"checkbox"`
         * - `"radiogroup"`
         * - `"text"`
         * - `"comment"`
         * - `"boolean"`
         * - `"expression"`
         * - `"rating"`
         *
         * Default value: "dropdown" (inherited from [`settings.matrixDefaultCellType`](https://surveyjs.io/form-library/documentation/settings#matrixDefaultCellType))
         */
        get: function () {
            return this.getPropertyValue("cellType", _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].matrixDefaultCellType);
        },
        set: function (val) {
            val = val.toLowerCase();
            this.setPropertyValue("cellType", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.updateColumnsCellType = function () {
        for (var i = 0; i < this.columns.length; i++) {
            this.columns[i].defaultCellTypeChanged();
        }
    };
    QuestionMatrixDropdownModelBase.prototype.updateColumnsIndexes = function (cols) {
        for (var i = 0; i < cols.length; i++) {
            cols[i].setIndex(i);
        }
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "columnColCount", {
        /**
         * Specifies the number of columns in Radiogroup and Checkbox cells.
         *
         * Default value: 0 (the number of columns is selected automatically based on the available column width)
         * @see cellType
         */
        get: function () {
            return this.getPropertyValue("columnColCount");
        },
        set: function (value) {
            if (value < 0 || value > 4)
                return;
            this.setPropertyValue("columnColCount", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "columnMinWidth", {
        /**
         * Minimum column width in CSS values.
         *
         * @see width
         */
        get: function () {
            return this.getPropertyValue("columnMinWidth", "");
        },
        set: function (val) {
            this.setPropertyValue("columnMinWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "horizontalScroll", {
        get: function () {
            return this.getPropertyValue("horizontalScroll", false);
        },
        set: function (val) {
            this.setPropertyValue("horizontalScroll", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "allowAdaptiveActions", {
        get: function () {
            return this.getPropertyValue("allowAdaptiveActions");
        },
        set: function (val) {
            this.setPropertyValue("allowAdaptiveActions", val);
            if (!!this.detailPanel) {
                this.detailPanel.allowAdaptiveActions = val;
            }
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getRequiredText = function () {
        return this.survey ? this.survey.requiredText : "";
    };
    QuestionMatrixDropdownModelBase.prototype.hasChoices = function () {
        return this.choices.length > 0;
    };
    QuestionMatrixDropdownModelBase.prototype.onColumnPropertyChanged = function (column, name, newValue) {
        this.updateHasFooter();
        if (!this.generatedVisibleRows)
            return;
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            this.generatedVisibleRows[i].updateCellQuestionOnColumnChanged(column, name, newValue);
        }
        if (!!this.generatedTotalRow) {
            this.generatedTotalRow.updateCellQuestionOnColumnChanged(column, name, newValue);
        }
        this.onColumnsChanged();
        if (name == "isRequired") {
            this.resetRenderedTable();
        }
    };
    QuestionMatrixDropdownModelBase.prototype.onColumnItemValuePropertyChanged = function (column, propertyName, obj, name, newValue, oldValue) {
        if (!this.generatedVisibleRows)
            return;
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            this.generatedVisibleRows[i].updateCellQuestionOnColumnItemValueChanged(column, propertyName, obj, name, newValue, oldValue);
        }
    };
    QuestionMatrixDropdownModelBase.prototype.onShowInMultipleColumnsChanged = function (column) {
        this.clearGeneratedRows();
        this.resetRenderedTable();
    };
    QuestionMatrixDropdownModelBase.prototype.onColumnCellTypeChanged = function (column) {
        this.clearGeneratedRows();
        this.resetRenderedTable();
    };
    QuestionMatrixDropdownModelBase.prototype.getRowTitleWidth = function () {
        return "";
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasFooter", {
        get: function () {
            return this.getPropertyValue("hasFooter", false);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getAddRowLocation = function () {
        return "default";
    };
    QuestionMatrixDropdownModelBase.prototype.getShowColumnsIfEmpty = function () {
        return false;
    };
    QuestionMatrixDropdownModelBase.prototype.updateShowTableAndAddRow = function () {
        if (!!this.renderedTable) {
            this.renderedTable.updateShowTableAndAddRow();
        }
    };
    QuestionMatrixDropdownModelBase.prototype.updateHasFooter = function () {
        this.setPropertyValue("hasFooter", this.hasTotal);
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasTotal", {
        get: function () {
            for (var i = 0; i < this.columns.length; i++) {
                if (this.columns[i].hasTotal)
                    return true;
            }
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getCellType = function () {
        return this.cellType;
    };
    QuestionMatrixDropdownModelBase.prototype.getCustomCellType = function (column, row, cellType) {
        if (!this.survey)
            return cellType;
        var options = {
            rowValue: row.value,
            row: row,
            column: column,
            columnName: column.name,
            cellType: cellType
        };
        this.survey.matrixCellCreating(this, options);
        return options.cellType;
    };
    QuestionMatrixDropdownModelBase.prototype.getConditionJson = function (operator, path) {
        if (operator === void 0) { operator = null; }
        if (path === void 0) { path = null; }
        if (!path)
            return _super.prototype.getConditionJson.call(this);
        var columnName = "";
        for (var i = path.length - 1; i >= 0; i--) {
            if (path[i] == ".")
                break;
            columnName = path[i] + columnName;
        }
        var column = this.getColumnByName(columnName);
        if (!column)
            return null;
        var question = column.createCellQuestion(null);
        if (!question)
            return null;
        return question.getConditionJson(operator);
    };
    QuestionMatrixDropdownModelBase.prototype.clearIncorrectValues = function () {
        var rows = this.visibleRows;
        if (!rows)
            return;
        for (var i = 0; i < rows.length; i++) {
            rows[i].clearIncorrectValues(this.getRowValue(i));
        }
    };
    QuestionMatrixDropdownModelBase.prototype.clearErrors = function () {
        _super.prototype.clearErrors.call(this);
        this.runFuncForCellQuestions(function (q) { q.clearErrors(); });
    };
    QuestionMatrixDropdownModelBase.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        this.runFuncForCellQuestions(function (q) { q.localeChanged(); });
    };
    QuestionMatrixDropdownModelBase.prototype.runFuncForCellQuestions = function (func) {
        if (!!this.generatedVisibleRows) {
            for (var i = 0; i < this.generatedVisibleRows.length; i++) {
                var row = this.generatedVisibleRows[i];
                for (var j = 0; j < row.cells.length; j++) {
                    func(row.cells[j].question);
                }
            }
        }
    };
    QuestionMatrixDropdownModelBase.prototype.runCondition = function (values, properties) {
        _super.prototype.runCondition.call(this, values, properties);
        var counter = 0;
        var prevTotalValue;
        do {
            prevTotalValue = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].getUnbindValue(this.totalValue);
            this.runCellsCondition(values, properties);
            this.runTotalsCondition(values, properties);
            counter++;
        } while (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(prevTotalValue, this.totalValue) &&
            counter < 3);
    };
    QuestionMatrixDropdownModelBase.prototype.shouldRunColumnExpression = function () {
        return false;
    };
    QuestionMatrixDropdownModelBase.prototype.runCellsCondition = function (values, properties) {
        if (!this.generatedVisibleRows)
            return;
        var newValues = this.getRowConditionValues(values);
        var rows = this.generatedVisibleRows;
        for (var i = 0; i < rows.length; i++) {
            rows[i].runCondition(newValues, properties);
        }
        this.checkColumnsVisibility();
        this.checkColumnsRenderedRequired();
    };
    QuestionMatrixDropdownModelBase.prototype.checkColumnsVisibility = function () {
        var hasChanged = false;
        for (var i = 0; i < this.visibleColumns.length; i++) {
            if (!this.visibleColumns[i].visibleIf)
                continue;
            hasChanged =
                this.isColumnVisibilityChanged(this.visibleColumns[i]) || hasChanged;
        }
        if (hasChanged) {
            this.resetRenderedTable();
        }
    };
    QuestionMatrixDropdownModelBase.prototype.checkColumnsRenderedRequired = function () {
        var rows = this.generatedVisibleRows;
        for (var i = 0; i < this.visibleColumns.length; i++) {
            var column = this.visibleColumns[i];
            if (!column.requiredIf)
                continue;
            var required = rows.length > 0;
            for (var j = 0; j < rows.length; j++) {
                if (!rows[j].cells[i].question.isRequired) {
                    required = false;
                    break;
                }
            }
            column.updateIsRenderedRequired(required);
        }
    };
    QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column) {
        var curVis = column.hasVisibleCell;
        var hasVisCell = false;
        var rows = this.generatedVisibleRows;
        for (var i = 0; i < rows.length; i++) {
            var cell = rows[i].cells[column.index];
            if (!!cell && !!cell.question && cell.question.isVisible) {
                hasVisCell = true;
                break;
            }
        }
        if (curVis != hasVisCell) {
            column.hasVisibleCell = hasVisCell;
        }
        return curVis != hasVisCell;
    };
    QuestionMatrixDropdownModelBase.prototype.runTotalsCondition = function (values, properties) {
        if (!this.generatedTotalRow)
            return;
        this.generatedTotalRow.runCondition(this.getRowConditionValues(values), properties);
    };
    QuestionMatrixDropdownModelBase.prototype.getRowConditionValues = function (values) {
        var newValues = values;
        if (!newValues)
            newValues = {};
        /*
        var newValues: { [index: string]: any } = {};
        if (values && values instanceof Object) {
          newValues = JSON.parse(JSON.stringify(values));
        }
        */
        var totalRow = {};
        if (!this.isValueEmpty(this.totalValue)) {
            totalRow = JSON.parse(JSON.stringify(this.totalValue));
        }
        newValues["row"] = {};
        newValues["totalRow"] = totalRow;
        return newValues;
    };
    QuestionMatrixDropdownModelBase.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        var columns = this.columns;
        for (var i = 0; i < columns.length; i++) {
            columns[i].locStrsChanged();
        }
        var rows = this.generatedVisibleRows;
        if (!rows)
            return;
        for (var i = 0; i < rows.length; i++) {
            rows[i].locStrsChanged();
        }
        if (!!this.generatedTotalRow) {
            this.generatedTotalRow.locStrsChanged();
        }
    };
    /**
     * Returns a matrix column with a given `name` or `null` if a column with this is not found.
     * @param columnName A column name.
     */
    QuestionMatrixDropdownModelBase.prototype.getColumnByName = function (columnName) {
        for (var i = 0; i < this.columns.length; i++) {
            if (this.columns[i].name == columnName)
                return this.columns[i];
        }
        return null;
    };
    QuestionMatrixDropdownModelBase.prototype.getColumnName = function (columnName) {
        return this.getColumnByName(columnName);
    };
    QuestionMatrixDropdownModelBase.prototype.getColumnWidth = function (column) {
        return column.minWidth ? column.minWidth : this.columnMinWidth;
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "choices", {
        /**
         * Gets or sets choice items for Dropdown, Checkbox, and Radiogroup matrix cells. You can override this property for individual columns.
         *
         * This property accepts an array of objects with the following structure:
         *
         * ```js
         * {
         *   "value": any, // A value to be saved in survey results
         *   "text": String, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
         * }
         * ```
         *
         * If you need to specify only the `value` property, you can set the `choices` property to an array of primitive values, for example, `[ "item1", "item2", "item3" ]`. These values are both saved in survey results and used as display text.
         * @see cellType
         */
        get: function () {
            return this.getPropertyValue("choices");
        },
        set: function (val) {
            this.setPropertyValue("choices", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "placeholder", {
        /**
         * A placeholder for Dropdown matrix cells.
         * @see cellType
         */
        get: function () {
            return this.getLocalizableStringText("placeholder");
        },
        set: function (val) {
            this.setLocalizableStringText("placeholder", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "locPlaceholder", {
        get: function () {
            return this.getLocalizableString("placeholder");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "optionsCaption", {
        get: function () {
            return this.placeholder;
        },
        set: function (val) {
            this.placeholder = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "keyDuplicationError", {
        /**
         * An error message displayed when users enter a duplicate value into a column that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
         *
         * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
         * @see isUniqueCaseSensitive
         */
        get: function () {
            return this.getLocalizableStringText("keyDuplicationError");
        },
        set: function (val) {
            this.setLocalizableStringText("keyDuplicationError", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "locKeyDuplicationError", {
        get: function () {
            return this.getLocalizableString("keyDuplicationError");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "storeOthersAsComment", {
        get: function () {
            return !!this.survey ? this.survey.storeOthersAsComment : false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.addColumn = function (name, title) {
        if (title === void 0) { title = null; }
        var column = new _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_12__["MatrixDropdownColumn"](name, title);
        this.columns.push(column);
        return column;
    };
    QuestionMatrixDropdownModelBase.prototype.getVisibleRows = function () {
        var _this = this;
        if (this.isUpdateLocked)
            return null;
        if (!this.generatedVisibleRows) {
            this.generatedVisibleRows = this.generateRows();
            this.generatedVisibleRows.forEach(function (row) { return _this.onMatrixRowCreated(row); });
            if (this.data) {
                this.runCellsCondition(this.data.getFilteredValues(), this.data.getFilteredProperties());
            }
            this.updateValueOnRowsGeneration(this.generatedVisibleRows);
            this.updateIsAnswered();
        }
        return this.generatedVisibleRows;
    };
    QuestionMatrixDropdownModelBase.prototype.updateValueOnRowsGeneration = function (rows) {
        var oldValue = this.createNewValue(true);
        var newValue = this.createNewValue();
        for (var i = 0; i < rows.length; i++) {
            var row = rows[i];
            if (!!row.editingObj)
                continue;
            var rowValue = this.getRowValue(i);
            var rValue = row.value;
            if (this.isTwoValueEquals(rowValue, rValue))
                continue;
            newValue = this.getNewValueOnRowChanged(row, "", rValue, false, newValue)
                .value;
        }
        if (this.isTwoValueEquals(oldValue, newValue))
            return;
        this.isRowChanging = true;
        this.setNewValue(newValue);
        this.isRowChanging = false;
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "totalValue", {
        get: function () {
            if (!this.hasTotal || !this.visibleTotalRow)
                return {};
            return this.visibleTotalRow.value;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getVisibleTotalRow = function () {
        if (this.isUpdateLocked)
            return null;
        if (this.hasTotal) {
            if (!this.generatedTotalRow) {
                this.generatedTotalRow = this.generateTotalRow();
                if (this.data) {
                    var properties = { survey: this.survey };
                    this.runTotalsCondition(this.data.getAllValues(), properties);
                }
            }
        }
        else {
            this.generatedTotalRow = null;
        }
        return this.generatedTotalRow;
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "visibleTotalRow", {
        get: function () {
            return this.getVisibleTotalRow();
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        this.updateColumnsIndexes(this.columns);
        this.clearGeneratedRows();
        this.generatedTotalRow = null;
        this.updateHasFooter();
    };
    /**
     * Returns an object with row values. If a row has no answers, this method returns an empty object.
     * @param rowIndex A zero-based row index.
     * @see setRowValue
     */
    QuestionMatrixDropdownModelBase.prototype.getRowValue = function (rowIndex) {
        if (rowIndex < 0)
            return null;
        var visRows = this.visibleRows;
        if (rowIndex >= visRows.length)
            return null;
        var newValue = this.createNewValue();
        return this.getRowValueCore(visRows[rowIndex], newValue);
    };
    QuestionMatrixDropdownModelBase.prototype.checkIfValueInRowDuplicated = function (checkedRow, cellQuestion) {
        if (!this.generatedVisibleRows)
            return false;
        var res = false;
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            var row = this.generatedVisibleRows[i];
            if (checkedRow === row)
                continue;
            if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(row.getValue(cellQuestion.name), cellQuestion.value, true, this.isUniqueCaseSensitive)) {
                res = true;
                break;
            }
        }
        if (res) {
            this.addDuplicationError(cellQuestion);
        }
        else {
            cellQuestion.clearErrors();
        }
        return res;
    };
    /**
     * Assigns values to a row.
     * @param rowIndex A zero-based row index.
     * @param rowValue An object with the following structure: `{ "column_name": columnValue, ... }`
     * @see getRowValue
     */
    QuestionMatrixDropdownModelBase.prototype.setRowValue = function (rowIndex, rowValue) {
        if (rowIndex < 0)
            return null;
        var visRows = this.visibleRows;
        if (rowIndex >= visRows.length)
            return null;
        visRows[rowIndex].value = rowValue;
        this.onRowChanged(visRows[rowIndex], "", rowValue, false);
    };
    QuestionMatrixDropdownModelBase.prototype.generateRows = function () {
        return null;
    };
    QuestionMatrixDropdownModelBase.prototype.generateTotalRow = function () {
        return new MatrixDropdownTotalRowModel(this);
    };
    QuestionMatrixDropdownModelBase.prototype.createNewValue = function (nullOnEmpty) {
        if (nullOnEmpty === void 0) { nullOnEmpty = false; }
        var res = !this.value ? {} : this.createValueCopy();
        if (nullOnEmpty && this.isMatrixValueEmpty(res))
            return null;
        return res;
    };
    QuestionMatrixDropdownModelBase.prototype.getRowValueCore = function (row, questionValue, create) {
        if (create === void 0) { create = false; }
        var result = !!questionValue && !!questionValue[row.rowName]
            ? questionValue[row.rowName]
            : null;
        if (!result && create) {
            result = {};
            if (!!questionValue) {
                questionValue[row.rowName] = result;
            }
        }
        return result;
    };
    QuestionMatrixDropdownModelBase.prototype.getRowObj = function (row) {
        var obj = this.getRowValueCore(row, this.value);
        return !!obj && !!obj.getType ? obj : null;
    };
    QuestionMatrixDropdownModelBase.prototype.getRowDisplayValue = function (keysAsText, row, rowValue) {
        if (!rowValue)
            return rowValue;
        if (!!row.editingObj)
            return rowValue;
        var keys = Object.keys(rowValue);
        for (var i = 0; i < keys.length; i++) {
            var key = keys[i];
            var question = row.getQuestionByName(key);
            if (!question) {
                question = this.getSharedQuestionByName(key, row);
            }
            if (!!question) {
                var displayvalue = question.getDisplayValue(keysAsText, rowValue[key]);
                if (keysAsText && !!question.title && question.title !== key) {
                    rowValue[question.title] = displayvalue;
                    delete rowValue[key];
                }
                else {
                    rowValue[key] = displayvalue;
                }
            }
        }
        return rowValue;
    };
    QuestionMatrixDropdownModelBase.prototype.getPlainData = function (options) {
        var _this = this;
        if (options === void 0) { options = {
            includeEmpty: true,
        }; }
        var questionPlainData = _super.prototype.getPlainData.call(this, options);
        if (!!questionPlainData) {
            questionPlainData.isNode = true;
            questionPlainData.data = this.visibleRows.map(function (row) {
                var rowDataItem = {
                    name: row.rowName,
                    title: row.text,
                    value: row.value,
                    displayValue: _this.getRowDisplayValue(false, row, row.value),
                    getString: function (val) {
                        return typeof val === "object" ? JSON.stringify(val) : val;
                    },
                    isNode: true,
                    data: row.cells
                        .map(function (cell) {
                        return cell.question.getPlainData(options);
                    })
                        .filter(function (d) { return !!d; }),
                };
                (options.calculations || []).forEach(function (calculation) {
                    rowDataItem[calculation.propertyName] = row[calculation.propertyName];
                });
                return rowDataItem;
            });
        }
        return questionPlainData;
    };
    QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
        var hasContext = !!context ? context === true || this.columns.indexOf(context) > -1 : false;
        var rowsIndeces = this.getConditionObjectsRowIndeces();
        if (hasContext) {
            rowsIndeces.push(-1);
        }
        for (var i = 0; i < rowsIndeces.length; i++) {
            var index = rowsIndeces[i];
            var rowName = index > -1 ? this.getConditionObjectRowName(index) : "row";
            if (!rowName)
                continue;
            var rowText = index > -1 ? this.getConditionObjectRowText(index) : "row";
            var hasQuestionPrefix = index > -1 || context === true;
            var dot = hasQuestionPrefix && index === -1 ? "." : "";
            var prefixName = (hasQuestionPrefix ? this.getValueName() : "") + dot + rowName + ".";
            var prefixTitle = (hasQuestionPrefix ? this.processedTitle : "") + dot + rowText + ".";
            for (var j = 0; j < this.columns.length; j++) {
                var column = this.columns[j];
                if (index === -1 && context === column)
                    continue;
                var obj = {
                    name: prefixName + column.name,
                    text: prefixTitle + column.fullTitle,
                    question: this
                };
                if (index === -1 && context === true) {
                    obj.context = this;
                }
                objects.push(obj);
            }
        }
    };
    QuestionMatrixDropdownModelBase.prototype.getConditionObjectRowName = function (index) {
        return "";
    };
    QuestionMatrixDropdownModelBase.prototype.getConditionObjectRowText = function (index) {
        return this.getConditionObjectRowName(index);
    };
    QuestionMatrixDropdownModelBase.prototype.getConditionObjectsRowIndeces = function () {
        return [];
    };
    QuestionMatrixDropdownModelBase.prototype.getProgressInfo = function () {
        if (!!this.generatedVisibleRows)
            return _survey_element__WEBPACK_IMPORTED_MODULE_4__["SurveyElement"].getProgressInfoByElements(this.getCellQuestions(), this.isRequired);
        var res = _base__WEBPACK_IMPORTED_MODULE_3__["Base"].createProgressInfo();
        this.updateProgressInfoByValues(res);
        return res;
    };
    QuestionMatrixDropdownModelBase.prototype.updateProgressInfoByValues = function (res) { };
    QuestionMatrixDropdownModelBase.prototype.updateProgressInfoByRow = function (res, rowValue) {
        for (var i = 0; i < this.columns.length; i++) {
            var col = this.columns[i];
            if (!col.templateQuestion.hasInput)
                continue;
            res.questionCount += 1;
            res.requiredQuestionCount += col.isRequired;
            var hasValue = !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(rowValue[col.name]);
            res.answeredQuestionCount += hasValue ? 1 : 0;
            res.requiredAnsweredQuestionCount += hasValue && col.isRequired ? 1 : 0;
        }
    };
    QuestionMatrixDropdownModelBase.prototype.getCellQuestions = function () {
        var res = [];
        this.runFuncForCellQuestions(function (q) { res.push(q); });
        return res;
    };
    QuestionMatrixDropdownModelBase.prototype.onBeforeValueChanged = function (val) { };
    QuestionMatrixDropdownModelBase.prototype.onSetQuestionValue = function () {
        if (this.isRowChanging)
            return;
        this.onBeforeValueChanged(this.value);
        if (!this.generatedVisibleRows || this.generatedVisibleRows.length == 0)
            return;
        this.isRowChanging = true;
        var val = this.createNewValue();
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            var row = this.generatedVisibleRows[i];
            this.generatedVisibleRows[i].value = this.getRowValueCore(row, val);
        }
        this.isRowChanging = false;
    };
    QuestionMatrixDropdownModelBase.prototype.setQuestionValue = function (newValue) {
        _super.prototype.setQuestionValue.call(this, newValue, false);
        this.onSetQuestionValue();
        this.updateIsAnswered();
    };
    QuestionMatrixDropdownModelBase.prototype.supportGoNextPageAutomatic = function () {
        var rows = this.generatedVisibleRows;
        if (!rows)
            rows = this.visibleRows;
        if (!rows)
            return true;
        for (var i = 0; i < rows.length; i++) {
            var cells = this.generatedVisibleRows[i].cells;
            if (!cells)
                continue;
            for (var colIndex = 0; colIndex < cells.length; colIndex++) {
                var question = cells[colIndex].question;
                if (question &&
                    (!question.supportGoNextPageAutomatic() || !question.value))
                    return false;
            }
        }
        return true;
    };
    QuestionMatrixDropdownModelBase.prototype.getContainsErrors = function () {
        return (_super.prototype.getContainsErrors.call(this) ||
            this.checkForAnswersOrErrors(function (question) { return question.containsErrors; }, false));
    };
    QuestionMatrixDropdownModelBase.prototype.getIsAnswered = function () {
        return (_super.prototype.getIsAnswered.call(this) &&
            this.checkForAnswersOrErrors(function (question) { return question.isAnswered; }, true));
    };
    QuestionMatrixDropdownModelBase.prototype.checkForAnswersOrErrors = function (predicate, every) {
        if (every === void 0) { every = false; }
        var rows = this.generatedVisibleRows;
        if (!rows)
            return false;
        for (var i = 0; i < rows.length; i++) {
            var cells = rows[i].cells;
            if (!cells)
                continue;
            for (var colIndex = 0; colIndex < cells.length; colIndex++) {
                if (!cells[colIndex])
                    continue;
                var question = cells[colIndex].question;
                if (question && question.isVisible)
                    if (predicate(question)) {
                        if (!every)
                            return true;
                    }
                    else {
                        if (every)
                            return false;
                    }
            }
        }
        return every ? true : false;
    };
    QuestionMatrixDropdownModelBase.prototype.hasErrors = function (fireCallback, rec) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (rec === void 0) { rec = null; }
        var errosInRows = this.hasErrorInRows(fireCallback, rec);
        var isDuplicated = this.isValueDuplicated();
        return _super.prototype.hasErrors.call(this, fireCallback, rec) || errosInRows || isDuplicated;
    };
    QuestionMatrixDropdownModelBase.prototype.getIsRunningValidators = function () {
        if (_super.prototype.getIsRunningValidators.call(this))
            return true;
        if (!this.generatedVisibleRows)
            return false;
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            var cells = this.generatedVisibleRows[i].cells;
            if (!cells)
                continue;
            for (var colIndex = 0; colIndex < cells.length; colIndex++) {
                if (!cells[colIndex])
                    continue;
                var question = cells[colIndex].question;
                if (!!question && question.isRunningValidators)
                    return true;
            }
        }
        return false;
    };
    QuestionMatrixDropdownModelBase.prototype.getAllErrors = function () {
        var result = _super.prototype.getAllErrors.call(this);
        var rows = this.generatedVisibleRows;
        if (rows === null)
            return result;
        for (var i = 0; i < rows.length; i++) {
            var row = rows[i];
            for (var j = 0; j < row.cells.length; j++) {
                var errors = row.cells[j].question.getAllErrors();
                if (errors && errors.length > 0) {
                    result = result.concat(errors);
                }
            }
        }
        return result;
    };
    QuestionMatrixDropdownModelBase.prototype.hasErrorInRows = function (fireCallback, rec) {
        var _this = this;
        var rows = this.generatedVisibleRows;
        if (!this.generatedVisibleRows) {
            rows = this.visibleRows;
        }
        var res = false;
        if (!rec)
            rec = {};
        if (!rows)
            return rec;
        rec.isSingleDetailPanel = this.detailPanelMode === "underRowSingle";
        for (var i = 0; i < rows.length; i++) {
            res = rows[i].hasErrors(fireCallback, rec, function () {
                _this.raiseOnCompletedAsyncValidators();
            }) || res;
        }
        return res;
    };
    QuestionMatrixDropdownModelBase.prototype.isValueDuplicated = function () {
        if (!this.generatedVisibleRows)
            return false;
        var columns = this.getUniqueColumns();
        var res = false;
        for (var i = 0; i < columns.length; i++) {
            res = this.isValueInColumnDuplicated(columns[i]) || res;
        }
        return res;
    };
    QuestionMatrixDropdownModelBase.prototype.isValueInColumnDuplicated = function (column) {
        var keyValues = [];
        var res = false;
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            res =
                this.isValueDuplicatedInRow(this.generatedVisibleRows[i], column, keyValues) || res;
        }
        return res;
    };
    QuestionMatrixDropdownModelBase.prototype.getUniqueColumns = function () {
        var res = new Array();
        for (var i = 0; i < this.columns.length; i++) {
            if (this.columns[i].isUnique) {
                res.push(this.columns[i]);
            }
        }
        return res;
    };
    QuestionMatrixDropdownModelBase.prototype.isValueDuplicatedInRow = function (row, column, keyValues) {
        var question = row.getQuestionByColumn(column);
        if (!question || question.isEmpty())
            return false;
        var value = question.value;
        for (var i = 0; i < keyValues.length; i++) {
            if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(value, keyValues[i], true, this.isUniqueCaseSensitive)) {
                this.addDuplicationError(question);
                return true;
            }
        }
        keyValues.push(value);
        return false;
    };
    QuestionMatrixDropdownModelBase.prototype.addDuplicationError = function (question) {
        question.addError(new _error__WEBPACK_IMPORTED_MODULE_10__["KeyDuplicationError"](this.keyDuplicationError, this));
    };
    QuestionMatrixDropdownModelBase.prototype.getFirstQuestionToFocus = function (withError) {
        return this.getFirstCellQuestion(withError);
    };
    QuestionMatrixDropdownModelBase.prototype.getFirstInputElementId = function () {
        var question = this.getFirstCellQuestion(false);
        return question ? question.inputId : _super.prototype.getFirstInputElementId.call(this);
    };
    QuestionMatrixDropdownModelBase.prototype.getFirstErrorInputElementId = function () {
        var question = this.getFirstCellQuestion(true);
        return question ? question.inputId : _super.prototype.getFirstErrorInputElementId.call(this);
    };
    QuestionMatrixDropdownModelBase.prototype.getFirstCellQuestion = function (onError) {
        if (!this.generatedVisibleRows)
            return null;
        for (var i = 0; i < this.generatedVisibleRows.length; i++) {
            var cells = this.generatedVisibleRows[i].cells;
            for (var colIndex = 0; colIndex < cells.length; colIndex++) {
                if (!onError)
                    return cells[colIndex].question;
                if (cells[colIndex].question.currentErrorCount > 0)
                    return cells[colIndex].question;
            }
        }
        return null;
    };
    QuestionMatrixDropdownModelBase.prototype.onReadOnlyChanged = function () {
        _super.prototype.onReadOnlyChanged.call(this);
        if (!this.generateRows)
            return;
        for (var i = 0; i < this.visibleRows.length; i++) {
            this.visibleRows[i].onQuestionReadOnlyChanged(this.isReadOnly);
        }
    };
    //IMatrixDropdownData
    QuestionMatrixDropdownModelBase.prototype.createQuestion = function (row, column) {
        return this.createQuestionCore(row, column);
    };
    QuestionMatrixDropdownModelBase.prototype.createQuestionCore = function (row, column) {
        var question = column.createCellQuestion(row);
        question.setSurveyImpl(row);
        question.setParentQuestion(this);
        return question;
    };
    QuestionMatrixDropdownModelBase.prototype.deleteRowValue = function (newValue, row) {
        if (!newValue)
            return newValue;
        delete newValue[row.rowName];
        return this.isObject(newValue) && Object.keys(newValue).length == 0
            ? null
            : newValue;
    };
    QuestionMatrixDropdownModelBase.prototype.onAnyValueChanged = function (name) {
        if (this.isUpdateLocked ||
            this.isDoingonAnyValueChanged ||
            !this.generatedVisibleRows)
            return;
        this.isDoingonAnyValueChanged = true;
        var rows = this.visibleRows;
        for (var i = 0; i < rows.length; i++) {
            rows[i].onAnyValueChanged(name);
        }
        var totalRow = this.visibleTotalRow;
        if (!!totalRow) {
            totalRow.onAnyValueChanged(name);
        }
        this.isDoingonAnyValueChanged = false;
    };
    QuestionMatrixDropdownModelBase.prototype.isObject = function (value) {
        return value !== null && typeof value === "object";
    };
    QuestionMatrixDropdownModelBase.prototype.getOnCellValueChangedOptions = function (row, columnName, rowValue) {
        var getQuestion = function (colName) {
            for (var i = 0; i < row.cells.length; i++) {
                var col = row.cells[i].column;
                if (!!col && col.name === colName) {
                    return row.cells[i].question;
                }
            }
            return null;
        };
        return {
            row: row,
            columnName: columnName,
            rowValue: rowValue,
            value: !!rowValue ? rowValue[columnName] : null,
            getCellQuestion: getQuestion,
        };
    };
    QuestionMatrixDropdownModelBase.prototype.onCellValueChanged = function (row, columnName, rowValue) {
        if (!this.survey)
            return;
        var options = this.getOnCellValueChangedOptions(row, columnName, rowValue);
        if (!!this.onCellValueChangedCallback) {
            this.onCellValueChangedCallback(options);
        }
        this.survey.matrixCellValueChanged(this, options);
    };
    QuestionMatrixDropdownModelBase.prototype.validateCell = function (row, columnName, rowValue) {
        if (!this.survey)
            return;
        var options = this.getOnCellValueChangedOptions(row, columnName, rowValue);
        return this.survey.matrixCellValidate(this, options);
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "isValidateOnValueChanging", {
        get: function () {
            return !!this.survey ? this.survey.isValidateOnValueChanging : false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.onRowChanging = function (row, columnName, rowValue) {
        if (!this.survey)
            return !!rowValue ? rowValue[columnName] : null;
        var options = this.getOnCellValueChangedOptions(row, columnName, rowValue);
        var oldRowValue = this.getRowValueCore(row, this.createNewValue(), true);
        options.oldValue = !!oldRowValue ? oldRowValue[columnName] : null;
        this.survey.matrixCellValueChanging(this, options);
        return options.value;
    };
    QuestionMatrixDropdownModelBase.prototype.onRowChanged = function (row, columnName, newRowValue, isDeletingValue) {
        var rowObj = !!columnName ? this.getRowObj(row) : null;
        if (!!rowObj) {
            var columnValue = null;
            if (!!newRowValue && !isDeletingValue) {
                columnValue = newRowValue[columnName];
            }
            this.isRowChanging = true;
            rowObj[columnName] = columnValue;
            this.isRowChanging = false;
            this.onCellValueChanged(row, columnName, rowObj);
        }
        else {
            var oldValue = this.createNewValue(true);
            var combine = this.getNewValueOnRowChanged(row, columnName, newRowValue, isDeletingValue, this.createNewValue());
            if (this.isTwoValueEquals(oldValue, combine.value))
                return;
            this.isRowChanging = true;
            this.setNewValue(combine.value);
            this.isRowChanging = false;
            if (columnName) {
                this.onCellValueChanged(row, columnName, combine.rowValue);
            }
        }
    };
    QuestionMatrixDropdownModelBase.prototype.getNewValueOnRowChanged = function (row, columnName, newRowValue, isDeletingValue, newValue) {
        var rowValue = this.getRowValueCore(row, newValue, true);
        if (isDeletingValue) {
            delete rowValue[columnName];
        }
        for (var i = 0; i < row.cells.length; i++) {
            var key = row.cells[i].question.getValueName();
            delete rowValue[key];
        }
        if (newRowValue) {
            newRowValue = JSON.parse(JSON.stringify(newRowValue));
            for (var key in newRowValue) {
                if (!this.isValueEmpty(newRowValue[key])) {
                    rowValue[key] = newRowValue[key];
                }
            }
        }
        if (this.isObject(rowValue) && Object.keys(rowValue).length === 0) {
            newValue = this.deleteRowValue(newValue, row);
        }
        return { value: newValue, rowValue: rowValue };
    };
    QuestionMatrixDropdownModelBase.prototype.getRowIndex = function (row) {
        if (!this.generatedVisibleRows)
            return -1;
        return this.visibleRows.indexOf(row);
    };
    QuestionMatrixDropdownModelBase.prototype.getElementsInDesign = function (includeHidden) {
        if (includeHidden === void 0) { includeHidden = false; }
        var elements;
        if (this.detailPanelMode == "none") {
            elements = _super.prototype.getElementsInDesign.call(this, includeHidden);
        }
        else {
            elements = includeHidden ? [this.detailPanel] : this.detailElements;
        }
        return this.columns.concat(elements);
    };
    QuestionMatrixDropdownModelBase.prototype.hasDetailPanel = function (row) {
        if (this.detailPanelMode == "none")
            return false;
        if (this.isDesignMode)
            return true;
        if (!!this.onHasDetailPanelCallback)
            return this.onHasDetailPanelCallback(row);
        return this.detailElements.length > 0;
    };
    QuestionMatrixDropdownModelBase.prototype.getIsDetailPanelShowing = function (row) {
        if (this.detailPanelMode == "none")
            return false;
        if (this.isDesignMode) {
            var res = this.visibleRows.indexOf(row) == 0;
            if (res) {
                if (!row.detailPanel) {
                    row.showDetailPanel();
                }
            }
            return res;
        }
        return this.getPropertyValue("isRowShowing" + row.id, false);
    };
    QuestionMatrixDropdownModelBase.prototype.setIsDetailPanelShowing = function (row, val) {
        if (val == this.getIsDetailPanelShowing(row))
            return;
        this.setPropertyValue("isRowShowing" + row.id, val);
        this.updateDetailPanelButtonCss(row);
        if (!!this.renderedTable) {
            this.renderedTable.onDetailPanelChangeVisibility(row, val);
        }
        if (val && this.detailPanelMode === "underRowSingle") {
            var rows = this.visibleRows;
            for (var i = 0; i < rows.length; i++) {
                if (rows[i].id !== row.id && rows[i].isDetailPanelShowing) {
                    rows[i].hideDetailPanel();
                }
            }
        }
    };
    QuestionMatrixDropdownModelBase.prototype.getDetailPanelButtonCss = function (row) {
        var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(this.getPropertyValue("detailButtonCss" + row.id));
        return builder.append(this.cssClasses.detailButton, builder.toString() === "").toString();
    };
    QuestionMatrixDropdownModelBase.prototype.getDetailPanelIconCss = function (row) {
        var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(this.getPropertyValue("detailIconCss" + row.id));
        return builder.append(this.cssClasses.detailIcon, builder.toString() === "").toString();
    };
    QuestionMatrixDropdownModelBase.prototype.getDetailPanelIconId = function (row) {
        return this.getIsDetailPanelShowing(row) ? this.cssClasses.detailIconExpandedId : this.cssClasses.detailIconId;
    };
    QuestionMatrixDropdownModelBase.prototype.updateDetailPanelButtonCss = function (row) {
        var classes = this.cssClasses;
        var isPanelShowing = this.getIsDetailPanelShowing(row);
        var iconBuilder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(classes.detailIcon)
            .append(classes.detailIconExpanded, isPanelShowing);
        this.setPropertyValue("detailIconCss" + row.id, iconBuilder.toString());
        var buttonBuilder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(classes.detailButton)
            .append(classes.detailButtonExpanded, isPanelShowing);
        this.setPropertyValue("detailButtonCss" + row.id, buttonBuilder.toString());
    };
    QuestionMatrixDropdownModelBase.prototype.createRowDetailPanel = function (row) {
        if (this.isDesignMode)
            return this.detailPanel;
        var panel = this.createNewDetailPanel();
        panel.readOnly = this.isReadOnly;
        var json = this.detailPanel.toJSON();
        new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
        panel.renderWidth = "100%";
        panel.updateCustomWidgets();
        if (!!this.onCreateDetailPanelCallback) {
            this.onCreateDetailPanelCallback(row, panel);
        }
        return panel;
    };
    QuestionMatrixDropdownModelBase.prototype.getSharedQuestionByName = function (columnName, row) {
        if (!this.survey || !this.valueName)
            return null;
        var index = this.getRowIndex(row);
        if (index < 0)
            return null;
        return (this.survey.getQuestionByValueNameFromArray(this.valueName, columnName, index));
    };
    QuestionMatrixDropdownModelBase.prototype.onTotalValueChanged = function () {
        if (!!this.data &&
            !!this.visibleTotalRow &&
            !this.isUpdateLocked &&
            !this.isSett &&
            !this.isReadOnly) {
            this.data.setValue(this.getValueName() + _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].matrixTotalValuePostFix, this.totalValue, false);
        }
    };
    QuestionMatrixDropdownModelBase.prototype.getParentTextProcessor = function () {
        if (!this.parentQuestion || !this.parent)
            return null;
        var data = this.parent.data;
        if (!!data && !!data.getTextProcessor)
            return data.getTextProcessor();
        return null;
    };
    QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
        if (index >= this.visibleRows.length)
            return null;
        return this.visibleRows[index].getQuestionByName(name);
    };
    QuestionMatrixDropdownModelBase.prototype.isMatrixValueEmpty = function (val) {
        if (!val)
            return;
        if (Array.isArray(val)) {
            for (var i = 0; i < val.length; i++) {
                if (this.isObject(val[i]) && Object.keys(val[i]).length > 0)
                    return false;
            }
            return true;
        }
        return Object.keys(val).length == 0;
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "SurveyModel", {
        get: function () {
            return this.survey;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getCellTemplateData = function (cell) {
        // return cell.cell.column.templateQuestion;
        return this.SurveyModel.getMatrixCellTemplateData(cell);
    };
    QuestionMatrixDropdownModelBase.prototype.getCellWrapperComponentName = function (cell) {
        return this.SurveyModel.getElementWrapperComponentName(cell, "cell");
    };
    QuestionMatrixDropdownModelBase.prototype.getCellWrapperComponentData = function (cell) {
        return this.SurveyModel.getElementWrapperComponentData(cell, "cell");
    };
    QuestionMatrixDropdownModelBase.prototype.getColumnHeaderWrapperComponentName = function (cell) {
        return this.SurveyModel.getElementWrapperComponentName(cell, "column-header");
    };
    QuestionMatrixDropdownModelBase.prototype.getColumnHeaderWrapperComponentData = function (cell) {
        return this.SurveyModel.getElementWrapperComponentData(cell, "column-header");
    };
    QuestionMatrixDropdownModelBase.prototype.getRowHeaderWrapperComponentName = function (cell) {
        return this.SurveyModel.getElementWrapperComponentName(cell, "row-header");
    };
    QuestionMatrixDropdownModelBase.prototype.getRowHeaderWrapperComponentData = function (cell) {
        return this.SurveyModel.getElementWrapperComponentData(cell, "row-header");
    };
    Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "showHorizontalScroll", {
        get: function () {
            return !this.isDefaultV2Theme && this.horizontalScroll;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownModelBase.prototype.getRootCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.rootScroll, this.horizontalScroll).toString();
    };
    QuestionMatrixDropdownModelBase.prototype.getIsTooltipErrorInsideSupported = function () {
        return true;
    };
    return QuestionMatrixDropdownModelBase;
}(_martixBase__WEBPACK_IMPORTED_MODULE_1__["QuestionMatrixBaseModel"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownbase", [
    {
        name: "columns:matrixdropdowncolumns",
        className: "matrixdropdowncolumn",
    },
    {
        name: "columnLayout",
        alternativeName: "columnsLocation",
        default: "horizontal",
        choices: ["horizontal", "vertical"],
    },
    {
        name: "detailElements",
        visible: false,
        isLightSerializable: false,
    },
    {
        name: "detailPanelMode",
        choices: ["none", "underRow", "underRowSingle"],
        default: "none",
    },
    "horizontalScroll:boolean",
    {
        name: "choices:itemvalue[]", uniqueProperty: "value",
    },
    { name: "placeholder", alternativeName: "optionsCaption", serializationProperty: "locPlaceholder" },
    {
        name: "keyDuplicationError",
        serializationProperty: "locKeyDuplicationError",
    },
    {
        name: "cellType",
        default: "dropdown",
        choices: function () {
            return _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_12__["MatrixDropdownColumn"].getColumnTypes();
        },
    },
    { name: "columnColCount", default: 0, choices: [0, 1, 2, 3, 4] },
    "columnMinWidth",
    { name: "allowAdaptiveActions:boolean", default: false, visible: false },
], function () {
    return new QuestionMatrixDropdownModelBase("");
}, "matrixbase");


/***/ }),

/***/ "./src/question_matrixdropdowncolumn.ts":
/*!**********************************************!*\
  !*** ./src/question_matrixdropdowncolumn.ts ***!
  \**********************************************/
/*! exports provided: matrixDropdownColumnTypes, MatrixDropdownColumn */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matrixDropdownColumnTypes", function() { return matrixDropdownColumnTypes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixDropdownColumn", function() { return MatrixDropdownColumn; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _question_expression__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_expression */ "./src/question_expression.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




function onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data) {
    cellQuestion.storeOthersAsComment = !!question
        ? question.storeOthersAsComment
        : false;
    if ((!cellQuestion.choices || cellQuestion.choices.length == 0) &&
        cellQuestion.choicesByUrl.isEmpty) {
        cellQuestion.choices = question.choices;
    }
    if (!cellQuestion.choicesByUrl.isEmpty) {
        cellQuestion.choicesByUrl.run(data.getTextProcessor());
    }
}
var matrixDropdownColumnTypes = {
    dropdown: {
        onCellQuestionUpdate: function (cellQuestion, column, question, data) {
            onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
            if (!!cellQuestion.locPlaceholder &&
                cellQuestion.locPlaceholder.isEmpty &&
                !question.locPlaceholder.isEmpty) {
                cellQuestion.optionsCaption = question.optionsCaption;
            }
        },
    },
    checkbox: {
        onCellQuestionUpdate: function (cellQuestion, column, question, data) {
            onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
            cellQuestion.colCount =
                column.colCount > -1 ? column.colCount : question.columnColCount;
        },
    },
    radiogroup: {
        onCellQuestionUpdate: function (cellQuestion, column, question, data) {
            onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
            cellQuestion.colCount =
                column.colCount > -1 ? column.colCount : question.columnColCount;
        },
    },
    tagbox: {},
    text: {},
    comment: {},
    boolean: {
        onCellQuestionUpdate: function (cellQuestion, column, question, data) {
            cellQuestion.renderAs = column.renderAs;
        },
    },
    expression: {},
    rating: {},
};
var MatrixDropdownColumn = /** @class */ (function (_super) {
    __extends(MatrixDropdownColumn, _super);
    function MatrixDropdownColumn(name, title) {
        if (title === void 0) { title = null; }
        var _this = _super.call(this) || this;
        _this.colOwnerValue = null;
        _this.indexValue = -1;
        _this._isVisible = true;
        _this._hasVisibleCell = true;
        _this.previousChoicesId = undefined;
        _this.createLocalizableString("totalFormat", _this);
        _this.createLocalizableString("cellHint", _this);
        _this.registerPropertyChangedHandlers(["showInMultipleColumns"], function () { _this.doShowInMultipleColumnsChanged(); });
        _this.updateTemplateQuestion();
        _this.name = name;
        if (title) {
            _this.title = title;
        }
        else {
            _this.templateQuestion.locTitle.strChanged();
        }
        return _this;
    }
    MatrixDropdownColumn.getColumnTypes = function () {
        var res = [];
        for (var key in matrixDropdownColumnTypes) {
            res.push(key);
        }
        return res;
    };
    MatrixDropdownColumn.prototype.getOriginalObj = function () {
        return this.templateQuestion;
    };
    MatrixDropdownColumn.prototype.getClassNameProperty = function () {
        return "cellType";
    };
    MatrixDropdownColumn.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        return !!this.colOwner ? this.colOwner.survey : null;
    };
    MatrixDropdownColumn.prototype.endLoadingFromJson = function () {
        var _this = this;
        _super.prototype.endLoadingFromJson.call(this);
        this.templateQuestion.autoOtherMode = this.isShowInMultipleColumns;
        this.templateQuestion.endLoadingFromJson();
        this.templateQuestion.onGetSurvey = function () {
            return _this.getSurvey();
        };
    };
    MatrixDropdownColumn.prototype.getDynamicPropertyName = function () {
        return "cellType";
    };
    MatrixDropdownColumn.prototype.getDynamicType = function () {
        if (this.cellType === "default")
            return "question";
        return this.calcCellQuestionType(null);
    };
    Object.defineProperty(MatrixDropdownColumn.prototype, "colOwner", {
        get: function () {
            return this.colOwnerValue;
        },
        set: function (value) {
            this.colOwnerValue = value;
            if (!!value) {
                this.updateTemplateQuestion();
                this.setParentQuestionToTemplate(this.templateQuestion);
            }
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownColumn.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        this.locTitle.strChanged();
    };
    MatrixDropdownColumn.prototype.addUsedLocales = function (locales) {
        _super.prototype.addUsedLocales.call(this, locales);
        this.templateQuestion.addUsedLocales(locales);
    };
    Object.defineProperty(MatrixDropdownColumn.prototype, "index", {
        get: function () {
            return this.indexValue;
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownColumn.prototype.setIndex = function (val) {
        this.indexValue = val;
    };
    MatrixDropdownColumn.prototype.getType = function () {
        return "matrixdropdowncolumn";
    };
    Object.defineProperty(MatrixDropdownColumn.prototype, "cellType", {
        get: function () {
            return this.getPropertyValue("cellType");
        },
        set: function (val) {
            val = val.toLocaleLowerCase();
            this.updateTemplateQuestion(val);
            this.setPropertyValue("cellType", val);
            if (!!this.colOwner) {
                this.colOwner.onColumnCellTypeChanged(this);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "templateQuestion", {
        get: function () {
            return this.templateQuestionValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "value", {
        get: function () {
            return this.templateQuestion.name;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "isVisible", {
        get: function () {
            return this._isVisible;
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownColumn.prototype.setIsVisible = function (newVal) {
        this._isVisible = newVal;
    };
    Object.defineProperty(MatrixDropdownColumn.prototype, "hasVisibleCell", {
        get: function () {
            return this._hasVisibleCell;
        },
        set: function (newVal) {
            this._hasVisibleCell = newVal;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "name", {
        get: function () {
            return this.templateQuestion.name;
        },
        set: function (val) {
            this.templateQuestion.name = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "title", {
        get: function () {
            return this.templateQuestion.title;
        },
        set: function (val) {
            this.templateQuestion.title = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "locTitle", {
        get: function () {
            return this.templateQuestion.locTitle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "fullTitle", {
        get: function () {
            return this.locTitle.textOrHtml;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "isRequired", {
        get: function () {
            return this.templateQuestion.isRequired;
        },
        set: function (val) {
            this.templateQuestion.isRequired = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "isRenderedRequired", {
        get: function () {
            return this.getPropertyValue("isRenderedRequired", this.isRequired);
        },
        set: function (val) {
            this.setPropertyValue("isRenderedRequired", val);
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownColumn.prototype.updateIsRenderedRequired = function (val) {
        this.isRenderedRequired = val || this.isRequired;
    };
    Object.defineProperty(MatrixDropdownColumn.prototype, "requiredText", {
        get: function () {
            return this.isRenderedRequired && this.getSurvey() ? this.getSurvey().requiredText : this.templateQuestion.requiredText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "requiredErrorText", {
        get: function () {
            return this.templateQuestion.requiredErrorText;
        },
        set: function (val) {
            this.templateQuestion.requiredErrorText = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "locRequiredErrorText", {
        get: function () {
            return this.templateQuestion.locRequiredErrorText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "readOnly", {
        get: function () {
            return this.templateQuestion.readOnly;
        },
        set: function (val) {
            this.templateQuestion.readOnly = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "hasOther", {
        get: function () {
            return this.templateQuestion.hasOther;
        },
        set: function (val) {
            this.templateQuestion.hasOther = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "visibleIf", {
        get: function () {
            return this.templateQuestion.visibleIf;
        },
        set: function (val) {
            this.templateQuestion.visibleIf = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "enableIf", {
        get: function () {
            return this.templateQuestion.enableIf;
        },
        set: function (val) {
            this.templateQuestion.enableIf = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "requiredIf", {
        get: function () {
            return this.templateQuestion.requiredIf;
        },
        set: function (val) {
            this.templateQuestion.requiredIf = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "isUnique", {
        get: function () {
            return this.getPropertyValue("isUnique");
        },
        set: function (val) {
            this.setPropertyValue("isUnique", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "showInMultipleColumns", {
        get: function () {
            return this.getPropertyValue("showInMultipleColumns", false);
        },
        set: function (val) {
            this.setPropertyValue("showInMultipleColumns", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "isSupportMultipleColumns", {
        get: function () {
            return ["checkbox", "radiogroup"].indexOf(this.cellType) > -1;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "isShowInMultipleColumns", {
        get: function () {
            return this.showInMultipleColumns && this.isSupportMultipleColumns;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "validators", {
        get: function () {
            return this.templateQuestion.validators;
        },
        set: function (val) {
            this.templateQuestion.validators = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "totalType", {
        get: function () {
            return this.getPropertyValue("totalType");
        },
        set: function (val) {
            this.setPropertyValue("totalType", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "totalExpression", {
        get: function () {
            return this.getPropertyValue("totalExpression");
        },
        set: function (val) {
            this.setPropertyValue("totalExpression", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "hasTotal", {
        get: function () {
            return this.totalType != "none" || !!this.totalExpression;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "totalFormat", {
        get: function () {
            return this.getLocalizableStringText("totalFormat", "");
        },
        set: function (val) {
            this.setLocalizableStringText("totalFormat", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "locTotalFormat", {
        get: function () {
            return this.getLocalizableString("totalFormat");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "cellHint", {
        get: function () {
            return this.getLocalizableStringText("cellHint", "");
        },
        set: function (val) {
            this.setLocalizableStringText("cellHint", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "locCellHint", {
        get: function () {
            return this.getLocalizableString("cellHint");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "renderAs", {
        get: function () {
            return this.getPropertyValue("renderAs");
        },
        set: function (val) {
            this.setPropertyValue("renderAs", val);
            if (!!this.templateQuestion) {
                this.templateQuestion.renderAs = val;
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "totalMaximumFractionDigits", {
        get: function () {
            return this.getPropertyValue("totalMaximumFractionDigits");
        },
        set: function (val) {
            if (val < -1 || val > 20)
                return;
            this.setPropertyValue("totalMaximumFractionDigits", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "totalMinimumFractionDigits", {
        get: function () {
            return this.getPropertyValue("totalMinimumFractionDigits");
        },
        set: function (val) {
            if (val < -1 || val > 20)
                return;
            this.setPropertyValue("totalMinimumFractionDigits", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "totalDisplayStyle", {
        get: function () {
            return this.getPropertyValue("totalDisplayStyle");
        },
        set: function (val) {
            this.setPropertyValue("totalDisplayStyle", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "totalCurrency", {
        get: function () {
            return this.getPropertyValue("totalCurrency");
        },
        set: function (val) {
            if (Object(_question_expression__WEBPACK_IMPORTED_MODULE_2__["getCurrecyCodes"])().indexOf(val) < 0)
                return;
            this.setPropertyValue("totalCurrency", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "minWidth", {
        get: function () {
            return this.getPropertyValue("minWidth", "");
        },
        set: function (val) {
            this.setPropertyValue("minWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "width", {
        get: function () {
            return this.getPropertyValue("width", "");
        },
        set: function (val) {
            this.setPropertyValue("width", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDropdownColumn.prototype, "colCount", {
        get: function () {
            return this.getPropertyValue("colCount");
        },
        set: function (val) {
            if (val < -1 || val > 4)
                return;
            this.setPropertyValue("colCount", val);
        },
        enumerable: false,
        configurable: true
    });
    MatrixDropdownColumn.prototype.getLocale = function () {
        return this.colOwner ? this.colOwner.getLocale() : "";
    };
    MatrixDropdownColumn.prototype.getMarkdownHtml = function (text, name) {
        return this.colOwner ? this.colOwner.getMarkdownHtml(text, name) : undefined;
    };
    MatrixDropdownColumn.prototype.getRenderer = function (name) {
        return !!this.colOwner ? this.colOwner.getRenderer(name) : null;
    };
    MatrixDropdownColumn.prototype.getRendererContext = function (locStr) {
        return !!this.colOwner ? this.colOwner.getRendererContext(locStr) : locStr;
    };
    MatrixDropdownColumn.prototype.getProcessedText = function (text) {
        return this.colOwner ? this.colOwner.getProcessedText(text) : text;
    };
    MatrixDropdownColumn.prototype.createCellQuestion = function (row) {
        var qType = this.calcCellQuestionType(row);
        var cellQuestion = this.createNewQuestion(qType);
        this.callOnCellQuestionUpdate(cellQuestion, row);
        return cellQuestion;
    };
    MatrixDropdownColumn.prototype.startLoadingFromJson = function (json) {
        _super.prototype.startLoadingFromJson.call(this, json);
        if (!!json && !json.cellType && !!json.choices) {
            json.cellType = this.colOwner.getCellType();
        }
    };
    MatrixDropdownColumn.prototype.updateCellQuestion = function (cellQuestion, data, onUpdateJson) {
        if (onUpdateJson === void 0) { onUpdateJson = null; }
        this.setQuestionProperties(cellQuestion, onUpdateJson);
    };
    MatrixDropdownColumn.prototype.callOnCellQuestionUpdate = function (cellQuestion, data) {
        var qType = cellQuestion.getType();
        var qDefinition = matrixDropdownColumnTypes[qType];
        if (qDefinition && qDefinition["onCellQuestionUpdate"]) {
            qDefinition["onCellQuestionUpdate"](cellQuestion, this, this.colOwner, data);
        }
    };
    MatrixDropdownColumn.prototype.defaultCellTypeChanged = function () {
        this.updateTemplateQuestion();
    };
    MatrixDropdownColumn.prototype.calcCellQuestionType = function (row) {
        var cellType = this.getDefaultCellQuestionType();
        if (!!row && !!this.colOwner) {
            cellType = this.colOwner.getCustomCellType(this, row, cellType);
        }
        return cellType;
    };
    MatrixDropdownColumn.prototype.getDefaultCellQuestionType = function (cellType) {
        if (!cellType)
            cellType = this.cellType;
        if (cellType !== "default")
            return cellType;
        if (this.colOwner)
            return this.colOwner.getCellType();
        return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].matrixDefaultCellType;
    };
    MatrixDropdownColumn.prototype.updateTemplateQuestion = function (newCellType) {
        var _this = this;
        var curCellType = this.getDefaultCellQuestionType(newCellType);
        var prevCellType = this.templateQuestion
            ? this.templateQuestion.getType()
            : "";
        if (curCellType === prevCellType)
            return;
        if (this.templateQuestion) {
            this.removeProperties(prevCellType);
        }
        this.templateQuestionValue = this.createNewQuestion(curCellType);
        this.templateQuestion.locOwner = this;
        this.addProperties(curCellType);
        this.templateQuestion.onPropertyChanged.add(function (sender, options) {
            _this.propertyValueChanged(options.name, options.oldValue, options.newValue);
        });
        this.templateQuestion.onItemValuePropertyChanged.add(function (sender, options) {
            _this.doItemValuePropertyChanged(options.propertyName, options.obj, options.name, options.newValue, options.oldValue);
        });
        this.templateQuestion.isContentElement = true;
        if (!this.isLoadingFromJson) {
            this.templateQuestion.onGetSurvey = function () {
                return _this.getSurvey();
            };
        }
        this.templateQuestion.locTitle.strChanged();
    };
    MatrixDropdownColumn.prototype.createNewQuestion = function (cellType) {
        var question = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(cellType);
        if (!question) {
            question = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass("text");
        }
        question.loadingOwner = this;
        question.isEditableTemplateElement = true;
        question.autoOtherMode = this.isShowInMultipleColumns;
        this.setQuestionProperties(question);
        this.setParentQuestionToTemplate(question);
        return question;
    };
    MatrixDropdownColumn.prototype.setParentQuestionToTemplate = function (question) {
        if (!!this.colOwner && this.colOwner.isQuestion) {
            question.setParentQuestion(this.colOwner);
        }
    };
    MatrixDropdownColumn.prototype.setQuestionProperties = function (question, onUpdateJson) {
        var _this = this;
        if (onUpdateJson === void 0) { onUpdateJson = null; }
        if (this.templateQuestion) {
            var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toJsonObject(this.templateQuestion, true);
            if (onUpdateJson) {
                onUpdateJson(json);
            }
            json.type = question.getType();
            if (this.cellType === "default" && !!this.colOwner && this.colOwner.hasChoices()) {
                delete json["choices"];
            }
            delete json["itemComponent"];
            new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, question);
            question.isContentElement = this.templateQuestion.isContentElement;
            this.previousChoicesId = undefined;
            question.loadedChoicesFromServerCallback = function () {
                if (!_this.isShowInMultipleColumns)
                    return;
                if (!!_this.previousChoicesId && _this.previousChoicesId !== question.id)
                    return;
                _this.previousChoicesId = question.id;
                var choices = question.visibleChoices;
                _this.templateQuestion.choices = choices;
                _this.propertyValueChanged("choices", choices, choices);
            };
        }
    };
    MatrixDropdownColumn.prototype.propertyValueChanged = function (name, oldValue, newValue) {
        _super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
        if (name === "isRequired") {
            this.updateIsRenderedRequired(newValue);
        }
        if (!this.colOwner || this.isLoadingFromJson)
            return;
        if (this.isShowInMultipleColumns && ["visibleChoices", "choices"].indexOf(name) > -1) {
            this.colOwner.onShowInMultipleColumnsChanged(this);
        }
        if (!_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].hasOriginalProperty(this, name))
            return;
        this.colOwner.onColumnPropertyChanged(this, name, newValue);
    };
    MatrixDropdownColumn.prototype.doItemValuePropertyChanged = function (propertyName, obj, name, newValue, oldValue) {
        if (!_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].hasOriginalProperty(obj, name))
            return;
        if (this.colOwner != null && !this.isLoadingFromJson) {
            this.colOwner.onColumnItemValuePropertyChanged(this, propertyName, obj, name, newValue, oldValue);
        }
    };
    MatrixDropdownColumn.prototype.doShowInMultipleColumnsChanged = function () {
        if (this.colOwner != null && !this.isLoadingFromJson) {
            this.colOwner.onShowInMultipleColumnsChanged(this);
        }
        if (this.templateQuestion) {
            this.templateQuestion.autoOtherMode = this.isShowInMultipleColumns;
        }
    };
    MatrixDropdownColumn.prototype.getProperties = function (curCellType) {
        return _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].getDynamicPropertiesByObj(this, curCellType);
    };
    MatrixDropdownColumn.prototype.removeProperties = function (curCellType) {
        var properties = this.getProperties(curCellType);
        for (var i = 0; i < properties.length; i++) {
            var prop = properties[i];
            delete this[prop.name];
            if (prop.serializationProperty) {
                delete this[prop.serializationProperty];
            }
        }
    };
    MatrixDropdownColumn.prototype.addProperties = function (curCellType) {
        var question = this.templateQuestion;
        var properties = this.getProperties(curCellType);
        for (var i = 0; i < properties.length; i++) {
            var prop = properties[i];
            this.addProperty(question, prop.name, false);
            if (prop.serializationProperty) {
                this.addProperty(question, prop.serializationProperty, true);
            }
            if (prop.alternativeName) {
                this.addProperty(question, prop.alternativeName, false);
            }
        }
    };
    MatrixDropdownColumn.prototype.addProperty = function (question, propName, isReadOnly) {
        var desc = {
            configurable: true,
            get: function () {
                return question[propName];
            },
        };
        if (!isReadOnly) {
            desc["set"] = function (v) {
                question[propName] = v;
            };
        }
        Object.defineProperty(this, propName, desc);
    };
    return MatrixDropdownColumn;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdowncolumn", [
    { name: "!name", isUnique: true },
    {
        name: "title", serializationProperty: "locTitle", dependsOn: "name",
        onPropertyEditorUpdate: function (obj, editor) {
            if (!!obj && !!editor) {
                editor.placeholder = obj.name;
            }
        }
    },
    { name: "cellHint", serializationProperty: "locCellHint", visible: false },
    {
        name: "cellType",
        default: "default",
        choices: function () {
            var res = MatrixDropdownColumn.getColumnTypes();
            res.splice(0, 0, "default");
            return res;
        },
    },
    { name: "colCount", default: -1, choices: [-1, 0, 1, 2, 3, 4] },
    "isRequired:boolean",
    "isUnique:boolean",
    {
        name: "requiredErrorText:text",
        serializationProperty: "locRequiredErrorText",
    },
    "readOnly:boolean",
    "minWidth",
    "width",
    "visibleIf:condition",
    "enableIf:condition",
    "requiredIf:condition",
    {
        name: "showInMultipleColumns:boolean",
        dependsOn: "cellType",
        visibleIf: function (obj) {
            if (!obj)
                return false;
            return obj.isSupportMultipleColumns;
        },
    },
    {
        name: "validators:validators",
        baseClassName: "surveyvalidator",
        classNamePart: "validator",
    },
    {
        name: "totalType",
        default: "none",
        choices: ["none", "sum", "count", "min", "max", "avg"],
    },
    "totalExpression:expression",
    { name: "totalFormat", serializationProperty: "locTotalFormat" },
    {
        name: "totalDisplayStyle",
        default: "none",
        choices: ["none", "decimal", "currency", "percent"],
    },
    {
        name: "totalCurrency",
        choices: function () {
            return Object(_question_expression__WEBPACK_IMPORTED_MODULE_2__["getCurrecyCodes"])();
        },
        default: "USD",
    },
    { name: "totalMaximumFractionDigits:number", default: -1 },
    { name: "totalMinimumFractionDigits:number", default: -1 },
    { name: "renderAs", default: "default", visible: false },
], function () {
    return new MatrixDropdownColumn("");
});


/***/ }),

/***/ "./src/question_matrixdropdownrendered.ts":
/*!************************************************!*\
  !*** ./src/question_matrixdropdownrendered.ts ***!
  \************************************************/
/*! exports provided: QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedCell", function() { return QuestionMatrixDropdownRenderedCell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedRow", function() { return QuestionMatrixDropdownRenderedRow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDropdownRenderedTable", function() { return QuestionMatrixDropdownRenderedTable; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
/* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./actions/adaptive-container */ "./src/actions/adaptive-container.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};








var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
    function QuestionMatrixDropdownRenderedCell() {
        this.minWidth = "";
        this.width = "";
        this.colSpans = 1;
        this.isActionsCell = false;
        this.isDragHandlerCell = false;
        this.classNameValue = "";
        this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
    }
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "hasQuestion", {
        get: function () {
            return !!this.question;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "hasTitle", {
        get: function () {
            return !!this.locTitle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "hasPanel", {
        get: function () {
            return !!this.panel;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "id", {
        get: function () {
            return this.idValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "showErrorOnTop", {
        get: function () {
            return this.showErrorOnCore("top");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "showErrorOnBottom", {
        get: function () {
            return this.showErrorOnCore("bottom");
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownRenderedCell.prototype.showErrorOnCore = function (location) {
        return (this.getShowErrorLocation(location) &&
            (!this.isChoice || this.isFirstChoice));
    };
    QuestionMatrixDropdownRenderedCell.prototype.getShowErrorLocation = function (location) {
        return this.hasQuestion && this.question.showErrorOnCore(location);
    };
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "item", {
        get: function () {
            return this.itemValue;
        },
        set: function (val) {
            this.itemValue = val;
            if (!!val) {
                val.hideCaption = true;
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isChoice", {
        get: function () {
            return !!this.item;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isItemChoice", {
        get: function () {
            return this.isChoice && !this.isOtherChoice;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "choiceValue", {
        get: function () {
            return this.isChoice ? this.item.value : null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isCheckbox", {
        get: function () {
            return this.isItemChoice && this.question.isDescendantOf("checkbox");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isRadio", {
        get: function () {
            return this.isItemChoice && this.question.isDescendantOf("radiogroup");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isFirstChoice", {
        get: function () {
            return this.choiceIndex === 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "className", {
        get: function () {
            var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(this.classNameValue);
            if (this.hasQuestion) {
                builder
                    .append(this.question.cssClasses.hasError, this.question.errors.length > 0)
                    .append(this.question.cssClasses.answered, this.question.isAnswered);
            }
            return builder.toString();
        },
        set: function (val) {
            this.classNameValue = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "headers", {
        get: function () {
            if (this.cell && this.cell.column) {
                if (this.cell.column.cellHint === " ") {
                    return "";
                }
                if (!!this.cell.column.cellHint) {
                    return this.cell.column.locCellHint.renderedHtml;
                }
                if (this.cell.column.isShowInMultipleColumns) {
                    return this.item.locText.renderedHtml;
                }
            }
            if (this.question && this.question.isVisible) {
                return this.question.locTitle.renderedHtml;
            }
            if (this.hasTitle) {
                return this.locTitle.renderedHtml || "";
            }
            return "";
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownRenderedCell.prototype.getTitle = function () {
        return (this.matrix && this.matrix.showHeader) ? this.headers : "";
    };
    QuestionMatrixDropdownRenderedCell.prototype.calculateFinalClassName = function (matrixCssClasses) {
        var questionCss = this.cell.question.cssClasses;
        // 'text-align': $data.isChoice ? 'center':
        var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(questionCss.itemValue, !!questionCss)
            .append(questionCss.asCell, !!questionCss);
        return builder.append(matrixCssClasses.cell, builder.isEmpty() && !!matrixCssClasses)
            .append(matrixCssClasses.choiceCell, this.isChoice)
            .toString();
    };
    QuestionMatrixDropdownRenderedCell.counter = 1;
    return QuestionMatrixDropdownRenderedCell;
}());

var QuestionMatrixDropdownRenderedRow = /** @class */ (function (_super) {
    __extends(QuestionMatrixDropdownRenderedRow, _super);
    function QuestionMatrixDropdownRenderedRow(cssClasses, isDetailRow) {
        if (isDetailRow === void 0) { isDetailRow = false; }
        var _this = _super.call(this) || this;
        _this.cssClasses = cssClasses;
        _this.isDetailRow = isDetailRow;
        _this.cells = [];
        _this.idValue = QuestionMatrixDropdownRenderedRow.counter++;
        return _this;
    }
    Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "id", {
        get: function () {
            return this.idValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "attributes", {
        get: function () {
            if (!this.row)
                return {};
            return { "data-sv-drop-target-matrix-row": this.row.id };
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "className", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
                .append(this.cssClasses.row)
                .append(this.cssClasses.detailRow, this.isDetailRow)
                .append(this.cssClasses.ghostRow, this.isGhostRow)
                .append(this.cssClasses.rowAdditional, this.isAdditionalClasses)
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownRenderedRow.counter = 1;
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: null })
    ], QuestionMatrixDropdownRenderedRow.prototype, "isGhostRow", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], QuestionMatrixDropdownRenderedRow.prototype, "isAdditionalClasses", void 0);
    return QuestionMatrixDropdownRenderedRow;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));

var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
    __extends(QuestionMatrixDropdownRenderedTable, _super);
    function QuestionMatrixDropdownRenderedTable(matrix) {
        var _this = _super.call(this) || this;
        _this.matrix = matrix;
        _this.renderedRowsChangedCallback = function () { };
        _this.hasActionCellInRowsValues = {};
        _this.build();
        return _this;
    }
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "showTable", {
        get: function () {
            return this.getPropertyValue("showTable", true);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "showHeader", {
        get: function () {
            return this.getPropertyValue("showHeader");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "showAddRowOnTop", {
        get: function () {
            return this.getPropertyValue("showAddRowOnTop", false);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "showAddRowOnBottom", {
        get: function () {
            return this.getPropertyValue("showAddRowOnBottom", false);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "showFooter", {
        get: function () {
            return this.matrix.hasFooter && this.matrix.isColumnLayoutHorizontal;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "hasFooter", {
        get: function () {
            return !!this.footerRow;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "hasRemoveRows", {
        get: function () {
            return this.hasRemoveRowsValue;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownRenderedTable.prototype.isRequireReset = function () {
        return (this.hasRemoveRows != this.matrix.canRemoveRows ||
            !this.matrix.isColumnLayoutHorizontal);
    };
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "headerRow", {
        get: function () {
            return this.headerRowValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "footerRow", {
        get: function () {
            return this.footerRowValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "allowRowsDragAndDrop", {
        get: function () {
            return this.matrix.allowRowsDragAndDrop && this.matrix.isColumnLayoutHorizontal;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownRenderedTable.prototype.build = function () {
        this.hasRemoveRowsValue = this.matrix.canRemoveRows;
        //build rows now
        var rows = this.matrix.visibleRows;
        this.cssClasses = this.matrix.cssClasses;
        this.buildRowsActions();
        this.buildHeader();
        this.buildRows();
        this.buildFooter();
        this.updateShowTableAndAddRow();
    };
    QuestionMatrixDropdownRenderedTable.prototype.updateShowTableAndAddRow = function () {
        var showTable = this.rows.length > 0 ||
            this.matrix.isDesignMode ||
            !this.matrix.getShowColumnsIfEmpty();
        this.setPropertyValue("showTable", showTable);
        var showAddRow = this.matrix.canAddRow && showTable;
        var showAddRowOnTop = showAddRow;
        var showAddRowOnBottom = showAddRow;
        if (showAddRowOnTop) {
            if (this.matrix.getAddRowLocation() === "default") {
                showAddRowOnTop = !this.matrix.isColumnLayoutHorizontal;
            }
            else {
                showAddRowOnTop = this.matrix.getAddRowLocation() !== "bottom";
            }
        }
        if (showAddRowOnBottom && this.matrix.getAddRowLocation() !== "topBottom") {
            showAddRowOnBottom = !showAddRowOnTop;
        }
        this.setPropertyValue("showAddRowOnTop", showAddRowOnTop);
        this.setPropertyValue("showAddRowOnBottom", showAddRowOnBottom);
    };
    QuestionMatrixDropdownRenderedTable.prototype.onAddedRow = function () {
        if (this.getRenderedDataRowCount() >= this.matrix.visibleRows.length)
            return;
        var row = this.matrix.visibleRows[this.matrix.visibleRows.length - 1];
        this.rowsActions.push(this.buildRowActions(row));
        this.addHorizontalRow(this.rows, row, this.matrix.visibleRows.length == 1 && !this.matrix.showHeader);
        this.updateShowTableAndAddRow();
    };
    QuestionMatrixDropdownRenderedTable.prototype.getRenderedDataRowCount = function () {
        var res = 0;
        for (var i = 0; i < this.rows.length; i++) {
            if (!this.rows[i].isDetailRow)
                res++;
        }
        return res;
    };
    QuestionMatrixDropdownRenderedTable.prototype.onRemovedRow = function (row) {
        var rowIndex = this.getRenderedRowIndex(row);
        if (rowIndex < 0)
            return;
        this.rowsActions.splice(rowIndex, 1);
        var removeCount = 1;
        if (rowIndex < this.rows.length - 1 &&
            this.rows[rowIndex + 1].isDetailRow) {
            removeCount++;
        }
        this.rows.splice(rowIndex, removeCount);
        this.updateShowTableAndAddRow();
    };
    QuestionMatrixDropdownRenderedTable.prototype.onDetailPanelChangeVisibility = function (row, isShowing) {
        var rowIndex = this.getRenderedRowIndex(row);
        if (rowIndex < 0)
            return;
        var panelRowIndex = rowIndex < this.rows.length - 1 && this.rows[rowIndex + 1].isDetailRow
            ? rowIndex + 1
            : -1;
        if ((isShowing && panelRowIndex > -1) || (!isShowing && panelRowIndex < 0))
            return;
        if (isShowing) {
            var detailRow = this.createDetailPanelRow(row, this.rows[rowIndex]);
            this.rows.splice(rowIndex + 1, 0, detailRow);
        }
        else {
            this.rows.splice(panelRowIndex, 1);
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.getRenderedRowIndex = function (row) {
        for (var i = 0; i < this.rows.length; i++) {
            if (this.rows[i].row == row)
                return i;
        }
        return -1;
    };
    QuestionMatrixDropdownRenderedTable.prototype.buildRowsActions = function () {
        this.rowsActions = [];
        var rows = this.matrix.visibleRows;
        for (var i = 0; i < rows.length; i++) {
            this.rowsActions.push(this.buildRowActions(rows[i]));
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.createRenderedRow = function (cssClasses, isDetailRow) {
        if (isDetailRow === void 0) { isDetailRow = false; }
        return new QuestionMatrixDropdownRenderedRow(cssClasses, isDetailRow);
    };
    QuestionMatrixDropdownRenderedTable.prototype.buildHeader = function () {
        var colHeaders = this.matrix.isColumnLayoutHorizontal && this.matrix.showHeader;
        var isShown = colHeaders ||
            (this.matrix.hasRowText && !this.matrix.isColumnLayoutHorizontal);
        this.setPropertyValue("showHeader", isShown);
        if (!isShown)
            return;
        this.headerRowValue = this.createRenderedRow(this.cssClasses);
        if (this.allowRowsDragAndDrop) {
            this.headerRow.cells.push(this.createHeaderCell(null));
        }
        if (this.hasActionCellInRows("start")) {
            this.headerRow.cells.push(this.createHeaderCell(null));
        }
        if (this.matrix.hasRowText && this.matrix.showHeader) {
            this.headerRow.cells.push(this.createHeaderCell(null));
        }
        if (this.matrix.isColumnLayoutHorizontal) {
            for (var i = 0; i < this.matrix.visibleColumns.length; i++) {
                var column = this.matrix.visibleColumns[i];
                if (!column.hasVisibleCell)
                    continue;
                if (column.isShowInMultipleColumns) {
                    this.createMutlipleColumnsHeader(column);
                }
                else {
                    this.headerRow.cells.push(this.createHeaderCell(column));
                }
            }
        }
        else {
            var rows = this.matrix.visibleRows;
            for (var i = 0; i < rows.length; i++) {
                var cell = this.createTextCell(rows[i].locText);
                cell.row = rows[i];
                this.headerRow.cells.push(cell);
            }
            if (this.matrix.hasFooter) {
                this.headerRow.cells.push(this.createTextCell(this.matrix.getFooterText()));
            }
        }
        if (this.hasActionCellInRows("end")) {
            this.headerRow.cells.push(this.createHeaderCell(null));
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.buildFooter = function () {
        if (!this.showFooter)
            return;
        this.footerRowValue = this.createRenderedRow(this.cssClasses);
        if (this.allowRowsDragAndDrop) {
            this.footerRow.cells.push(this.createHeaderCell(null));
        }
        if (this.hasActionCellInRows("start")) {
            this.footerRow.cells.push(this.createHeaderCell(null));
        }
        if (this.matrix.hasRowText) {
            this.footerRow.cells.push(this.createTextCell(this.matrix.getFooterText()));
        }
        var cells = this.matrix.visibleTotalRow.cells;
        for (var i = 0; i < cells.length; i++) {
            var cell = cells[i];
            if (!cell.column.hasVisibleCell)
                continue;
            if (cell.column.isShowInMultipleColumns) {
                this.createMutlipleColumnsFooter(this.footerRow, cell);
            }
            else {
                var editCell = this.createEditCell(cell);
                if (cell.column) {
                    this.setHeaderCellWidth(cell.column, editCell);
                }
                this.footerRow.cells.push(editCell);
            }
        }
        if (this.hasActionCellInRows("end")) {
            this.footerRow.cells.push(this.createHeaderCell(null));
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.buildRows = function () {
        var rows = this.matrix.isColumnLayoutHorizontal
            ? this.buildHorizontalRows()
            : this.buildVerticalRows();
        this.rows = rows;
    };
    QuestionMatrixDropdownRenderedTable.prototype.hasActionCellInRows = function (location) {
        if (this.hasActionCellInRowsValues[location] === undefined) {
            var rows = this.matrix.visibleRows;
            this.hasActionCellInRowsValues[location] = false;
            for (var i = 0; i < rows.length; i++) {
                if (!this.isValueEmpty(this.getRowActions(i, location))) {
                    this.hasActionCellInRowsValues[location] = true;
                    break;
                }
            }
        }
        return this.hasActionCellInRowsValues[location];
    };
    QuestionMatrixDropdownRenderedTable.prototype.canRemoveRow = function (row) {
        return this.matrix.canRemoveRow(row);
    };
    QuestionMatrixDropdownRenderedTable.prototype.buildHorizontalRows = function () {
        var rows = this.matrix.visibleRows;
        var renderedRows = [];
        for (var i = 0; i < rows.length; i++) {
            this.addHorizontalRow(renderedRows, rows[i], i == 0 && !this.matrix.showHeader);
        }
        return renderedRows;
    };
    QuestionMatrixDropdownRenderedTable.prototype.addHorizontalRow = function (renderedRows, row, useAsHeader) {
        var renderedRow = this.createHorizontalRow(row, useAsHeader);
        renderedRow.row = row;
        renderedRows.push(renderedRow);
        if (row.isDetailPanelShowing) {
            renderedRows.push(this.createDetailPanelRow(row, renderedRow));
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.getRowDragCell = function (rowIndex) {
        var cell = new QuestionMatrixDropdownRenderedCell();
        cell.isDragHandlerCell = true;
        cell.className = this.getActionsCellClassName();
        cell.row = this.matrix.visibleRows[rowIndex];
        return cell;
    };
    QuestionMatrixDropdownRenderedTable.prototype.getActionsCellClassName = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(this.cssClasses.actionsCell).append(this.cssClasses.verticalCell, !this.matrix.isColumnLayoutHorizontal).toString();
    };
    QuestionMatrixDropdownRenderedTable.prototype.getRowActionsCell = function (rowIndex, location) {
        var rowActions = this.getRowActions(rowIndex, location);
        if (!this.isValueEmpty(rowActions)) {
            var cell = new QuestionMatrixDropdownRenderedCell();
            var actionContainer = this.matrix.allowAdaptiveActions ? new _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_4__["AdaptiveActionContainer"]() : new _actions_container__WEBPACK_IMPORTED_MODULE_6__["ActionContainer"]();
            if (!!this.matrix.survey && this.matrix.survey.getCss().actionBar) {
                actionContainer.cssClasses = this.matrix.survey.getCss().actionBar;
            }
            actionContainer.setItems(rowActions);
            var itemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"](actionContainer);
            cell.item = itemValue;
            cell.isActionsCell = true;
            cell.className = this.getActionsCellClassName();
            cell.row = this.matrix.visibleRows[rowIndex];
            return cell;
        }
        return null;
    };
    QuestionMatrixDropdownRenderedTable.prototype.getRowActions = function (rowIndex, location) {
        var actions = this.rowsActions[rowIndex];
        if (!Array.isArray(actions))
            return [];
        return actions.filter(function (action) {
            if (!action.location) {
                action.location = "start";
            }
            return action.location === location;
        });
    };
    QuestionMatrixDropdownRenderedTable.prototype.buildRowActions = function (row) {
        var actions = [];
        this.setDefaultRowActions(row, actions);
        if (!!this.matrix.survey) {
            actions = this.matrix.survey.getUpdatedMatrixRowActions(this.matrix, row, actions);
        }
        return actions;
    };
    Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "showRemoveButtonAsIcon", {
        get: function () {
            return (_settings__WEBPACK_IMPORTED_MODULE_7__["settings"].matrixRenderRemoveAsIcon && this.matrix.survey && this.matrix.survey.css.root === "sd-root-modern");
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDropdownRenderedTable.prototype.setDefaultRowActions = function (row, actions) {
        var matrix = this.matrix;
        if (this.hasRemoveRows && this.canRemoveRow(row)) {
            if (!this.showRemoveButtonAsIcon) {
                actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
                    id: "remove-row",
                    location: "end",
                    enabled: !this.matrix.isInputReadOnly,
                    component: "sv-matrix-remove-button",
                    data: { row: row, question: this.matrix },
                }));
            }
            else {
                actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
                    id: "remove-row",
                    iconName: "icon-delete",
                    component: "sv-action-bar-item",
                    innerCss: new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(this.matrix.cssClasses.button).append(this.matrix.cssClasses.buttonRemove).toString(),
                    location: "end",
                    showTitle: false,
                    title: matrix.removeRowText,
                    enabled: !matrix.isInputReadOnly,
                    data: { row: row, question: matrix },
                    action: function () {
                        matrix.removeRowUI(row);
                    },
                }));
            }
        }
        if (row.hasPanel) {
            actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
                id: "show-detail",
                title: this.matrix.getLocalizationString("editText"),
                showTitle: false,
                location: "start",
                component: "sv-matrix-detail-button",
                data: { row: row, question: this.matrix },
            }));
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.createHorizontalRow = function (row, useAsHeader) {
        var res = this.createRenderedRow(this.cssClasses);
        if (this.allowRowsDragAndDrop) {
            var rowIndex = this.matrix.visibleRows.indexOf(row);
            res.cells.push(this.getRowDragCell(rowIndex));
        }
        this.addRowActionsCell(row, res, "start");
        if (this.matrix.hasRowText) {
            var renderedCell = this.createTextCell(row.locText);
            renderedCell.row = row;
            res.cells.push(renderedCell);
            if (useAsHeader) {
                this.setHeaderCellWidth(null, renderedCell);
            }
            renderedCell.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
                .append(renderedCell.className)
                .append(this.cssClasses.rowTextCell)
                .append(this.cssClasses.detailRowText, row.hasPanel)
                .toString();
        }
        for (var i = 0; i < row.cells.length; i++) {
            var cell = row.cells[i];
            if (!cell.column.hasVisibleCell)
                continue;
            if (cell.column.isShowInMultipleColumns) {
                this.createMutlipleEditCells(res, cell);
            }
            else {
                var renderedCell = this.createEditCell(cell);
                res.cells.push(renderedCell);
                if (useAsHeader) {
                    this.setHeaderCellWidth(cell.column, renderedCell);
                }
            }
        }
        this.addRowActionsCell(row, res, "end");
        return res;
    };
    QuestionMatrixDropdownRenderedTable.prototype.addRowActionsCell = function (row, renderedRow, location) {
        var rowIndex = this.matrix.visibleRows.indexOf(row);
        if (this.hasActionCellInRows(location)) {
            var actions = this.getRowActionsCell(rowIndex, location);
            if (!!actions) {
                renderedRow.cells.push(actions);
            }
            else {
                var cell = new QuestionMatrixDropdownRenderedCell();
                cell.isEmpty = true;
                renderedRow.cells.push(cell);
            }
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.createDetailPanelRow = function (row, renderedRow) {
        var panelFullWidth = this.matrix.isDesignMode;
        var res = this.createRenderedRow(this.cssClasses, true);
        res.row = row;
        var buttonCell = new QuestionMatrixDropdownRenderedCell();
        if (this.matrix.hasRowText) {
            buttonCell.colSpans = 2;
        }
        buttonCell.isEmpty = true;
        if (!panelFullWidth)
            res.cells.push(buttonCell);
        var actionsCell = null;
        if (this.hasActionCellInRows("end")) {
            actionsCell = new QuestionMatrixDropdownRenderedCell();
            actionsCell.isEmpty = true;
        }
        var cell = new QuestionMatrixDropdownRenderedCell();
        cell.panel = row.detailPanel;
        cell.colSpans =
            renderedRow.cells.length -
                (!panelFullWidth ? buttonCell.colSpans : 0) -
                (!!actionsCell ? actionsCell.colSpans : 0);
        cell.className = this.cssClasses.detailPanelCell;
        res.cells.push(cell);
        if (!!actionsCell) {
            res.cells.push(actionsCell);
        }
        if (typeof this.matrix.onCreateDetailPanelRenderedRowCallback === "function") {
            this.matrix.onCreateDetailPanelRenderedRowCallback(res);
        }
        return res;
    };
    QuestionMatrixDropdownRenderedTable.prototype.buildVerticalRows = function () {
        var columns = this.matrix.columns;
        var renderedRows = [];
        for (var i = 0; i < columns.length; i++) {
            var col = columns[i];
            if (col.isVisible && col.hasVisibleCell) {
                if (col.isShowInMultipleColumns) {
                    this.createMutlipleVerticalRows(renderedRows, col, i);
                }
                else {
                    renderedRows.push(this.createVerticalRow(col, i));
                }
            }
        }
        if (this.hasActionCellInRows("end")) {
            renderedRows.push(this.createEndVerticalActionRow());
        }
        return renderedRows;
    };
    QuestionMatrixDropdownRenderedTable.prototype.createMutlipleVerticalRows = function (renderedRows, column, index) {
        var choices = this.getMultipleColumnChoices(column);
        if (!choices)
            return;
        for (var i = 0; i < choices.length; i++) {
            renderedRows.push(this.createVerticalRow(column, index, choices[i], i));
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.createVerticalRow = function (column, index, choice, choiceIndex) {
        if (choice === void 0) { choice = null; }
        if (choiceIndex === void 0) { choiceIndex = -1; }
        var res = this.createRenderedRow(this.cssClasses);
        if (this.matrix.showHeader) {
            var lTitle = !!choice ? choice.locText : column.locTitle;
            var hCell = this.createTextCell(lTitle);
            hCell.column = column;
            hCell.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
                .append(hCell.className)
                .append(this.cssClasses.rowTextCell).toString();
            if (!choice) {
                this.setRequriedToHeaderCell(column, hCell);
            }
            res.cells.push(hCell);
        }
        var rows = this.matrix.visibleRows;
        for (var i = 0; i < rows.length; i++) {
            var rChoice = choice;
            var rChoiceIndex = choiceIndex >= 0 ? choiceIndex : i;
            var cell = rows[i].cells[index];
            var visChoices = !!choice ? cell.question.visibleChoices : undefined;
            if (!!visChoices && rChoiceIndex < visChoices.length) {
                rChoice = visChoices[rChoiceIndex];
            }
            var rCell = this.createEditCell(cell, rChoice);
            rCell.item = rChoice;
            rCell.choiceIndex = rChoiceIndex;
            res.cells.push(rCell);
        }
        if (this.matrix.hasTotal) {
            res.cells.push(this.createEditCell(this.matrix.visibleTotalRow.cells[index]));
        }
        return res;
    };
    QuestionMatrixDropdownRenderedTable.prototype.createEndVerticalActionRow = function () {
        var res = this.createRenderedRow(this.cssClasses);
        if (this.matrix.showHeader) {
            res.cells.push(this.createEmptyCell());
        }
        var rows = this.matrix.visibleRows;
        for (var i = 0; i < rows.length; i++) {
            res.cells.push(this.getRowActionsCell(i, "end"));
        }
        if (this.matrix.hasTotal) {
            res.cells.push(this.createEmptyCell());
        }
        return res;
    };
    QuestionMatrixDropdownRenderedTable.prototype.createMutlipleEditCells = function (rRow, cell, isFooter) {
        if (isFooter === void 0) { isFooter = false; }
        var choices = isFooter
            ? this.getMultipleColumnChoices(cell.column)
            : cell.question.visibleChoices;
        if (!choices)
            return;
        for (var i = 0; i < choices.length; i++) {
            var rCell = this.createEditCell(cell, !isFooter ? choices[i] : undefined);
            if (!isFooter) {
                //rCell.item = choices[i];
                rCell.choiceIndex = i;
            }
            rRow.cells.push(rCell);
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.createEditCell = function (cell, choiceItem) {
        if (choiceItem === void 0) { choiceItem = undefined; }
        var res = new QuestionMatrixDropdownRenderedCell();
        res.cell = cell;
        res.row = cell.row;
        res.question = cell.question;
        res.matrix = this.matrix;
        res.item = choiceItem;
        res.isOtherChoice = !!choiceItem && !!cell.question && cell.question.otherItem === choiceItem;
        res.className = res.calculateFinalClassName(this.cssClasses);
        return res;
    };
    QuestionMatrixDropdownRenderedTable.prototype.createMutlipleColumnsFooter = function (rRow, cell) {
        this.createMutlipleEditCells(rRow, cell, true);
    };
    QuestionMatrixDropdownRenderedTable.prototype.createMutlipleColumnsHeader = function (column) {
        var choices = this.getMultipleColumnChoices(column);
        if (!choices)
            return;
        for (var i = 0; i < choices.length; i++) {
            var cell = this.createTextCell(choices[i].locText);
            this.setHeaderCell(column, cell);
            this.headerRow.cells.push(cell);
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.getMultipleColumnChoices = function (column) {
        var choices = column.templateQuestion.choices;
        if (!!choices && Array.isArray(choices) && choices.length == 0)
            return this.matrix.choices;
        choices = column.templateQuestion.visibleChoices;
        if (!choices || !Array.isArray(choices))
            return null;
        return choices;
    };
    QuestionMatrixDropdownRenderedTable.prototype.createHeaderCell = function (column) {
        var cell = !!column ? this.createTextCell(column.locTitle) : this.createEmptyCell();
        cell.column = column;
        this.setHeaderCell(column, cell);
        var cellType = (!!column && column.cellType !== "default") ? column.cellType : this.matrix.cellType;
        cell.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(this.cssClasses.headerCell)
            .append(this.cssClasses.emptyCell, !!cell.isEmpty)
            .append(this.cssClasses.cell + "--" + cellType)
            .toString();
        return cell;
    };
    QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
        this.setHeaderCellWidth(column, cell);
        this.setRequriedToHeaderCell(column, cell);
    };
    QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellWidth = function (column, cell) {
        cell.minWidth = column != null ? this.matrix.getColumnWidth(column) : this.matrix.getRowTitleWidth();
        cell.width = column != null ? column.width : this.matrix.getRowTitleWidth();
    };
    QuestionMatrixDropdownRenderedTable.prototype.setRequriedToHeaderCell = function (column, cell) {
        if (!!column && column.isRequired && this.matrix.survey) {
            cell.requiredText = this.matrix.survey.requiredText;
        }
    };
    QuestionMatrixDropdownRenderedTable.prototype.createRemoveRowCell = function (row) {
        var res = new QuestionMatrixDropdownRenderedCell();
        res.row = row;
        res.isRemoveRow = this.canRemoveRow(row);
        if (!!this.cssClasses.cell) {
            res.className = this.cssClasses.cell;
        }
        return res;
    };
    QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
        var cell = new QuestionMatrixDropdownRenderedCell();
        cell.locTitle = locTitle;
        if (!!locTitle) {
            locTitle.strChanged();
        }
        if (!!this.cssClasses.cell) {
            cell.className = this.cssClasses.cell;
        }
        return cell;
    };
    QuestionMatrixDropdownRenderedTable.prototype.createEmptyCell = function () {
        var res = this.createTextCell(null);
        res.isEmpty = true;
        return res;
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])({
            onPush: function (_, i, target) {
                target.renderedRowsChangedCallback();
            },
        })
    ], QuestionMatrixDropdownRenderedTable.prototype, "rows", void 0);
    return QuestionMatrixDropdownRenderedTable;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));



/***/ }),

/***/ "./src/question_matrixdynamic.ts":
/*!***************************************!*\
  !*** ./src/question_matrixdynamic.ts ***!
  \***************************************/
/*! exports provided: MatrixDynamicRowModel, QuestionMatrixDynamicModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatrixDynamicRowModel", function() { return MatrixDynamicRowModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMatrixDynamicModel", function() { return QuestionMatrixDynamicModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_matrixdropdownbase */ "./src/question_matrixdropdownbase.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
/* harmony import */ var _dragdrop_matrix_rows__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dragdrop/matrix-rows */ "./src/dragdrop/matrix-rows.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./question_matrixdropdownrendered */ "./src/question_matrixdropdownrendered.ts");
/* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();










var MatrixDynamicRowModel = /** @class */ (function (_super) {
    __extends(MatrixDynamicRowModel, _super);
    function MatrixDynamicRowModel(index, data, value) {
        var _this = _super.call(this, data, value) || this;
        _this.index = index;
        _this.buildCells(value);
        return _this;
    }
    Object.defineProperty(MatrixDynamicRowModel.prototype, "rowName", {
        get: function () {
            return this.id;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MatrixDynamicRowModel.prototype, "shortcutText", {
        get: function () {
            var matrix = this.data;
            var index = matrix.visibleRows.indexOf(this) + 1;
            var questionValue1 = this.cells.length > 1 ? this.cells[1]["questionValue"] : undefined;
            var questionValue0 = this.cells.length > 0 ? this.cells[0]["questionValue"] : undefined;
            return (questionValue1 && questionValue1.value ||
                questionValue0 && questionValue0.value ||
                "" + index);
        },
        enumerable: false,
        configurable: true
    });
    return MatrixDynamicRowModel;
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_2__["MatrixDropdownRowModelBase"]));

/**
  * A class that describes the Dynamic Matrix question type.
  *
  * Dynamic Matrix allows respondents to add and delete matrix rows. You can use the [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), [Text](https://surveyjs.io/form-library/documentation/questiontextmodel), and [Comment](https://surveyjs.io/form-library/documentation/questioncommentmodel) question types as cell editors.
  *
  * [View Demo](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/ (linkStyle))
  */
var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
    __extends(QuestionMatrixDynamicModel, _super);
    function QuestionMatrixDynamicModel(name) {
        var _this = _super.call(this, name) || this;
        _this.rowCounter = 0;
        _this.initialRowCount = 2;
        _this.setRowCountValueFromData = false;
        _this.startDragMatrixRow = function (event, currentTarget) {
            _this.dragDropMatrixRows.startDrag(event, _this.draggedRow, _this, event.target);
        };
        _this.moveRowByIndex = function (fromIndex, toIndex) {
            var value = _this.createNewValue();
            if (!value)
                return;
            var movableRow = value[fromIndex];
            if (!movableRow)
                return;
            value.splice(fromIndex, 1);
            value.splice(toIndex, 0, movableRow);
            _this.value = value;
        };
        _this.createLocalizableString("confirmDeleteText", _this, false, "confirmDelete");
        var locAddRowText = _this.createLocalizableString("addRowText", _this);
        locAddRowText.onGetTextCallback = function (text) {
            return !!text ? text : _this.defaultAddRowText;
        };
        _this.createLocalizableString("removeRowText", _this, false, "removeRow");
        _this.createLocalizableString("emptyRowsText", _this, false, true);
        _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
            _this.updateShowTableAndAddRow();
        });
        _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop"], function () { _this.clearRowsAndResetRenderedTable(); });
        _this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
        return _this;
    }
    QuestionMatrixDynamicModel.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value, isLight);
        this.dragDropMatrixRows = new _dragdrop_matrix_rows__WEBPACK_IMPORTED_MODULE_6__["DragDropMatrixRows"](this.survey);
    };
    QuestionMatrixDynamicModel.prototype.isBanStartDrag = function (pointerDownEvent) {
        var target = pointerDownEvent.target;
        return target.getAttribute("contenteditable") === "true" || target.nodeName === "INPUT";
    };
    QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
        if (!row || !this.allowRowsDragAndDrop)
            return;
        if (this.isBanStartDrag(pointerDownEvent))
            return;
        if (row.isDetailPanelShowing)
            return;
        this.draggedRow = row;
        this.dragOrClickHelper.onPointerDown(pointerDownEvent);
    };
    QuestionMatrixDynamicModel.prototype.getType = function () {
        return "matrixdynamic";
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "isRowsDynamic", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "confirmDelete", {
        /**
         * Specifies whether to display a confirmation dialog when a respondent wants to delete a row.
         * @see confirmDeleteText
         */
        get: function () {
            return this.getPropertyValue("confirmDelete", false);
        },
        set: function (val) {
            this.setPropertyValue("confirmDelete", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "keyName", {
        /**
         * Specifies a key column. Set this property to a column name, and the question will display `keyDuplicationError` if a user tries to enter a duplicate value in this column.
         * @see keyDuplicationError
         */
        get: function () {
            return this.getPropertyValue("keyName", "");
        },
        set: function (val) {
            this.setPropertyValue("keyName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "defaultRowValue", {
        /**
         * If it is not empty, then this value is set to every new row, including rows created initially, unless the defaultValue is not empty
         * @see defaultValue
         * @see defaultValueFromLastRow
         */
        get: function () {
            return this.getPropertyValue("defaultRowValue");
        },
        set: function (val) {
            this.setPropertyValue("defaultRowValue", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "defaultValueFromLastRow", {
        /**
         * Specifies whether default values for a new row/column should be copied from the last row/column.
         *
         * If you also specify `defaultValue`, it will be merged with the copied values.
         * @see defaultValue
         */
        get: function () {
            return this.getPropertyValue("defaultValueFromLastRow", false);
        },
        set: function (val) {
            this.setPropertyValue("defaultValueFromLastRow", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.isDefaultValueEmpty = function () {
        return (_super.prototype.isDefaultValueEmpty.call(this) && this.isValueEmpty(this.defaultRowValue));
    };
    QuestionMatrixDynamicModel.prototype.valueFromData = function (val) {
        if (this.minRowCount < 1)
            return _super.prototype.valueFromData.call(this, val);
        if (!Array.isArray(val))
            val = [];
        for (var i = val.length; i < this.minRowCount; i++)
            val.push({});
        return val;
    };
    QuestionMatrixDynamicModel.prototype.setDefaultValue = function () {
        if (this.isValueEmpty(this.defaultRowValue) ||
            !this.isValueEmpty(this.defaultValue)) {
            _super.prototype.setDefaultValue.call(this);
            return;
        }
        if (!this.isEmpty() || this.rowCount == 0)
            return;
        var newValue = [];
        for (var i = 0; i < this.rowCount; i++) {
            newValue.push(this.defaultRowValue);
        }
        this.value = newValue;
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCount", {
        /**
         * The number of rows in the matrix.
         * @see minRowCount
         * @see maxRowCount
         */
        get: function () {
            return this.rowCountValue;
        },
        set: function (val) {
            if (val < 0 || val > _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].matrixMaximumRowCount)
                return;
            this.setRowCountValueFromData = false;
            var prevValue = this.rowCountValue;
            this.rowCountValue = val;
            if (this.value && this.value.length > val) {
                var qVal = this.value;
                qVal.splice(val);
                this.value = qVal;
            }
            if (this.isUpdateLocked) {
                this.initialRowCount = val;
                return;
            }
            if (this.generatedVisibleRows || prevValue == 0) {
                if (!this.generatedVisibleRows) {
                    this.generatedVisibleRows = [];
                }
                this.generatedVisibleRows.splice(val);
                for (var i = prevValue; i < val; i++) {
                    var newRow = this.createMatrixRow(this.getValueForNewRow());
                    this.generatedVisibleRows.push(newRow);
                    this.onMatrixRowCreated(newRow);
                }
                this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
            }
            this.onRowsChanged();
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.updateProgressInfoByValues = function (res) {
        var val = this.value;
        if (!Array.isArray(val))
            val = [];
        for (var i = 0; i < this.rowCount; i++) {
            var rowValue = i < val.length ? val[i] : {};
            this.updateProgressInfoByRow(res, rowValue);
        }
    };
    QuestionMatrixDynamicModel.prototype.getValueForNewRow = function () {
        var res = null;
        if (!!this.onGetValueForNewRowCallBack) {
            res = this.onGetValueForNewRowCallBack(this);
        }
        return res;
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "allowRowsDragAndDrop", {
        /**
         * Specifies whether users can drag and drop matrix rows to reorder them.
         *
         * Default value: `false`
         */
        get: function () {
            if (this.readOnly)
                return false;
            return this.getPropertyValue("allowRowsDragAndDrop");
        },
        set: function (val) {
            this.setPropertyValue("allowRowsDragAndDrop", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
        get: function () {
            return this.cssClasses.iconDragElement;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.createRenderedTable = function () {
        return new QuestionMatrixDynamicRenderedTable(this);
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCountValue", {
        get: function () {
            return this.getPropertyValue("rowCount");
        },
        set: function (val) {
            this.setPropertyValue("rowCount", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "minRowCount", {
        /**
         * A minimum number of rows in the matrix. Users cannot delete rows if `rowCount` equals `minRowCount`.
         *
         * Default value: 0
         * @see rowCount
         * @see maxRowCount
         * @see allowRemoveRows
         */
        get: function () {
            return this.getPropertyValue("minRowCount");
        },
        set: function (val) {
            if (val < 0)
                val = 0;
            this.setPropertyValue("minRowCount", val);
            if (val > this.maxRowCount)
                this.maxRowCount = val;
            if (this.rowCount < val)
                this.rowCount = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "maxRowCount", {
        /**
         * A maximum number of rows in the matrix. Users cannot add new rows if `rowCount` equals `maxRowCount`.
         *
         * Default value: 1000 (inherited from [`settings.matrixMaximumRowCount`](https://surveyjs.io/form-library/documentation/settings#matrixMaximumRowCount))
         * @see rowCount
         * @see minRowCount
         * @see allowAddRows
         */
        get: function () {
            return this.getPropertyValue("maxRowCount");
        },
        set: function (val) {
            if (val <= 0)
                return;
            if (val > _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].matrixMaximumRowCount)
                val = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].matrixMaximumRowCount;
            if (val == this.maxRowCount)
                return;
            this.setPropertyValue("maxRowCount", val);
            if (val < this.minRowCount)
                this.minRowCount = val;
            if (this.rowCount > val)
                this.rowCount = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "allowAddRows", {
        /**
         * Specifies whether users are allowed to add new rows.
         *
         * Default value: `true`
         * @see canAddRow
         * @see allowRemoveRows
         */
        get: function () {
            return this.getPropertyValue("allowAddRows");
        },
        set: function (val) {
            this.setPropertyValue("allowAddRows", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "allowRemoveRows", {
        /**
         * Specifies whether users are allowed to delete rows.
         *
         * Default value: `true`
         * @see canRemoveRows
         * @see allowAddRows
         */
        get: function () {
            return this.getPropertyValue("allowRemoveRows");
        },
        set: function (val) {
            this.setPropertyValue("allowRemoveRows", val);
            if (!this.isUpdateLocked) {
                this.resetRenderedTable();
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "canAddRow", {
        /**
         * Indicates whether it is possible to add a new row.
         *
         * This property returns `true` when all of the following conditions apply:
         *
         * - Users are allowed to add new rows (`allowAddRows` is `true`).
         * - The question, its parent panel, or survey is not in read-only state.
         * - `rowCount` is less than `maxRowCount`.
         * @see allowAddRows
         * @see isReadOnly
         * @see rowCount
         * @see maxRowCount
         * @see canRemoveRows
         */
        get: function () {
            return (this.allowAddRows && !this.isReadOnly && this.rowCount < this.maxRowCount);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "canRemoveRows", {
        /**
         * Indicates whether it is possible to delete rows.
         *
         * This property returns `true` when all of the following conditions apply:
         *
         * - Users are allowed to delete rows (`allowRemoveRows` is `true`).
         * - The question, its parent panel, or survey is not in read-only state.
         * - `rowCount` exceeds `minRowCount`.
         * @see allowRemoveRows
         * @see isReadOnly
         * @see rowCount
         * @see minRowCount
         * @see canAddRow
         */
        get: function () {
            var res = this.allowRemoveRows &&
                !this.isReadOnly &&
                this.rowCount > this.minRowCount;
            return !!this.canRemoveRowsCallback ? this.canRemoveRowsCallback(res) : res;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.canRemoveRow = function (row) {
        if (!this.survey)
            return true;
        return this.survey.matrixAllowRemoveRow(this, row.index, row);
    };
    /**
     * Creates and add a new row and focus the cell in the first column.
     */
    QuestionMatrixDynamicModel.prototype.addRowUI = function () {
        var oldRowCount = this.rowCount;
        this.addRow();
        if (oldRowCount === this.rowCount)
            return;
        var q = this.getQuestionToFocusOnAddingRow();
        if (!!q) {
            q.focus();
        }
    };
    QuestionMatrixDynamicModel.prototype.getQuestionToFocusOnAddingRow = function () {
        var row = this.visibleRows[this.visibleRows.length - 1];
        for (var i = 0; i < row.cells.length; i++) {
            var q = row.cells[i].question;
            if (!!q && q.isVisible && !q.isReadOnly) {
                return q;
            }
        }
        return null;
    };
    /**
     * Creates and add a new row.
     */
    QuestionMatrixDynamicModel.prototype.addRow = function () {
        var options = { question: this, canAddRow: this.canAddRow };
        if (!!this.survey) {
            this.survey.matrixBeforeRowAdded(options);
        }
        if (!options.canAddRow)
            return;
        this.onStartRowAddingRemoving();
        this.addRowCore();
        this.onEndRowAdding();
        if (this.detailPanelShowOnAdding && this.visibleRows.length > 0) {
            this.visibleRows[this.visibleRows.length - 1].showDetailPanel();
        }
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "detailPanelShowOnAdding", {
        /**
         * Specifies whether to expand the detail section immediately when a respondent adds a new row.
         * @see detailPanelMode
         */
        get: function () {
            return this.getPropertyValue("detailPanelShowOnAdding");
        },
        set: function (val) {
            this.setPropertyValue("detailPanelShowOnAdding", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.hasRowsAsItems = function () {
        return false;
    };
    QuestionMatrixDynamicModel.prototype.unbindValue = function () {
        this.clearGeneratedRows();
        this.clearPropertyValue("value");
        this.rowCountValue = 0;
        _super.prototype.unbindValue.call(this);
    };
    QuestionMatrixDynamicModel.prototype.isValueSurveyElement = function (val) {
        return this.isEditingSurveyElement || _super.prototype.isValueSurveyElement.call(this, val);
    };
    QuestionMatrixDynamicModel.prototype.addRowCore = function () {
        var prevRowCount = this.rowCount;
        this.rowCount = this.rowCount + 1;
        var defaultValue = this.getDefaultRowValue(true);
        var newValue = null;
        if (!this.isValueEmpty(defaultValue)) {
            newValue = this.createNewValue();
            if (newValue.length == this.rowCount) {
                newValue[newValue.length - 1] = defaultValue;
                this.value = newValue;
            }
        }
        if (this.data) {
            this.runCellsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
            if (this.isValueEmpty(defaultValue)) {
                var row = this.visibleRows[this.rowCount - 1];
                if (!this.isValueEmpty(row.value)) {
                    if (!newValue) {
                        newValue = this.createNewValue();
                    }
                    if (!this.isValueSurveyElement(newValue) &&
                        !this.isTwoValueEquals(newValue[newValue.length - 1], row.value)) {
                        newValue[newValue.length - 1] = row.value;
                        this.value = newValue;
                    }
                }
            }
        }
        if (this.survey) {
            if (prevRowCount + 1 == this.rowCount) {
                this.survey.matrixRowAdded(this, this.visibleRows[this.visibleRows.length - 1]);
                this.onRowsChanged();
            }
        }
    };
    QuestionMatrixDynamicModel.prototype.getDefaultRowValue = function (isRowAdded) {
        var res = null;
        for (var i = 0; i < this.columns.length; i++) {
            var q = this.columns[i].templateQuestion;
            if (!!q && !this.isValueEmpty(q.getDefaultValue())) {
                res = res || {};
                res[this.columns[i].name] = q.getDefaultValue();
            }
        }
        if (!this.isValueEmpty(this.defaultRowValue)) {
            for (var key in this.defaultRowValue) {
                res = res || {};
                res[key] = this.defaultRowValue[key];
            }
        }
        if (isRowAdded && this.defaultValueFromLastRow) {
            var val = this.value;
            if (!!val && Array.isArray(val) && val.length >= this.rowCount - 1) {
                var rowValue = val[this.rowCount - 2];
                for (var key in rowValue) {
                    res = res || {};
                    res[key] = rowValue[key];
                }
            }
        }
        return res;
    };
    /**
     * Removes a row by it's index. If confirmDelete is true, show a confirmation dialog
     * @param index a row index, from 0 to rowCount - 1
     * @see removeRow
     * @see confirmDelete
     */
    QuestionMatrixDynamicModel.prototype.removeRowUI = function (value) {
        if (!!value && !!value.rowName) {
            var index = this.visibleRows.indexOf(value);
            if (index < 0)
                return;
            value = index;
        }
        if (!this.isRequireConfirmOnRowDelete(value) ||
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["confirmAction"])(this.confirmDeleteText)) {
            this.removeRow(value);
        }
    };
    QuestionMatrixDynamicModel.prototype.isRequireConfirmOnRowDelete = function (index) {
        if (!this.confirmDelete)
            return false;
        if (index < 0 || index >= this.rowCount)
            return false;
        var value = this.createNewValue();
        if (this.isValueEmpty(value) || !Array.isArray(value))
            return false;
        if (index >= value.length)
            return false;
        return !this.isValueEmpty(value[index]);
    };
    /**
     * Removes a row by it's index.
     * @param index a row index, from 0 to rowCount - 1
     */
    QuestionMatrixDynamicModel.prototype.removeRow = function (index) {
        if (!this.canRemoveRows)
            return;
        if (index < 0 || index >= this.rowCount)
            return;
        var row = !!this.visibleRows && index < this.visibleRows.length
            ? this.visibleRows[index]
            : null;
        if (!!row &&
            !!this.survey &&
            !this.survey.matrixRowRemoving(this, index, row))
            return;
        this.onStartRowAddingRemoving();
        this.removeRowCore(index);
        this.onEndRowRemoving(row);
    };
    QuestionMatrixDynamicModel.prototype.removeRowCore = function (index) {
        var row = this.generatedVisibleRows
            ? this.generatedVisibleRows[index]
            : null;
        if (this.generatedVisibleRows && index < this.generatedVisibleRows.length) {
            this.generatedVisibleRows.splice(index, 1);
        }
        this.rowCountValue--;
        if (this.value) {
            var val = [];
            if (Array.isArray(this.value) && index < this.value.length) {
                val = this.createValueCopy();
            }
            else {
                val = this.createNewValue();
            }
            val.splice(index, 1);
            val = this.deleteRowValue(val, null);
            this.isRowChanging = true;
            this.value = val;
            this.isRowChanging = false;
        }
        this.onRowsChanged();
        if (this.survey) {
            this.survey.matrixRowRemoved(this, index, row);
        }
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "confirmDeleteText", {
        /**
         * A message displayed in a confirmation dialog that appears when a respondent wants to delete a row.
         * @see confirmDelete
         */
        get: function () {
            return this.getLocalizableStringText("confirmDeleteText");
        },
        set: function (val) {
            this.setLocalizableStringText("confirmDeleteText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "locConfirmDeleteText", {
        get: function () {
            return this.getLocalizableString("confirmDeleteText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "addRowText", {
        /**
         * A caption for the Add Row button.
         * @see addRowLocation
         */
        get: function () {
            return this.getLocalizableStringText("addRowText", this.defaultAddRowText);
        },
        set: function (val) {
            this.setLocalizableStringText("addRowText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "locAddRowText", {
        get: function () {
            return this.getLocalizableString("addRowText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "defaultAddRowText", {
        get: function () {
            return this.getLocalizationString(this.isColumnLayoutHorizontal ? "addRow" : "addColumn");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "addRowLocation", {
        /**
         * Specifies the location of the Add Row button.
         *
         * Possible values:
         *
         * - `"top"` - Displays the Add Row button at the top of the matrix.
         * - `"bottom"` - Displays the Add Row button at the bottom of the matrix.
         * - `"topBottom"` - Displays the Add Row button at the top and bottom of the matrix.
         *
         * Default value: `"top"` if `columnLayout` is `vertical`; `"bottom"` if `columnLayout` is `"horizontal"` or the matrix is in compact mode.
         * @see columnLayout
         * @see addRowText
         */
        get: function () {
            return this.getPropertyValue("addRowLocation");
        },
        set: function (val) {
            this.setPropertyValue("addRowLocation", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.getAddRowLocation = function () {
        return this.addRowLocation;
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "hideColumnsIfEmpty", {
        /**
         * Specifies whether to hide columns when the matrix does not contain any rows. If you enable this property, the matrix displays the `emptyRowsText` message and the Add Row button.
         *
         * Default value: `false`
         * @see emptyRowsText
         */
        get: function () {
            return this.getPropertyValue("hideColumnsIfEmpty");
        },
        set: function (val) {
            this.setPropertyValue("hideColumnsIfEmpty", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.getShowColumnsIfEmpty = function () {
        return this.hideColumnsIfEmpty;
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "removeRowText", {
        /**
         * Use this property to change the default value of remove row button text.
         */
        get: function () {
            return this.getLocalizableStringText("removeRowText");
        },
        set: function (val) {
            this.setLocalizableStringText("removeRowText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "locRemoveRowText", {
        get: function () {
            return this.getLocalizableString("removeRowText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "emptyRowsText", {
        /**
         * A message displayed when the matrix does not contain any rows. Applies only if `hideColumnsIfEmpty` is enabled.
         * @see hideColumnsIfEmpty
         */
        get: function () {
            return this.getLocalizableStringText("emptyRowsText");
        },
        set: function (val) {
            this.setLocalizableStringText("emptyRowsText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "locEmptyRowsText", {
        get: function () {
            return this.getLocalizableString("emptyRowsText");
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        if (!value || !Array.isArray(value))
            return value;
        var values = this.getUnbindValue(value);
        var rows = this.visibleRows;
        for (var i = 0; i < rows.length && i < values.length; i++) {
            var val = values[i];
            if (!val)
                continue;
            values[i] = this.getRowDisplayValue(keysAsText, rows[i], val);
        }
        return values;
    };
    QuestionMatrixDynamicModel.prototype.getConditionObjectRowName = function (index) {
        return "[" + index.toString() + "]";
    };
    QuestionMatrixDynamicModel.prototype.getConditionObjectsRowIndeces = function () {
        var res = [];
        var rowCount = Math.max(this.rowCount, 1);
        for (var i = 0; i < Math.min(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].matrixMaxRowCountInCondition, rowCount); i++) {
            res.push(i);
        }
        return res;
    };
    QuestionMatrixDynamicModel.prototype.supportGoNextPageAutomatic = function () {
        return false;
    };
    Object.defineProperty(QuestionMatrixDynamicModel.prototype, "hasRowText", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
        _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
        if (!isOnValueChanged && this.hasErrorInMinRows()) {
            errors.push(new _error__WEBPACK_IMPORTED_MODULE_3__["MinRowCountError"](this.minRowCount, this));
        }
    };
    QuestionMatrixDynamicModel.prototype.hasErrorInMinRows = function () {
        if (this.minRowCount <= 0 || !this.isRequired || !this.generatedVisibleRows)
            return false;
        var setRowCount = 0;
        for (var rowIndex = 0; rowIndex < this.generatedVisibleRows.length; rowIndex++) {
            var row = this.generatedVisibleRows[rowIndex];
            if (!row.isEmpty)
                setRowCount++;
        }
        return setRowCount < this.minRowCount;
    };
    QuestionMatrixDynamicModel.prototype.getUniqueColumns = function () {
        var res = _super.prototype.getUniqueColumns.call(this);
        if (!!this.keyName) {
            var column = this.getColumnByName(this.keyName);
            if (!!column && res.indexOf(column) < 0) {
                res.push(column);
            }
        }
        return res;
    };
    QuestionMatrixDynamicModel.prototype.generateRows = function () {
        var result = new Array();
        if (this.rowCount === 0)
            return result;
        var val = this.createNewValue();
        for (var i = 0; i < this.rowCount; i++) {
            result.push(this.createMatrixRow(this.getRowValueByIndex(val, i)));
        }
        if (!this.isValueEmpty(this.getDefaultRowValue(false))) {
            this.value = val;
        }
        return result;
    };
    QuestionMatrixDynamicModel.prototype.createMatrixRow = function (value) {
        return new MatrixDynamicRowModel(this.rowCounter++, this, value);
    };
    QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
        if (!val || !Array.isArray(val))
            return;
        var newRowCount = val.length;
        if (newRowCount == this.rowCount)
            return;
        if (!this.setRowCountValueFromData && newRowCount < this.initialRowCount)
            return;
        this.setRowCountValueFromData = true;
        this.rowCountValue = newRowCount;
        if (this.generatedVisibleRows) {
            this.clearGeneratedRows();
            this.generatedVisibleRows = this.visibleRows;
            this.onRowsChanged();
        }
    };
    QuestionMatrixDynamicModel.prototype.createNewValue = function () {
        var result = this.createValueCopy();
        if (!result || !Array.isArray(result))
            result = [];
        if (result.length > this.rowCount)
            result.splice(this.rowCount);
        var rowValue = this.getDefaultRowValue(false);
        rowValue = rowValue || {};
        for (var i = result.length; i < this.rowCount; i++) {
            result.push(this.getUnbindValue(rowValue));
        }
        return result;
    };
    QuestionMatrixDynamicModel.prototype.deleteRowValue = function (newValue, row) {
        var isEmpty = true;
        for (var i = 0; i < newValue.length; i++) {
            if (this.isObject(newValue[i]) && Object.keys(newValue[i]).length > 0) {
                isEmpty = false;
                break;
            }
        }
        return isEmpty ? null : newValue;
    };
    QuestionMatrixDynamicModel.prototype.getRowValueByIndex = function (questionValue, index) {
        return Array.isArray(questionValue) &&
            index >= 0 &&
            index < questionValue.length
            ? questionValue[index]
            : null;
    };
    QuestionMatrixDynamicModel.prototype.getRowValueCore = function (row, questionValue, create) {
        if (create === void 0) { create = false; }
        if (!this.generatedVisibleRows)
            return {};
        var res = this.getRowValueByIndex(questionValue, this.generatedVisibleRows.indexOf(row));
        if (!res && create)
            res = {};
        return res;
    };
    QuestionMatrixDynamicModel.prototype.getAddRowButtonCss = function (isEmptySection) {
        if (isEmptySection === void 0) { isEmptySection = false; }
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]()
            .append(this.cssClasses.button)
            .append(this.cssClasses.buttonAdd)
            .append(this.cssClasses.emptyRowsButton, isEmptySection)
            .toString();
    };
    QuestionMatrixDynamicModel.prototype.getRemoveRowButtonCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]()
            .append(this.cssClasses.button)
            .append(this.cssClasses.buttonRemove)
            .toString();
    };
    QuestionMatrixDynamicModel.prototype.getRootCss = function () {
        var _a;
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.empty, !((_a = this.renderedTable) === null || _a === void 0 ? void 0 : _a.showTable)).toString();
    };
    return QuestionMatrixDynamicModel;
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_2__["QuestionMatrixDropdownModelBase"]));

var QuestionMatrixDynamicRenderedTable = /** @class */ (function (_super) {
    __extends(QuestionMatrixDynamicRenderedTable, _super);
    function QuestionMatrixDynamicRenderedTable() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    QuestionMatrixDynamicRenderedTable.prototype.setDefaultRowActions = function (row, actions) {
        _super.prototype.setDefaultRowActions.call(this, row, actions);
    };
    return QuestionMatrixDynamicRenderedTable;
}(_question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_8__["QuestionMatrixDropdownRenderedTable"]));
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdynamic", [
    { name: "rowsVisibleIf:condition", visible: false },
    { name: "allowAddRows:boolean", default: true },
    { name: "allowRemoveRows:boolean", default: true },
    { name: "rowCount:number", default: 2, minValue: 0, isBindable: true },
    { name: "minRowCount:number", default: 0, minValue: 0 },
    {
        name: "maxRowCount:number",
        default: _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].matrixMaximumRowCount,
    },
    { name: "keyName" },
    "defaultRowValue:rowvalue",
    "defaultValueFromLastRow:boolean",
    { name: "confirmDelete:boolean" },
    {
        name: "confirmDeleteText",
        dependsOn: "confirmDelete",
        visibleIf: function (obj) {
            return !obj || obj.confirmDelete;
        },
        serializationProperty: "locConfirmDeleteText",
    },
    {
        name: "addRowLocation",
        default: "default",
        choices: ["default", "top", "bottom", "topBottom"],
    },
    { name: "addRowText", serializationProperty: "locAddRowText" },
    { name: "removeRowText", serializationProperty: "locRemoveRowText" },
    "hideColumnsIfEmpty:boolean",
    {
        name: "emptyRowsText:text",
        serializationProperty: "locEmptyRowsText",
        dependsOn: "hideColumnsIfEmpty",
        visibleIf: function (obj) {
            return !obj || obj.hideColumnsIfEmpty;
        },
    },
    {
        name: "detailPanelShowOnAdding:boolean",
        dependsOn: "detailPanelMode",
        visibleIf: function (obj) {
            return obj.detailPanelMode !== "none";
        },
    },
    "allowRowsDragAndDrop:switch"
], function () {
    return new QuestionMatrixDynamicModel("");
}, "matrixdropdownbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("matrixdynamic", function (name) {
    var q = new QuestionMatrixDynamicModel(name);
    q.choices = [1, 2, 3, 4, 5];
    _question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_2__["QuestionMatrixDropdownModelBase"].addDefaultColumns(q);
    return q;
});


/***/ }),

/***/ "./src/question_multipletext.ts":
/*!**************************************!*\
  !*** ./src/question_multipletext.ts ***!
  \**************************************/
/*! exports provided: MultipleTextItemModel, QuestionMultipleTextModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultipleTextItemModel", function() { return MultipleTextItemModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionMultipleTextModel", function() { return QuestionMultipleTextModel; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _question_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./question_text */ "./src/question_text.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();









var MultipleTextItemModel = /** @class */ (function (_super) {
    __extends(MultipleTextItemModel, _super);
    function MultipleTextItemModel(name, title) {
        if (name === void 0) { name = null; }
        if (title === void 0) { title = null; }
        var _this = _super.call(this) || this;
        _this.editorValue = _this.createEditor(name);
        _this.editor.questionTitleTemplateCallback = function () {
            return "";
        };
        _this.editor.titleLocation = "left";
        if (title) {
            _this.title = title;
        }
        return _this;
    }
    MultipleTextItemModel.prototype.getType = function () {
        return "multipletextitem";
    };
    Object.defineProperty(MultipleTextItemModel.prototype, "id", {
        get: function () {
            return this.editor.id;
        },
        enumerable: false,
        configurable: true
    });
    MultipleTextItemModel.prototype.getOriginalObj = function () {
        return this.editor;
    };
    Object.defineProperty(MultipleTextItemModel.prototype, "name", {
        /**
         * The item name.
         */
        get: function () {
            return this.editor.name;
        },
        set: function (val) {
            this.editor.name = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "question", {
        get: function () {
            return this.data;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "editor", {
        get: function () {
            return this.editorValue;
        },
        enumerable: false,
        configurable: true
    });
    MultipleTextItemModel.prototype.createEditor = function (name) {
        return new _question_text__WEBPACK_IMPORTED_MODULE_3__["QuestionTextModel"](name);
    };
    MultipleTextItemModel.prototype.addUsedLocales = function (locales) {
        _super.prototype.addUsedLocales.call(this, locales);
        this.editor.addUsedLocales(locales);
    };
    MultipleTextItemModel.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        this.editor.localeChanged();
    };
    MultipleTextItemModel.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        this.editor.locStrsChanged();
    };
    MultipleTextItemModel.prototype.setData = function (data) {
        this.data = data;
        if (!!data) {
            this.editor.defaultValue = data.getItemDefaultValue(this.name);
            this.editor.setSurveyImpl(this);
            this.editor.parent = data;
        }
    };
    Object.defineProperty(MultipleTextItemModel.prototype, "isRequired", {
        /**
         * Set this property to true, to make the item a required. If a user doesn't fill the item then a validation error will be generated.
         */
        get: function () {
            return this.editor.isRequired;
        },
        set: function (val) {
            this.editor.isRequired = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "inputType", {
        /**
         * Use this property to change the default input type.
         */
        get: function () {
            return this.editor.inputType;
        },
        set: function (val) {
            this.editor.inputType = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "title", {
        /**
         * Item title. If it is empty, the item name is rendered as title. This property supports markdown.
         * @see name
         */
        get: function () {
            return this.editor.title;
        },
        set: function (val) {
            this.editor.title = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "locTitle", {
        get: function () {
            return this.editor.locTitle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "fullTitle", {
        get: function () {
            return this.editor.fullTitle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "maxLength", {
        /**
         * The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used.
         * If it is 0, then the value is unlimited
         * @see SurveyModel.maxTextLength
         */
        get: function () {
            return this.editor.maxLength;
        },
        set: function (val) {
            this.editor.maxLength = val;
        },
        enumerable: false,
        configurable: true
    });
    MultipleTextItemModel.prototype.getMaxLength = function () {
        var survey = this.getSurvey();
        return _helpers__WEBPACK_IMPORTED_MODULE_6__["Helpers"].getMaxLength(this.maxLength, survey ? survey.maxTextLength : -1);
    };
    Object.defineProperty(MultipleTextItemModel.prototype, "placeholder", {
        /**
         * The input place holder.
         */
        get: function () {
            return this.editor.placeholder;
        },
        set: function (val) {
            this.editor.placeholder = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "locPlaceholder", {
        get: function () {
            return this.editor.locPlaceholder;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "placeHolder", {
        get: function () {
            return this.placeholder;
        },
        set: function (val) {
            this.placeholder = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "locPlaceHolder", {
        get: function () {
            return this.locPlaceholder;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "requiredErrorText", {
        /**
         * The custom text that will be shown on required error. Use this property, if you do not want to show the default text.
         */
        get: function () {
            return this.editor.requiredErrorText;
        },
        set: function (val) {
            this.editor.requiredErrorText = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "locRequiredErrorText", {
        get: function () {
            return this.editor.locRequiredErrorText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "size", {
        /**
         * The input size.
         */
        get: function () {
            return this.editor.size;
        },
        set: function (val) {
            this.editor.size = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleTextItemModel.prototype, "validators", {
        /**
         * The list of question validators.
         */
        get: function () {
            return this.editor.validators;
        },
        set: function (val) {
            this.editor.validators = val;
        },
        enumerable: false,
        configurable: true
    });
    MultipleTextItemModel.prototype.getValidators = function () {
        return this.validators;
    };
    Object.defineProperty(MultipleTextItemModel.prototype, "value", {
        /**
         * The item value.
         */
        get: function () {
            return this.data ? this.data.getMultipleTextValue(this.name) : null;
        },
        set: function (value) {
            if (this.data != null) {
                this.data.setMultipleTextValue(this.name, value);
            }
        },
        enumerable: false,
        configurable: true
    });
    MultipleTextItemModel.prototype.isEmpty = function () {
        return this.editor.isEmpty();
    };
    MultipleTextItemModel.prototype.onValueChanged = function (newValue) {
        if (this.valueChangedCallback)
            this.valueChangedCallback(newValue);
    };
    //ISurveyImpl
    MultipleTextItemModel.prototype.getSurveyData = function () {
        return this;
    };
    MultipleTextItemModel.prototype.getSurvey = function () {
        return this.data ? this.data.getSurvey() : null;
    };
    MultipleTextItemModel.prototype.getTextProcessor = function () {
        return this.data ? this.data.getTextProcessor() : null;
    };
    //ISurveyData
    MultipleTextItemModel.prototype.getValue = function (name) {
        if (!this.data)
            return null;
        return this.data.getMultipleTextValue(name);
    };
    MultipleTextItemModel.prototype.setValue = function (name, value) {
        if (this.data) {
            this.data.setMultipleTextValue(name, value);
        }
    };
    MultipleTextItemModel.prototype.getVariable = function (name) {
        return undefined;
    };
    MultipleTextItemModel.prototype.setVariable = function (name, newValue) { };
    MultipleTextItemModel.prototype.getComment = function (name) {
        return null;
    };
    MultipleTextItemModel.prototype.setComment = function (name, newValue) { };
    MultipleTextItemModel.prototype.getAllValues = function () {
        if (this.data)
            return this.data.getAllValues();
        return this.value;
    };
    MultipleTextItemModel.prototype.getFilteredValues = function () {
        return this.getAllValues();
    };
    MultipleTextItemModel.prototype.getFilteredProperties = function () {
        return { survey: this.getSurvey() };
    };
    //IValidatorOwner
    MultipleTextItemModel.prototype.getValidatorTitle = function () {
        return this.title;
    };
    Object.defineProperty(MultipleTextItemModel.prototype, "validatedValue", {
        get: function () {
            return this.value;
        },
        set: function (val) {
            this.value = val;
        },
        enumerable: false,
        configurable: true
    });
    MultipleTextItemModel.prototype.getDataFilteredValues = function () {
        return this.getFilteredValues();
    };
    MultipleTextItemModel.prototype.getDataFilteredProperties = function () {
        return this.getFilteredProperties();
    };
    return MultipleTextItemModel;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));

/**
 * A class that describes the Multiple Text question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-multipletext/ (linkStyle))
 */
var QuestionMultipleTextModel = /** @class */ (function (_super) {
    __extends(QuestionMultipleTextModel, _super);
    function QuestionMultipleTextModel(name) {
        var _this = _super.call(this, name) || this;
        _this.isMultipleItemValueChanging = false;
        _this.createNewArray("items", function (item) {
            item.setData(_this);
        });
        _this.registerPropertyChangedHandlers(["items", "colCount"], function () {
            _this.fireCallback(_this.colCountChangedCallback);
        });
        _this.registerPropertyChangedHandlers(["itemSize"], function () { _this.updateItemsSize(); });
        return _this;
    }
    QuestionMultipleTextModel.addDefaultItems = function (question) {
        var names = _questionfactory__WEBPACK_IMPORTED_MODULE_5__["QuestionFactory"].DefaultMutlipleTextItems;
        for (var i = 0; i < names.length; i++)
            question.addItem(names[i]);
    };
    QuestionMultipleTextModel.prototype.getType = function () {
        return "multipletext";
    };
    QuestionMultipleTextModel.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value, isLight);
        for (var i = 0; i < this.items.length; i++) {
            this.items[i].setData(this);
        }
    };
    Object.defineProperty(QuestionMultipleTextModel.prototype, "isAllowTitleLeft", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMultipleTextModel.prototype, "hasSingleInput", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMultipleTextModel.prototype, "id", {
        get: function () {
            return this.getPropertyValue("id");
        },
        set: function (val) {
            var _a;
            (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(function (item, index) { return item.editor.id = val + "_" + index; });
            this.setPropertyValue("id", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMultipleTextModel.prototype.onSurveyLoad = function () {
        this.editorsOnSurveyLoad();
        _super.prototype.onSurveyLoad.call(this);
        this.fireCallback(this.colCountChangedCallback);
    };
    QuestionMultipleTextModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
        if (updateIsAnswered === void 0) { updateIsAnswered = true; }
        _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
        this.performForEveryEditor(function (item) {
            item.editor.updateValueFromSurvey(item.value);
        });
        this.updateIsAnswered();
    };
    QuestionMultipleTextModel.prototype.onSurveyValueChanged = function (newValue) {
        _super.prototype.onSurveyValueChanged.call(this, newValue);
        this.performForEveryEditor(function (item) {
            item.editor.onSurveyValueChanged(item.value);
        });
    };
    QuestionMultipleTextModel.prototype.updateItemsSize = function () {
        this.performForEveryEditor(function (item) {
            item.editor.updateInputSize();
        });
    };
    QuestionMultipleTextModel.prototype.editorsOnSurveyLoad = function () {
        this.performForEveryEditor(function (item) {
            item.editor.onSurveyLoad();
        });
    };
    QuestionMultipleTextModel.prototype.performForEveryEditor = function (func) {
        for (var i = 0; i < this.items.length; i++) {
            var item = this.items[i];
            if (item.editor) {
                func(item);
            }
        }
    };
    Object.defineProperty(QuestionMultipleTextModel.prototype, "items", {
        /**
         * An array of `MultipleTextItemModel` objects that represent input items.
         * @see addItem
         */
        get: function () {
            return this.getPropertyValue("items");
        },
        set: function (val) {
            this.setPropertyValue("items", val);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Adds a new input item.
     * @param name An item name
     * @param title (Optional) An item title
     * @see items
     */
    QuestionMultipleTextModel.prototype.addItem = function (name, title) {
        if (title === void 0) { title = null; }
        var item = this.createTextItem(name, title);
        this.items.push(item);
        return item;
    };
    QuestionMultipleTextModel.prototype.getItemByName = function (name) {
        for (var i = 0; i < this.items.length; i++) {
            if (this.items[i].name == name)
                return this.items[i];
        }
        return null;
    };
    QuestionMultipleTextModel.prototype.addConditionObjectsByContext = function (objects, context) {
        for (var i = 0; i < this.items.length; i++) {
            var item = this.items[i];
            objects.push({
                name: this.getValueName() + "." + item.name,
                text: this.processedTitle + "." + item.fullTitle,
                question: this,
            });
        }
    };
    QuestionMultipleTextModel.prototype.getConditionJson = function (operator, path) {
        if (operator === void 0) { operator = null; }
        if (path === void 0) { path = null; }
        if (!path)
            return _super.prototype.getConditionJson.call(this);
        var item = this.getItemByName(path);
        if (!item)
            return null;
        var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_4__["JsonObject"]().toJsonObject(item);
        json["type"] = "text";
        return json;
    };
    QuestionMultipleTextModel.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        for (var i = 0; i < this.items.length; i++) {
            this.items[i].locStrsChanged();
        }
    };
    QuestionMultipleTextModel.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        for (var i = 0; i < this.items.length; i++) {
            this.items[i].localeChanged();
        }
    };
    QuestionMultipleTextModel.prototype.supportGoNextPageAutomatic = function () {
        for (var i = 0; i < this.items.length; i++) {
            if (this.items[i].isEmpty())
                return false;
        }
        return true;
    };
    Object.defineProperty(QuestionMultipleTextModel.prototype, "colCount", {
        /**
         * The number of columns used to arrange input items. Accepts the following values: 1, 2, 3, 4, 5.
         *
         * Default value: 1
         */
        get: function () {
            return this.getPropertyValue("colCount");
        },
        set: function (val) {
            if (val < 1 || val > 5)
                return;
            this.setPropertyValue("colCount", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionMultipleTextModel.prototype, "itemSize", {
        /**
         * A value passed on to the [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size) attribute of the underlying `<input>` elements.
         */
        get: function () {
            return this.getPropertyValue("itemSize");
        },
        set: function (val) {
            this.setPropertyValue("itemSize", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionMultipleTextModel.prototype.getRows = function () {
        var colCount = this.colCount;
        var items = this.items;
        var rows = [];
        var index = 0;
        for (var i = 0; i < items.length; i++) {
            if (index == 0) {
                rows.push([]);
            }
            rows[rows.length - 1].push(items[i]);
            index++;
            if (index >= colCount) {
                index = 0;
            }
        }
        return rows;
    };
    QuestionMultipleTextModel.prototype.onValueChanged = function () {
        _super.prototype.onValueChanged.call(this);
        this.onItemValueChanged();
    };
    QuestionMultipleTextModel.prototype.createTextItem = function (name, title) {
        return new MultipleTextItemModel(name, title);
    };
    QuestionMultipleTextModel.prototype.onItemValueChanged = function () {
        if (this.isMultipleItemValueChanging)
            return;
        for (var i = 0; i < this.items.length; i++) {
            var itemValue = null;
            if (this.value && this.items[i].name in this.value) {
                itemValue = this.value[this.items[i].name];
            }
            this.items[i].onValueChanged(itemValue);
        }
    };
    QuestionMultipleTextModel.prototype.getIsRunningValidators = function () {
        if (_super.prototype.getIsRunningValidators.call(this))
            return true;
        for (var i = 0; i < this.items.length; i++) {
            if (this.items[i].editor.isRunningValidators)
                return true;
        }
        return false;
    };
    QuestionMultipleTextModel.prototype.hasErrors = function (fireCallback, rec) {
        var _this = this;
        if (fireCallback === void 0) { fireCallback = true; }
        if (rec === void 0) { rec = null; }
        var res = false;
        for (var i = 0; i < this.items.length; i++) {
            this.items[i].editor.onCompletedAsyncValidators = function (hasErrors) {
                _this.raiseOnCompletedAsyncValidators();
            };
            if (!!rec &&
                rec.isOnValueChanged === true &&
                this.items[i].editor.isEmpty())
                continue;
            res = this.items[i].editor.hasErrors(fireCallback, rec) || res;
        }
        return _super.prototype.hasErrors.call(this, fireCallback) || res;
    };
    QuestionMultipleTextModel.prototype.getAllErrors = function () {
        var result = _super.prototype.getAllErrors.call(this);
        for (var i = 0; i < this.items.length; i++) {
            var errors = this.items[i].editor.getAllErrors();
            if (errors && errors.length > 0) {
                result = result.concat(errors);
            }
        }
        return result;
    };
    QuestionMultipleTextModel.prototype.clearErrors = function () {
        _super.prototype.clearErrors.call(this);
        for (var i = 0; i < this.items.length; i++) {
            this.items[i].editor.clearErrors();
        }
    };
    QuestionMultipleTextModel.prototype.getContainsErrors = function () {
        var res = _super.prototype.getContainsErrors.call(this);
        if (res)
            return res;
        var items = this.items;
        for (var i = 0; i < items.length; i++) {
            if (items[i].editor.containsErrors)
                return true;
        }
        return false;
    };
    QuestionMultipleTextModel.prototype.getIsAnswered = function () {
        if (!_super.prototype.getIsAnswered.call(this))
            return false;
        for (var i = 0; i < this.items.length; i++) {
            var editor = this.items[i].editor;
            if (editor.isVisible && !editor.isAnswered)
                return false;
        }
        return true;
    };
    QuestionMultipleTextModel.prototype.getProgressInfo = function () {
        var elements = [];
        for (var i = 0; i < this.items.length; i++) {
            elements.push(this.items[i].editor);
        }
        return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(elements, this.isRequired);
    };
    QuestionMultipleTextModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        if (!value)
            return value;
        var res = {};
        for (var i = 0; i < this.items.length; i++) {
            var item = this.items[i];
            var val = value[item.name];
            if (_helpers__WEBPACK_IMPORTED_MODULE_6__["Helpers"].isValueEmpty(val))
                continue;
            var itemName = item.name;
            if (keysAsText && !!item.title) {
                itemName = item.title;
            }
            res[itemName] = item.editor.getDisplayValue(keysAsText, val);
        }
        return res;
    };
    //IMultipleTextData
    QuestionMultipleTextModel.prototype.getMultipleTextValue = function (name) {
        if (!this.value)
            return null;
        return this.value[name];
    };
    QuestionMultipleTextModel.prototype.setMultipleTextValue = function (name, value) {
        this.isMultipleItemValueChanging = true;
        if (this.isValueEmpty(value)) {
            value = undefined;
        }
        var newValue = this.value;
        if (!newValue) {
            newValue = {};
        }
        newValue[name] = value;
        this.setNewValue(newValue);
        this.isMultipleItemValueChanging = false;
    };
    QuestionMultipleTextModel.prototype.getItemDefaultValue = function (name) {
        return !!this.defaultValue ? this.defaultValue[name] : null;
    };
    QuestionMultipleTextModel.prototype.getTextProcessor = function () {
        return this.textProcessor;
    };
    QuestionMultipleTextModel.prototype.getAllValues = function () {
        return this.data ? this.data.getAllValues() : null;
    };
    QuestionMultipleTextModel.prototype.getIsRequiredText = function () {
        return this.survey ? this.survey.requiredText : "";
    };
    //IPanel
    QuestionMultipleTextModel.prototype.addElement = function (element, index) { };
    QuestionMultipleTextModel.prototype.removeElement = function (element) {
        return false;
    };
    QuestionMultipleTextModel.prototype.getQuestionTitleLocation = function () {
        return "left";
    };
    QuestionMultipleTextModel.prototype.getQuestionStartIndex = function () {
        return this.getStartIndex();
    };
    QuestionMultipleTextModel.prototype.getChildrenLayoutType = function () {
        return "row";
    };
    QuestionMultipleTextModel.prototype.elementWidthChanged = function (el) { };
    Object.defineProperty(QuestionMultipleTextModel.prototype, "elements", {
        get: function () {
            return [];
        },
        enumerable: false,
        configurable: true
    });
    QuestionMultipleTextModel.prototype.indexOf = function (el) {
        return -1;
    };
    QuestionMultipleTextModel.prototype.ensureRowsVisibility = function () {
        // do nothing
    };
    QuestionMultipleTextModel.prototype.getItemLabelCss = function (item) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]().append(this.cssClasses.itemLabel).append(this.cssClasses.itemLabelOnError, item.editor.errors.length > 0).toString();
    };
    QuestionMultipleTextModel.prototype.getItemCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]().append(this.cssClasses.item).toString();
    };
    QuestionMultipleTextModel.prototype.getItemTitleCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]().append(this.cssClasses.itemTitle).toString();
    };
    QuestionMultipleTextModel.prototype.getIsTooltipErrorInsideSupported = function () {
        return true;
    };
    return QuestionMultipleTextModel;
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextitem", [
    "name",
    "isRequired:boolean",
    { name: "placeholder", alternativeName: "placeHolder", serializationProperty: "locPlaceholder" },
    {
        name: "inputType",
        default: "text",
        choices: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].questions.inputTypes,
    },
    { name: "title", serializationProperty: "locTitle" },
    { name: "maxLength:number", default: -1 },
    { name: "size:number", minValue: 0 },
    {
        name: "requiredErrorText:text",
        serializationProperty: "locRequiredErrorText",
    },
    {
        name: "validators:validators",
        baseClassName: "surveyvalidator",
        classNamePart: "validator",
    },
], function () {
    return new MultipleTextItemModel("");
});
_jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletext", [
    { name: "!items:textitems", className: "multipletextitem" },
    { name: "itemSize:number", minValue: 0 },
    { name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
], function () {
    return new QuestionMultipleTextModel("");
}, "question");
_questionfactory__WEBPACK_IMPORTED_MODULE_5__["QuestionFactory"].Instance.registerQuestion("multipletext", function (name) {
    var q = new QuestionMultipleTextModel(name);
    QuestionMultipleTextModel.addDefaultItems(q);
    return q;
});


/***/ }),

/***/ "./src/question_paneldynamic.ts":
/*!**************************************!*\
  !*** ./src/question_paneldynamic.ts ***!
  \**************************************/
/*! exports provided: QuestionPanelDynamicItem, QuestionPanelDynamicTemplateSurveyImpl, QuestionPanelDynamicModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicItem", function() { return QuestionPanelDynamicItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicTemplateSurveyImpl", function() { return QuestionPanelDynamicTemplateSurveyImpl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicModel", function() { return QuestionPanelDynamicModel; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
/* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};











var QuestionPanelDynamicItemTextProcessor = /** @class */ (function (_super) {
    __extends(QuestionPanelDynamicItemTextProcessor, _super);
    function QuestionPanelDynamicItemTextProcessor(data, panelItem, variableName) {
        var _this = _super.call(this, variableName) || this;
        _this.data = data;
        _this.panelItem = panelItem;
        _this.variableName = variableName;
        _this.sharedQuestions = {};
        return _this;
    }
    Object.defineProperty(QuestionPanelDynamicItemTextProcessor.prototype, "survey", {
        get: function () {
            return this.panelItem.getSurvey();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicItemTextProcessor.prototype, "panel", {
        get: function () {
            return this.panelItem.panel;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicItemTextProcessor.prototype, "panelIndex", {
        get: function () {
            return !!this.data ? this.data.getItemIndex(this.panelItem) : -1;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicItemTextProcessor.prototype.getValues = function () {
        return this.panelItem.getAllValues();
    };
    QuestionPanelDynamicItemTextProcessor.prototype.getQuestionByName = function (name) {
        var res = _super.prototype.getQuestionByName.call(this, name);
        if (!!res)
            return res;
        var index = this.panelIndex;
        res = index > -1 ? this.data.getSharedQuestionFromArray(name, index) : undefined;
        var qName = !!res ? res.name : name;
        this.sharedQuestions[qName] = name;
        return res;
    };
    QuestionPanelDynamicItemTextProcessor.prototype.getQuestionDisplayText = function (question) {
        var name = this.sharedQuestions[question.name];
        if (!name)
            return _super.prototype.getQuestionDisplayText.call(this, question);
        var val = this.panelItem.getValue(name);
        return question.getDisplayValue(true, val);
    };
    QuestionPanelDynamicItemTextProcessor.prototype.onCustomProcessText = function (textValue) {
        if (textValue.name == QuestionPanelDynamicItem.IndexVariableName) {
            var index = this.panelIndex;
            if (index > -1) {
                textValue.isExists = true;
                textValue.value = index + 1;
                return true;
            }
        }
        if (textValue.name.toLowerCase().indexOf(QuestionPanelDynamicItem.ParentItemVariableName + ".") == 0) {
            var q = this.data;
            if (!!q && !!q.parentQuestion && !!q.parent && !!q.parent.data) {
                var processor = new QuestionPanelDynamicItemTextProcessor(q.parentQuestion, q.parent.data, QuestionPanelDynamicItem.ItemVariableName);
                var text = QuestionPanelDynamicItem.ItemVariableName +
                    textValue.name.substring(QuestionPanelDynamicItem.ParentItemVariableName.length);
                var res = processor.processValue(text, textValue.returnDisplayValue);
                textValue.isExists = res.isExists;
                textValue.value = res.value;
            }
            return true;
        }
        return false;
    };
    return QuestionPanelDynamicItemTextProcessor;
}(_textPreProcessor__WEBPACK_IMPORTED_MODULE_2__["QuestionTextProcessor"]));
var QuestionPanelDynamicItem = /** @class */ (function () {
    function QuestionPanelDynamicItem(data, panel) {
        this.data = data;
        this.panelValue = panel;
        this.textPreProcessor = new QuestionPanelDynamicItemTextProcessor(data, this, QuestionPanelDynamicItem.ItemVariableName);
        this.setSurveyImpl();
    }
    Object.defineProperty(QuestionPanelDynamicItem.prototype, "panel", {
        get: function () {
            return this.panelValue;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicItem.prototype.setSurveyImpl = function () {
        this.panel.setSurveyImpl(this);
    };
    QuestionPanelDynamicItem.prototype.getValue = function (name) {
        var values = this.getAllValues();
        return values[name];
    };
    QuestionPanelDynamicItem.prototype.setValue = function (name, newValue) {
        var oldItemData = this.data.getPanelItemData(this);
        var oldValue = !!oldItemData ? oldItemData[name] : undefined;
        if (typeof oldValue !== "object" && _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(newValue, oldValue))
            return;
        this.data.setPanelItemData(this, name, newValue);
        var questions = this.panel.questions;
        for (var i = 0; i < questions.length; i++) {
            if (questions[i].getValueName() === name)
                continue;
            questions[i].checkBindings(name, newValue);
        }
    };
    QuestionPanelDynamicItem.prototype.getVariable = function (name) {
        return undefined;
    };
    QuestionPanelDynamicItem.prototype.setVariable = function (name, newValue) { };
    QuestionPanelDynamicItem.prototype.getComment = function (name) {
        var result = this.getValue(name + _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentPrefix);
        return result ? result : "";
    };
    QuestionPanelDynamicItem.prototype.setComment = function (name, newValue, locNotification) {
        this.setValue(name + _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentPrefix, newValue);
    };
    QuestionPanelDynamicItem.prototype.getAllValues = function () {
        return this.data.getPanelItemData(this);
    };
    QuestionPanelDynamicItem.prototype.getFilteredValues = function () {
        var values = {};
        var surveyValues = !!this.data && !!this.data.getRootData()
            ? this.data.getRootData().getFilteredValues()
            : {};
        for (var key in surveyValues) {
            values[key] = surveyValues[key];
        }
        values[QuestionPanelDynamicItem.ItemVariableName] = this.getAllValues();
        if (!!this.data) {
            values[QuestionPanelDynamicItem.IndexVariableName.toLowerCase()] = this.data.getItemIndex(this);
            var q = this.data;
            if (!!q && !!q.parentQuestion && !!q.parent) {
                values[QuestionPanelDynamicItem.ParentItemVariableName] = q.parent.getValue();
            }
        }
        return values;
    };
    QuestionPanelDynamicItem.prototype.getFilteredProperties = function () {
        if (!!this.data && !!this.data.getRootData())
            return this.data.getRootData().getFilteredProperties();
        return { survey: this.getSurvey() };
    };
    QuestionPanelDynamicItem.prototype.getSurveyData = function () {
        return this;
    };
    QuestionPanelDynamicItem.prototype.getSurvey = function () {
        return this.data ? this.data.getSurvey() : null;
    };
    QuestionPanelDynamicItem.prototype.getTextProcessor = function () {
        return this.textPreProcessor;
    };
    QuestionPanelDynamicItem.ItemVariableName = "panel";
    QuestionPanelDynamicItem.ParentItemVariableName = "parentpanel";
    QuestionPanelDynamicItem.IndexVariableName = "panelIndex";
    return QuestionPanelDynamicItem;
}());

var QuestionPanelDynamicTemplateSurveyImpl = /** @class */ (function () {
    function QuestionPanelDynamicTemplateSurveyImpl(data) {
        this.data = data;
    }
    QuestionPanelDynamicTemplateSurveyImpl.prototype.getSurveyData = function () {
        return null;
    };
    QuestionPanelDynamicTemplateSurveyImpl.prototype.getSurvey = function () {
        return this.data.getSurvey();
    };
    QuestionPanelDynamicTemplateSurveyImpl.prototype.getTextProcessor = function () {
        return null;
    };
    return QuestionPanelDynamicTemplateSurveyImpl;
}());

/**
  * A class that describes the Dynamic Panel question type.
  *
  * Dynamic Panel allows respondents to add panels based on a template panel and delete them. Specify the [`templateElements`](https://surveyjs.io/form-library/documentation/questionpaneldynamicmodel#templateElements) property to configure template panel elements.
  *
  * [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/ (linkStyle))
  */
var QuestionPanelDynamicModel = /** @class */ (function (_super) {
    __extends(QuestionPanelDynamicModel, _super);
    function QuestionPanelDynamicModel(name) {
        var _this = _super.call(this, name) || this;
        _this.loadingPanelCount = 0;
        _this.currentIndexValue = -1;
        _this.isAddingNewPanels = false;
        _this.onReadyChangedCallback = function () {
            _this.recalculateIsReadyValue();
        };
        _this.createNewArray("panels");
        _this.templateValue = _this.createAndSetupNewPanelObject();
        _this.template.renderWidth = "100%";
        _this.template.selectedElementInDesign = _this;
        _this.template.addElementCallback = function (element) {
            _this.addOnPropertyChangedCallback(element);
            _this.rebuildPanels();
        };
        _this.template.removeElementCallback = function () {
            _this.rebuildPanels();
        };
        _this.createLocalizableString("confirmDeleteText", _this, false, "confirmDelete");
        _this.createLocalizableString("keyDuplicationError", _this, false, true);
        _this.createLocalizableString("panelAddText", _this, false, "addPanel");
        _this.createLocalizableString("panelRemoveText", _this, false, "removePanel");
        _this.createLocalizableString("panelPrevText", _this, false, "pagePrevText");
        _this.createLocalizableString("panelNextText", _this, false, "pageNextText");
        _this.createLocalizableString("noEntriesText", _this, false, "noEntriesText");
        _this.registerPropertyChangedHandlers(["panelsState"], function () {
            _this.setPanelsState();
        });
        _this.registerPropertyChangedHandlers(["isMobile"], function () {
            _this.updateFooterActions();
        });
        return _this;
    }
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "hasSingleInput", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.getFirstQuestionToFocus = function (withError) {
        for (var i = 0; i < this.panels.length; i++) {
            var res = this.panels[i].getFirstQuestionToFocus(withError);
            if (!!res)
                return res;
        }
        return null;
    };
    QuestionPanelDynamicModel.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value, isLight);
        this.setTemplatePanelSurveyImpl();
        this.setPanelsSurveyImpl();
    };
    QuestionPanelDynamicModel.prototype.assignOnPropertyChangedToTemplate = function () {
        var elements = this.template.elements;
        for (var i = 0; i < elements.length; i++) {
            this.addOnPropertyChangedCallback(elements[i]);
        }
    };
    QuestionPanelDynamicModel.prototype.addOnPropertyChangedCallback = function (element) {
        var _this = this;
        if (element.isQuestion) {
            element.setParentQuestion(this);
        }
        element.onPropertyChanged.add(function (element, options) {
            _this.onTemplateElementPropertyChanged(element, options);
        });
        if (element.isPanel) {
            element.addElementCallback = function (element) {
                _this.addOnPropertyChangedCallback(element);
            };
        }
    };
    QuestionPanelDynamicModel.prototype.onTemplateElementPropertyChanged = function (element, options) {
        if (this.isLoadingFromJson || this.useTemplatePanel || this.panels.length == 0)
            return;
        var property = _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].findProperty(element.getType(), options.name);
        if (!property)
            return;
        var panels = this.panels;
        for (var i = 0; i < panels.length; i++) {
            var question = panels[i].getQuestionByName(element.name);
            if (!!question && question[options.name] !== options.newValue) {
                question[options.name] = options.newValue;
            }
        }
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "useTemplatePanel", {
        get: function () {
            return this.isDesignMode && !this.isContentElement;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.getType = function () {
        return "paneldynamic";
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isCompositeQuestion", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.clearOnDeletingContainer = function () {
        this.panels.forEach(function (panel) {
            panel.clearOnDeletingContainer();
        });
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isAllowTitleLeft", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.removeElement = function (element) {
        return this.template.removeElement(element);
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "template", {
        /**
         * A `PanelModel` object used as a template to create dynamic panels.
         * @see PanelModel
         * @see templateElements
         * @see templateTitle
         * @see panels
         * @see panelCount
         */
        get: function () {
            return this.templateValue;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.getPanel = function () {
        return this.template;
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateElements", {
        /**
         * An array of questions and panels included in the template panel.
         * @see template
         * @see panels
         * @see panelCount
         */
        get: function () {
            return this.template.elements;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTitle", {
        /**
         * A title for the template panel.
         * @see template
         * @see templateDescription
         * @see templateElements
         * @see panels
         * @see panelCount
         */
        get: function () {
            return this.template.title;
        },
        set: function (newValue) {
            this.template.title = newValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locTemplateTitle", {
        get: function () {
            return this.template.locTitle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateDescription", {
        /**
         * A description for the template panel.
         * @see template
         * @see templateTitle
         * @see templateElements
         * @see panels
         * @see panelCount
         */
        get: function () {
            return this.template.description;
        },
        set: function (newValue) {
            this.template.description = newValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locTemplateDescription", {
        get: function () {
            return this.template.locDescription;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "items", {
        get: function () {
            var res = [];
            for (var i = 0; i < this.panels.length; i++) {
                res.push(this.panels[i].data);
            }
            return res;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panels", {
        /**
         * An array of `PanelModel` objects created based on the template panel.
         * @see PanelModel
         * @see template
         * @see panelCount
         */
        get: function () {
            return this.getPropertyValue("panels");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "currentIndex", {
        /**
         * A zero-based index of the currently displayed panel.
         *
         * When `renderMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains -1.
         * @see currentPanel
         * @see panels
         * @see panelCount
         * @see renderMode
         */
        get: function () {
            if (this.isRenderModeList)
                return -1;
            if (this.useTemplatePanel)
                return 0;
            if (this.currentIndexValue < 0 && this.panelCount > 0) {
                this.currentIndexValue = 0;
            }
            if (this.currentIndexValue >= this.panelCount) {
                this.currentIndexValue = this.panelCount - 1;
            }
            return this.currentIndexValue;
        },
        set: function (val) {
            if (this.currentIndexValue !== val) {
                if (val >= this.panelCount)
                    val = this.panelCount - 1;
                this.currentIndexValue = val;
                this.updateFooterActions();
                this.fireCallback(this.currentIndexChangedCallback);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "currentPanel", {
        /**
         * A `PanelModel` object that is the currently displayed panel.
         *
         * When `renderMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains `null`.
         * @see currentIndex
         * @see panels
         * @see panelCount
         * @see renderMode
         */
        get: function () {
            var index = this.currentIndex;
            if (index < 0 || index >= this.panels.length)
                return null;
            return this.panels[index];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "confirmDelete", {
        /**
         * Specifies whether to display a confirmation dialog when a respondent wants to delete a panel.
         * @see confirmDeleteText
         */
        get: function () {
            return this.getPropertyValue("confirmDelete", false);
        },
        set: function (val) {
            this.setPropertyValue("confirmDelete", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "keyName", {
        /**
         * Specifies a key question. Set this property to the name of a question used in the template, and Dynamic Panel will display `keyDuplicationError` if a user tries to enter a duplicate value in this question.
         * @see keyDuplicationError
         */
        get: function () {
            return this.getPropertyValue("keyName", "");
        },
        set: function (val) {
            this.setPropertyValue("keyName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "confirmDeleteText", {
        /**
         * A message displayed in a confirmation dialog that appears when a respondent wants to delete a panel.
         * @see confirmDelete
         */
        get: function () {
            return this.getLocalizableStringText("confirmDeleteText");
        },
        set: function (val) {
            this.setLocalizableStringText("confirmDeleteText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locConfirmDeleteText", {
        get: function () {
            return this.getLocalizableString("confirmDeleteText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "keyDuplicationError", {
        /**
         * An error message displayed when users enter a duplicate value into a question that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
         *
         * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
         * @see keyName
         */
        get: function () {
            return this.getLocalizableStringText("keyDuplicationError");
        },
        set: function (val) {
            this.setLocalizableStringText("keyDuplicationError", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locKeyDuplicationError", {
        get: function () {
            return this.getLocalizableString("keyDuplicationError");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelPrevText", {
        /**
         * A caption for the Previous button. Applies only if `renderMode` is different from `"list"`.
         * @see renderMode
         * @see isPrevButtonShowing
         */
        get: function () {
            return this.getLocalizableStringText("panelPrevText");
        },
        set: function (val) {
            this.setLocalizableStringText("panelPrevText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locPanelPrevText", {
        get: function () {
            return this.getLocalizableString("panelPrevText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelNextText", {
        /**
         * A caption for the Next button. Applies only if `renderMode` is different from `"list"`.
         * @see renderMode
         * @see isNextButtonShowing
         */
        get: function () {
            return this.getLocalizableStringText("panelNextText");
        },
        set: function (val) {
            this.setLocalizableStringText("panelNextText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locPanelNextText", {
        get: function () {
            return this.getLocalizableString("panelNextText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelAddText", {
        /**
         * A caption for the Add Panel button.
         */
        get: function () {
            return this.getLocalizableStringText("panelAddText");
        },
        set: function (value) {
            this.setLocalizableStringText("panelAddText", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locPanelAddText", {
        get: function () {
            return this.getLocalizableString("panelAddText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelRemoveText", {
        /**
         * A caption for the Delete Panel button.
         * @see panelRemoveButtonLocation
         */
        get: function () {
            return this.getLocalizableStringText("panelRemoveText");
        },
        set: function (val) {
            this.setLocalizableStringText("panelRemoveText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locPanelRemoveText", {
        get: function () {
            return this.getLocalizableString("panelRemoveText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressTopShowing", {
        /**
         * Returns true when the renderMode equals to "progressTop" or "progressTopBottom"
         */
        get: function () {
            return this.renderMode === "progressTop" || this.renderMode === "progressTopBottom";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressBottomShowing", {
        /**
         * Returns true when the renderMode equals to "progressBottom" or "progressTopBottom"
         */
        get: function () {
            return this.renderMode === "progressBottom" || this.renderMode === "progressTopBottom";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isPrevButtonShowing", {
        /**
         * Indicates whether the Previous button is visible.
         * @see currentIndex
         * @see currentPanel
         * @see panelPrevText
         */
        get: function () {
            return this.currentIndex > 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isNextButtonShowing", {
        /**
         * Indicates whether the Next button is visible.
         * @see currentIndex
         * @see currentPanel
         * @see panelNextText
         */
        get: function () {
            return this.currentIndex >= 0 && this.currentIndex < this.panelCount - 1;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRangeShowing", {
        /**
         * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and panelCount is >= 2.
         */
        get: function () {
            return (this.showRangeInProgress && this.currentIndex >= 0 && this.panelCount > 1);
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.getElementsInDesign = function (includeHidden) {
        if (includeHidden === void 0) { includeHidden = false; }
        return includeHidden ? [this.template] : this.templateElements;
    };
    QuestionPanelDynamicModel.prototype.prepareValueForPanelCreating = function () {
        this.addingNewPanelsValue = this.value;
        this.isAddingNewPanels = true;
        this.isNewPanelsValueChanged = false;
    };
    QuestionPanelDynamicModel.prototype.setValueAfterPanelsCreating = function () {
        this.isAddingNewPanels = false;
        if (this.isNewPanelsValueChanged) {
            this.isValueChangingInternally = true;
            this.value = this.addingNewPanelsValue;
            this.isValueChangingInternally = false;
        }
    };
    QuestionPanelDynamicModel.prototype.getValueCore = function () {
        return this.isAddingNewPanels
            ? this.addingNewPanelsValue
            : _super.prototype.getValueCore.call(this);
    };
    QuestionPanelDynamicModel.prototype.setValueCore = function (newValue) {
        if (this.isAddingNewPanels) {
            this.isNewPanelsValueChanged = true;
            this.addingNewPanelsValue = newValue;
        }
        else {
            _super.prototype.setValueCore.call(this, newValue);
        }
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelCount", {
        /**
         * The number of panels in Dynamic Panel.
         * @see minPanelCount
         * @see maxPanelCount
         */
        get: function () {
            return this.isLoadingFromJson || this.useTemplatePanel
                ? this.loadingPanelCount
                : this.panels.length;
        },
        set: function (val) {
            if (val < 0)
                return;
            if (this.isLoadingFromJson || this.useTemplatePanel) {
                this.loadingPanelCount = val;
                return;
            }
            if (val == this.panels.length || this.useTemplatePanel)
                return;
            this.updateBindings("panelCount", val);
            this.prepareValueForPanelCreating();
            for (var i = this.panelCount; i < val; i++) {
                var panel = this.createNewPanel();
                this.panels.push(panel);
                if (this.renderMode == "list" && this.panelsState != "default") {
                    if (this.panelsState === "expand") {
                        panel.expand();
                    }
                    else {
                        if (!!panel.title) {
                            panel.collapse();
                        }
                    }
                }
            }
            if (val < this.panelCount)
                this.panels.splice(val, this.panelCount - val);
            this.setValueAfterPanelsCreating();
            this.setValueBasedOnPanelCount();
            this.reRunCondition();
            this.updateFooterActions();
            this.fireCallback(this.panelCountChangedCallback);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelsState", {
        /**
         * Specifies whether users can expand and collapse panels. Applies if `renderMode` is `"list"` and the `templateTitle` property is specified.
         *
         * Possible values:
         *
         * - `"default"` (default) - All panels are displayed in full and cannot be collapsed.
         * - `"expanded"` - All panels are displayed in full and can be collapsed in the UI.
         * - `"collapsed"` - All panels display only their titles and descriptions and can be expanded in the UI.
         * - `"firstExpanded"` - Only the first panel is displayed in full; other panels are collapsed and can be expanded in the UI.
         * @see renderMode
         * @see templateTitle
         */
        get: function () {
            return this.getPropertyValue("panelsState");
        },
        set: function (val) {
            this.setPropertyValue("panelsState", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.setTemplatePanelSurveyImpl = function () {
        this.template.setSurveyImpl(this.useTemplatePanel
            ? this.surveyImpl
            : new QuestionPanelDynamicTemplateSurveyImpl(this));
    };
    QuestionPanelDynamicModel.prototype.setPanelsSurveyImpl = function () {
        for (var i = 0; i < this.panels.length; i++) {
            var panel = this.panels[i];
            if (panel == this.template)
                continue;
            panel.setSurveyImpl(panel.data);
        }
    };
    QuestionPanelDynamicModel.prototype.setPanelsState = function () {
        if (this.useTemplatePanel || this.renderMode != "list" || !this.templateTitle)
            return;
        for (var i = 0; i < this.panels.length; i++) {
            var state = this.panelsState;
            if (state === "firstExpanded") {
                state = i === 0 ? "expanded" : "collapsed";
            }
            this.panels[i].state = state;
        }
    };
    QuestionPanelDynamicModel.prototype.setValueBasedOnPanelCount = function () {
        var value = this.value;
        if (!value || !Array.isArray(value))
            value = [];
        if (value.length == this.panelCount)
            return;
        for (var i = value.length; i < this.panelCount; i++)
            value.push({});
        if (value.length > this.panelCount) {
            value.splice(this.panelCount, value.length - this.panelCount);
        }
        this.isValueChangingInternally = true;
        this.value = value;
        this.isValueChangingInternally = false;
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "minPanelCount", {
        /**
         * A minimum number of panels in Dynamic Panel. Users cannot delete panels if `panelCount` equals `minPanelCount`.
         *
         * Default value: 0
         * @see panelCount
         * @see maxPanelCount
         * @see allowRemovePanel
         */
        get: function () {
            return this.getPropertyValue("minPanelCount");
        },
        set: function (val) {
            if (val < 0)
                val = 0;
            if (val == this.minPanelCount)
                return;
            this.setPropertyValue("minPanelCount", val);
            if (val > this.maxPanelCount)
                this.maxPanelCount = val;
            if (this.panelCount < val)
                this.panelCount = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "maxPanelCount", {
        /**
         * A maximum number of panels in Dynamic Panel. Users cannot add new panels if `panelCount` equals `maxPanelCount`.
         *
         * Default value: 100 (inherited from [`settings.panelMaximumPanelCount`](https://surveyjs.io/form-library/documentation/settings#panelMaximumPanelCount))
         * @see panelCount
         * @see minPanelCount
         * @see allowAddPanel
         */
        get: function () {
            return this.getPropertyValue("maxPanelCount");
        },
        set: function (val) {
            if (val <= 0)
                return;
            if (val > _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].panelMaximumPanelCount)
                val = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].panelMaximumPanelCount;
            if (val == this.maxPanelCount)
                return;
            this.setPropertyValue("maxPanelCount", val);
            if (val < this.minPanelCount)
                this.minPanelCount = val;
            if (this.panelCount > val)
                this.panelCount = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowAddPanel", {
        /**
         * Specifies whether users are allowed to add new panels.
         *
         * Default value: `true`
         * @see canAddPanel
         * @see allowRemovePanel
         */
        get: function () {
            return this.getPropertyValue("allowAddPanel");
        },
        set: function (val) {
            this.setPropertyValue("allowAddPanel", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowRemovePanel", {
        /**
         * Specifies whether users are allowed to delete panels.
         *
         * Default value: `true`
         * @see canRemovePanel
         * @see allowAddPanel
         */
        get: function () {
            return this.getPropertyValue("allowRemovePanel");
        },
        set: function (val) {
            this.setPropertyValue("allowRemovePanel", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTitleLocation", {
        /**
         * Gets or sets the location of question titles within the template panel relative to their input fields.
         *
         * - `"default"` (default) - Inherits the setting from the Dynamic Panel's `titleLocation` property, which in turn inherits the [`questionTitleLocation`](https://surveyjs.io/form-library/documentation/surveymodel#questionTitleLocation) property value specified for the Dynamic Panel's container (page or survey).
         * - `"top"` - Displays question titles above input fields.
         * - `"bottom"` - Displays question titles below input fields.
         * - `"left"` - Displays question titles to the left of input fields.
         * - `"hidden"` - Hides question titles.
         * @see titleLocation
         */
        get: function () {
            return this.getPropertyValue("templateTitleLocation");
        },
        set: function (value) {
            this.setPropertyValue("templateTitleLocation", value.toLowerCase());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "showQuestionNumbers", {
        /**
         * Use this property to show/hide the numbers in titles in questions inside a dynamic panel.
         * By default the value is "off". You may set it to "onPanel" and the first question inside a dynamic panel will start with 1 or "onSurvey" to include nested questions in dymamic panels into global survey question numbering.
         */
        get: function () {
            return this.getPropertyValue("showQuestionNumbers");
        },
        set: function (val) {
            this.setPropertyValue("showQuestionNumbers", val);
            if (!this.isLoadingFromJson && this.survey) {
                this.survey.questionVisibilityChanged(this, this.visible);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelRemoveButtonLocation", {
        /**
         * Specifies the location of the Delete Panel button relative to panel content.
         *
         * Possible values:
         *
         * - `"bottom"` (default) - Displays the Delete Panel button below panel content.
         * - `"right"` - Displays the Delete Panel button to the right of panel content.
         * @see panelRemoveText
         */
        get: function () {
            return this.getPropertyValue("panelRemoveButtonLocation");
        },
        set: function (val) {
            this.setPropertyValue("panelRemoveButtonLocation", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "showRangeInProgress", {
        /**
         * Shows the range from 1 to panelCount when renderMode doesn't equal to "list". Set to false to hide this element.
         * @see panelCount
         * @see renderMode
         */
        get: function () {
            return this.getPropertyValue("showRangeInProgress");
        },
        set: function (val) {
            this.setPropertyValue("showRangeInProgress", val);
            this.updateFooterActions();
            this.fireCallback(this.currentIndexChangedCallback);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "renderMode", {
        /**
         * By default the property equals to "list" and all dynamic panels are rendered one by one on the page. You may change it to: "progressTop", "progressBottom" or "progressTopBottom" to render only one dynamic panel at once. The progress and navigation elements can be rendred on top, bottom or both.
         */
        get: function () {
            return this.getPropertyValue("renderMode");
        },
        set: function (val) {
            this.setPropertyValue("renderMode", val);
            this.updateFooterActions();
            this.fireCallback(this.renderModeChangedCallback);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeList", {
        get: function () {
            return this.renderMode === "list";
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.setVisibleIndex = function (value) {
        if (!this.isVisible)
            return 0;
        var startIndex = this.showQuestionNumbers == "onSurvey" ? value : 0;
        for (var i = 0; i < this.panels.length; i++) {
            var counter = this.setPanelVisibleIndex(this.panels[i], startIndex, this.showQuestionNumbers != "off");
            if (this.showQuestionNumbers == "onSurvey") {
                startIndex += counter;
            }
        }
        _super.prototype.setVisibleIndex.call(this, this.showQuestionNumbers != "onSurvey" ? value : -1);
        return this.showQuestionNumbers != "onSurvey" ? 1 : startIndex - value;
    };
    QuestionPanelDynamicModel.prototype.setPanelVisibleIndex = function (panel, index, showIndex) {
        if (!showIndex) {
            panel.setVisibleIndex(-1);
            return 0;
        }
        return panel.setVisibleIndex(index);
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "canAddPanel", {
        /**
         * Indicates whether it is possible to add a new panel.
         *
         * This property returns `true` when all of the following conditions apply:
         *
         * - Users are allowed to add new panels (`allowAddPanel` is `true`).
         * - Dynamic Panel or its parent survey is not in read-only state.
         * - `panelCount` is less than `maxPanelCount`.
         * @see allowAddPanel
         * @see isReadOnly
         * @see panelCount
         * @see maxPanelCount
         * @see canRemovePanel
         */
        get: function () {
            if (this.isDesignMode)
                return false;
            if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList && this.currentIndex < this.panelCount - 1) {
                return false;
            }
            return (this.allowAddPanel &&
                !this.isReadOnly &&
                this.panelCount < this.maxPanelCount);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "canRemovePanel", {
        /**
         * Indicates whether it is possible to delete panels.
         *
         * This property returns `true` when all of the following conditions apply:
         *
         * - Users are allowed to delete panels (`allowRemovePanel` is `true`).
         * - Dynamic Panel or its parent survey is not in read-only state.
         * - `panelCount` exceeds `minPanelCount`.
         * @see allowRemovePanel
         * @see isReadOnly
         * @see panelCount
         * @see minPanelCount
         * @see canAddPanel
         */
        get: function () {
            if (this.isDesignMode)
                return false;
            return (this.allowRemovePanel &&
                !this.isReadOnly &&
                this.panelCount > this.minPanelCount);
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.rebuildPanels = function () {
        var _a;
        if (this.isLoadingFromJson)
            return;
        this.prepareValueForPanelCreating();
        var panels = [];
        if (this.useTemplatePanel) {
            new QuestionPanelDynamicItem(this, this.template);
            panels.push(this.template);
        }
        else {
            for (var i = 0; i < this.panelCount; i++) {
                panels.push(this.createNewPanel());
            }
        }
        (_a = this.panels).splice.apply(_a, __spreadArray([0, this.panels.length], panels, false));
        this.setValueAfterPanelsCreating();
        this.setPanelsState();
        this.reRunCondition();
        this.updateFooterActions();
        this.fireCallback(this.panelCountChangedCallback);
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "defaultPanelValue", {
        /**
         * If it is not empty, then this value is set to every new panel, including panels created initially, unless the defaultValue is not empty
         * @see defaultValue
         * @see defaultValueFromLastPanel
         */
        get: function () {
            return this.getPropertyValue("defaultPanelValue");
        },
        set: function (val) {
            this.setPropertyValue("defaultPanelValue", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "defaultValueFromLastPanel", {
        /**
         * Specifies whether default values for a new panel should be copied from the last panel.
         *
         * If you also specify `defaultValue`, it will be merged with the copied values.
         * @see defaultValue
         */
        get: function () {
            return this.getPropertyValue("defaultValueFromLastPanel", false);
        },
        set: function (val) {
            this.setPropertyValue("defaultValueFromLastPanel", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.isDefaultValueEmpty = function () {
        return (_super.prototype.isDefaultValueEmpty.call(this) && this.isValueEmpty(this.defaultPanelValue));
    };
    QuestionPanelDynamicModel.prototype.setDefaultValue = function () {
        if (this.isValueEmpty(this.defaultPanelValue) ||
            !this.isValueEmpty(this.defaultValue)) {
            _super.prototype.setDefaultValue.call(this);
            return;
        }
        if (!this.isEmpty() || this.panelCount == 0)
            return;
        var newValue = [];
        for (var i = 0; i < this.panelCount; i++) {
            newValue.push(this.defaultPanelValue);
        }
        this.value = newValue;
    };
    QuestionPanelDynamicModel.prototype.isEmpty = function () {
        var val = this.value;
        if (!val || !Array.isArray(val))
            return true;
        for (var i = 0; i < val.length; i++) {
            if (!this.isRowEmpty(val[i]))
                return false;
        }
        return true;
    };
    QuestionPanelDynamicModel.prototype.getProgressInfo = function () {
        return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(this.panels, this.isRequired);
    };
    QuestionPanelDynamicModel.prototype.isRowEmpty = function (val) {
        for (var prop in val) {
            if (val.hasOwnProperty(prop))
                return false;
        }
        return true;
    };
    /**
     * Add a new dynamic panel based on the template Panel. It checks if canAddPanel returns true and then calls addPanel method.
     * If a renderMode is different from "list" and the current panel has erros, then
     * @see template
     * @see panelCount
     * @see panels
     * @see canAddPanel
     */
    QuestionPanelDynamicModel.prototype.addPanelUI = function () {
        if (!this.canAddPanel)
            return null;
        if (!this.canLeaveCurrentPanel())
            return null;
        var newPanel = this.addPanel();
        if (this.renderMode === "list" && this.panelsState !== "default") {
            newPanel.expand();
        }
        return newPanel;
    };
    /**
     * Add a new dynamic panel based on the template Panel.
     * @see template
     * @see panelCount
     * @see panels
     * @see renderMode
     */
    QuestionPanelDynamicModel.prototype.addPanel = function () {
        this.panelCount++;
        if (!this.isRenderModeList) {
            this.currentIndex = this.panelCount - 1;
        }
        var newValue = this.value;
        var hasModified = false;
        if (!this.isValueEmpty(this.defaultPanelValue)) {
            if (!!newValue &&
                Array.isArray(newValue) &&
                newValue.length == this.panelCount) {
                hasModified = true;
                this.copyValue(newValue[newValue.length - 1], this.defaultPanelValue);
            }
        }
        if (this.defaultValueFromLastPanel &&
            !!newValue &&
            Array.isArray(newValue) &&
            newValue.length > 1 &&
            newValue.length == this.panelCount) {
            hasModified = true;
            this.copyValue(newValue[newValue.length - 1], newValue[newValue.length - 2]);
        }
        if (hasModified) {
            this.value = newValue;
        }
        if (this.survey)
            this.survey.dynamicPanelAdded(this);
        return this.panels[this.panelCount - 1];
    };
    QuestionPanelDynamicModel.prototype.canLeaveCurrentPanel = function () {
        return !(this.renderMode !== "list" && this.currentPanel && this.currentPanel.hasErrors());
    };
    QuestionPanelDynamicModel.prototype.copyValue = function (src, dest) {
        for (var key in dest) {
            src[key] = dest[key];
        }
    };
    /**
     * Call removePanel function. Do nothing is canRemovePanel returns false. If confirmDelete set to true, it shows the confirmation dialog first.
     * @param value a panel or panel index
     * @see removePanel
     * @see confirmDelete
     * @see confirmDeleteText
     * @see canRemovePanel
     *
     */
    QuestionPanelDynamicModel.prototype.removePanelUI = function (value) {
        if (!this.canRemovePanel)
            return;
        if (!this.confirmDelete || Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["confirmAction"])(this.confirmDeleteText)) {
            this.removePanel(value);
        }
    };
    /**
     * Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `renderMode` is `"list"` or the current panel contains validation errors.
     * @see renderMode
     */
    QuestionPanelDynamicModel.prototype.goToNextPanel = function () {
        if (this.currentIndex < 0)
            return false;
        if (!this.canLeaveCurrentPanel())
            return false;
        this.currentIndex++;
        return true;
    };
    /**
     * Switches Dynamic Panel to the previous panel.
     */
    QuestionPanelDynamicModel.prototype.goToPrevPanel = function () {
        if (this.currentIndex < 0)
            return;
        this.currentIndex--;
    };
    /**
     * Removes a dynamic panel from the panels array.
     * @param value a panel or panel index
     * @see panels
     * @see template
     */
    QuestionPanelDynamicModel.prototype.removePanel = function (value) {
        var index = this.getPanelIndex(value);
        if (index < 0 || index >= this.panelCount)
            return;
        var panel = this.panels[index];
        if (this.survey && !this.survey.dynamicPanelRemoving(this, index, panel))
            return;
        this.panels.splice(index, 1);
        this.updateBindings("panelCount", this.panelCount);
        var value = this.value;
        if (!value || !Array.isArray(value) || index >= value.length)
            return;
        this.isValueChangingInternally = true;
        value.splice(index, 1);
        this.value = value;
        this.updateFooterActions();
        this.fireCallback(this.panelCountChangedCallback);
        if (this.survey)
            this.survey.dynamicPanelRemoved(this, index, panel);
        this.isValueChangingInternally = false;
    };
    QuestionPanelDynamicModel.prototype.getPanelIndex = function (val) {
        if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val))
            return val;
        var items = this.items;
        for (var i = 0; i < this.panels.length; i++) {
            if (this.panels[i] === val || items[i] === val)
                return i;
        }
        return -1;
    };
    QuestionPanelDynamicModel.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        var panels = this.panels;
        for (var i = 0; i < panels.length; i++) {
            panels[i].locStrsChanged();
        }
    };
    QuestionPanelDynamicModel.prototype.clearIncorrectValues = function () {
        for (var i = 0; i < this.panels.length; i++) {
            this.clearIncorrectValuesInPanel(i);
        }
    };
    QuestionPanelDynamicModel.prototype.clearErrors = function () {
        _super.prototype.clearErrors.call(this);
        for (var i = 0; i < this.panels.length; i++) {
            this.panels[i].clearErrors();
        }
    };
    QuestionPanelDynamicModel.prototype.getQuestionFromArray = function (name, index) {
        if (index >= this.panelCount)
            return null;
        return this.panels[index].getQuestionByName(name);
    };
    QuestionPanelDynamicModel.prototype.clearIncorrectValuesInPanel = function (index) {
        var panel = this.panels[index];
        panel.clearIncorrectValues();
        var val = this.value;
        var values = !!val && index < val.length ? val[index] : null;
        if (!values)
            return;
        var isChanged = false;
        for (var key in values) {
            if (this.getSharedQuestionFromArray(key, index))
                continue;
            var q = panel.getQuestionByName(key);
            if (!!q)
                continue;
            if (this.iscorrectValueWithPostPrefix(panel, key, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentPrefix) ||
                this.iscorrectValueWithPostPrefix(panel, key, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].matrixTotalValuePostFix))
                continue;
            delete values[key];
            isChanged = true;
        }
        if (isChanged) {
            val[index] = values;
            this.value = val;
        }
    };
    QuestionPanelDynamicModel.prototype.iscorrectValueWithPostPrefix = function (panel, key, postPrefix) {
        if (key.indexOf(postPrefix) !== key.length - postPrefix.length)
            return false;
        return !!panel.getQuestionByName(key.substring(0, key.indexOf(postPrefix)));
    };
    QuestionPanelDynamicModel.prototype.getSharedQuestionFromArray = function (name, panelIndex) {
        return !!this.survey && !!this.valueName
            ? (this.survey.getQuestionByValueNameFromArray(this.valueName, name, panelIndex))
            : null;
    };
    QuestionPanelDynamicModel.prototype.addConditionObjectsByContext = function (objects, context) {
        var hasContext = !!context
            ? context === true || this.template.questions.indexOf(context) > -1
            : false;
        var prefixName = this.getValueName() + "[0].";
        var prefixText = this.processedTitle + "[0].";
        var panelObjs = new Array();
        var questions = this.template.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].addConditionObjectsByContext(panelObjs, context);
        }
        for (var i = 0; i < panelObjs.length; i++) {
            objects.push({
                name: prefixName + panelObjs[i].name,
                text: prefixText + panelObjs[i].text,
                question: panelObjs[i].question,
            });
        }
        if (hasContext) {
            var prefixName_1 = context === true ? this.getValueName() + "." : "";
            var prefixText_1 = context === true ? this.processedTitle + "." : "";
            for (var i = 0; i < panelObjs.length; i++) {
                if (panelObjs[i].question == context)
                    continue;
                var obj = {
                    name: prefixName_1 + "panel." + panelObjs[i].name,
                    text: prefixText_1 + "panel." + panelObjs[i].text,
                    question: panelObjs[i].question
                };
                if (context === true) {
                    obj.context = this;
                }
                objects.push(obj);
            }
        }
    };
    QuestionPanelDynamicModel.prototype.getConditionJson = function (operator, path) {
        if (operator === void 0) { operator = null; }
        if (path === void 0) { path = null; }
        if (!path)
            return _super.prototype.getConditionJson.call(this, operator, path);
        var questionName = path;
        var pos = path.indexOf(".");
        if (pos > -1) {
            questionName = path.substring(0, pos);
            path = path.substring(pos + 1);
        }
        var question = this.template.getQuestionByName(questionName);
        if (!question)
            return null;
        return question.getConditionJson(operator, path);
    };
    QuestionPanelDynamicModel.prototype.onReadOnlyChanged = function () {
        var readOnly = this.isReadOnly;
        this.template.readOnly = readOnly;
        for (var i = 0; i < this.panels.length; i++) {
            this.panels[i].readOnly = readOnly;
        }
        _super.prototype.onReadOnlyChanged.call(this);
    };
    QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
        this.template.readOnly = this.isReadOnly;
        this.template.onSurveyLoad();
        if (this.loadingPanelCount > 0) {
            this.panelCount = this.loadingPanelCount;
        }
        if (this.useTemplatePanel) {
            this.rebuildPanels();
        }
        this.setPanelsSurveyImpl();
        this.setPanelsState();
        this.assignOnPropertyChangedToTemplate();
        if (!!this.survey) {
            for (var i = 0; i < this.panelCount; i++) {
                this.survey.dynamicPanelAdded(this);
            }
        }
        this.recalculateIsReadyValue();
        _super.prototype.onSurveyLoad.call(this);
    };
    QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
        this.template.onFirstRendering();
        for (var i = 0; i < this.panels.length; i++) {
            this.panels[i].onFirstRendering();
        }
        _super.prototype.onFirstRendering.call(this);
    };
    QuestionPanelDynamicModel.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        for (var i = 0; i < this.panels.length; i++) {
            this.panels[i].localeChanged();
        }
    };
    QuestionPanelDynamicModel.prototype.runCondition = function (values, properties) {
        _super.prototype.runCondition.call(this, values, properties);
        this.runPanelsCondition(values, properties);
    };
    QuestionPanelDynamicModel.prototype.reRunCondition = function () {
        if (!this.data)
            return;
        this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
    };
    QuestionPanelDynamicModel.prototype.runPanelsCondition = function (values, properties) {
        var cachedValues = {};
        if (values && values instanceof Object) {
            cachedValues = JSON.parse(JSON.stringify(values));
        }
        if (!!this.parentQuestion && !!this.parent) {
            cachedValues[QuestionPanelDynamicItem.ParentItemVariableName] = this.parent.getValue();
        }
        for (var i = 0; i < this.panels.length; i++) {
            var panelValues = this.getPanelItemData(this.panels[i].data);
            //Should be unique for every panel due async expression support
            var newValues = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].createCopy(cachedValues);
            newValues[QuestionPanelDynamicItem.ItemVariableName.toLowerCase()] = panelValues;
            newValues[QuestionPanelDynamicItem.IndexVariableName.toLowerCase()] = i;
            this.panels[i].runCondition(newValues, properties);
        }
    };
    QuestionPanelDynamicModel.prototype.onAnyValueChanged = function (name) {
        _super.prototype.onAnyValueChanged.call(this, name);
        for (var i = 0; i < this.panels.length; i++) {
            this.panels[i].onAnyValueChanged(name);
            this.panels[i].onAnyValueChanged(QuestionPanelDynamicItem.ItemVariableName);
        }
    };
    QuestionPanelDynamicModel.prototype.hasKeysDuplicated = function (fireCallback, rec) {
        if (rec === void 0) { rec = null; }
        var keyValues = [];
        var res;
        for (var i = 0; i < this.panels.length; i++) {
            res =
                this.isValueDuplicated(this.panels[i], keyValues, rec, fireCallback) ||
                    res;
        }
        return res;
    };
    QuestionPanelDynamicModel.prototype.updatePanelsContainsErrors = function () {
        var question = this.changingValueQuestion;
        var parent = question.parent;
        while (!!parent) {
            parent.updateContainsErrors();
            parent = parent.parent;
        }
        this.updateContainsErrors();
    };
    QuestionPanelDynamicModel.prototype.hasErrors = function (fireCallback, rec) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (rec === void 0) { rec = null; }
        if (this.isValueChangingInternally)
            return false;
        var res = false;
        if (!!this.changingValueQuestion) {
            var res = this.changingValueQuestion.hasErrors(fireCallback, rec);
            res = this.hasKeysDuplicated(fireCallback, rec) || res;
            this.updatePanelsContainsErrors();
            return res;
        }
        else {
            var errosInPanels = this.hasErrorInPanels(fireCallback, rec);
            return _super.prototype.hasErrors.call(this, fireCallback) || errosInPanels;
        }
    };
    QuestionPanelDynamicModel.prototype.getContainsErrors = function () {
        var res = _super.prototype.getContainsErrors.call(this);
        if (res)
            return res;
        var panels = this.panels;
        for (var i = 0; i < panels.length; i++) {
            if (panels[i].containsErrors)
                return true;
        }
        return false;
    };
    QuestionPanelDynamicModel.prototype.getIsAnswered = function () {
        if (!_super.prototype.getIsAnswered.call(this))
            return false;
        var panels = this.panels;
        for (var i = 0; i < panels.length; i++) {
            var visibleQuestions = [];
            panels[i].addQuestionsToList(visibleQuestions, true);
            for (var j = 0; j < visibleQuestions.length; j++) {
                if (!visibleQuestions[j].isAnswered)
                    return false;
            }
        }
        return true;
    };
    QuestionPanelDynamicModel.prototype.clearValueIfInvisibleCore = function () {
        for (var i = 0; i < this.panels.length; i++) {
            var questions = this.panels[i].questions;
            this.isSetPanelItemData = [];
            for (var j = 0; j < questions.length; j++) {
                var q = questions[j];
                q.clearValueIfInvisible();
                this.isSetPanelItemData.push(q.getValueName());
            }
        }
        this.isSetPanelItemData = undefined;
        _super.prototype.clearValueIfInvisibleCore.call(this);
    };
    QuestionPanelDynamicModel.prototype.getIsRunningValidators = function () {
        if (_super.prototype.getIsRunningValidators.call(this))
            return true;
        for (var i = 0; i < this.panels.length; i++) {
            var questions = this.panels[i].questions;
            for (var j = 0; j < questions.length; j++) {
                if (questions[j].isRunningValidators)
                    return true;
            }
        }
        return false;
    };
    QuestionPanelDynamicModel.prototype.getAllErrors = function () {
        var result = _super.prototype.getAllErrors.call(this);
        for (var i = 0; i < this.panels.length; i++) {
            var questions = this.panels[i].questions;
            for (var j = 0; j < questions.length; j++) {
                var errors = questions[j].getAllErrors();
                if (errors && errors.length > 0) {
                    result = result.concat(errors);
                }
            }
        }
        return result;
    };
    QuestionPanelDynamicModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        var values = this.getUnbindValue(value);
        if (!values || !Array.isArray(values))
            return values;
        for (var i = 0; i < this.panels.length && i < values.length; i++) {
            var val = values[i];
            if (!val)
                continue;
            values[i] = this.getPanelDisplayValue(i, val, keysAsText);
        }
        return values;
    };
    QuestionPanelDynamicModel.prototype.getPanelDisplayValue = function (panelIndex, val, keysAsText) {
        if (!val)
            return val;
        var panel = this.panels[panelIndex];
        var keys = Object.keys(val);
        for (var i = 0; i < keys.length; i++) {
            var key = keys[i];
            var question = panel.getQuestionByValueName(key);
            if (!question) {
                question = this.getSharedQuestionFromArray(key, panelIndex);
            }
            if (!!question) {
                var qValue = question.getDisplayValue(keysAsText, val[key]);
                val[key] = qValue;
                if (keysAsText && !!question.title && question.title !== key) {
                    val[question.title] = qValue;
                    delete val[key];
                }
            }
        }
        return val;
    };
    QuestionPanelDynamicModel.prototype.hasErrorInPanels = function (fireCallback, rec) {
        var res = false;
        var panels = this.panels;
        var keyValues = [];
        for (var i = 0; i < panels.length; i++) {
            this.setOnCompleteAsyncInPanel(panels[i]);
        }
        for (var i = 0; i < panels.length; i++) {
            var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.focuseOnFirstError, rec);
            pnlError = this.isValueDuplicated(panels[i], keyValues, rec, fireCallback) || pnlError;
            if (!this.isRenderModeList && pnlError && !res) {
                this.currentIndex = i;
            }
            res = pnlError || res;
        }
        return res;
    };
    QuestionPanelDynamicModel.prototype.setOnCompleteAsyncInPanel = function (panel) {
        var _this = this;
        var questions = panel.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].onCompletedAsyncValidators = function (hasErrors) {
                _this.raiseOnCompletedAsyncValidators();
            };
        }
    };
    QuestionPanelDynamicModel.prototype.isValueDuplicated = function (panel, keyValues, rec, fireCallback) {
        if (!this.keyName)
            return false;
        var question = panel.getQuestionByValueName(this.keyName);
        if (!question || question.isEmpty())
            return false;
        var value = question.value;
        if (!!this.changingValueQuestion &&
            question != this.changingValueQuestion) {
            question.hasErrors(fireCallback, rec);
        }
        for (var i = 0; i < keyValues.length; i++) {
            if (value == keyValues[i]) {
                if (fireCallback) {
                    question.addError(new _error__WEBPACK_IMPORTED_MODULE_6__["KeyDuplicationError"](this.keyDuplicationError, this));
                }
                if (!!rec && !rec.firstErrorQuestion) {
                    rec.firstErrorQuestion = question;
                }
                return true;
            }
        }
        keyValues.push(value);
        return false;
    };
    QuestionPanelDynamicModel.prototype.createNewPanel = function () {
        var panel = this.createAndSetupNewPanelObject();
        var json = this.template.toJSON();
        new _jsonobject__WEBPACK_IMPORTED_MODULE_4__["JsonObject"]().toObject(json, panel);
        panel.renderWidth = "100%";
        panel.updateCustomWidgets();
        new QuestionPanelDynamicItem(this, panel);
        panel.onFirstRendering();
        var questions = panel.questions;
        for (var i = 0; i < questions.length; i++) {
            questions[i].setParentQuestion(this);
        }
        panel.locStrsChanged();
        return panel;
    };
    QuestionPanelDynamicModel.prototype.createAndSetupNewPanelObject = function () {
        var panel = this.createNewPanelObject();
        panel.isInteractiveDesignElement = false;
        panel.setParentQuestion(this);
        var self = this;
        panel.onGetQuestionTitleLocation = function () {
            return self.getTemplateQuestionTitleLocation();
        };
        return panel;
    };
    QuestionPanelDynamicModel.prototype.getTemplateQuestionTitleLocation = function () {
        return this.templateTitleLocation != "default"
            ? this.templateTitleLocation
            : this.getTitleLocationCore();
    };
    QuestionPanelDynamicModel.prototype.createNewPanelObject = function () {
        return _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].createClass("panel");
    };
    QuestionPanelDynamicModel.prototype.setPanelCountBasedOnValue = function () {
        if (this.isValueChangingInternally || this.useTemplatePanel)
            return;
        var val = this.value;
        var newPanelCount = val && Array.isArray(val) ? val.length : 0;
        if (newPanelCount == 0 && this.loadingPanelCount > 0) {
            newPanelCount = this.loadingPanelCount;
        }
        this.panelCount = newPanelCount;
    };
    QuestionPanelDynamicModel.prototype.setQuestionValue = function (newValue) {
        _super.prototype.setQuestionValue.call(this, newValue, false);
        this.setPanelCountBasedOnValue();
        for (var i = 0; i < this.panels.length; i++) {
            this.panelUpdateValueFromSurvey(this.panels[i]);
        }
        this.updateIsAnswered();
    };
    QuestionPanelDynamicModel.prototype.onSurveyValueChanged = function (newValue) {
        _super.prototype.onSurveyValueChanged.call(this, newValue);
        for (var i = 0; i < this.panels.length; i++) {
            this.panelSurveyValueChanged(this.panels[i]);
        }
        if (newValue === undefined) {
            this.setValueBasedOnPanelCount();
        }
        this.recalculateIsReadyValue();
    };
    QuestionPanelDynamicModel.prototype.panelUpdateValueFromSurvey = function (panel) {
        var questions = panel.questions;
        var values = this.getPanelItemData(panel.data);
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            q.updateValueFromSurvey(values[q.getValueName()]);
            q.updateCommentFromSurvey(values[q.getValueName() + _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentPrefix]);
        }
    };
    QuestionPanelDynamicModel.prototype.panelSurveyValueChanged = function (panel) {
        var questions = panel.questions;
        var values = this.getPanelItemData(panel.data);
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            q.onSurveyValueChanged(values[q.getValueName()]);
        }
    };
    QuestionPanelDynamicModel.prototype.recalculateIsReadyValue = function () {
        var _this = this;
        var oldIsReady = this.isReadyValue;
        var isReady = true;
        this.panels.forEach(function (panel) {
            panel.questions.forEach(function (q) {
                if (!q.isReady) {
                    isReady = false;
                    q.onReadyChanged.add(_this.onReadyChangedCallback);
                }
                else {
                    q.onReadyChanged.remove(_this.onReadyChangedCallback);
                }
            });
        });
        this.isReadyValue = isReady;
        if (oldIsReady != this.isReadyValue) {
            this.onReadyChanged.fire(this, {
                question: this,
                oldIsReady: oldIsReady,
                isReady: this.isReadyValue
            });
        }
    };
    QuestionPanelDynamicModel.prototype.onSetData = function () {
        _super.prototype.onSetData.call(this);
        if (this.useTemplatePanel) {
            this.setTemplatePanelSurveyImpl();
            this.rebuildPanels();
        }
    };
    //IQuestionPanelDynamicData
    QuestionPanelDynamicModel.prototype.getItemIndex = function (item) {
        var res = this.items.indexOf(item);
        return res > -1 ? res : this.items.length;
    };
    QuestionPanelDynamicModel.prototype.getPanelItemData = function (item) {
        var items = this.items;
        var index = items.indexOf(item);
        var qValue = this.value;
        if (index < 0 && Array.isArray(qValue) && qValue.length > items.length) {
            index = items.length;
        }
        if (index < 0)
            return {};
        if (!qValue || !Array.isArray(qValue) || qValue.length <= index)
            return {};
        return qValue[index];
    };
    QuestionPanelDynamicModel.prototype.setPanelItemData = function (item, name, val) {
        if (this.isSetPanelItemData && this.isSetPanelItemData.indexOf(name) > -1)
            return;
        if (!this.isSetPanelItemData)
            this.isSetPanelItemData = [];
        this.isSetPanelItemData.push(name);
        var items = this.items;
        var index = items.indexOf(item);
        if (index < 0)
            index = items.length;
        var qValue = this.getUnbindValue(this.value);
        if (!qValue || !Array.isArray(qValue)) {
            qValue = [];
        }
        if (qValue.length <= index) {
            for (var i = qValue.length; i <= index; i++) {
                qValue.push({});
            }
        }
        if (!qValue[index])
            qValue[index] = {};
        if (!this.isValueEmpty(val)) {
            qValue[index][name] = val;
        }
        else {
            delete qValue[index][name];
        }
        if (index >= 0 && index < this.panels.length) {
            this.changingValueQuestion = this.panels[index].getQuestionByValueName(name);
        }
        this.value = qValue;
        this.changingValueQuestion = null;
        if (this.survey) {
            var options = {
                question: this,
                panel: item.panel,
                name: name,
                itemIndex: index,
                itemValue: qValue[index],
                value: val,
            };
            this.survey.dynamicPanelItemValueChanged(this, options);
        }
        var index = this.isSetPanelItemData.indexOf(name);
        if (index > -1) {
            this.isSetPanelItemData.splice(index, 1);
        }
    };
    QuestionPanelDynamicModel.prototype.getRootData = function () {
        return this.data;
    };
    QuestionPanelDynamicModel.prototype.getPlainData = function (options) {
        if (options === void 0) { options = {
            includeEmpty: true,
        }; }
        var questionPlainData = _super.prototype.getPlainData.call(this, options);
        if (!!questionPlainData) {
            questionPlainData.isNode = true;
            questionPlainData.data = this.panels.map(function (panel, index) {
                var panelDataItem = {
                    name: panel.name || index,
                    title: panel.title || "Panel",
                    value: panel.getValue(),
                    displayValue: panel.getValue(),
                    getString: function (val) {
                        return typeof val === "object" ? JSON.stringify(val) : val;
                    },
                    isNode: true,
                    data: panel.questions
                        .map(function (question) { return question.getPlainData(options); })
                        .filter(function (d) { return !!d; }),
                };
                (options.calculations || []).forEach(function (calculation) {
                    panelDataItem[calculation.propertyName] = panel[calculation.propertyName];
                });
                return panelDataItem;
            });
        }
        return questionPlainData;
    };
    QuestionPanelDynamicModel.prototype.updateElementCss = function (reNew) {
        _super.prototype.updateElementCss.call(this, reNew);
        for (var i = 0; i < this.panels.length; i++) {
            var el = this.panels[i];
            el.updateElementCss(reNew);
        }
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "progressText", {
        get: function () {
            var rangeMax = this.panelCount;
            return this.getLocalizationFormatString("panelDynamicProgressText", this.currentIndex + 1, rangeMax);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "progress", {
        get: function () {
            return ((this.currentIndex + 1) / this.panelCount) * 100 + "%";
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.getRootCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.empty, this.getShowNoEntriesPlaceholder()).toString();
    };
    QuestionPanelDynamicModel.prototype.getPanelWrapperCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
            .append(this.cssClasses.panelWrapper)
            .append(this.cssClasses.panelWrapperInRow, this.panelRemoveButtonLocation === "right")
            .toString();
    };
    QuestionPanelDynamicModel.prototype.getPanelRemoveButtonCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
            .append(this.cssClasses.button)
            .append(this.cssClasses.buttonRemove)
            .append(this.cssClasses.buttonRemoveRight, this.panelRemoveButtonLocation === "right")
            .toString();
    };
    QuestionPanelDynamicModel.prototype.getAddButtonCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
            .append(this.cssClasses.button)
            .append(this.cssClasses.buttonAdd)
            .append(this.cssClasses.buttonAdd + "--list-mode", this.renderMode === "list")
            .toString();
    };
    QuestionPanelDynamicModel.prototype.getPrevButtonCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
            .append(this.cssClasses.buttonPrev)
            .append(this.cssClasses.buttonPrevDisabled, !this.isPrevButtonShowing)
            .toString();
    };
    QuestionPanelDynamicModel.prototype.getNextButtonCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
            .append(this.cssClasses.buttonNext)
            .append(this.cssClasses.buttonNextDisabled, !this.isNextButtonShowing)
            .toString();
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "noEntriesText", {
        /**
         * A text displayed when Dynamic Panel contains no entries. Applies only in the Default V2 theme.
         */
        get: function () {
            return this.getLocalizableStringText("noEntriesText");
        },
        set: function (val) {
            this.setLocalizableStringText("noEntriesText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "locNoEntriesText", {
        get: function () {
            return this.getLocalizableString("noEntriesText");
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.getShowNoEntriesPlaceholder = function () {
        return !!this.cssClasses.noEntriesPlaceholder && !this.isDesignMode && this.panelCount === 0;
    };
    QuestionPanelDynamicModel.prototype.needResponsiveWidth = function () {
        var panel = this.getPanel();
        if (!!panel && panel.needResponsiveWidth())
            return true;
        return false;
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "footerToolbar", {
        get: function () {
            if (!this.footerToolbarValue) {
                this.initFooterToolbar();
            }
            return this.footerToolbarValue;
        },
        enumerable: false,
        configurable: true
    });
    QuestionPanelDynamicModel.prototype.updateFooterActions = function () {
        if (!!this.updateFooterActionsCallback) {
            this.updateFooterActionsCallback();
        }
    };
    QuestionPanelDynamicModel.prototype.initFooterToolbar = function () {
        var _this = this;
        this.footerToolbarValue = this.createActionContainer();
        var items = [];
        var prevTextBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
            id: "sv-pd-prev-btn",
            title: this.panelPrevText,
            action: function () {
                _this.goToPrevPanel();
            }
        });
        var nextTextBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
            id: "sv-pd-next-btn",
            title: this.panelNextText,
            action: function () {
                _this.goToNextPanel();
            }
        });
        var addBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
            id: "sv-pd-add-btn",
            component: "sv-paneldynamic-add-btn",
            data: { question: this }
        });
        var prevBtnIcon = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
            id: "sv-prev-btn-icon",
            component: "sv-paneldynamic-prev-btn",
            data: { question: this }
        });
        var progressText = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
            id: "sv-pd-progress-text",
            component: "sv-paneldynamic-progress-text",
            data: { question: this }
        });
        var nextBtnIcon = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
            id: "sv-pd-next-btn-icon",
            component: "sv-paneldynamic-next-btn",
            data: { question: this }
        });
        items.push(prevTextBtn, nextTextBtn, addBtn, prevBtnIcon, progressText, nextBtnIcon);
        this.updateFooterActionsCallback = function () {
            var isLegacyNavigation = _this.legacyNavigation;
            var isRenderModeList = _this.isRenderModeList;
            var isMobile = _this.isMobile;
            var showNavigation = !isLegacyNavigation && !isRenderModeList;
            prevTextBtn.visible = showNavigation && _this.currentIndex > 0;
            nextTextBtn.visible = showNavigation && _this.currentIndex < _this.panelCount - 1;
            nextTextBtn.needSpace = isMobile && nextTextBtn.visible && prevTextBtn.visible;
            addBtn.needSpace = _this.isMobile && !nextTextBtn.visible && prevTextBtn.visible;
            progressText.visible = !_this.isRenderModeList && !isMobile;
            progressText.needSpace = !isLegacyNavigation && !_this.isMobile;
            var showLegacyNavigation = isLegacyNavigation && !isRenderModeList;
            prevBtnIcon.visible = showLegacyNavigation;
            nextBtnIcon.visible = showLegacyNavigation;
            prevBtnIcon.needSpace = showLegacyNavigation;
        };
        this.updateFooterActionsCallback();
        this.footerToolbarValue.setItems(items);
    };
    Object.defineProperty(QuestionPanelDynamicModel.prototype, "showLegacyNavigation", {
        get: function () {
            return !this.isDefaultV2Theme;
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_4__["property"])({ defaultValue: false, onSet: function (_, target) { target.updateFooterActions(); } })
    ], QuestionPanelDynamicModel.prototype, "legacyNavigation", void 0);
    return QuestionPanelDynamicModel;
}(_question__WEBPACK_IMPORTED_MODULE_3__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("paneldynamic", [
    {
        name: "templateElements",
        alternativeName: "questions",
        visible: false,
        isLightSerializable: false,
    },
    { name: "templateTitle:text", serializationProperty: "locTemplateTitle" },
    {
        name: "templateDescription:text",
        serializationProperty: "locTemplateDescription",
    },
    { name: "minWidth", default: "auto" },
    { name: "noEntriesText:text", serializationProperty: "locNoEntriesText" },
    { name: "allowAddPanel:boolean", default: true },
    { name: "allowRemovePanel:boolean", default: true },
    {
        name: "panelCount:number",
        isBindable: true,
        default: 0,
        choices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    },
    { name: "minPanelCount:number", default: 0, minValue: 0 },
    {
        name: "maxPanelCount:number",
        default: _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].panelMaximumPanelCount,
    },
    "defaultPanelValue:panelvalue",
    "defaultValueFromLastPanel:boolean",
    {
        name: "panelsState",
        default: "default",
        choices: ["default", "collapsed", "expanded", "firstExpanded"],
    },
    { name: "keyName" },
    {
        name: "keyDuplicationError",
        serializationProperty: "locKeyDuplicationError",
    },
    { name: "confirmDelete:boolean" },
    {
        name: "confirmDeleteText",
        serializationProperty: "locConfirmDeleteText",
    },
    { name: "panelAddText", serializationProperty: "locPanelAddText" },
    { name: "panelRemoveText", serializationProperty: "locPanelRemoveText" },
    { name: "panelPrevText", serializationProperty: "locPanelPrevText" },
    { name: "panelNextText", serializationProperty: "locPanelNextText" },
    {
        name: "showQuestionNumbers",
        default: "off",
        choices: ["off", "onPanel", "onSurvey"],
    },
    { name: "showRangeInProgress:boolean", default: true },
    {
        name: "renderMode",
        default: "list",
        choices: ["list", "progressTop", "progressBottom", "progressTopBottom"],
    },
    {
        name: "templateTitleLocation",
        default: "default",
        choices: ["default", "top", "bottom", "left"],
    },
    {
        name: "panelRemoveButtonLocation",
        default: "bottom",
        choices: ["bottom", "right"],
    },
], function () {
    return new QuestionPanelDynamicModel("");
}, "question");
_questionfactory__WEBPACK_IMPORTED_MODULE_5__["QuestionFactory"].Instance.registerQuestion("paneldynamic", function (name) {
    return new QuestionPanelDynamicModel(name);
});


/***/ }),

/***/ "./src/question_radiogroup.ts":
/*!************************************!*\
  !*** ./src/question_radiogroup.ts ***!
  \************************************/
/*! exports provided: QuestionRadiogroupModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRadiogroupModel", function() { return QuestionRadiogroupModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_baseselect */ "./src/question_baseselect.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base */ "./src/base.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * A class that describes the Radiogroup question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-radiogroup/ (linkStyle))
 */
var QuestionRadiogroupModel = /** @class */ (function (_super) {
    __extends(QuestionRadiogroupModel, _super);
    function QuestionRadiogroupModel(name) {
        return _super.call(this, name) || this;
    }
    QuestionRadiogroupModel.prototype.getDefaultItemComponent = function () {
        return "survey-radiogroup-item";
    };
    QuestionRadiogroupModel.prototype.getType = function () {
        return "radiogroup";
    };
    Object.defineProperty(QuestionRadiogroupModel.prototype, "ariaRole", {
        get: function () {
            return "radiogroup";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRadiogroupModel.prototype, "titleAriaLabel", {
        get: function () {
            return null;
        },
        enumerable: false,
        configurable: true
    });
    QuestionRadiogroupModel.prototype.getFirstInputElementId = function () {
        return this.inputId + "_0";
    };
    Object.defineProperty(QuestionRadiogroupModel.prototype, "selectedItem", {
        /**
         * Returns the selected choice item. If no item is selected, returns `null`.
         */
        get: function () {
            var selectedItemValues = this.selectedItemValues;
            if (this.isEmpty())
                return null;
            var itemValue = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.visibleChoices, this.value);
            if (!itemValue && !selectedItemValues) {
                this.updateSelectedItemValues();
            }
            return itemValue || selectedItemValues || new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRadiogroupModel.prototype, "showClearButton", {
        /**
         * Specifies whether to display a button that clears the question value.
         *
         * Default value: `false`
         */
        get: function () {
            return this.getPropertyValue("showClearButton");
        },
        set: function (val) {
            this.setPropertyValue("showClearButton", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRadiogroupModel.prototype, "canShowClearButton", {
        get: function () {
            return this.showClearButton && !this.isReadOnly;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRadiogroupModel.prototype, "clearButtonCaption", {
        get: function () {
            return this.getLocalizationString("clearCaption");
        },
        enumerable: false,
        configurable: true
    });
    QuestionRadiogroupModel.prototype.supportGoNextPageAutomatic = function () {
        return true;
    };
    Object.defineProperty(QuestionRadiogroupModel.prototype, "showClearButtonInContent", {
        get: function () {
            return !this.isDefaultV2Theme && this.canShowClearButton;
        },
        enumerable: false,
        configurable: true
    });
    QuestionRadiogroupModel.prototype.getDefaultTitleActions = function () {
        var _this = this;
        var actions = [];
        if (this.isDefaultV2Theme && !this.isDesignMode) {
            var clearAction = new _actions_action__WEBPACK_IMPORTED_MODULE_4__["Action"]({
                title: this.clearButtonCaption,
                id: "sv-clr-btn-".concat(this.id),
                action: function () { _this.clearValue(); },
                innerCss: this.cssClasses.clearButton,
                visible: new _base__WEBPACK_IMPORTED_MODULE_5__["ComputedUpdater"](function () { return _this.canShowClearButton; })
            });
            actions.push(clearAction);
        }
        return actions;
    };
    return QuestionRadiogroupModel;
}(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("radiogroup", [{ name: "showClearButton:boolean", default: false },
    { name: "separateSpecialChoices", visible: true },
    { name: "itemComponent", visible: false, default: "survey-radiogroup-item" }
], function () {
    return new QuestionRadiogroupModel("");
}, "checkboxbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("radiogroup", function (name) {
    var q = new QuestionRadiogroupModel(name);
    q.choices = _questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/question_ranking.ts":
/*!*********************************!*\
  !*** ./src/question_ranking.ts ***!
  \*********************************/
/*! exports provided: QuestionRankingModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRankingModel", function() { return QuestionRankingModel; });
/* harmony import */ var _dragdrop_ranking_choices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dragdrop/ranking-choices */ "./src/dragdrop/ranking-choices.ts");
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question_checkbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./question_checkbox */ "./src/question_checkbox.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};








/**
 * A class that describes the Ranking question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-ranking/ (linkStyle))
 */
var QuestionRankingModel = /** @class */ (function (_super) {
    __extends(QuestionRankingModel, _super);
    function QuestionRankingModel(name) {
        var _this = _super.call(this, name) || this;
        _this.domNode = null;
        _this.onVisibleChoicesChanged = function () {
            _super.prototype.onVisibleChoicesChanged.call(_this);
            // ranking question with only one choice doesn't make sense
            if (_this.visibleChoices.length === 1) {
                _this.value = [];
                _this.updateRankingChoices();
                return;
            }
            if (_this.isEmpty()) {
                _this.updateRankingChoices();
                return;
            }
            if (_this.visibleChoices.length > _this.value.length)
                _this.addToValueByVisibleChoices();
            if (_this.visibleChoices.length < _this.value.length)
                _this.removeFromValueByVisibleChoices();
            _this.updateRankingChoices();
        };
        _this.localeChanged = function () {
            _super.prototype.localeChanged.call(_this);
            _this.updateRankingChoices();
        };
        _this.handlePointerDown = function (event, choice, node) {
            if (_this.allowStartDrag) {
                _this.dragDropRankingChoices.startDrag(event, choice, _this, node);
            }
        };
        _this.handleKeydown = function (event, choice) {
            if (!_this.isDesignMode) {
                var key = event.key;
                var index = _this.rankingChoices.indexOf(choice);
                if (key === "ArrowUp" && index) {
                    _this.handleArrowUp(index, choice);
                    event.preventDefault();
                }
                if (key === "ArrowDown" && index !== _this.rankingChoices.length - 1) {
                    _this.handleArrowDown(index, choice);
                    event.preventDefault();
                }
            }
        };
        _this.handleArrowUp = function (index, choice) {
            var choices = _this.rankingChoices;
            choices.splice(index, 1);
            choices.splice(index - 1, 0, choice);
            _this.setValue();
            setTimeout(function () {
                _this.focusItem(index - 1);
            }, 1);
        };
        _this.handleArrowDown = function (index, choice) {
            var choices = _this.rankingChoices;
            choices.splice(index, 1);
            choices.splice(index + 1, 0, choice);
            _this.setValue();
            setTimeout(function () {
                _this.focusItem(index + 1);
            }, 1);
        };
        _this.focusItem = function (index) {
            var itemsNodes = _this.domNode.querySelectorAll("." + _this.cssClasses.item);
            itemsNodes[index].focus();
        };
        _this.setValue = function () {
            var value = [];
            _this.rankingChoices.forEach(function (choice) {
                value.push(choice.value);
            });
            _this.value = value;
        };
        _this.setValueFromUI = function () {
            var value = [];
            var textNodes = _this.domNode.querySelectorAll("." + _this.cssClasses.controlLabel);
            textNodes.forEach(function (textNode, index) {
                var innerText = textNode.innerText;
                _this.visibleChoices.forEach(function (visibleChoice) {
                    if (innerText === visibleChoice.text) {
                        value.push(visibleChoice.value);
                    }
                });
            });
            _this.value = value;
        };
        _this.syncNumbers = function () {
            if (!_this.domNode)
                return;
            var selector = "." +
                _this.cssClasses.item +
                ":not(." +
                _this.cssClasses.itemDragMod +
                ")" +
                " ." +
                _this.cssClasses.itemIndex;
            var indexNodes = _this.domNode.querySelectorAll(selector);
            indexNodes.forEach(function (indexNode, index) {
                indexNode.innerText = _this.getNumberByIndex(index);
            });
        };
        _this.setGhostText = function (text) {
            var indexNodes = _this.domNode.querySelectorAll("." + _this.cssClasses.itemIndex);
            var ghostNode = indexNodes[indexNodes.length - 1];
            ghostNode.innerText = text;
        };
        _this.createNewArray("rankingChoices");
        return _this;
    }
    QuestionRankingModel.prototype.getDefaultItemComponent = function () {
        return "";
    };
    QuestionRankingModel.prototype.getType = function () {
        return "ranking";
    };
    QuestionRankingModel.prototype.getItemTabIndex = function (item) {
        return this.isDesignMode ? undefined : 0;
    };
    Object.defineProperty(QuestionRankingModel.prototype, "rootClass", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
                .append(this.cssClasses.root)
                .append(this.cssClasses.rootMobileMod, _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsMobile"])
                .append(this.cssClasses.rootDisabled, this.isReadOnly)
                .append(this.cssClasses.rootDesignMode, !!this.isDesignMode)
                .append(this.cssClasses.itemOnError, this.errors.length > 0)
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    QuestionRankingModel.prototype.getItemClassCore = function (item, options) {
        var itemIndex = this.rankingChoices.indexOf(item);
        var dropTargetIndex = this.rankingChoices.indexOf(this.currentDropTarget);
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(_super.prototype.getItemClassCore.call(this, item, options))
            .append(this.cssClasses.itemGhostMod, this.currentDropTarget === item)
            .append("sv-dragdrop-movedown", itemIndex === dropTargetIndex + 1 && this.dropTargetNodeMove === "down")
            .append("sv-dragdrop-moveup", itemIndex === dropTargetIndex - 1 && this.dropTargetNodeMove === "up")
            .toString();
    };
    QuestionRankingModel.prototype.isItemCurrentDropTarget = function (item) {
        return this.dragDropRankingChoices.dropTarget === item;
    };
    Object.defineProperty(QuestionRankingModel.prototype, "ghostPositionCssClass", {
        get: function () {
            if (this.ghostPosition === "top")
                return this.cssClasses.dragDropGhostPositionTop;
            if (this.ghostPosition === "bottom")
                return this.cssClasses.dragDropGhostPositionBottom;
            return "";
        },
        enumerable: false,
        configurable: true
    });
    QuestionRankingModel.prototype.getNumberByIndex = function (index) {
        return this.isEmpty() ? "\u2013" : index + 1 + "";
    };
    QuestionRankingModel.prototype.setSurveyImpl = function (value, isLight) {
        _super.prototype.setSurveyImpl.call(this, value, isLight);
        this.updateRankingChoices();
    };
    QuestionRankingModel.prototype.isAnswerCorrect = function () {
        return _helpers__WEBPACK_IMPORTED_MODULE_7__["Helpers"].isArraysEqual(this.value, this.correctAnswer, false);
    };
    QuestionRankingModel.prototype.onSurveyValueChanged = function (newValue) {
        _super.prototype.onSurveyValueChanged.call(this, newValue);
        if (this.isLoadingFromJson)
            return;
        this.updateRankingChoices();
    };
    QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
        var newValue = this.value.slice();
        this.visibleChoices.forEach(function (choice) {
            if (newValue.indexOf(choice.value) === -1) {
                newValue.push(choice.value);
            }
        });
        this.value = newValue;
    };
    QuestionRankingModel.prototype.removeFromValueByVisibleChoices = function () {
        var _this = this;
        var newValue = this.value.slice();
        this.value.forEach(function (valueItem, index) {
            var isValueItemToRemove = true;
            _this.visibleChoices.forEach(function (choice) {
                if (choice.value === valueItem)
                    isValueItemToRemove = false;
            });
            isValueItemToRemove && newValue.splice(index, 1);
        });
        this.value = newValue;
    };
    Object.defineProperty(QuestionRankingModel.prototype, "rankingChoices", {
        get: function () {
            return this.getPropertyValue("rankingChoices", []);
        },
        enumerable: false,
        configurable: true
    });
    QuestionRankingModel.prototype.updateRankingChoices = function (forceUpdate) {
        var _this = this;
        if (forceUpdate === void 0) { forceUpdate = false; }
        var newRankingChoices = [];
        // ranking question with only one choice doesn't make sense
        if (this.visibleChoices.length === 1) {
            this.setPropertyValue("rankingChoices", newRankingChoices);
            return;
        }
        if (forceUpdate)
            this.setPropertyValue("rankingChoices", []);
        if (this.isEmpty()) {
            this.setPropertyValue("rankingChoices", this.visibleChoices);
            return;
        }
        this.value.forEach(function (valueItem) {
            _this.visibleChoices.forEach(function (choice) {
                if (choice.value === valueItem)
                    newRankingChoices.push(choice);
            });
        });
        this.setPropertyValue("rankingChoices", newRankingChoices);
    };
    QuestionRankingModel.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        this.dragDropRankingChoices = new _dragdrop_ranking_choices__WEBPACK_IMPORTED_MODULE_0__["DragDropRankingChoices"](this.survey, null, this.longTap);
    };
    Object.defineProperty(QuestionRankingModel.prototype, "allowStartDrag", {
        get: function () {
            return !this.isReadOnly && !this.isDesignMode;
        },
        enumerable: false,
        configurable: true
    });
    //cross framework initialization
    QuestionRankingModel.prototype.afterRenderQuestionElement = function (el) {
        this.domNode = el;
        _super.prototype.afterRenderQuestionElement.call(this, el);
    };
    //cross framework destroy
    QuestionRankingModel.prototype.beforeDestroyQuestionElement = function (el) {
        _super.prototype.beforeDestroyQuestionElement.call(this, el);
    };
    QuestionRankingModel.prototype.supportSelectAll = function () {
        return false;
    };
    QuestionRankingModel.prototype.supportOther = function () {
        return false;
    };
    QuestionRankingModel.prototype.supportNone = function () {
        return false;
    };
    QuestionRankingModel.prototype.getChoicesFromQuestion = function (question) {
        var res = _super.prototype.getChoicesFromQuestion.call(this, question);
        if (this.choicesFromQuestionMode === "selected" && question.isOtherSelected && !!question.comment) {
            res.push(new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](question.otherItem.value, question.comment));
        }
        return res;
    };
    QuestionRankingModel.prototype.getIconHoverCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(this.cssClasses.itemIcon)
            .append(this.cssClasses.itemIconHoverMod)
            .toString();
    };
    QuestionRankingModel.prototype.getIconFocusCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
            .append(this.cssClasses.itemIcon)
            .append(this.cssClasses.itemIconFocusMod)
            .toString();
    };
    Object.defineProperty(QuestionRankingModel.prototype, "longTap", {
        /**
         * Specifies whether to use a long tap (press and hold) gesture to start dragging.
         *
         * Default value: `true`
         *
         * Disable this property if you want to start dragging when users perform a scroll gesture.
        */
        get: function () {
            return this.getPropertyValue("longTap");
        },
        set: function (val) {
            this.setPropertyValue("longTap", val);
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: null })
    ], QuestionRankingModel.prototype, "currentDropTarget", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: null })
    ], QuestionRankingModel.prototype, "dropTargetNodeMove", void 0);
    return QuestionRankingModel;
}(_question_checkbox__WEBPACK_IMPORTED_MODULE_4__["QuestionCheckboxModel"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("ranking", [
    { name: "showOtherItem", visible: false, isSerializable: false },
    { name: "otherText", visible: false, isSerializable: false },
    { name: "otherErrorText", visible: false, isSerializable: false },
    { name: "storeOthersAsComment", visible: false, isSerializable: false },
    { name: "showNoneItem", visible: false, isSerializable: false },
    { name: "noneText", visible: false, isSerializable: false },
    { name: "showSelectAllItem", visible: false, isSerializable: false },
    { name: "selectAllText", visible: false, isSerializable: false },
    { name: "colCount:number", visible: false, isSerializable: false },
    { name: "maxSelectedChoices", visible: false, isSerializable: false },
    {
        name: "longTap",
        default: true,
        visible: false,
        isSerializable: false,
    },
    { name: "itemComponent", visible: false, default: "" }
], function () {
    return new QuestionRankingModel("");
}, "checkbox");
_questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].Instance.registerQuestion("ranking", function (name) {
    var q = new QuestionRankingModel(name);
    q.choices = _questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/question_rating.ts":
/*!********************************!*\
  !*** ./src/question_rating.ts ***!
  \********************************/
/*! exports provided: RenderedRatingItem, QuestionRatingModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderedRatingItem", function() { return RenderedRatingItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRatingModel", function() { return QuestionRatingModel; });
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./base */ "./src/base.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};








var RenderedRatingItem = /** @class */ (function (_super) {
    __extends(RenderedRatingItem, _super);
    function RenderedRatingItem(itemValue, locString) {
        if (locString === void 0) { locString = null; }
        var _this = _super.call(this) || this;
        _this.itemValue = itemValue;
        _this.locString = locString;
        return _this;
    }
    Object.defineProperty(RenderedRatingItem.prototype, "value", {
        get: function () {
            return this.itemValue.getPropertyValue("value");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(RenderedRatingItem.prototype, "locText", {
        get: function () {
            return this.locString || this.itemValue.locText;
        },
        enumerable: false,
        configurable: true
    });
    return RenderedRatingItem;
}(_base__WEBPACK_IMPORTED_MODULE_7__["Base"]));

/**
 * A Model for a rating question.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-rating/ (linkStyle))
 */
var QuestionRatingModel = /** @class */ (function (_super) {
    __extends(QuestionRatingModel, _super);
    function QuestionRatingModel(name) {
        var _this = _super.call(this, name) || this;
        _this.createItemValues("rateValues");
        _this.createRenderedRateItems();
        _this.createLocalizableString("ratingOptionsCaption", _this, false, true);
        _this.registerFunctionOnPropertiesValueChanged(["rateValues", "rateMin", "rateMax",
            "minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.createRenderedRateItems(); });
        _this.createLocalizableString("minRateDescription", _this, true);
        _this.createLocalizableString("maxRateDescription", _this, true);
        return _this;
    }
    QuestionRatingModel.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        this.hasMinRateDescription = !!this.minRateDescription;
        this.hasMaxRateDescription = !!this.maxRateDescription;
        this.createRenderedRateItems();
    };
    Object.defineProperty(QuestionRatingModel.prototype, "rateValues", {
        /**
         * A list of rate values.
         *
         * This property accepts an array of objects with the following structure:
         *
         * ```js
         * {
         *   "value": any, // A value to be saved in survey results
         *   "text": String, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
         * }
         * ```
         *
         * If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
         *
         * If you do not specify the `rateValues` property, rate values are generated automatically based upon the `rateMin`, `rateMax`, and `rateStep` property values.
         * @see rateMin
         * @see rateMax
         * @see rateStep
         */
        get: function () {
            return this.getPropertyValue("rateValues");
        },
        set: function (val) {
            this.setPropertyValue("rateValues", val);
            this.createRenderedRateItems();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "rateMin", {
        /**
         * Specifies the first rate value in the generated sequence of rate values. Applies if the `rateValues` array is empty.
         *
         * Default value: 1
         * @see rateValues
         * @see rateMax
         * @see rateStep
         */
        get: function () {
            return this.getPropertyValue("rateMin");
        },
        set: function (val) {
            this.setPropertyValue("rateMin", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "rateMax", {
        /**
         * Specifies the last rate value in the generated sequence of rate values. Applies if the `rateValues` array is empty.
         *
         * Default value: 5
         * @see rateValues
         * @see rateMin
         * @see rateStep
         */
        get: function () {
            return this.getPropertyValue("rateMax");
        },
        set: function (val) {
            this.setPropertyValue("rateMax", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "rateStep", {
        /**
         * Specifies a step with which to generate rate values. Applies if the `rateValues` array is empty.
         *
         * Default value: 1
         * @see rateValues
         * @see rateMin
         * @see rateMax
         */
        get: function () {
            return this.getPropertyValue("rateStep");
        },
        set: function (val) {
            this.setPropertyValue("rateStep", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionRatingModel.prototype.getDisplayValueCore = function (keysAsText, value) {
        var res = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getTextOrHtmlByValue(this.visibleRateValues, value);
        return !!res ? res : value;
    };
    Object.defineProperty(QuestionRatingModel.prototype, "visibleRateValues", {
        get: function () {
            return this.renderedRateItems.map(function (i) { return i.itemValue; });
        },
        enumerable: false,
        configurable: true
    });
    QuestionRatingModel.prototype.itemValuePropertyChanged = function (item, name, oldValue, newValue) {
        if (this.rateValues.length === 0 && newValue !== undefined)
            this.setPropertyValue("rateValues", this.visibleRateValues);
        _super.prototype.itemValuePropertyChanged.call(this, item, name, oldValue, newValue);
    };
    QuestionRatingModel.prototype.createRenderedRateItems = function () {
        var _this = this;
        var rateValues = [];
        if (this.rateValues.length > 0) {
            rateValues = this.rateValues;
        }
        else {
            var res = [];
            var value = this.rateMin;
            var step = this.rateStep;
            while (value <= this.rateMax &&
                res.length < _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].ratingMaximumRateValueCount) {
                var item = new _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"](value);
                item.locOwner = this;
                item.ownerPropertyName = "rateValues";
                res.push(item);
                value = this.correctValue(value + step, step);
            }
            rateValues = res;
        }
        this.renderedRateItems = rateValues.map(function (v, i) {
            if (_this.displayRateDescriptionsAsExtremeItems) {
                if (i == 0)
                    return new RenderedRatingItem(v, _this.minRateDescription && _this.locMinRateDescription || v.locText);
                if (i == rateValues.length - 1)
                    return new RenderedRatingItem(v, _this.maxRateDescription && _this.locMaxRateDescription || v.locText);
            }
            return new RenderedRatingItem(v);
        });
    };
    QuestionRatingModel.prototype.correctValue = function (value, step) {
        if (!value)
            return value;
        if (Math.round(value) == value)
            return value;
        var fr = 0;
        while (Math.round(step) != step) {
            step *= 10;
            fr++;
        }
        return parseFloat(value.toFixed(fr));
    };
    QuestionRatingModel.prototype.getType = function () {
        return "rating";
    };
    QuestionRatingModel.prototype.getFirstInputElementId = function () {
        return this.inputId + "_0";
    };
    QuestionRatingModel.prototype.getInputId = function (index) {
        return this.inputId + "_" + index;
    };
    QuestionRatingModel.prototype.supportGoNextPageAutomatic = function () {
        return true;
    };
    QuestionRatingModel.prototype.supportComment = function () {
        return true;
    };
    QuestionRatingModel.prototype.supportOther = function () {
        return false;
    };
    Object.defineProperty(QuestionRatingModel.prototype, "minRateDescription", {
        /**
         * Specifies a description for the minimum (first) rate value.
         * @see rateValues
         * @see rateMin
         * @see displayRateDescriptionsAsExtremeItems
         */
        get: function () {
            return this.getLocalizableStringText("minRateDescription");
        },
        set: function (val) {
            this.setLocalizableStringText("minRateDescription", val);
            this.hasMinRateDescription = !!this.minRateDescription;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "locMinRateDescription", {
        get: function () {
            return this.getLocalizableString("minRateDescription");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "maxRateDescription", {
        /**
         * Specifies a description for the maximum (last) rate value.
         * @see rateValues
         * @see rateMax
         * @see displayRateDescriptionsAsExtremeItems
         */
        get: function () {
            return this.getLocalizableStringText("maxRateDescription");
        },
        set: function (val) {
            this.setLocalizableStringText("maxRateDescription", val);
            this.hasMaxRateDescription = !!this.maxRateDescription;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "locMaxRateDescription", {
        get: function () {
            return this.getLocalizableString("maxRateDescription");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "hasMinLabel", {
        get: function () {
            return !this.displayRateDescriptionsAsExtremeItems && !!this.hasMinRateDescription;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "hasMaxLabel", {
        get: function () {
            return !this.displayRateDescriptionsAsExtremeItems && !!this.hasMaxRateDescription;
        },
        enumerable: false,
        configurable: true
    });
    QuestionRatingModel.prototype.valueToData = function (val) {
        if (this.rateValues.length > 0) {
            var item = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(this.rateValues, val);
            return !!item ? item.value : val;
        }
        return !isNaN(val) ? parseFloat(val) : val;
    };
    QuestionRatingModel.prototype.setValueFromClick = function (value) {
        if (this.value === parseFloat(value)) {
            this.clearValue();
        }
        else {
            this.value = value;
        }
    };
    Object.defineProperty(QuestionRatingModel.prototype, "ratingRootCss", {
        get: function () {
            return ((this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode)) && this.cssClasses.rootWrappable) ?
                this.cssClasses.rootWrappable : this.cssClasses.root;
        },
        enumerable: false,
        configurable: true
    });
    QuestionRatingModel.prototype.getItemClass = function (item) {
        var isSelected = this.value == item.value;
        var isDisabled = this.isReadOnly || !item.isEnabled;
        var allowHover = !isDisabled && !isSelected && !(!!this.survey && this.survey.isDesignMode);
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
            .append(this.cssClasses.item)
            .append(this.cssClasses.selected, this.value == item.value)
            .append(this.cssClasses.itemDisabled, this.isReadOnly)
            .append(this.cssClasses.itemHover, allowHover)
            .append(this.cssClasses.itemOnError, this.errors.length > 0)
            .toString();
    };
    //methods for mobile view
    QuestionRatingModel.prototype.getControlClass = function () {
        this.isEmpty();
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
            .append(this.cssClasses.control)
            .append(this.cssClasses.controlEmpty, this.isEmpty())
            .append(this.cssClasses.onError, this.errors.length > 0)
            .append(this.cssClasses.controlDisabled, this.isReadOnly)
            .toString();
    };
    Object.defineProperty(QuestionRatingModel.prototype, "placeholder", {
        get: function () {
            return this.getLocalizableStringText("ratingOptionsCaption");
        },
        set: function (val) {
            this.setLocalizableStringText("ratingOptionsCaption", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "locPlaceholder", {
        get: function () {
            return this.getLocalizableString("ratingOptionsCaption");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "allowClear", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "searchEnabled", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "renderedValue", {
        get: function () {
            return this.value;
        },
        set: function (val) {
            this.value = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
        get: function () {
            return this.visibleRateValues;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionRatingModel.prototype, "readOnlyText", {
        get: function () {
            return (this.displayValue || this.placeholder);
        },
        enumerable: false,
        configurable: true
    });
    QuestionRatingModel.prototype.needResponsiveWidth = function () {
        var rateValues = this.getPropertyValue("rateValues");
        var rateStep = this.getPropertyValue("rateStep");
        var rateMax = this.getPropertyValue("rateMax");
        var rateMin = this.getPropertyValue("rateMin");
        return this.displayMode != "dropdown" && !!(this.hasMinRateDescription ||
            this.hasMaxRateDescription ||
            (rateStep && (rateMax - rateMin) / rateStep > 9));
    };
    // TODO: return responsiveness after design improvement
    QuestionRatingModel.prototype.supportResponsiveness = function () {
        return true;
    };
    QuestionRatingModel.prototype.getCompactRenderAs = function () {
        return (this.displayMode == "buttons") ? "default" : "dropdown";
    };
    QuestionRatingModel.prototype.getDesktopRenderAs = function () {
        return (this.displayMode == "dropdown") ? "dropdown" : "default";
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["propertyArray"])()
    ], QuestionRatingModel.prototype, "renderedRateItems", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
    ], QuestionRatingModel.prototype, "hasMinRateDescription", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
    ], QuestionRatingModel.prototype, "hasMaxRateDescription", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
    ], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "auto", onSet: function (val, target) {
                if (!target.isDesignMode) {
                    if (val === "dropdown") {
                        target.renderAs = "dropdown";
                    }
                    else {
                        target.renderAs = "default";
                    }
                }
            } })
    ], QuestionRatingModel.prototype, "displayMode", void 0);
    return QuestionRatingModel;
}(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
    { name: "showCommentArea:switch", layout: "row", visible: true },
    {
        name: "commentText",
        dependsOn: "showCommentArea",
        visibleIf: function (obj) {
            return obj.hasComment;
        },
        serializationProperty: "locCommentText",
        layout: "row",
    },
    {
        name: "commentPlaceholder",
        alternativeName: "commentPlaceHolder",
        serializationProperty: "locCommentPlaceholder",
        dependsOn: "showCommentArea",
        visibleIf: function (obj) {
            return obj.hasComment;
        },
    },
    {
        name: "rateValues:itemvalue[]",
        baseValue: function () {
            return _surveyStrings__WEBPACK_IMPORTED_MODULE_5__["surveyLocalization"].getString("choices_Item");
        },
    },
    {
        name: "rateMin:number", default: 1,
        onSettingValue: function (obj, val) {
            return val > obj.rateMax - obj.rateStep ? obj.rateMax - obj.rateStep : val;
        }
    },
    {
        name: "rateMax:number", default: 5,
        onSettingValue: function (obj, val) {
            return val < obj.rateMin + obj.rateStep ? obj.rateMin + obj.rateStep : val;
        }
    },
    {
        name: "rateStep:number", default: 1, minValue: 0.1,
        onSettingValue: function (obj, val) {
            if (val <= 0)
                val = 1;
            if (val > obj.rateMax - obj.rateMin)
                val = obj.rateMax - obj.rateMin;
            return val;
        }
    },
    {
        name: "minRateDescription",
        alternativeName: "mininumRateDescription",
        serializationProperty: "locMinRateDescription",
    },
    {
        name: "maxRateDescription",
        alternativeName: "maximumRateDescription",
        serializationProperty: "locMaxRateDescription",
    },
    { name: "displayRateDescriptionsAsExtremeItems:boolean", default: false },
    {
        name: "displayMode",
        default: "auto",
        choices: ["auto", "buttons", "dropdown"],
    }
], function () {
    return new QuestionRatingModel("");
}, "question");
_questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].Instance.registerQuestion("rating", function (name) {
    return new QuestionRatingModel(name);
});


/***/ }),

/***/ "./src/question_signaturepad.ts":
/*!**************************************!*\
  !*** ./src/question_signaturepad.ts ***!
  \**************************************/
/*! exports provided: QuestionSignaturePadModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return QuestionSignaturePadModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var signature_pad__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! signature_pad */ "./node_modules/signature_pad/dist/signature_pad.mjs");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var defaultWidth = 300;
var defaultHeight = 200;
function resizeCanvas(canvas) {
    var context = canvas.getContext("2d");
    var devicePixelRatio = window.devicePixelRatio || 1;
    var backingStoreRatio = context.webkitBackingStorePixelRatio ||
        context.mozBackingStorePixelRatio ||
        context.msBackingStorePixelRatio ||
        context.oBackingStorePixelRatio ||
        context.backingStorePixelRatio ||
        1;
    var ratio = devicePixelRatio / backingStoreRatio;
    var oldWidth = canvas.width;
    var oldHeight = canvas.height;
    canvas.width = oldWidth * ratio;
    canvas.height = oldHeight * ratio;
    canvas.style.width = oldWidth + "px";
    canvas.style.height = oldHeight + "px";
    context.scale(ratio, ratio);
}
/**
 * A class that describes the Signature Page question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/ (linkStyle))
 */
var QuestionSignaturePadModel = /** @class */ (function (_super) {
    __extends(QuestionSignaturePadModel, _super);
    function QuestionSignaturePadModel(name) {
        return _super.call(this, name) || this;
    }
    QuestionSignaturePadModel.prototype.getCssRoot = function (cssClasses) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
            .append(_super.prototype.getCssRoot.call(this, cssClasses))
            .append(cssClasses.small, this.signatureWidth.toString() === "300")
            .toString();
    };
    QuestionSignaturePadModel.prototype.updateValue = function () {
        if (this.signaturePad) {
            var data = this.signaturePad.toDataURL(this.dataFormat);
            this.value = data;
        }
    };
    QuestionSignaturePadModel.prototype.getType = function () {
        return "signaturepad";
    };
    QuestionSignaturePadModel.prototype.afterRenderQuestionElement = function (el) {
        if (!!el) {
            this.initSignaturePad(el);
        }
        _super.prototype.afterRenderQuestionElement.call(this, el);
    };
    QuestionSignaturePadModel.prototype.beforeDestroyQuestionElement = function (el) {
        if (!!el) {
            this.destroySignaturePad(el);
        }
    };
    QuestionSignaturePadModel.prototype.initSignaturePad = function (el) {
        var _this = this;
        var canvas = el.getElementsByTagName("canvas")[0];
        var signaturePad = new signature_pad__WEBPACK_IMPORTED_MODULE_3__["default"](canvas, { backgroundColor: "#ffffff" });
        if (this.isInputReadOnly) {
            signaturePad.off();
        }
        this.readOnlyChangedCallback = function () {
            if (_this.isInputReadOnly) {
                signaturePad.off();
            }
            else {
                signaturePad.on();
            }
        };
        signaturePad.penColor = this.penColor;
        signaturePad.backgroundColor = this.backgroundColor;
        signaturePad.onBegin = function () {
            _this.isDrawingValue = true;
            canvas.focus();
        };
        signaturePad.onEnd = function () {
            _this.isDrawingValue = false;
            _this.updateValue();
        };
        var updateValueHandler = function () {
            var data = _this.value;
            canvas.width = _this.signatureWidth || defaultWidth;
            canvas.height = _this.signatureHeight || defaultHeight;
            resizeCanvas(canvas);
            if (!data) {
                signaturePad.clear();
            }
            else {
                signaturePad.fromDataURL(data);
            }
        };
        updateValueHandler();
        this.readOnlyChangedCallback();
        this.signaturePad = signaturePad;
        var propertyChangedHandler = function (sender, options) {
            if (options.name === "signatureWidth" || options.name === "signatureHeight" || options.name === "value") {
                updateValueHandler();
            }
        };
        this.onPropertyChanged.add(propertyChangedHandler);
        this.signaturePad.propertyChangedHandler = propertyChangedHandler;
    };
    QuestionSignaturePadModel.prototype.destroySignaturePad = function (el) {
        if (this.signaturePad) {
            this.onPropertyChanged.remove(this.signaturePad.propertyChangedHandler);
            this.signaturePad.off();
        }
        this.readOnlyChangedCallback = null;
        this.signaturePad = null;
    };
    Object.defineProperty(QuestionSignaturePadModel.prototype, "signatureWidth", {
        /**
         * Specifies the width of the signature area. Accepts positive integer numbers.
         */
        get: function () {
            return this.getPropertyValue("signatureWidth");
        },
        set: function (val) {
            this.setPropertyValue("signatureWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSignaturePadModel.prototype, "signatureHeight", {
        /**
         * Specifies the height of the signature area. Accepts positive integer numbers.
         */
        get: function () {
            return this.getPropertyValue("signatureHeight");
        },
        set: function (val) {
            this.setPropertyValue("signatureHeight", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSignaturePadModel.prototype, "height", {
        //todo: need to remove this property
        get: function () {
            return this.getPropertyValue("height");
        },
        set: function (val) {
            this.setPropertyValue("height", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSignaturePadModel.prototype, "allowClear", {
        /**
         * Specifies whether to display a button that clears the signature area.
         *
         * Default value: `true`
         */
        get: function () {
            return this.getPropertyValue("allowClear");
        },
        set: function (val) {
            this.setPropertyValue("allowClear", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSignaturePadModel.prototype, "canShowClearButton", {
        get: function () {
            return !this.isInputReadOnly && this.allowClear;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSignaturePadModel.prototype, "penColor", {
        /**
         * Specifies a color for the pen. Accepts hexadecimal colors (`"#FF0000"`), RGB colors (`"rgb(255,0,0)"`), or color names (`"red"`).
         * @see backgroundColor
         */
        get: function () {
            return this.getPropertyValue("penColor");
        },
        set: function (val) {
            this.setPropertyValue("penColor", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSignaturePadModel.prototype, "backgroundColor", {
        /**
         * Specifies a color for the signature area background.  Accepts hexadecimal colors (`"#FF0000"`), RGB colors (`"rgb(255,0,0)"`), or color names (`"red"`).
         * @see penColor
         */
        get: function () {
            return this.getPropertyValue("backgroundColor");
        },
        set: function (val) {
            this.setPropertyValue("backgroundColor", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionSignaturePadModel.prototype, "clearButtonCaption", {
        get: function () {
            return this.getLocalizationString("clearCaption");
        },
        enumerable: false,
        configurable: true
    });
    QuestionSignaturePadModel.prototype.needShowPlaceholder = function () {
        return !this.isDrawingValue && this.isEmpty();
    };
    Object.defineProperty(QuestionSignaturePadModel.prototype, "placeHolderText", {
        get: function () {
            return this.getLocalizationString("signaturePlaceHolder");
        },
        enumerable: false,
        configurable: true
    });
    QuestionSignaturePadModel.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        //todo: need to remove this code
        if (this.signatureWidth === 300 && !!this.width && typeof this.width === "number" && this.width) {
            // eslint-disable-next-line no-console
            console.warn("Use signatureWidth property to set width for the signature pad");
            this.signatureWidth = this.width;
            this.width = undefined;
        }
        if (this.signatureHeight === 200 && !!this.height) {
            // eslint-disable-next-line no-console
            console.warn("Use signatureHeight property to set width for the signature pad");
            this.signatureHeight = this.height;
            this.height = undefined;
        }
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], QuestionSignaturePadModel.prototype, "isDrawingValue", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
    ], QuestionSignaturePadModel.prototype, "dataFormat", void 0);
    return QuestionSignaturePadModel;
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad", [
    {
        name: "signatureWidth:number",
        category: "general",
        default: 300,
    },
    {
        name: "signatureHeight:number",
        category: "general",
        default: 200,
    },
    //need to remove this property
    {
        name: "height:number",
        category: "general",
        visible: false
    },
    {
        name: "allowClear:boolean",
        category: "general",
        default: true,
    },
    {
        name: "penColor:color",
        category: "general",
        default: "#1ab394",
    },
    {
        name: "backgroundColor:color",
        category: "general",
        default: "#ffffff",
    },
    {
        name: "dataFormat",
        category: "general",
        default: "",
        choices: [
            { value: "", text: "PNG" },
            { value: "image/jpeg", text: "JPEG" },
            { value: "image/svg+xml", text: "SVG" },
        ],
    },
    { name: "defaultValue", visible: false },
    { name: "correctAnswer", visible: false },
], function () {
    return new QuestionSignaturePadModel("");
}, "question");
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("signaturepad", function (name) {
    return new QuestionSignaturePadModel(name);
});


/***/ }),

/***/ "./src/question_tagbox.ts":
/*!********************************!*\
  !*** ./src/question_tagbox.ts ***!
  \********************************/
/*! exports provided: QuestionTagboxModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionTagboxModel", function() { return QuestionTagboxModel; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
/* harmony import */ var _question_checkbox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./question_checkbox */ "./src/question_checkbox.ts");
/* harmony import */ var _dropdownMultiSelectListModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdownMultiSelectListModel */ "./src/dropdownMultiSelectListModel.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





/**
 * A Model for a tagbox question
 *
 * [View Demo](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/ (linkStyle))
 */
var QuestionTagboxModel = /** @class */ (function (_super) {
    __extends(QuestionTagboxModel, _super);
    function QuestionTagboxModel(name) {
        var _this = _super.call(this, name) || this;
        _this.onOpened = _this.addEvent();
        _this.createLocalizableString("placeholder", _this, false, true);
        _this.createLocalizableString("clearCaption", _this, false, true);
        return _this;
    }
    QuestionTagboxModel.prototype.getDefaultItemComponent = function () {
        return "";
    };
    Object.defineProperty(QuestionTagboxModel.prototype, "readOnlyText", {
        get: function () {
            return this.displayValue || this.placeholder;
        },
        enumerable: false,
        configurable: true
    });
    QuestionTagboxModel.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        if (!this.dropdownListModel) {
            this.dropdownListModel = new _dropdownMultiSelectListModel__WEBPACK_IMPORTED_MODULE_4__["DropdownMultiSelectListModel"](this);
        }
    };
    Object.defineProperty(QuestionTagboxModel.prototype, "placeholder", {
        /**
         * A text displayed in the input field when it doesn't have a value.
         */
        get: function () {
            return this.getLocalizableStringText("placeholder");
        },
        set: function (val) {
            this.setLocalizableStringText("placeholder", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTagboxModel.prototype, "locPlaceholder", {
        get: function () {
            return this.getLocalizableString("placeholder");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTagboxModel.prototype, "clearCaption", {
        get: function () {
            return this.getLocalizableStringText("clearCaption");
        },
        set: function (value) {
            this.setLocalizableStringText("clearCaption", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTagboxModel.prototype, "locClearCaption", {
        get: function () {
            return this.getLocalizableString("clearCaption");
        },
        enumerable: false,
        configurable: true
    });
    QuestionTagboxModel.prototype.getType = function () {
        return "tagbox";
    };
    Object.defineProperty(QuestionTagboxModel.prototype, "popupModel", {
        get: function () {
            var _a;
            return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
        },
        enumerable: false,
        configurable: true
    });
    QuestionTagboxModel.prototype.getControlClass = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
            .append(this.cssClasses.control)
            .append(this.cssClasses.controlEmpty, this.isEmpty())
            .append(this.cssClasses.onError, this.errors.length > 0)
            .append(this.cssClasses.controlDisabled, this.isReadOnly)
            .toString();
    };
    QuestionTagboxModel.prototype.onOpenedCallBack = function () {
        this.onOpened.fire(this, { question: this, choices: this.choices });
    };
    QuestionTagboxModel.prototype.onVisibleChoicesChanged = function () {
        _super.prototype.onVisibleChoicesChanged.call(this);
        if (this.popupModel) {
            this.dropdownListModel.updateItems();
        }
    };
    QuestionTagboxModel.prototype.getFirstInputElementId = function () {
        return this.inputId + (this.searchEnabled ? "_0" : "");
    };
    QuestionTagboxModel.prototype.getInputId = function () {
        return this.inputId + "_0";
    };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
    ], QuestionTagboxModel.prototype, "allowClear", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
            defaultValue: true,
            onSet: function (newValue, target) {
                if (!!target.dropdownListModel) {
                    target.dropdownListModel.setSearchEnabled(newValue);
                }
            }
        })
    ], QuestionTagboxModel.prototype, "searchEnabled", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
            defaultValue: false,
            onSet: function (newValue, target) {
                if (!!target.dropdownListModel) {
                    target.dropdownListModel.setHideSelectedItems(newValue);
                }
            }
        })
    ], QuestionTagboxModel.prototype, "hideSelectedItems", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], QuestionTagboxModel.prototype, "choicesLazyLoadEnabled", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 25 })
    ], QuestionTagboxModel.prototype, "choicesLazyLoadPageSize", void 0);
    return QuestionTagboxModel;
}(_question_checkbox__WEBPACK_IMPORTED_MODULE_3__["QuestionCheckboxModel"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("tagbox", [
    { name: "placeholder", serializationProperty: "locPlaceholder" },
    { name: "allowClear:boolean", default: true },
    { name: "searchEnabled:boolean", default: true },
    { name: "choicesLazyLoadEnabled:boolean", default: false, visible: false },
    { name: "choicesLazyLoadPageSize:number", default: 25, visible: false },
    { name: "hideSelectedItems:boolean", default: false },
    { name: "closeOnSelect:boolean", default: true, visible: false },
    { name: "itemComponent", visible: false, default: "" }
], function () {
    return new QuestionTagboxModel("");
}, "checkbox");
_questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("tagbox", function (name) {
    var q = new QuestionTagboxModel(name);
    q.choices = _questionfactory__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].DefaultChoices;
    return q;
});


/***/ }),

/***/ "./src/question_text.ts":
/*!******************************!*\
  !*** ./src/question_text.ts ***!
  \******************************/
/*! exports provided: QuestionTextModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionTextModel", function() { return QuestionTextModel; });
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _validator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./validator */ "./src/validator.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _question_textbase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./question_textbase */ "./src/question_textbase.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();








/**
 * A class that describes the Text question type.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/questiontype-text/ (linkStyle))
 */
var QuestionTextModel = /** @class */ (function (_super) {
    __extends(QuestionTextModel, _super);
    function QuestionTextModel(name) {
        var _this = _super.call(this, name) || this;
        _this.createLocalizableString("minErrorText", _this, true, "minError");
        _this.createLocalizableString("maxErrorText", _this, true, "maxError");
        _this.locDataListValue = new _localizablestring__WEBPACK_IMPORTED_MODULE_2__["LocalizableStrings"](_this);
        _this.locDataListValue.onValueChanged = function (oldValue, newValue) {
            _this.propertyValueChanged("dataList", oldValue, newValue);
        };
        _this.registerPropertyChangedHandlers(["min", "max", "inputType", "minValueExpression", "maxValueExpression"], function () {
            _this.setRenderedMinMax();
        });
        _this.registerPropertyChangedHandlers(["inputType", "size"], function () {
            _this.updateInputSize();
            _this.calcRenderedPlaceholder();
        });
        return _this;
    }
    QuestionTextModel.prototype.isTextValue = function () {
        return ["text", "number", "password"].indexOf(this.inputType) > -1;
    };
    QuestionTextModel.prototype.getType = function () {
        return "text";
    };
    QuestionTextModel.prototype.onSurveyLoad = function () {
        _super.prototype.onSurveyLoad.call(this);
        this.setRenderedMinMax();
        this.updateInputSize();
    };
    Object.defineProperty(QuestionTextModel.prototype, "inputType", {
        /**
         * A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
         */
        get: function () {
            return this.getPropertyValue("inputType");
        },
        set: function (val) {
            val = val.toLowerCase();
            if (val == "datetime_local")
                val = "datetime-local";
            this.setPropertyValue("inputType", val.toLowerCase());
            if (!this.isLoadingFromJson) {
                this.min = undefined;
                this.max = undefined;
                this.step = undefined;
            }
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextModel.prototype.runCondition = function (values, properties) {
        _super.prototype.runCondition.call(this, values, properties);
        if (!!this.minValueExpression || !!this.maxValueExpression) {
            this.setRenderedMinMax(values, properties);
        }
    };
    QuestionTextModel.prototype.getValidators = function () {
        var validators = _super.prototype.getValidators.call(this);
        if (this.inputType === "email" &&
            !this.validators.some(function (v) { return v.getType() === "emailvalidator"; })) {
            validators.push(new _validator__WEBPACK_IMPORTED_MODULE_4__["EmailValidator"]());
        }
        return validators;
    };
    QuestionTextModel.prototype.isLayoutTypeSupported = function (layoutType) {
        return true;
    };
    Object.defineProperty(QuestionTextModel.prototype, "size", {
        /**
         * A value passed on to the [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size) attribute of the underlying `<input>` element.
         */
        get: function () {
            return this.getPropertyValue("size");
        },
        set: function (val) {
            this.setPropertyValue("size", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "isTextInput", {
        get: function () {
            return (["text", "search", "tel", "url", "email", "password"].indexOf(this.inputType) > -1);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "inputSize", {
        get: function () {
            return this.getPropertyValue("inputSize", 0);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "renderedInputSize", {
        get: function () {
            return this.getPropertyValue("inputSize") || null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "inputWidth", {
        get: function () {
            return this.getPropertyValue("inputWidth");
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextModel.prototype.updateInputSize = function () {
        var size = this.isTextInput && this.size > 0 ? this.size : 0;
        if (this.isTextInput &&
            size < 1 &&
            this.parent &&
            !!this.parent["itemSize"]) {
            size = this.parent["itemSize"];
        }
        this.setPropertyValue("inputSize", size);
        this.setPropertyValue("inputWidth", size > 0 ? "auto" : "");
    };
    Object.defineProperty(QuestionTextModel.prototype, "autocomplete", {
        /**
         * A value passed on to the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) attribute of the underlying `<input>` element.
         */
        get: function () {
            return this.getPropertyValue("autocomplete", "");
        },
        set: function (val) {
            this.setPropertyValue("autocomplete", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "min", {
        /**
         * A value passed on to the [`min`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/min) attribute of the underlying `<input>` element.
         * @see minValueExpression
         */
        get: function () {
            return this.getPropertyValue("min");
        },
        set: function (val) {
            if (this.isValueExpression(val)) {
                this.minValueExpression = val.substring(1);
                return;
            }
            this.setPropertyValue("min", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "max", {
        /**
         * A value passed on to the [`max`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/max) attribute of the underlying `<input>` element.
         * @see maxValueExpression
         */
        get: function () {
            return this.getPropertyValue("max");
        },
        set: function (val) {
            if (this.isValueExpression(val)) {
                this.maxValueExpression = val.substring(1);
                return;
            }
            this.setPropertyValue("max", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "minValueExpression", {
        /**
         * The minimum value specified as an expression. For example, `"minValueExpression": "today(-1)"` sets the minimum value to yesterday.
         * @see min
         */
        get: function () {
            return this.getPropertyValue("minValueExpression", "");
        },
        set: function (val) {
            this.setPropertyValue("minValueExpression", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "maxValueExpression", {
        /**
         * The maximum value specified as an expression. For example, `"maxValueExpression": "today(1)"` sets the maximum value to tomorrow.
         * @see max
         */
        get: function () {
            return this.getPropertyValue("maxValueExpression", "");
        },
        set: function (val) {
            this.setPropertyValue("maxValueExpression", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "renderedMin", {
        get: function () {
            return this.getPropertyValue("renderedMin");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "renderedMax", {
        get: function () {
            return this.getPropertyValue("renderedMax");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "minErrorText", {
        /**
         * An error message to display when the question value is less than the minimum accepted value.
         * @see min
         * @see minValueExpression
         */
        get: function () {
            return this.getLocalizableStringText("minErrorText");
        },
        set: function (val) {
            this.setLocalizableStringText("minErrorText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "locMinErrorText", {
        get: function () {
            return this.getLocalizableString("minErrorText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "maxErrorText", {
        /**
         * An error message to display when the question value exceeds the maximum accepted value.
         * @see max
         * @see maxValueExpression
         */
        get: function () {
            return this.getLocalizableStringText("maxErrorText");
        },
        set: function (val) {
            this.setLocalizableStringText("maxErrorText", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "locMaxErrorText", {
        get: function () {
            return this.getLocalizableString("maxErrorText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "isMinMaxType", {
        /**
         * Returns `true` if the specified `inputType` supports the `min` and `max` properties.
         * @see inputType
         * @see min
         * @see max
         */
        get: function () {
            return isMinMaxType(this);
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
        var _this = this;
        _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
        if (isOnValueChanged)
            return;
        if (this.isValueLessMin) {
            var minError = new _error__WEBPACK_IMPORTED_MODULE_5__["CustomError"](this.getMinMaxErrorText(this.minErrorText, this.getCalculatedMinMax(this.renderedMin)), this);
            minError.onUpdateErrorTextCallback = function (err) {
                err.text = _this.getMinMaxErrorText(_this.minErrorText, _this.getCalculatedMinMax(_this.renderedMin));
            };
            errors.push(minError);
        }
        if (this.isValueGreaterMax) {
            var maxError = new _error__WEBPACK_IMPORTED_MODULE_5__["CustomError"](this.getMinMaxErrorText(this.maxErrorText, this.getCalculatedMinMax(this.renderedMax)), this);
            maxError.onUpdateErrorTextCallback = function (err) {
                err.text = _this.getMinMaxErrorText(_this.maxErrorText, _this.getCalculatedMinMax(_this.renderedMax));
            };
            errors.push(maxError);
        }
    };
    QuestionTextModel.prototype.canSetValueToSurvey = function () {
        if (!this.isMinMaxType)
            return true;
        var isValid = !this.isValueLessMin && !this.isValueGreaterMax;
        if (this.inputType === "number" && !!this.survey &&
            (this.survey.isValidateOnValueChanging || this.survey.isValidateOnValueChanged)) {
            this.hasErrors();
        }
        return isValid;
    };
    QuestionTextModel.prototype.getMinMaxErrorText = function (errorText, value) {
        if (_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isValueEmpty(value))
            return errorText;
        var errorValue = value.toString();
        if (this.inputType === "date" && !!value.toDateString) {
            errorValue = value.toDateString();
        }
        return errorText.replace("{0}", errorValue);
    };
    Object.defineProperty(QuestionTextModel.prototype, "isValueLessMin", {
        get: function () {
            return (!this.isValueEmpty(this.renderedMin) &&
                this.getCalculatedMinMax(this.value) <
                    this.getCalculatedMinMax(this.renderedMin));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "isValueGreaterMax", {
        get: function () {
            return (!this.isValueEmpty(this.renderedMax) &&
                this.getCalculatedMinMax(this.value) >
                    this.getCalculatedMinMax(this.renderedMax));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "isDateInputType", {
        get: function () {
            return this.inputType === "date" || this.inputType === "datetime-local";
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextModel.prototype.getCalculatedMinMax = function (minMax) {
        if (this.isValueEmpty(minMax))
            return minMax;
        return this.isDateInputType ? new Date(minMax) : minMax;
    };
    QuestionTextModel.prototype.setRenderedMinMax = function (values, properties) {
        var _this = this;
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        this.minValueRunner = this.getDefaultRunner(this.minValueRunner, this.minValueExpression);
        this.setValueAndRunExpression(this.minValueRunner, this.min, function (val) {
            if (!val && _this.isDateInputType && !!_settings__WEBPACK_IMPORTED_MODULE_6__["settings"].minDate) {
                val = _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].minDate;
            }
            _this.setPropertyValue("renderedMin", val);
        }, values, properties);
        this.maxValueRunner = this.getDefaultRunner(this.maxValueRunner, this.maxValueExpression);
        this.setValueAndRunExpression(this.maxValueRunner, this.max, function (val) {
            if (!val && _this.isDateInputType) {
                val = !!_settings__WEBPACK_IMPORTED_MODULE_6__["settings"].maxDate ? _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].maxDate : "2999-12-31";
            }
            _this.setPropertyValue("renderedMax", val);
        }, values, properties);
    };
    Object.defineProperty(QuestionTextModel.prototype, "step", {
        /**
         * A value passed on to the [`step`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/step) attribute of the underlying `<input>` element.
         */
        get: function () {
            return this.getPropertyValue("step");
        },
        set: function (val) {
            this.setPropertyValue("step", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "renderedStep", {
        get: function () {
            if (this.isValueEmpty(this.step)) {
                return this.inputType !== "number" ? undefined : "any";
            }
            return this.step;
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextModel.prototype.supportGoNextPageAutomatic = function () {
        return ["date", "datetime", "datetime-local"].indexOf(this.inputType) < 0;
    };
    QuestionTextModel.prototype.supportGoNextPageError = function () {
        return ["date", "datetime", "datetime-local"].indexOf(this.inputType) < 0;
    };
    Object.defineProperty(QuestionTextModel.prototype, "dataList", {
        /**
         * An array of predefined options from which users can select. This property configures an HTML [`<datalist>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist) element and associates it with the underlying `input` element.
         */
        get: function () {
            return this.locDataList.value;
        },
        set: function (val) {
            this.locDataList.value = val;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "locDataList", {
        get: function () {
            return this.locDataListValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextModel.prototype, "dataListId", {
        get: function () {
            return this.locDataList.hasValue() ? this.id + "_datalist" : undefined;
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextModel.prototype.canRunValidators = function (isOnValueChanged) {
        return (this.errors.length > 0 ||
            !isOnValueChanged ||
            this.supportGoNextPageError());
    };
    QuestionTextModel.prototype.setNewValue = function (newValue) {
        newValue = this.correctValueType(newValue);
        _super.prototype.setNewValue.call(this, newValue);
    };
    QuestionTextModel.prototype.correctValueType = function (newValue) {
        if (!newValue)
            return newValue;
        if (this.inputType == "number" || this.inputType == "range") {
            return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(newValue) ? parseFloat(newValue) : "";
        }
        return newValue;
    };
    QuestionTextModel.prototype.hasPlaceHolder = function () {
        return !this.isReadOnly && this.inputType !== "range";
    };
    QuestionTextModel.prototype.isReadOnlyRenderDiv = function () {
        return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].readOnlyTextRenderMode === "div";
    };
    Object.defineProperty(QuestionTextModel.prototype, "inputStyle", {
        get: function () {
            var style = {};
            if (!!this.inputWidth) {
                style.width = this.inputWidth;
            }
            return style;
        },
        enumerable: false,
        configurable: true
    });
    return QuestionTextModel;
}(_question_textbase__WEBPACK_IMPORTED_MODULE_7__["QuestionTextBase"]));

var minMaxTypes = [
    "number",
    "date",
    "datetime",
    "datetime-local",
    "month",
    "time",
    "week",
];
function isMinMaxType(obj) {
    var t = !!obj ? obj.inputType : "";
    if (!t)
        return false;
    return minMaxTypes.indexOf(t) > -1;
}
function getWeekTimeNumber(str, delimiter) {
    var strs = str.split(delimiter);
    if (strs.length !== 2)
        return -1;
    if (!_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(strs[0]) || !_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(strs[1]))
        return -1;
    return parseFloat(strs[0]) * 60 + parseFloat(strs[1]);
}
function isMinBiggerWeekTime(minStr, maxStr, delimiter) {
    var min = getWeekTimeNumber(minStr, delimiter);
    var max = getWeekTimeNumber(maxStr, delimiter);
    if (min < 0 || max < 0)
        return false;
    return min > max;
}
function getCorrectMinMax(obj, min, max, isMax) {
    var val = isMax ? max : min;
    if (!isMinMaxType(obj))
        return val;
    if (_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isValueEmpty(min) || _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isValueEmpty(max))
        return val;
    if (obj.inputType.indexOf("date") === 0 || obj.inputType === "month") {
        var isMonth = obj.inputType === "month";
        var dMin = new Date(isMonth ? min + "-1" : min);
        var dMax = new Date(isMonth ? max + "-1" : max);
        if (!dMin || !dMax)
            return val;
        if (dMin > dMax)
            return isMax ? min : max;
    }
    if (obj.inputType === "week" || obj.inputType === "time") {
        var delimiter = obj.inputType === "week" ? "-W" : ":";
        if (isMinBiggerWeekTime(min, max, delimiter))
            return isMax ? min : max;
        return val;
    }
    if (obj.inputType === "number") {
        if (!_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(min) || !_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(max))
            return val;
        if (parseFloat(min) > parseFloat(max))
            return isMax ? min : max;
    }
    if (typeof min === "string" || typeof max === "string")
        return val;
    if (min > max)
        return isMax ? min : max;
    return val;
}
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
    {
        name: "inputType",
        default: "text",
        choices: _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].questions.inputTypes,
    },
    {
        name: "size:number",
        minValue: 0,
        dependsOn: "inputType",
        visibleIf: function (obj) {
            if (!obj)
                return false;
            return obj.isTextInput;
        },
    },
    {
        name: "textUpdateMode",
        default: "default",
        choices: ["default", "onBlur", "onTyping"],
        dependsOn: "inputType",
        visibleIf: function (obj) {
            if (!obj)
                return false;
            return obj.isTextInput;
        },
    },
    {
        name: "autocomplete",
        alternativeName: "autoComplete",
        choices: _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].questions.dataList,
    },
    {
        name: "min",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            return isMinMaxType(obj);
        },
        onPropertyEditorUpdate: function (obj, propertyEditor) {
            if (!!obj && !!obj.inputType) {
                propertyEditor.inputType = obj.inputType;
            }
        },
        onSettingValue: function (obj, val) {
            return getCorrectMinMax(obj, val, obj.max, false);
        },
    },
    {
        name: "max",
        dependsOn: "inputType",
        nextToProperty: "*min",
        visibleIf: function (obj) {
            return isMinMaxType(obj);
        },
        onSettingValue: function (obj, val) {
            return getCorrectMinMax(obj, obj.min, val, true);
        },
        onPropertyEditorUpdate: function (obj, propertyEditor) {
            if (!!obj && !!obj.inputType) {
                propertyEditor.inputType = obj.inputType;
            }
        },
    },
    {
        name: "minValueExpression:expression",
        category: "logic",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            return isMinMaxType(obj);
        },
    },
    {
        name: "maxValueExpression:expression",
        category: "logic",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            return isMinMaxType(obj);
        },
    },
    {
        name: "minErrorText",
        serializationProperty: "locMinErrorText",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            return isMinMaxType(obj);
        },
    },
    {
        name: "maxErrorText",
        serializationProperty: "locMaxErrorText",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            return isMinMaxType(obj);
        },
    },
    {
        name: "step:number",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            if (!obj)
                return false;
            return obj.inputType === "number";
        },
    },
    {
        name: "maxLength:number",
        default: -1,
        dependsOn: "inputType",
        visibleIf: function (obj) {
            if (!obj)
                return false;
            return obj.isTextInput;
        },
    },
    {
        name: "placeholder",
        alternativeName: "placeHolder",
        serializationProperty: "locPlaceholder",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            if (!obj)
                return false;
            return obj.isTextInput;
        },
    },
    {
        name: "dataList:string[]",
        serializationProperty: "locDataList",
        dependsOn: "inputType",
        visibleIf: function (obj) {
            if (!obj)
                return false;
            return obj.inputType === "text";
        },
    },
], function () {
    return new QuestionTextModel("");
}, "textbase");
_questionfactory__WEBPACK_IMPORTED_MODULE_0__["QuestionFactory"].Instance.registerQuestion("text", function (name) {
    return new QuestionTextModel(name);
});


/***/ }),

/***/ "./src/question_textbase.ts":
/*!**********************************!*\
  !*** ./src/question_textbase.ts ***!
  \**********************************/
/*! exports provided: QuestionTextBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionTextBase", function() { return QuestionTextBase; });
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




/**
 * A base class for the [Text](https://surveyjs.io/form-library/documentation/questiontextmodel) and [Comment](https://surveyjs.io/form-library/documentation/questioncommentmodel) question types.
 */
var QuestionTextBase = /** @class */ (function (_super) {
    __extends(QuestionTextBase, _super);
    function QuestionTextBase(name) {
        return _super.call(this, name) || this;
    }
    QuestionTextBase.prototype.isTextValue = function () {
        return true;
    };
    Object.defineProperty(QuestionTextBase.prototype, "maxLength", {
        /**
         * The maximum text length measured in characters. Assign 0 if the length should be unlimited.
         *
         * Default value: -1 (inherits the actual value from the `SurveyModel`'s [`maxTextLength`](https://surveyjs.io/form-library/documentation/surveymodel#maxTextLength) property).
         */
        get: function () {
            return this.getPropertyValue("maxLength");
        },
        set: function (val) {
            this.setPropertyValue("maxLength", val);
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextBase.prototype.getMaxLength = function () {
        return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].getMaxLength(this.maxLength, this.survey ? this.survey.maxTextLength : -1);
    };
    Object.defineProperty(QuestionTextBase.prototype, "placeHolder", {
        get: function () { return this.placeholder; },
        set: function (val) { this.placeholder = val; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextBase.prototype, "locPlaceHolder", {
        get: function () { return this.locPlaceholder; },
        enumerable: false,
        configurable: true
    });
    QuestionTextBase.prototype.getType = function () {
        return "textbase";
    };
    QuestionTextBase.prototype.isEmpty = function () {
        return _super.prototype.isEmpty.call(this) || this.value === "";
    };
    Object.defineProperty(QuestionTextBase.prototype, "textUpdateMode", {
        /**
         * Gets or sets a value that specifies when to update the question value.
         *
         * Possible values:
         *
         * - `"onBlur"` - Updates the value after the input field loses focus.
         * - `"onTyping"` - Updates the value on every key press.
         * - `"default"` (default) - Inherits the value from the `SurveyModel`'s [`textUpdateMode`](https://surveyjs.io/form-library/documentation/surveymodel#textUpdateMode) property.
         *
         * > NOTE: Do not use the `"onTyping"` mode if your survey contains many expressions. Expressions are reevaluated each time a question value is changed. In `"onTyping"` mode, the question value changes frequently. This may cause performance degradation.
         */
        get: function () {
            return this.getPropertyValue("textUpdateMode");
        },
        set: function (val) {
            this.setPropertyValue("textUpdateMode", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextBase.prototype, "isSurveyInputTextUpdate", {
        get: function () {
            if (this.textUpdateMode == "default")
                return !!this.survey ? this.survey.isUpdateValueTextOnTyping : false;
            return this.textUpdateMode == "onTyping";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
        get: function () {
            return this.getPropertyValue("renderedPlaceholder");
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextBase.prototype.setRenderedPlaceholder = function (val) {
        this.setPropertyValue("renderedPlaceholder", val);
    };
    QuestionTextBase.prototype.onReadOnlyChanged = function () {
        _super.prototype.onReadOnlyChanged.call(this);
        this.calcRenderedPlaceholder();
    };
    QuestionTextBase.prototype.onSurveyLoad = function () {
        this.calcRenderedPlaceholder();
        _super.prototype.onSurveyLoad.call(this);
    };
    QuestionTextBase.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        this.calcRenderedPlaceholder();
    };
    QuestionTextBase.prototype.calcRenderedPlaceholder = function () {
        var res = this.placeHolder;
        if (!!res && !this.hasPlaceHolder()) {
            res = undefined;
        }
        this.setRenderedPlaceholder(res);
    };
    QuestionTextBase.prototype.hasPlaceHolder = function () {
        return !this.isReadOnly;
    };
    QuestionTextBase.prototype.getControlClass = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
            .append(this.cssClasses.root)
            .append(this.cssClasses.onError, this.errors.length > 0)
            .append(this.cssClasses.controlDisabled, this.isReadOnly)
            .toString();
    };
    Object.defineProperty(QuestionTextBase.prototype, "ariaRole", {
        get: function () {
            return "textbox";
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true, onSet: function (val, target) { return target.calcRenderedPlaceholder(); } })
    ], QuestionTextBase.prototype, "placeholder", void 0);
    return QuestionTextBase;
}(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("textbase", [], function () {
    return new QuestionTextBase("");
}, "question");


/***/ }),

/***/ "./src/questionfactory.ts":
/*!********************************!*\
  !*** ./src/questionfactory.ts ***!
  \********************************/
/*! exports provided: QuestionFactory, ElementFactory */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionFactory", function() { return QuestionFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return ElementFactory; });
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");


//TODO replace completely with ElementFactory
var QuestionFactory = /** @class */ (function () {
    function QuestionFactory() {
        this.creatorHash = {};
    }
    Object.defineProperty(QuestionFactory, "DefaultChoices", {
        get: function () {
            return [
                _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].getString("choices_Item") + "1",
                _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].getString("choices_Item") + "2",
                _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].getString("choices_Item") + "3",
            ];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFactory, "DefaultColums", {
        get: function () {
            var colName = _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].getString("matrix_column") + " ";
            return [colName + "1", colName + "2", colName + "3"];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFactory, "DefaultRows", {
        get: function () {
            var rowName = _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].getString("matrix_row") + " ";
            return [rowName + "1", rowName + "2"];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionFactory, "DefaultMutlipleTextItems", {
        get: function () {
            var itemName = _surveyStrings__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].getString("multipletext_itemname");
            return [itemName + "1", itemName + "2"];
        },
        enumerable: false,
        configurable: true
    });
    QuestionFactory.prototype.registerQuestion = function (questionType, questionCreator) {
        this.creatorHash[questionType] = questionCreator;
    };
    QuestionFactory.prototype.unregisterElement = function (elementType) {
        delete this.creatorHash[elementType];
    };
    QuestionFactory.prototype.clear = function () {
        this.creatorHash = {};
    };
    QuestionFactory.prototype.getAllTypes = function () {
        var result = new Array();
        for (var key in this.creatorHash) {
            result.push(key);
        }
        return result.sort();
    };
    QuestionFactory.prototype.createQuestion = function (questionType, name) {
        var creator = this.creatorHash[questionType];
        if (creator == null)
            return null;
        return creator(name);
    };
    QuestionFactory.Instance = new QuestionFactory();
    return QuestionFactory;
}());

var ElementFactory = /** @class */ (function () {
    function ElementFactory() {
        this.creatorHash = {};
    }
    ElementFactory.prototype.registerElement = function (elementType, elementCreator) {
        this.creatorHash[elementType] = elementCreator;
    };
    ElementFactory.prototype.clear = function () {
        this.creatorHash = {};
    };
    ElementFactory.prototype.unregisterElement = function (elementType, removeFromSerializer) {
        if (removeFromSerializer === void 0) { removeFromSerializer = false; }
        delete this.creatorHash[elementType];
        QuestionFactory.Instance.unregisterElement(elementType);
        if (removeFromSerializer) {
            _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(elementType);
        }
    };
    ElementFactory.prototype.getAllTypes = function () {
        var result = QuestionFactory.Instance.getAllTypes();
        for (var key in this.creatorHash) {
            result.push(key);
        }
        return result.sort();
    };
    ElementFactory.prototype.createElement = function (elementType, name) {
        var creator = this.creatorHash[elementType];
        if (creator == null)
            return QuestionFactory.Instance.createQuestion(elementType, name);
        return creator(name);
    };
    ElementFactory.Instance = new ElementFactory();
    return ElementFactory;
}());



/***/ }),

/***/ "./src/questionnonvalue.ts":
/*!*********************************!*\
  !*** ./src/questionnonvalue.ts ***!
  \*********************************/
/*! exports provided: QuestionNonValue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionNonValue", function() { return QuestionNonValue; });
/* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./question */ "./src/question.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * A base class for question types that cannot have a value ([Html](https://surveyjs.io/form-library/documentation/questionhtmlmodel), [Image](https://surveyjs.io/form-library/documentation/questionimagemodel)).
 *
 * This class does not implement new functionality&mdash;it only redefines default values of certain properties inherited from the [`Question`](https://surveyjs.io/form-library/documentation/question) class.
 */
var QuestionNonValue = /** @class */ (function (_super) {
    __extends(QuestionNonValue, _super);
    function QuestionNonValue(name) {
        return _super.call(this, name) || this;
    }
    QuestionNonValue.prototype.getType = function () {
        return "nonvalue";
    };
    Object.defineProperty(QuestionNonValue.prototype, "hasInput", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionNonValue.prototype, "hasTitle", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionNonValue.prototype.getTitleLocation = function () {
        return "";
    };
    Object.defineProperty(QuestionNonValue.prototype, "hasComment", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    QuestionNonValue.prototype.hasErrors = function (fireCallback, rec) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (rec === void 0) { rec = null; }
        return false;
    };
    QuestionNonValue.prototype.getAllErrors = function () {
        return [];
    };
    QuestionNonValue.prototype.supportGoNextPageAutomatic = function () {
        return false;
    };
    QuestionNonValue.prototype.addConditionObjectsByContext = function (objects, context) { };
    QuestionNonValue.prototype.getConditionJson = function (operator, path) {
        if (operator === void 0) { operator = null; }
        if (path === void 0) { path = null; }
        return null;
    };
    return QuestionNonValue;
}(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("nonvalue", [
    { name: "title", visible: false },
    { name: "description", visible: false },
    { name: "valueName", visible: false },
    { name: "enableIf", visible: false },
    { name: "defaultValue", visible: false },
    { name: "correctAnswer", visible: false },
    { name: "clearIfInvisible", visible: false },
    { name: "isRequired", visible: false, isSerializable: false },
    { name: "requiredErrorText", visible: false },
    { name: "readOnly", visible: false },
    { name: "requiredIf", visible: false },
    { name: "validators", visible: false },
    { name: "titleLocation", visible: false },
    { name: "useDisplayValuesInDynamicTexts", alternativeName: "useDisplayValuesInTitle", visible: false },
], function () {
    return new QuestionNonValue("");
}, "question");


/***/ }),

/***/ "./src/rendererFactory.ts":
/*!********************************!*\
  !*** ./src/rendererFactory.ts ***!
  \********************************/
/*! exports provided: RendererFactory */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererFactory", function() { return RendererFactory; });
var RendererFactory = /** @class */ (function () {
    function RendererFactory() {
        this.renderersHash = {};
    }
    RendererFactory.prototype.unregisterRenderer = function (questionType, rendererAs) {
        delete this.renderersHash[questionType][rendererAs];
    };
    RendererFactory.prototype.registerRenderer = function (questionType, renderAs, renderer) {
        if (!this.renderersHash[questionType]) {
            this.renderersHash[questionType] = {};
        }
        this.renderersHash[questionType][renderAs] = renderer;
    };
    RendererFactory.prototype.getRenderer = function (questionType, renderAs) {
        return ((this.renderersHash[questionType] &&
            this.renderersHash[questionType][renderAs]) ||
            "default");
    };
    RendererFactory.prototype.getRendererByQuestion = function (question) {
        return this.getRenderer(question.getType(), question.renderAs);
    };
    RendererFactory.prototype.clear = function () {
        this.renderersHash = {};
    };
    RendererFactory.Instance = new RendererFactory();
    return RendererFactory;
}());



/***/ }),

/***/ "./src/settings.ts":
/*!*************************!*\
  !*** ./src/settings.ts ***!
  \*************************/
/*! exports provided: settings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
/**
 * Global survey settings
 */
var settings = {
    /**
     * Options for SurveyJS comparator. By default we trim strings and compare them as case insensitive. To change the behavior you can use following code:
     * settings.comparator.trimStrings = false; //"abc " will not equal to "abc". They are equal by default.
     * settings.comparator.caseSensitive = true; //"abc " will not equal to "Abc". They are equal by default.
     */
    comparator: {
        trimStrings: true,
        caseSensitive: false
    },
    expressionDisableConversionChar: "#",
    /**
     * Set this value to false, if you want to have UTC fuctions, for example setUTCHours inside our functions, like today.
     * By default it uses setHours function, with local date
     */
    useLocalTimeZone: true,
    /**
     * The prefix that uses to store the question comment, as "questionName + commentPrefix".
     * The default value is "-Comment"
     */
    commentPrefix: "-Comment",
    /**
     * Encode parameter on calling restful web API
     */
    webserviceEncodeParameters: true,
    /**
     * Cache the result for choices getting from web services. Set this property to false, to disable the caching.
     */
    useCachingForChoicesRestful: true,
    get useCachingForChoicesRestfull() {
        return settings.useCachingForChoicesRestful;
    },
    set useCachingForChoicesRestfull(val) {
        settings.useCachingForChoicesRestful = val;
    },
    /**
     * SurveyJS web service API url
     */
    surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey",
    /**
     * separator that can allow to set value and text of ItemValue object in one string as: "value|text"
     */
    itemValueSeparator: "|",
    /**
     * Set it to true to serialize itemvalue instance always as object even if text property is empty
     * const item = new Survey.ItemValue(5);
     * item.toJSON(); //will return {value: 5}, instead of 5 by default.
     */
    itemValueAlwaysSerializeAsObject: false,
    /**
     * Set it to true to serialize itemvalue text property, even if it is empty or equals to value
     * const item = new Survey.ItemValue("item1");
     * item.toJSON(); //will return {value: item1, text: "item1"}, instead of "item1" by default.
     */
    itemValueAlwaysSerializeText: false,
    /**
     * default locale name for localizable strings that uses during serialization, {"default": "My text", "de": "Mein Text"}
     */
    defaultLocaleName: "default",
    /**
     * By default we do not store a value for a locale if it equals to "default" locale value
     */
    storeDuplicatedTranslations: false,
    /**
     * Default row name for matrix (single choice)
     */
    matrixDefaultRowName: "default",
    /**
     * Default cell type for dropdown and dynamic matrices
     */
    matrixDefaultCellType: "dropdown",
    /**
     * Total value postfix for dropdown and dynamic matrices. The total value stores as: {matrixName} + {postfix}
     */
    matrixTotalValuePostFix: "-total",
    /**
     * Maximum row count in dynamic matrix
     */
    matrixMaximumRowCount: 1000,
    /**
     * Maximum rowCount that returns in addConditionObjectsByContext function
     */
    matrixMaxRowCountInCondition: 1,
    /**
     * Set this property to false, to render matrix dynamic remove action as button.
     * It is rendered as icon in new themes ("defaultV2") by default.
     */
    matrixRenderRemoveAsIcon: true,
    /**
     * Maximum panel count in dynamic panel
     */
    panelMaximumPanelCount: 100,
    /**
     * Maximum rate value count in rating question
     */
    ratingMaximumRateValueCount: 20,
    /**
     * Disable the question while choices are getting from the web service
     */
    disableOnGettingChoicesFromWeb: false,
    /**
     * Set to true to always serialize the localization string as object even if there is only one value for default locale. Instead of string "MyStr" serialize as {default: "MyStr"}
     */
    serializeLocalizableStringAsObject: false,
    /**
     * Set to false to hide empty page title and description in design mode
     */
    allowShowEmptyTitleInDesignMode: true,
    /**
     * Set to false to hide empty page description in design mode
     */
    allowShowEmptyDescriptionInDesignMode: true,
    /**
     * Set this property to true to execute the complete trigger on value change instead of on next page.
     */
    executeCompleteTriggerOnValueChanged: false,
    /**
     * Set this property to false to stop showing "Compete" button when the complete trigger is going to be executed.
     */
    changeNavigationButtonsOnCompleteTrigger: true,
    /**
     * Set this property to false to execute the skip trigger on next page instead of on value change.
     */
    executeSkipTriggerOnValueChanged: true,
    /**
     * Specifies how the input field of [Comment](https://surveyjs.io/Documentation/Library?id=questioncommentmodel) questions is rendered in the read-only mode.
     * Available values:
     * "textarea" (default) - A 'textarea' element is used to render a Comment question's input field.
     * "div" - A 'div' element is used to render a Comment question's input field.
     */
    readOnlyCommentRenderMode: "textarea",
    /**
     * Specifies how the input field of [Text](https://surveyjs.io/Documentation/Library?id=questiontextmodel) questions is rendered in the read-only mode.
     * Available values:
     * "input" (default) - An 'input' element is used to render a Text question's input field.
     * "div" - A 'div' element is used to render a Text question's input field.
     */
    readOnlyTextRenderMode: "input",
    /**
     * Override this function, set your function, if you want to show your own dialog confirm window instead of standard browser window.
     * @param message
     */
    confirmActionFunc: function (message) {
        return confirm(message);
    },
    /**
     * Set this property to change the default value of the minWidth constraint
     */
    minWidth: "300px",
    /**
     * Set this property to change the default value of the maxWidth constraint
     */
    maxWidth: "100%",
    /**
     * This property tells how many times survey re-run expressions on value changes during condition running. We need it to avoid recursions in the expressions
     */
    maximumConditionRunCountOnValueChanged: 10,
    /**
     * By default visibleIndex for question with titleLocation = "hidden" is -1, and survey doesn't count these questions when set questions numbers.
     * Set it true, and a question next to a question with hidden title will increase it's number.
     */
    setQuestionVisibleIndexForHiddenTitle: false,
    /**
     * By default visibleIndex for question with hideNumber = true is -1, and survey doesn't count these questions when set questions numbers.
     * Set it true, and a question next to a question with hidden title number will increase it's number.
     */
    setQuestionVisibleIndexForHiddenNumber: false,
    /**
     * By default all rows are rendered no matters whwther they are visible.
     * Set it true, and survey markup rows will be rendered only if they are visible in viewport.
     * This feature is experimantal and might do not support all the use cases.
     */
    lazyRowsRendering: false,
    lazyRowsRenderingStartRow: 3,
    /**
     * By default checkbox and radiogroup items are ordered in rows.
     * Set it "column", and items will be ordered in columns.
     */
    showItemsInOrder: "default",
    /**
     * Supported validators by question types. You can modify this variable to add validators for new question types or add/remove for existing question types.
     */
    supportedValidators: {
        question: ["expression"],
        comment: ["text", "regex"],
        text: ["numeric", "text", "regex", "email"],
        checkbox: ["answercount"],
        imagepicker: ["answercount"],
    },
    /**
     * Set the value as string "yyyy-mm-dd". text questions with inputType "date" will not allow to set to survey date that less than this value
     */
    minDate: "",
    /**
     * Set the value as string "yyyy-mm-dd". text questions with inputType "date" will not allow to set to survey date that greater than this value
     */
    maxDate: "",
    showModal: undefined,
    supportCreatorV2: false,
    showDefaultItemsInCreatorV2: true,
    /**
     * Specifies a list of custom icons.
     * Use this property to replace SurveyJS default icons (displayed in UI elements of SurveyJS Library or Creator) with your custom icons.
     * For every default icon to replace, add a key/value object with the default icon's name as a key and the name of your custom icon as a value.
     * For example: Survey.settings.customIcons["icon-redo"] = "my-own-redo-icon"
     */
    customIcons: {},
    titleTags: {
        survey: "h3",
        page: "h4",
        panel: "h4",
        question: "h5",
    },
    questions: {
        inputTypes: [
            "color",
            "date",
            "datetime",
            "datetime-local",
            "email",
            "month",
            "number",
            "password",
            "range",
            "tel",
            "text",
            "time",
            "url",
            "week",
        ],
        dataList: [
            "name",
            "honorific-prefix",
            "given-name",
            "additional-name",
            "family-name",
            "honorific-suffix",
            "nickname",
            "organization-title",
            "username",
            "new-password",
            "current-password",
            "organization",
            "street-address",
            "address-line1",
            "address-line2",
            "address-line3",
            "address-level4",
            "address-level3",
            "address-level2",
            "address-level1",
            "country",
            "country-name",
            "postal-code",
            "cc-name",
            "cc-given-name",
            "cc-additional-name",
            "cc-family-name",
            "cc-number",
            "cc-exp",
            "cc-exp-month",
            "cc-exp-year",
            "cc-csc",
            "cc-type",
            "transaction-currency",
            "transaction-amount",
            "language",
            "bday",
            "bday-day",
            "bday-month",
            "bday-year",
            "sex",
            "url",
            "photo",
            "tel",
            "tel-country-code",
            "tel-national",
            "tel-area-code",
            "tel-local",
            "tel-local-prefix",
            "tel-local-suffix",
            "tel-extension",
            "email",
            "impp",
        ]
    }
};


/***/ }),

/***/ "./src/stylesmanager.ts":
/*!******************************!*\
  !*** ./src/stylesmanager.ts ***!
  \******************************/
/*! exports provided: StylesManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StylesManager", function() { return StylesManager; });
/* harmony import */ var _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultCss/cssstandard */ "./src/defaultCss/cssstandard.ts");

var StylesManager = /** @class */ (function () {
    function StylesManager() {
        this.sheet = null;
        if (StylesManager.Enabled) {
            this.sheet = StylesManager.findSheet(StylesManager.SurveyJSStylesSheetId);
            if (!this.sheet) {
                this.sheet = StylesManager.createSheet(StylesManager.SurveyJSStylesSheetId);
                this.initializeStyles(this.sheet);
            }
        }
    }
    StylesManager.findSheet = function (styleSheetId) {
        if (typeof document === "undefined")
            return null;
        for (var i = 0; i < document.styleSheets.length; i++) {
            if (!!document.styleSheets[i].ownerNode &&
                document.styleSheets[i].ownerNode["id"] === styleSheetId) {
                return document.styleSheets[i];
            }
        }
        return null;
    };
    StylesManager.createSheet = function (styleSheetId) {
        var style = document.createElement("style");
        style.id = styleSheetId;
        // Add a media (and/or media query) here if you'd like!
        // style.setAttribute("media", "screen")
        // style.setAttribute("media", "only screen and (max-width : 1024px)")
        style.appendChild(document.createTextNode(""));
        document.head.appendChild(style);
        return style.sheet;
    };
    StylesManager.applyTheme = function (themeName, themeSelector) {
        if (themeName === void 0) { themeName = "default"; }
        if (themeSelector === void 0) { themeSelector = ".sv_main"; }
        var ThemeCss;
        if (themeName === "modern")
            themeSelector = ".sv-root-modern ";
        if (themeName === "defaultV2") {
            _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_0__["surveyCss"].currentType = themeName;
            return;
        }
        if (["bootstrap", "bootstrapmaterial", "modern"].indexOf(themeName) !== -1) {
            ThemeCss = StylesManager[themeName + "ThemeCss"];
            _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_0__["surveyCss"].currentType = themeName;
        }
        else {
            ThemeCss = StylesManager.ThemeCss;
            _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_0__["surveyCss"].currentType = "standard";
        }
        if (StylesManager.Enabled) {
            var styleSheetId = (themeName + themeSelector).trim();
            var sheet_1 = StylesManager.findSheet(styleSheetId);
            if (!sheet_1) {
                sheet_1 = StylesManager.createSheet(styleSheetId);
                var theme_1 = StylesManager.ThemeColors[themeName] ||
                    StylesManager.ThemeColors["default"];
                Object.keys(ThemeCss).forEach(function (selector) {
                    var cssRuleText = ThemeCss[selector];
                    Object.keys(theme_1).forEach(function (colorVariableName) { return (cssRuleText = cssRuleText.replace(new RegExp("\\" + colorVariableName, "g"), theme_1[colorVariableName])); });
                    try {
                        if (selector.indexOf("body") === 0) {
                            sheet_1.insertRule(selector + " { " + cssRuleText + " }", 0);
                        }
                        else {
                            sheet_1.insertRule(themeSelector + selector + " { " + cssRuleText + " }", 0);
                        }
                    }
                    catch (e) { }
                });
            }
        }
    };
    StylesManager.prototype.initializeStyles = function (sheet) {
        if (StylesManager.Enabled) {
            Object.keys(StylesManager.Styles).forEach(function (selector) {
                try {
                    sheet.insertRule(selector + " { " + StylesManager.Styles[selector] + " }", 0);
                }
                catch (e) { }
            });
            Object.keys(StylesManager.Media).forEach(function (selector) {
                try {
                    sheet.insertRule(StylesManager.Media[selector].media +
                        " { " +
                        selector +
                        " { " +
                        StylesManager.Media[selector].style +
                        " } }", 0);
                }
                catch (e) { }
            });
        }
    };
    StylesManager.SurveyJSStylesSheetId = "surveyjs-styles";
    StylesManager.Styles = {
        // ".sv_bootstrap_css":
        //   "position: relative; width: 100%; background-color: #f4f4f4",
        // ".sv_bootstrap_css .sv_custom_header":
        //   "position: absolute; width: 100%; height: 275px; background-color: #e7e7e7;",
        // ".sv_bootstrap_css .sv_container":
        //   "max-width: 80%; margin: auto; position: relative; color: #6d7072; padding: 0 1em;",
        // ".sv_bootstrap_css .panel-body":
        //   "background-color: white; padding: 1em 1em 5em 1em; border-top: 2px solid lightgray;",
        ".sv_main span": "word-break: break-word;",
        ".sv_main legend": "border: none; margin: 0;",
        ".sv_bootstrap_css .sv_qstn": "padding: 0.5em 1em 1.5em 1em;",
        ".sv_bootstrap_css .sv_qcbc input[type=checkbox], .sv_bootstrap_css .sv_qcbc input[type=radio]": "vertical-align: middle; margin-top: -1px",
        ".sv_bootstrap_css .sv_qstn fieldset": "display: block;",
        ".sv_bootstrap_css .sv_qstn  .sv_q_checkbox_inline, .sv_bootstrap_css .sv_qstn .sv_q_radiogroup_inline": "display: inline-block;",
        ".sv_bootstrap_css .sv-paneldynamic__progress-container ": "position: relative; margin-right: 250px; margin-left: 40px; margin-top: 10px;",
        ".sv_main.sv_bootstrapmaterial_css .sv_q_radiogroup_control_label": "display: inline; position: static;",
        ".sv_main.sv_bootstrapmaterial_css .checkbox": "margin-top:10px;margin-bottom:10px;",
        ".sv_row": "clear: both; min-width:300px;",
        ".sv_row .sv_qstn": "float: left",
        ".sv_row .sv_qstn:last-child": "float: none",
        ".sv_qstn": "display: vertical-align: top; overflow: auto; min-width:300px;",
        ".sv_p_container": "display: vertical-align: top; min-width:300px;",
        ".sv_q_title .sv_question_icon": "float: right; margin-right: 1em;",
        ".sv_q_title .sv_question_icon::before": "content: ''; background-repeat: no-repeat; background-position: center; padding: 0.5em; display: inline-block; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxMCAxMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MHtmaWxsOiM2RDcwNzI7fQ0KPC9zdHlsZT4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMiwyIDAsNCA1LDkgMTAsNCA4LDIgNSw1ICIvPg0KPC9zdmc+DQo=);",
        ".sv_q_title .sv_question_icon.sv_expanded::before": "transform: rotate(180deg);",
        ".sv_qbln .checkbox-material": "margin-right: 3px;",
        ".sv_qcbx .checkbox-material": "margin-right: 5px;",
        ".sv_qcbx .checkbox label": "justify-content: left; display: inline-block;",
        ".sv_qstn .radio label": "justify-content: left; display: inline-block;",
        ".sv_qstn .sv_q_imgsel > label img": "pointer-events: none;",
        ".sv_qstn .sv_q_imgsel.sv_q_imagepicker_inline": "display: inline-block;",
        ".sv_qstn label.sv_q_m_label": "position: absolute; margin: 0; display: block; width: 100%;",
        ".sv_qstn td": "position: relative;",
        ".sv_q_mt": "table-layout: fixed;",
        ".sv_q_mt_label": "display: flex; align-items: center; font-weight: inherit;",
        ".sv_q_mt_title": "margin-right: 0.5em; width: 33%;",
        ".sv_q_mt_item": "flex: 1;",
        ".sv_q_mt_item_value": "float: left;",
        '[dir="rtl"] .sv_q_mt_item_value': "float: right;",
        ".sv_qstn.sv_qstn_left": "margin-top: 0.75em;",
        ".sv_qstn .title-left": "float: left; margin-right: 1em; max-width: 50%",
        '[dir="rtl"] .sv_qstn .title-left': "float: right; margin-left: 1em;",
        ".sv_qstn .content-left": "overflow: hidden",
        ".sv_q_radiogroup_inline .sv_q_radiogroup_other": "display: inline-block;",
        ".sv_q_checkbox_inline .sv_q_checkbox_other": "display: inline-block;",
        ".sv_q_checkbox_inline, .sv_q_radiogroup_inline, .sv_q_imagepicker_inline": "line-height: 2.5em;",
        ".form-inline .sv_q_checkbox_inline:not(:last-child)": "margin-right: 1em;",
        ".form-inline .sv_q_radiogroup_inline:not(:last-child)": "margin-right: 1em;",
        ".sv_imgsel .sv_q_imagepicker_inline:not(:last-child)": "margin-right: 1em;",
        ".sv_qstn fieldset": "border: none; margin: 0; padding: 0;",
        ".sv_qstn .sv_q_file_placeholder": "display:none",
        ".sv_p_title": "padding-left: 1em; padding-bottom: 0.3em;",
        ".sv_p_title_expandable, .sv_q_title_expandable": "cursor: pointer; position: relative; display: flex; align-items: center; padding-right: 24px;",
        ".sv_p_title_expandable::after, .sv_q_title_expandable::after": "content: \"\"; display: block;background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23404040;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='2,2 0,4 5,9 10,4 8,2 5,5 '/%3E%3C/svg%3E%0A\"); background-repeat: no-repeat; background-position: center center; background-size: 10px 12px; width: 24px; height: 24px; position: absolute; right: 0;",
        ".sv_p_title_expanded::after, .sv_q_title_expanded::after": "transform: rotate(180deg);",
        ".sv_p_title .sv_panel_icon": "float: right; margin-right: 1em;",
        ".sv_p_title .sv_panel_icon::before": "content: ''; background-repeat: no-repeat; background-position: center; padding: 0.5em; display: inline-block; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxMCAxMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MHtmaWxsOiM2RDcwNzI7fQ0KPC9zdHlsZT4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMiwyIDAsNCA1LDkgMTAsNCA4LDIgNSw1ICIvPg0KPC9zdmc+DQo=);",
        ".sv_p_title .sv_panel_icon.sv_expanded::before": "transform: rotate(180deg);",
        ".sv_p_footer": "padding-left: 1em; padding-bottom: 1em;padding-top: 1em;",
        ".sv_matrix_cell_detail_button": "position: relative",
        ".sv_detail_panel_icon": "display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px;",
        ".sv_detail_panel_icon::before": "content: ''; background-repeat: no-repeat; background-position: center; width: 14px; height: 14px; display: block; transform: rotate(270deg); background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 15 15' style='enable-background:new 0 0 15 15;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='14,5.5 12.6,4.1 7.5,9.1 2.4,4.1 1,5.5 7.5,12 '/%3E%3C/svg%3E%0A\");",
        ".sv_detail_panel_icon.sv_detail_expanded::before": "transform: rotate(0deg)",
        ".sv_matrix_empty_rows_section": "text-align: center; vertical-align: middle;",
        ".sv_matrix_empty_rows_text": "padding:20px",
        ".sv_q_file > input[type=file], .sv_q_file > button": "display: inline-block;",
        ".sv_q_file_preview": "display: inline-block; vertical-align: top; border: 1px solid lightgray; padding: 5px; margin-top: 10px;",
        ".sv_q_file_preview > a": "display: block; overflow: hidden; vertical-align: top; white-space: nowrap; text-overflow: ellipsis;",
        ".sv_q_file_remove_button": "line-height: normal;",
        ".sv_q_file_remove": "display: block; cursor: pointer;",
        ".sv_q_m_cell_text": "cursor: pointer;",
        ".sv_q_dd_other": "margin-top: 1em;",
        ".sv_q_dd_other input": "width: 100%;",
        ".sv_q_dd_clean-button": "margin: 0.15em 3em;",
        ".sv_q_dd_clean-button-svg": "width: 1em; height: 1em;",
        ".sv_q_dd_control": "display: flex; justify-content: space-between; appearance: none;",
        ".sv_q_dd_value": "width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative;",
        ".sv_q_dd_root": "position: relative;",
        ".sv_q_dd_select_wrapper::after": "content: \"\"; display: block;background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23404040;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='2,2 0,4 5,9 10,4 8,2 5,5 '/%3E%3C/svg%3E%0A\"); background-repeat: no-repeat; background-position: center center; background-size: 10px 12px; width: 34px; height: 100%; position: absolute; inset-inline-end: 0; top: 0;",
        ".sv_q_dd_filter-string-input": "outline: none; border: none; background-color: transparent; position: absolute; inset-inline-start: 0;",
        ".sv_q_dropdown_clean-button": "margin: auto 2em;",
        ".sv_q_tagbox__placeholder": "position: absolute; top: 0; inset-inline-start: 1em; max-width: 100%; width: auto; height: 100%; text-align: start; cursor: text; pointer-events: none;",
        ".sv_qstn .sv-q-col-1, .sv-question .sv-q-col-1": "width: 100%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-col-2, .sv-question .sv-q-col-2": "width: calc(50% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-col-3, .sv-question .sv-q-col-3": "width: calc(33.33333% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-col-4, .sv-question .sv-q-col-4": "width: calc(25% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-col-5, .sv-question .sv-q-col-5": "width: calc(20% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-column-1, .sv-question .sv-q-column-1": "width: 100%; max-width: 100%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-column-2, .sv-question .sv-q-column-2": "max-width: 50%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-column-3, .sv-question .sv-q-column-3": "max-width: 33.33333%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-column-4, .sv-question .sv-q-column-4": "max-width: 25%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv-q-column-5, .sv-question .sv-q-column-5": "max-width: 20%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
        ".sv_qstn .sv_q_file_input": "color: transparent;",
        ".sv_qstn .sv_q_imgsel label > div": "overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 4px; border: 1px solid lightgray; border-radius: 4px;",
        ".sv_qstn .sv_q_imgsel label > div > img, .sv_qstn .sv_q_imgsel label > div > embed": "display: block;",
        ".sv_qstn table tr td .sv_q_m_cell_label": "position: absolute; left: 0; right: 0; top: 0; bottom: 0;",
        "f-panel": "padding: 0.5em 1em; display: inline-block; line-height: 2em;",
        ".sv_progress_bar > span": "white-space: nowrap;",
        //progress buttons
        ".sv_progress-buttons__container-center": "text-align: center;",
        ".sv_progress-buttons__container": "display: inline-block; font-size: 0; width: 100%; max-width: 1100px; white-space: nowrap; overflow: hidden;",
        ".sv_progress-buttons__image-button-left": "display: inline-block; vertical-align: top; margin-top: 22px; font-size: 14px; width: 16px; height: 16px; cursor: pointer; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iMTEsMTIgOSwxNCAzLDggOSwyIDExLDQgNyw4ICIvPg0KPC9zdmc+DQo=);",
        ".sv_progress-buttons__image-button-right": "display: inline-block; vertical-align: top; margin-top: 22px; font-size: 14px; width: 16px; height: 16px; cursor: pointer; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iNSw0IDcsMiAxMyw4IDcsMTQgNSwxMiA5LDggIi8+DQo8L3N2Zz4NCg==);",
        ".sv_progress-buttons__image-button--hidden": "visibility: hidden;",
        ".sv_progress-buttons__list-container": "max-width: calc(100% - 36px); display: inline-block; overflow: hidden;",
        ".sv_progress-buttons__list": "display: inline-block; width: max-content; padding-left: 28px; padding-right: 28px; margin-top: 14px; margin-bottom: 14px;",
        ".sv_progress-buttons__list li": "width: 138px; font-size: 14px; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; position: relative; text-align: center; vertical-align: top; display: inline-block;",
        ".sv_progress-buttons__list li:before": "width: 24px; height: 24px; content: ''; line-height: 30px; display: block; margin: 0 auto 10px auto; border: 3px solid; border-radius: 50%; box-sizing: content-box; cursor: pointer;",
        ".sv_progress-buttons__list li:after": "width: 73%; height: 3px; content: ''; position: absolute; top: 15px; left: -36.5%;",
        ".sv_progress-buttons__list li:first-child:after": "content: none;",
        ".sv_progress-buttons__list .sv_progress-buttons__page-title": "width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold;",
        ".sv_progress-buttons__list .sv_progress-buttons__page-description": "width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",
        ".sv_progress-buttons__list li.sv_progress-buttons__list-element--nonclickable:before": "cursor: not-allowed;",
        // ranking
        ".sv-ranking": "outline: none; user-select: none;",
        ".sv-ranking-item": "cursor: pointer; position: relative;",
        ".sv-ranking-item:focus .sv-ranking-item__icon--hover": "visibility: hidden;",
        ".sv-ranking-item:hover .sv-ranking-item__icon--hover": "visibility: visible;",
        ".sv-question--disabled .sv-ranking-item:hover .sv-ranking-item__icon--hover": "visibility: hidden;",
        ".sv-ranking-item:focus": "outline: none;",
        ".sv-ranking-item:focus .sv-ranking-item__icon--focus": "visibility: visible; top: 15px;",
        ".sv-ranking-item:focus .sv-ranking-item__index": "background: white; border: 2px solid var(--primary, #19b394);",
        ".sv-ranking-item__content": "display: flex; align-items: center; line-height: 1em; padding: 5px 0px; border-radius: 100px;",
        ".sv-ranking-item__icon-container": "left: 0;top: 0;bottom: 0;width: 25px; flex-shrink: 0;",
        ".sv-ranking-item__icon": "visibility: hidden;top:20px; fill: var(--primary, #19b394); position: absolute;",
        ".sv-ranking-item__index": "display: flex; flex-shrink: 0; align-items: center; justify-content: center; background: rgba(25, 179, 148, 0.1); color: var(--foreground); border-radius: 100%; border:2px solid transparent; margin-right: 16px; width: 40px; height: 40px; line-height: 1em;",
        ".sv-ranking-item__text": "display: inline-block; overflow:hidden; text-overflow: ellipsis; white-space: nowrap;",
        ".sv-ranking-item__ghost": "display: none; background-color: var(--background-dim, #f3f3f3); border-radius: 100px;width: 200px;height: 55px;z-index: 1;position: absolute;left: 25px;",
        "[dir='rtl'] .sv-ranking-item__ghost": "left: initilal; right: 25px;",
        ".sv-ranking-item--ghost .sv-ranking-item__ghost": "display: block;",
        ".sv-ranking-item--ghost .sv-ranking-item__content": "visibility: hidden;",
        ".sv-ranking-item--drag .sv-ranking-item__content": "box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);border-radius: 100px;",
        ".sv-ranking--drag .sv-ranking-item:hover .sv-ranking-item__icon": "visibility: hidden;",
        ".sv-ranking-item--drag .sv-ranking-item__icon--hover": "visibility: visible;",
        ".sv-ranking--mobile .sv-ranking-item__icon--hover": "visibility:visible; fill:#9f9f9f;",
        ".sv-ranking--mobile.sv-ranking--drag .sv-ranking-item--ghost .sv-ranking-item__icon.sv-ranking-item__icon--hover": "visibility:hidden;",
        ".sv-ranking--mobile.sv-ranking-shortcut": "max-width: 80%;",
        ".sv-ranking--design-mode .sv-ranking-item:hover .sv-ranking-item__icon": "visibility: hidden;",
        ".sv-ranking--disabled": "opacity: 0.8;",
        ".sv-ranking-shortcut .sv-ranking-item__icon": "fill: var(--primary, #19b394); ",
        // EO ranking
        // drag drop
        ".sv-dragged-element-shortcut": "height: 24px; min-width: 100px; border-radius: 36px; background-color: white; padding: 16px; cursor: grabbing; position: absolute; z-index: 1000; box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); font-family: 'Open Sans'; font-size: 16px; padding-left: 20px;line-height: 24px;",
        ".sv-matrixdynamic__drag-icon": "padding-top:14px",
        ".sv-matrixdynamic__drag-icon:after": "content: ' '; display: block; height: 6px; width: 20px; border: 1px solid #e7e7e7; box-sizing: border-box; border-radius: 10px; cursor: move; margin-top: 12px;",
        ".sv-matrix-row--drag-drop-ghost-mod td": "background-color: #f3f3f3;",
        ".sv-matrix-row--drag-drop-ghost-mod td > *": "visibility: hidden",
        //eo drag-drop
        ".sv_qstn .sv_q_select_column": "display: inline-block; vertical-align: top; min-width: 10%;",
        ".sv_qstn .sv_q_select_column > *:not(.sv_technical)": "display: block;",
        ".sv_main .sv_container .sv_body .sv_p_root .sv_qstn .sv_q_select_column textarea": "margin-left: 0; padding-left: 0; line-height: initial;",
        ".sv_main .sv-hidden": "display: none !important;",
        ".sv_main .sv-visuallyhidden": "position: absolute; height: 1px !important; width: 1px !important; overflow: hidden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);",
        // paneldynamic progress
        ".sv_main .sv-progress": "height: 0.19em; background-color: $header-background-color; position: relative;",
        ".sv_main .sv-progress__bar": "background-color: $main-color; height: 100%; position: relative;",
        // EO paneldynamic progress
        // paneldynamic
        ".sv_main .sv-paneldynamic__progress-container": "position: relative; display: inline-block; width: calc(100% - 250px); margin-top: 20px;",
        ".sv_main .sv-paneldynamic__add-btn": "float: right;",
        ".sv_main .sv-paneldynamic__add-btn--list-mode": "float: none; margin-top: 0;",
        ".sv_main .sv-paneldynamic__remove-btn": "margin-top: 1.25em;",
        ".sv_main .sv-paneldynamic__remove-btn--right": "margin-top: 0; margin-left: 1.25em;",
        ".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn": "box-sizing: border-box; display: inline-block; cursor: pointer; width: 0.7em; top: -0.28em; position: absolute;",
        ".sv_main .sv-paneldynamic__prev-btn svg, .sv_main .sv-paneldynamic__next-btn svg": "width: 0.7em; height: 0.7em; display: block;",
        ".sv_main .sv-paneldynamic__prev-btn": "left: -1.3em; transform: rotate(90deg);",
        ".sv_main .sv-paneldynamic__next-btn ": "right: -1.3em; transform: rotate(270deg);",
        ".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled": "cursor: auto;",
        ".sv_main .sv-paneldynamic__progress-text": "font-weight: bold; font-size: 0.87em; margin-top: 0.69em; margin-left: 4em",
        // EO paneldynamic
        //boolean
        ".sv_main .sv-boolean__switch": "display: inline-block; box-sizing: border-box; width: 63px; height: 24px; margin-right: 17px; margin-left: 21px; padding: 2px 3px; vertical-align: middle; border-radius: 12px; cursor: pointer;",
        ".sv_main .sv-boolean__slider": "display: inline-block; width: 20px; height: 20px; transition-duration: .4s; transition-property: margin-left; border: none; border-radius: 100%;",
        ".sv_main .sv-boolean__label": "vertical-align: middle; cursor: pointer;",
        ".sv_main .sv-boolean--indeterminate  .sv-boolean__slider": "margin-left: calc(50% - 10px);",
        ".sv_main .sv-boolean input:focus ~ .sv-boolean__switch": "outline-width: 1px; outline-style: solid; outline-offset: 1px;",
        ".sv_main .sv-boolean--checked  .sv-boolean__slider": "margin-left: calc(100% - 20px);",
        "[dir='rtl'] .sv-boolean__label ": "float: right;",
        "[dir='rtl'] .sv-boolean--indeterminate .sv-boolean__slider": "margin-right: calc(50% - 0.625em);",
        "[dir='rtl'] .sv-boolean--checked .sv-boolean__slider": "margin-right: calc(100% - 1.25em);",
        "[dir='rtl'] .sv-boolean__switch": "float: right;",
        "[style*='direction:rtl'] .sv-boolean__label ": "float: right;",
        "[style*='direction:rtl'] .sv-boolean--indeterminate .sv-boolean__slider": "margin-right: calc(50% - 0.625em);",
        "[style*='direction:rtl'] .sv-boolean--checked .sv-boolean__slider": "margin-right: calc(100% - 1.25em);",
        "[style*='direction:rtl'] .sv-boolean__switch": "float: right;",
        // EO boolean
        ".sv_main .sv_q_num": "",
        ".sv_main .sv_q_num + span": "",
        // SignaturePad
        ".sv_main .sjs_sp_container": "position: relative; box-sizing: content-box;",
        ".sv_main .sjs_sp_controls": "position: absolute; left: 0; bottom: 0;",
        ".sv_main .sjs_sp_controls > button": "user-select: none;",
        ".sv_main .sjs_sp_container>div>canvas:focus": "outline: none;",
        ".sv_main .sjs_sp_placeholder": "display: flex;  align-items: center; justify-content: center; position: absolute; z-index: 0; user-select: none; pointer-events: none; width: 100%; height: 100%;",
        // logo
        // ".sv_main .sv_header": "white-space: nowrap;",
        ".sv_main .sv_logo": "",
        ".sv_main .sv-logo--left": "display: inline-block; vertical-align: top; margin-right: 2em;",
        ".sv_main .sv-logo--right": "display: inline-block; vertical-align: top; margin-left: 2em; ",
        ".sv_main .sv-logo--top": "display: block; width: 100%; text-align: center;",
        ".sv_main .sv-logo--bottom": "display: block; width: 100%; text-align: center;",
        ".sv_main .sv_header__text": "display: inline-block; vertical-align: top; max-width: 100%; width: 100%",
        ".sv_main .sv-expand-action:before": "content: \"\"; display: inline-block; background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23404040;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='2,2 0,4 5,9 10,4 8,2 5,5 '/%3E%3C/svg%3E%0A\"); background-repeat: no-repeat; background-position: center center; height: 10px; width: 12px; margin: auto 8px;",
        ".sv_main .sv-expand-action--expanded:before": "transform: rotate(180deg);",
        ".sv_main .sv-action-bar": "display: flex; position: relative; align-items: center; margin-left: auto; padding: 0 0 0 16px; overflow: hidden; white-space: nowrap;",
        ".sv_main .sv-action-bar-separator": "display: inline-block; width: 1px; height: 24px; vertical-align: middle; margin-right: 16px; background-color: #d6d6d6;",
        ".sv_main .sv-action-bar-item": "-webkit-appearance: none; -moz-appearance: none; appearance: none; display: flex; height: 40px; padding: 8px; box-sizing: border-box; margin-right: 16px; border: none; border-radius: 2px; background-color: transparent; cursor: pointer; line-height: 24px; font-size: 16px; overflow-x: hidden; white-space: nowrap; min-width: auto; font-weight: normal",
        ".sv_main .sv-action-bar-item__title": "vertical-align: middle; white-space: nowrap;",
        ".sv_main .sv-action-bar-item__title--with-icon": "margin-left: 8px;",
        ".sv_main .sv-action__content": "display: flex; flex-direction: row; align-items: center;",
        ".sv_main .sv-action__content > *": "flex: 0 0 auto;",
        ".sv_main .sv-action--hidden": "width: 0px; height: 0px; overflow: hidden;",
        ".sv_main .sv-action-bar-item__icon svg": "display: block;",
        ".sv_main .sv-action-bar-item:active": "opacity: 0.5;",
        ".sv_main .sv-action-bar-item:focus": "outline: none;",
        ".sv_main .sv-title-actions": "display: flex; align-items: center; width: 100%;",
        ".sv_main .sv-title-actions__title": "flex-wrap: wrap; max-width: 90%; min-width: 50%;",
        ".sv_main .sv-title-actions__bar": "min-width: 56px;",
        ".sv_main .sv-title-actions .sv-title-actions__title": "min-width: unset; max-width: unset; flex-wrap: wrap; flex: 0 0 auto;",
        ".sv_main .sv-title-actions .sv-action-title-bar": "min-width: unset; flex: 1 1 auto; justify-content: flex-end;",
        ".sv_main .sv_matrix_cell_actions .sv-action-bar": "margin-left: 0; padding-left: 0;",
        ".sv_main .sv_p_wrapper_in_row": "display: flex; flex-direction: row; align-items: center;",
        ".sv_main  .sv_p_remove_btn_right": "margin-left: 1em;",
        //button-group
        ".sv_main .sv-button-group": "display: flex; align-items: center; flex-direction: row; font-size: 16px; height: 48px; overflow: auto;",
        ".sv_main .sv-button-group__item": "display: flex; box-sizing: border-box; flex-direction: row; justify-content: center; align-items: center; width: 100%; padding: 11px 16px; line-height: 24px; border-width: 1px; border-style: solid; outline: none; font-size: 16px; font-weight: 400; cursor: pointer; overflow: hidden;",
        ".sv_main .sv-button-group__item:not(:first-of-type)": "margin-left: -1px;",
        ".sv_main .sv-button-group__item-icon": "display: block; height: 24px;",
        ".sv_main .sv-button-group__item--selected": "font-weight: 600;",
        ".sv_main .sv-button-group__item-decorator": "display: flex; align-items: center; max-width: 100%;",
        ".sv_main  .sv-button-group__item-icon + .sv-button-group__item-caption": "margin-left: 8px",
        ".sv_main .sv-button-group__item-caption": "display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",
        ".sv_main .sv-button-group__item--disabled": "color: cursor: default;",
        //eo button-group
        //popup
        "sv-popup": "display: block; position: absolute; z-index: -1;",
        ".sv-popup": "position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; outline: none; z-index: 1500;",
        ".sv-popup__container": "box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1); position: absolute; padding: 0;",
        ".sv-popup__body-content": "background-color: var(--background, #fff); border-radius: calc(0.5 * var(--base-unit, 8px)); width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; max-height: 90vh; max-width: 90vw;",
        ".sv-popup--modal .sv-list__filter": "padding-top: 8px;",
        ".sv-popup--modal .sv-list__filter-icon": "top: 20px;",
        ".sv-popup--overlay .sv-list__filter": "padding-top: 8px;",
        ".sv-popup--overlay .sv-list__filter-icon": "top: 20px;",
        ".sv-popup--modal": "display: flex; align-items: center; justify-content: center;",
        ".sv-popup--modal .sv-popup__container": "position: static;",
        ".sv-popup--modal .sv-popup__body-content": "padding: calc(4 * var(--base-unit, 8px));",
        ".sv-popup--overlay": "width: 100%;",
        ".sv-popup--overlay .sv-popup__container": "background: rgba(144, 144, 144, 0.5); max-width: 100vw; max-height: calc(100vh - 1 * var(--base-unit, 8px)); height: calc(100vh - 1 * var(--base-unit, 8px)); width: 100%; padding-top: calc(2 * var(--base-unit, 8px)); border: unset;",
        ".sv-popup__shadow": "width: 100%; height: 100%; border-radius: calc(1 * var(--base-unit, 8px));",
        ".sv-popup--overlay .sv-popup__body-content": "border-radius: calc(2 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) 0px 0px; background: var(--background, #fff); box-shadow: 0px calc(1 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) rgba(0, 0, 0, 0.1); padding: calc(3 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)); height: calc(100% - calc(1 * var(--base-unit, 8px))); max-height: 100vh; max-width: 100vw;",
        ".sv-popup--overlay .sv-popup__scrolling-content": "height: calc(100% - (10 * var(--base-unit, 8px)));",
        ".sv-popup--overlay .sv-popup__body-footer": "margin-top: calc(2 * var(--base-unit, 8px));",
        ".sv-popup--overlay .sv-popup__body-footer .sv-action": "width: 100%;",
        ".sv-popup--overlay .sv-popup__body-footer .sv-action-bar": "width: 100%;",
        ".sv-popup--overlay .sv-popup__body-footer-item": "width: 100%;",
        ".sv-popup--overlay .sv-popup__button": "background-color: var(--primary, #19b394); border: 2px solid var(--primary, #19b394); color: var(--primary-foreground, #fff);",
        ".sv-popup__scrolling-content": "height: 100%; overflow: auto; display: flex; flex-direction: column;",
        ".sv-popup__scrolling-content::-webkit-scrollbar": "height: 6px; width: 6px; background-color: var(--background-dim, #f3f3f3);",
        ".sv-popup__scrolling-content::-webkit-scrollbar-thumb": "background: var(--primary-light, rgba(25, 179, 148, 0.1));",
        ".sv-popup__content": "min-width: 100%; height: 100%;",
        ".sv-popup--show-pointer.sv-popup--top .sv-popup__pointer": "transform: translate(calc(-1 * var(--base-unit, 8px))) rotate(180deg);",
        ".sv-popup--show-pointer.sv-popup--bottom .sv-popup__pointer": "transform: translate(calc(-1 * var(--base-unit, 8px)), calc(-1 * var(--base-unit, 8px)));",
        ".sv-popup--show-pointer.sv-popup--right": "transform: translate(calc(1 * var(--base-unit, 8px)));",
        ".sv-popup--show-pointer.sv-popup--right .sv-popup__pointer": "transform: translate(-12px, -4px) rotate(-90deg);",
        ".sv-popup--show-pointer.sv-popup--left": "transform: translate(calc(-1 * var(--base-unit, 8px)));",
        ".sv-popup--show-pointer.sv-popup--left .sv-popup__pointer": "transform: translate(-4px, -4px) rotate(90deg);",
        ".sv-popup__pointer": "display: block; position: absolute;",
        ".sv-popup__pointer:after": "content: ' '; display: block; width: 0; height: 0; border-left: calc(1 * var(--base-unit, 8px)) solid transparent; border-right: calc(1 * var(--base-unit, 8px)) solid transparent; border-bottom: calc(1 * var(--base-unit, 8px)) solid var(--background, #fff); align-self: center;",
        ".sv-popup__body-header": "font-family: Open Sans; font-size: calc(3 * var(--base-unit, 8px)); line-height: calc(4 * var(--base-unit, 8px)); font-style: normal; font-weight: 700; margin-bottom: calc(2 * var(--base-unit, 8px)); color: var(--foreground, #161616);",
        ".sv-popup__body-footer": "display: flex; margin-top: calc(4 * var(--base-unit, 8px));",
        ".sv-popup__body-footer .sv-action-bar": "gap: calc(1.5 * var(--base-unit, 8px));",
        ".sv-popup__button": "padding: calc(2 * var(--base-unit, 8px)) calc(6 * var(--base-unit, 8px)); background: var(--background, #fff); box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.15); border-radius: 4px; margin: 2px; cursor: pointer; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-style: normal; font-weight: 600; font-size: calc(2 * var(--base-unit, 8px)); line-height: calc(3 * var(--base-unit, 8px)); text-align: center; color: var(--primary, #19b394); border: none; outline: none;",
        ".sv-popup__button:hover": "box-shadow: 0 0 0 2px var(--primary, #19b394);",
        ".sv-popup__button:disabled": "color: var(--foreground-disabled, rgba(#161616, 0.16)); cursor: default;",
        ".sv-popup__button:disabled:hover": "box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.15);",
        ".sv-popup__button.sv-popup__button--apply": "background-color: var(--primary, #19b394); color: var(--primary-foreground, #fff);",
        ".sv-popup__button.sv-popup__button--apply:disabled": "background-color: var(--background-dim, #f3f3f3);",
        //eo popup
        //list
        ".sv-list": "padding: 0; margin: 0; background: var(--background, #fff); list-style-type: none; overflow-y: auto;",
        ".sv-list__item--with-icon": "padding-top: 12px; padding-bottom: 12px;",
        ".sv-list__item": "width: 100%; box-sizing: border-box; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",
        ".sv-list__item-body": "width: 100%; box-sizing: border-box; padding-top: 8px; padding-bottom: 8px; padding-inline-end: 64px; padding-inline-start: 16px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",
        ".sv-list__item-icon": "float: left; width: calc(3 * 8px); height: calc(3 * 8px); margin-right: calc(2 * 8px);",
        ".sv-list__item-icon svg": "display: block;",
        ".sv-list__item-icon use": "fill: #909090;",
        ".sv-list__item:hover .sv-list__item-body": "background-color: var(--background-dim, #f3f3f3);",
        ".sv-list__item.sv-list__item--focused .sv-list__item-body": "background-color: var(--background-dim, #f3f3f3);",
        ".sv-list__loading-indicator": "pointer-events: none;",
        ".sv-list__loading-indicator .sv-list__item-body": "background-color: transparent",
        // ".sv-list__item--selected": "background-color: var(--primary, #19b394); color: var(--primary-foreground, #fff);",
        ".sv-list__item--selected .sv-list__item-icon use": "fill: var(--primary-foreground, #fff);",
        ".sv-list__item.sv-list__item--disabled": "color: var(--foreground-light, #909090); cursor: default;",
        ".sv-list__item span": "white-space: nowrap;",
        ".sv-list__container": "position: relative; display: flex; flex-direction: column; height: 100%; display: flex; flex-direction: column; min-height: 0;",
        ".sv-list__filter": "border-bottom: 1px solid rgba(0, 0, 0, 0.16); background: var(--background, #fff); padding-bottom: calcSize(1);",
        ".sv-list__input": "-webkit-appearance: none; -moz-appearance: none; appearance: none; display: block; box-sizing: border-box; width: 100%; line-height: 24px; padding-left: 56px; padding-right: 24px; padding-top: 12px; padding-bottom: 12px; outline: none; font-size: 1em; border: none",
        ".sv-list__filter-icon": "display: block; position: absolute; top: 12px; left: 16px;",
        ".sv-list__filter-icon .sv-svg-icon": "width: 24px; height: 24px;",
        ".sv-list__empty-container": "width: 100%; box-sizing: border-box; padding: 12px 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",
        ".sv-list__empty-text": "line-height: 24px; font-size: 16px; font-weight: 400; text-align: center; color: var(--foreground-light, #909090);",
        //eo list
        ".sv-skeleton-element": "min-height: 50px;",
    };
    StylesManager.Media = {
        ".sv_qstn fieldset .sv-q-col-1": {
            style: "width: 100%;",
            media: "@media only screen and (max-width: 480px)",
        },
        ".sv_qstn fieldset .sv-q-col-2": {
            style: "width: 100%;",
            media: "@media only screen and (max-width: 480px)",
        },
        ".sv_qstn fieldset .sv-q-col-3": {
            style: "width: 100%;",
            media: "@media only screen and (max-width: 480px)",
        },
        ".sv_qstn fieldset .sv-q-col-4": {
            style: "width: 100%;",
            media: "@media only screen and (max-width: 480px)",
        },
        ".sv_qstn fieldset .sv-q-col-5": {
            style: "width: 100%;",
            media: "@media only screen and (max-width: 480px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn": {
            style: "display: block; width: 100% !important;",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .title-left": {
            style: "float: none;",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .sv_q_radiogroup_inline, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .sv_q_checkbox_inline, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .sv_q_imagepicker_inline": {
            style: "display: block;",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table": {
            style: "display: block;",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table thead": {
            style: "display: none;",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table tbody, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table tr, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table td": {
            style: "display: block;",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table:not(.sv_q_matrix) td:before": {
            style: "content: attr(data-responsive-title);",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.sv_q_matrix td:after": {
            style: "content: attr(data-responsive-title); padding-left: 1em",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .radio label, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .checkbox label": {
            style: "line-height: 12px; vertical-align: top;",
            media: "@media (max-width: 600px)",
        },
        ".sv_qstn label.sv_q_m_label": {
            style: "display: inline;",
            media: "@media (max-width: 600px)",
        },
        ".sv_main .sv_custom_header": {
            style: "display: none;",
            media: "@media (max-width: 1300px)",
        },
        ".sv_main .sv_container .sv_header h3": {
            style: "font-size: 1.5em;",
            media: "@media (max-width: 1300px)",
        },
        ".sv_main .sv_container .sv_header h3 span": {
            style: "font-size: 0.75em;",
            media: "@media (max-width: 700px)",
        },
        ".sv_main.sv_bootstrap_css .sv-progress__text": {
            style: "margin-left: 8em;",
            media: "@media (min-width: 768px)",
        },
        ".sv_row": {
            style: " display: flex; flex-wrap: wrap;",
            media: "@supports (display: flex)",
        },
        ".sv-row > .sv-row__panel, .sv-row__question:not(:last-child)": {
            style: "float: left;",
            media: "@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)",
        },
        "[dir='rtl'],[style*='direction:rtl'] .sv-row__question:not(:last-child)": {
            style: "float: right;",
            media: "@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)",
        },
        ".sv-row > .sv-row__panel, .sv-row__question": {
            style: "width: 100% !important; padding-right: 0 !important;",
            media: "@media only screen and (max-width: 600px)",
        },
    };
    StylesManager.ThemeColors = {
        default: {
            "$header-background-color": "#e7e7e7",
            "$body-container-background-color": "#f4f4f4",
            "$main-color": "#1ab394",
            "$main-hover-color": "#0aa384",
            "$body-background-color": "white",
            "$inputs-background-color": "white",
            "$text-color": "#6d7072",
            "$text-input-color": "#6d7072",
            "$header-color": "#6d7072",
            "$border-color": "#e7e7e7",
            "$error-color": "#ed5565",
            "$error-background-color": "#fd6575",
            "$progress-text-color": "#9d9d9d",
            "$disable-color": "#dbdbdb",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#8dd9ca",
            "$progress-buttons-line-color": "#d4d4d4"
        },
        orange: {
            "$header-background-color": "#4a4a4a",
            "$body-container-background-color": "#f8f8f8",
            "$main-color": "#f78119",
            "$main-hover-color": "#e77109",
            "$body-background-color": "white",
            "$inputs-background-color": "white",
            "$text-color": "#4a4a4a",
            "$text-input-color": "#4a4a4a",
            "$header-color": "#f78119",
            "$border-color": "#e7e7e7",
            "$error-color": "#ed5565",
            "$error-background-color": "#fd6575",
            "$progress-text-color": "#9d9d9d",
            "$disable-color": "#dbdbdb",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#f7b781",
            "$progress-buttons-line-color": "#d4d4d4"
        },
        darkblue: {
            "$header-background-color": "#d9d8dd",
            "$body-container-background-color": "#f6f7f2",
            "$main-color": "#3c4f6d",
            "$main-hover-color": "#2c3f5d",
            "$body-background-color": "white",
            "$inputs-background-color": "white",
            "$text-color": "#4a4a4a",
            "$text-input-color": "#4a4a4a",
            "$header-color": "#6d7072",
            "$border-color": "#e7e7e7",
            "$error-color": "#ed5565",
            "$error-background-color": "#fd6575",
            "$progress-text-color": "#9d9d9d",
            "$disable-color": "#dbdbdb",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#839ec9",
            "$progress-buttons-line-color": "#d4d4d4"
        },
        darkrose: {
            "$header-background-color": "#ddd2ce",
            "$body-container-background-color": "#f7efed",
            "$main-color": "#68656e",
            "$main-hover-color": "#58555e",
            "$body-background-color": "white",
            "$inputs-background-color": "white",
            "$text-color": "#4a4a4a",
            "$text-input-color": "#4a4a4a",
            "$header-color": "#6d7072",
            "$border-color": "#e7e7e7",
            "$error-color": "#ed5565",
            "$error-background-color": "#fd6575",
            "$progress-text-color": "#9d9d9d",
            "$disable-color": "#dbdbdb",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#c6bed4",
            "$progress-buttons-line-color": "#d4d4d4"
        },
        stone: {
            "$header-background-color": "#cdccd2",
            "$body-container-background-color": "#efedf4",
            "$main-color": "#0f0f33",
            "$main-hover-color": "#191955",
            "$body-background-color": "white",
            "$inputs-background-color": "white",
            "$text-color": "#0f0f33",
            "$text-input-color": "#0f0f33",
            "$header-color": "#0f0f33",
            "$border-color": "#e7e7e7",
            "$error-color": "#ed5565",
            "$error-background-color": "#fd6575",
            "$progress-text-color": "#9d9d9d",
            "$disable-color": "#dbdbdb",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#747491",
            "$progress-buttons-line-color": "#d4d4d4"
        },
        winter: {
            "$header-background-color": "#82b8da",
            "$body-container-background-color": "#dae1e7",
            "$main-color": "#3c3b40",
            "$main-hover-color": "#1e1d20",
            "$body-background-color": "white",
            "$inputs-background-color": "white",
            "$text-color": "#000",
            "$text-input-color": "#000",
            "$header-color": "#000",
            "$border-color": "#e7e7e7",
            "$error-color": "#ed5565",
            "$error-background-color": "#fd6575",
            "$disable-color": "#dbdbdb",
            "$progress-text-color": "#9d9d9d",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#d1c9f5",
            "$progress-buttons-line-color": "#d4d4d4"
        },
        winterstone: {
            "$header-background-color": "#323232",
            "$body-container-background-color": "#f8f8f8",
            "$main-color": "#5ac8fa",
            "$main-hover-color": "#06a1e7",
            "$body-background-color": "white",
            "$inputs-background-color": "white",
            "$text-color": "#000",
            "$text-input-color": "#000",
            "$header-color": "#000",
            "$border-color": "#e7e7e7",
            "$error-color": "#ed5565",
            "$error-background-color": "#fd6575",
            "$disable-color": "#dbdbdb",
            "$progress-text-color": "#9d9d9d",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#acdcf2",
            "$progress-buttons-line-color": "#d4d4d4"
        },
        modern: {
            "$main-color": "#1ab394",
            "$add-button-color": "#1948b3",
            "$remove-button-color": "#ff1800",
            "$disable-color": "#dbdbdb",
            "$progress-text-color": "#9d9d9d",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$error-color": "#d52901",
            "$text-color": "#404040",
            "$light-text-color": "#fff",
            "$button-text-color": "#fff",
            "$checkmark-color": "#fff",
            "$matrix-text-checked-color": "#fff",
            "$progress-buttons-color": "#8dd9ca",
            "$progress-buttons-line-color": "#d4d4d4",
            "$text-input-color": "#404040",
            "$inputs-background-color": "transparent",
            "$main-hover-color": "#9f9f9f",
            "$body-container-background-color": "#f4f4f4",
            "$text-border-color": "#d4d4d4",
            "$disabled-text-color": "rgba(64, 64, 64, 0.5)",
            "$border-color": "rgb(64, 64, 64, 0.5)",
            "$dropdown-border-color": "#d4d4d4",
            "$header-background-color": "#e7e7e7",
            "$answer-background-color": "rgba(26, 179, 148, 0.2)",
            "$error-background-color": "rgba(213, 41, 1, 0.2)",
            "$radio-checked-color": "#404040",
            "$clean-button-color": "#1948b3",
            "$body-background-color": "#ffffff",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
        },
        bootstrap: {
            "$main-color": "#18a689",
            "$text-color": "#404040;",
            "$text-input-color": "#404040;",
            "$progress-text-color": "#9d9d9d",
            "$disable-color": "#dbdbdb",
            "$header-background-color": "#e7e7e7",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#8dd6c7",
            "$progress-buttons-line-color": "#d4d4d4",
        },
        bootstrapmaterial: {
            "$main-color": "#18a689",
            "$text-color": "#404040;",
            "$text-input-color": "#404040;",
            "$progress-text-color": "#9d9d9d",
            "$disable-color": "#dbdbdb",
            "$header-background-color": "#e7e7e7",
            "$disabled-label-color": "rgba(64, 64, 64, 0.5)",
            "$slider-color": "white",
            "$disabled-switch-color": "#9f9f9f",
            "$disabled-slider-color": "#cfcfcf",
            "$body-background-color": "#ffffff",
            "$foreground-light": "#909090",
            "$foreground-disabled": "#161616",
            "$background-dim": "#f3f3f3",
            "$progress-buttons-color": "#8dd6c7",
            "$progress-buttons-line-color": "#d4d4d4",
        }
    };
    StylesManager.ThemeCss = {
        ".sv_default_css": "background-color: $body-container-background-color;",
        ".sv_default_css hr": "border-color: $border-color;",
        ".sv_default_css input[type='button'], .sv_default_css button": "color: $body-background-color; background-color: $main-color;",
        ".sv_default_css input[type='button']:hover, .sv_default_css button:hover": "background-color: $main-hover-color;",
        ".sv_default_css .sv_header": "color: $header-color;",
        ".sv_default_css .sv_custom_header": "background-color: $header-background-color;",
        ".sv_default_css .sv_container": "color: $text-color;",
        ".sv_default_css .sv_body": "background-color: $body-background-color; border-color: $main-color;",
        ".sv_default_css .sv_progress": "background-color: $border-color;",
        ".sv_default_css .sv_progress_bar": "background-color: $main-color;",
        ".sv_default_css .sv_progress-buttons__list li:before": "border-color: $progress-buttons-color; background-color: $progress-buttons-color;",
        ".sv_default_css .sv_progress-buttons__list li:after": "background-color: $progress-buttons-line-color;",
        ".sv_default_css .sv_progress-buttons__list .sv_progress-buttons__page-title": "color: $text-color;",
        ".sv_default_css .sv_progress-buttons__list .sv_progress-buttons__page-description": "color: $text-color;",
        ".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before": "border-color: $main-color; background-color: $main-color;",
        ".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after": "background-color: $progress-buttons-color",
        ".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        ".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        ".sv_default_css .sv_p_root > .sv_row": "border-color: $border-color;",
        ".sv_default_css .sv_p_root > .sv_row:nth-child(odd)": "background-color: $body-background-color;",
        ".sv_default_css .sv_p_root > .sv_row:nth-child(even)": "background-color: $body-container-background-color;",
        ".sv_default_css .sv_q_other input": "color: $text-color; -webkit-text-fill-color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",
        ".sv_default_css .sv_q_text_root": "color: $text-color; -webkit-text-fill-color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",
        ".sv_default_css .sv_q_dropdown_control": "color: $text-input-color; border-color: $border-color; background-color: $inputs-background-color;",
        ".sv_default_css .sv_q_dropdown_control__input-field-component": "height: auto;",
        ".sv_default_css input[type='text']": "color: $text-color; -webkit-text-fill-color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",
        ".sv_default_css select": "color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",
        ".sv_default_css textarea": "color: $text-input-color; -webkit-text-fill-color: $text-input-color; border-color: $border-color; background-color: $inputs-background-color;",
        ".sv_default_css input:not([type='button']):not([type='reset']):not([type='submit']):not([type='image']):not([type='checkbox']):not([type='radio'])": "border: 1px solid $border-color; background-color: $inputs-background-color;color: $text-input-color; -webkit-text-fill-color: $text-input-color;",
        ".sv_default_css input:not([type='button']):not([type='reset']):not([type='submit']):not([type='image']):not([type='checkbox']):not([type='radio']):focus": "border: 1px solid $main-color;",
        ".sv_default_css .sv_container .sv_body .sv_p_root .sv_q .sv_select_wrapper .sv_q_dropdown_control": "background-color: $inputs-background-color;",
        ".sv_default_css .sv_container .sv_body .sv_p_root .sv_q .sv_select_wrapper .sv_q_dropdown_control:focus-within": "border: 1px solid $main-color;",
        ".sv_default_css .sv_q_other input:focus": "border-color: $main-color;",
        ".sv_default_css .sv_q_text_root:focus": "border-color: $main-color;",
        ".sv_default_css .sv_q_dropdown_control:focus": "border-color: $main-color;",
        ".sv_default_css .sv_container .sv_body .sv_p_root .sv_q .sv_q_dropdown_control .sv_q_dropdown__value .sv_q_dropdown__filter-string-input[type=text]": "border: none; outline: none; padding: 0px; width: auto; display: flex; flex-grow: 1;  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; position: absolute; inset-inline-start: 0; top: 0; height: 100%; background-color: transparent;",
        ".sv_default_css .sv_container .sv_body .sv_p_root .sv_q .sv_q_dropdown_control .sv_q_dropdown__value.sv_q_tagbox__value .sv_q_dropdown__filter-string-input.sv_q_tagbox__filter-string-input": "position: initial;",
        ".sv_default_css input[type='text']:focus": "border-color: $main-color;",
        '.sv_default_css .sv_container .sv_body .sv_p_root .sv_q input[type="radio"]:focus, .sv_default_css .sv_container .sv_body .sv_p_root .sv_q input[type="checkbox"]:focus': "outline: 1px dotted $main-color;",
        ".sv_default_css select:focus": "border-color: $main-color;",
        ".sv_default_css textarea:focus": "border-color: $main-color;",
        ".sv_default_css .sv_q_input.sv_q_input.sv_q_input.sv_q_tagbox.sv_q_tagbox.sv_q_tagbox:not(.sv_q_tagbox--empty)": "height: auto;",
        ".sv_default_css .sv_select_wrapper.sv_q_tagbox_wrapper::before": "height: 100%; padding: 0 1em;",
        ".sv_default_css .sv_select_wrapper": "background-color: $body-background-color;",
        ".sv_default_css .sv_select_wrapper::before": "background-color: $main-color;",
        ".sv_default_css .sv_q_rating_item.active .sv_q_rating_item_text": "background-color: $main-hover-color; border-color: $main-hover-color; color: $body-background-color;",
        ".sv_default_css .sv_q_rating_item .sv_q_rating_item_text": "border-color: $border-color;",
        ".sv_default_css .sv_q_rating_item .sv_q_rating_item_text:hover": "border-color: $main-hover-color;",
        ".sv_default_css table.sv_q_matrix tr": "border-color: $border-color;",
        ".sv_default_css table.sv_q_matrix_dropdown tr": "border-color: $border-color;",
        ".sv_default_css table.sv_q_matrix_dynamic tr": "border-color: $border-color;",
        ".sv_default_css .sv_q_m_cell_selected": "color: $body-background-color; background-color: $main-hover-color;",
        ".sv_main .sv_q_file_remove:hover": "color: $main-color;",
        ".sv_main .sv_q_file_choose_button": "color: $body-background-color; background-color: $main-color;",
        ".sv_main .sv_q_file_choose_button:hover": "background-color: $main-hover-color;",
        ".sv_main .sv_q_imgsel.checked label>div": "background-color: $main-color",
        ".sv_default_css .sv_p_description": "padding-left: 1.29em;",
        //progress bar
        ".sv_main .sv-progress": "background-color: $header-background-color;",
        ".sv_main .sv-progress__bar": "background-color: $main-color;",
        //paneldynamic
        ".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled": "fill: $disable-color;",
        ".sv_main .sv-paneldynamic__progress-text": "color: $progress-text-color;",
        ".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn": "fill: $text-color",
        //boolean
        ".sv_main .sv-boolean__switch": "background-color: $main-color; outline-color: $main-color",
        ".sv_main .sv-boolean__slider": "background-color: $slider-color;",
        ".sv_main .sv-boolean__label--disabled": "color: $disabled-label-color;",
        ".sv_main .sv-boolean--disabled .sv-boolean__switch": "background-color: $disabled-switch-color;",
        ".sv_main .sv-boolean--disabled .sv-boolean__slider": "background-color: $disabled-slider-color;",
        //eo boolean
        //signature pad
        ".sv_main .sjs_sp_container": "border: 1px dashed $disable-color;",
        ".sv_main .sjs_sp_placeholder": "color: $foreground-light;",
        ".sv_main .sv_matrix_detail_row": "background-color: #ededed; border-top: 1px solid $header-background-color; border-bottom: 1px solid $header-background-color;",
        //action-bar
        ".sv_main .sv-action-bar-item": "color: $text-color;",
        ".sv_main .sv-action-bar-item__icon use": "fill: $foreground-light;",
        ".sv_main .sv-action-bar-item:hover": "background-color: $background-dim;",
        //eo action-bar
        //button-group
        ".sv_main .sv-button-group__item--hover:hover": "background-color: $background-dim;",
        ".sv_main .sv-button-group__item-icon use": "fill: $foreground-light;",
        ".sv_main .sv-button-group__item--selected": "color: $main-color;",
        ".sv_main .sv-button-group__item--selected .sv-button-group__item-icon use": "fill: $main-color;",
        ".sv_main .sv-button-group__item--disabled": "color: $foreground-disabled;",
        ".sv_main .sv-button-group__item--disabled .sv-button-group__item-icon use": "fill: $foreground-disabled;",
        ".sv_main .sv-button-group__item": "background: $body-background-color; border-color: $border-color;",
        //eo button-group
        ".sv_main .sv_qstn textarea": "max-width: 100%",
        //list
        "body .sv-list__input": "color: $text-input-color; border-color: $border-color; background-color: $inputs-background-color;",
        "body .sv-list__input::placeholder": "color: $foreground-light;",
        "body .sv-list__input:disabled": "color: $foreground-disabled;",
        "body .sv-list__input:disabled::placeholder": "color: $foreground-disabled;",
        "body .sv-list__item--selected": "background: rgba(25, 179, 148, 0.1); color: $foreground-disabled",
        "body .sv-list__item--selected.sv-list__item--focused": "background-color: $main-color; color: $inputs-background-color;",
        "body .sv-list__item--selected:focus": "background-color: $main-color; color: $inputs-background-color;",
        "body .sv-list__item--selected:hover": "background-color: $main-color; color: $inputs-background-color;",
        //eo list
        ".sv-skeleton-element": "background-color: $background-dim;",
        //ranking
        ".sv_main .sv-ranking-item:focus .sv-ranking-item__index": "border: 2px solid $main-color;",
        ".sv_main .sv-ranking-item__icon": "fill: $main-color;",
        "body .sv-ranking-shortcut .sv-ranking-item__icon": "fill: $main-color;"
        //eo ranking
    };
    StylesManager.modernThemeCss = {
        // ".sv-paneldynamic__add-btn": "background-color: $add-button-color;",
        // ".sv-paneldynamic__remove-btn": "background-color: $remove-button-color;",
        ".sv-boolean__switch": "background-color: $main-color;",
        ".sv-boolean__slider": "background-color: $slider-color;",
        ".sv-boolean__label--disabled": "color: $disabled-label-color;",
        ".sv-boolean--disabled .sv-boolean__switch": "background-color: $disabled-switch-color;",
        ".sv-boolean--disabled .sv-boolean__slider": "background-color: $disabled-slider-color;",
        ".sv-btn": "color: $button-text-color;",
        ".sv-btn--navigation": "background-color: $main-color",
        ".sv-checkbox__svg": "border-color: $border-color; fill: transparent;",
        ".sv-checkbox--allowhover:hover .sv-checkbox__svg": "background-color: $main-hover-color; fill: $checkmark-color;",
        ".sv-checkbox--checked .sv-checkbox__svg": "background-color: $main-color; fill: $checkmark-color;",
        ".sv-checkbox--checked.sv-checkbox--disabled .sv-checkbox__svg": "background-color: $disable-color; fill: $checkmark-color;",
        ".sv-checkbox--disabled .sv-checkbox__svg": "border-color: $disable-color;",
        ".sv-comment": "border-color: $text-border-color; max-width: 100%;",
        ".sv-comment:focus": "border-color: $main-color;",
        ".sv-completedpage": "color: $text-color; background-color: $body-container-background-color;",
        ".sv-container-modern": "color: $text-color;",
        ".sv-container-modern__title": "color: $main-color;",
        ".sv-description": "color: $disabled-text-color;",
        ".sv-dropdown": "border-bottom: 0.06em solid $text-border-color;",
        ".sv-dropdown:focus": "border-color: $dropdown-border-color;",
        ".sv-dropdown--error": "border-color: $error-color; color: $error-color;",
        ".sv-dropdown--error::placeholder": "color: $error-color;",
        ".sv-dropdown--error::-ms-input-placeholder": "color: $error-color;",
        ".sv-tagbox": "border-bottom: 0.06em solid $text-border-color;",
        ".sv-tagbox:focus": "border-color: $dropdown-border-color;",
        ".sv-tagbox--error": "border-color: $error-color; color: $error-color;",
        ".sv-tagbox--error::placeholder": "color: $error-color;",
        ".sv-tagbox--error::-ms-input-placeholder": "color: $error-color;",
        ".sv-file__decorator": "background-color: $body-container-background-color;",
        ".sv-file__clean-btn": "background-color: $remove-button-color;",
        ".sv-file__choose-btn:not(.sv-file__choose-btn--disabled)": "background-color: $add-button-color;",
        ".sv-file__choose-btn--disabled": "background-color: $disable-color;",
        ".sv-file__remove-svg": "fill: #ff1800;",
        ".sv-file__sign a": "color: $text-color;",
        ".sv-imagepicker__item--allowhover:hover .sv-imagepicker__image": "background-color: $main-hover-color; border-color: $main-hover-color;",
        ".sv-imagepicker__item--checked .sv-imagepicker__image": "background-color: $main-color; border-color: $main-color;",
        ".sv-imagepicker__item--disabled.sv-imagepicker__item--checked .sv-imagepicker__image": "background-color: $disable-color; border-color: $disable-color;",
        ".sv-item__control:focus + .sv-item__decorator": "border-color: $main-color;",
        ".sv-matrix__text--checked": "color: $matrix-text-checked-color; background-color: $main-color;",
        ".sv-matrix__text--disabled.sv-matrix__text--checked": "background-color: $disable-color;",
        ".sv-matrixdynamic__add-btn": "background-color: $add-button-color;",
        ".sv-matrixdynamic__remove-btn": "background-color: $remove-button-color;",
        ".sv-paneldynamic__add-btn": "background-color: $add-button-color;",
        ".sv-paneldynamic__remove-btn": "background-color: $remove-button-color;",
        ".sv-paneldynamic__prev-btn": "fill: $text-color;",
        ".sv-paneldynamic__next-btn": "fill: $text-color;",
        ".sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled": "fill: $disable-color;",
        ".sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled": "fill: $disable-color;",
        ".sv-paneldynamic__progress-text": "color: $progress-text-color;",
        ".sv-progress": "background-color: $header-background-color;",
        ".sv-progress__bar": "background-color: $main-color;",
        ".sv-progress__text": "color: $progress-text-color;",
        ".sv_progress-buttons__list li:before": "border-color: $progress-buttons-color; background-color: $progress-buttons-color;",
        ".sv_progress-buttons__list li:after": "background-color: $progress-buttons-line-color;",
        ".sv_progress-buttons__list .sv_progress-buttons__page-title": "color: $text-color;",
        ".sv_progress-buttons__list .sv_progress-buttons__page-description": "color: $text-color;",
        ".sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before": "border-color: $main-color; background-color: $main-color;",
        ".sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after": "background-color: $progress-buttons-color",
        ".sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        ".sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        ".sv-question__erbox": "color: $error-color;",
        ".sv-question__title--answer": "background-color: $answer-background-color;",
        ".sv-question__title--error": "background-color: $error-background-color;",
        ".sv-panel__title--error": "background-color: $error-background-color;",
        ".sv-radio__svg": "border-color: $border-color; fill: transparent;",
        ".sv-radio--allowhover:hover .sv-radio__svg": "fill: $border-color;",
        ".sv-radio--checked .sv-radio__svg": "border-color: $radio-checked-color; fill: $radio-checked-color;",
        ".sv-radio--disabled .sv-radio__svg": "border-color: $disable-color;",
        ".sv-radio--disabled.sv-radio--checked .sv-radio__svg": "fill: $disable-color;",
        ".sv-rating": "color: $text-color;",
        ".sv-rating input:focus + .sv-rating__min-text + .sv-rating__item-text, .sv-rating input:focus + .sv-rating__item-text": "outline-color: $main-color;",
        ".sv-rating__item-text": "color: $main-hover-color; border: solid 0.1875em $main-hover-color;",
        ".sv-rating__item-text:hover": "background-color: $main-hover-color; color: $body-background-color;",
        ".sv-rating__item--selected .sv-rating__item-text": "background-color: $main-color; color: $body-background-color; border-color: $main-color;",
        ".sv-rating--disabled .sv-rating__item-text": "color: $disable-color; border-color: $disable-color;",
        ".sv-rating--disabled .sv-rating__item-text:hover": "background-color: transparent;",
        ".sv-rating--disabled .sv-rating__item-text:hover .sv-rating__item--selected .sv-rating__item-text": "background-color: $disable-color; color: $body-background-color;",
        "::-webkit-scrollbar": "background-color: $main-hover-color;",
        "::-webkit-scrollbar-thumb": "background: $main-color;",
        ".sv-selectbase__clear-btn": "background-color: $clean-button-color;",
        ".sv-table": "background-color: rgba($main-hover-color, 0.1);",
        ".sv-text:focus": "border-color: $main-color;",
        '.sv-text[type="date"]::-webkit-calendar-picker-indicator': "color: transparent; background: transparent;",
        ".sv-text--error": "color: $error-color; border-color: $error-color;",
        ".sv-text--error::placeholder": "color: $error-color;",
        ".sv-text--error::-ms-placeholder": "color: $error-color;",
        ".sv-text--error:-ms-placeholder": "color: $error-color;",
        "input.sv-text, textarea.sv-comment, select.sv-dropdown": "color: $text-input-color; background-color: $inputs-background-color;",
        ".sv-text::placeholder": "color: $text-input-color;",
        ".sv-text::-ms-placeholder": "color: $text-input-color;",
        ".sv-text:-ms-placeholder": "color: $text-input-color;",
        ".sv-table__row--detail": "background-color: $header-background-color;",
        //signature pad
        ".sjs_sp_container": "border: 1px dashed $disable-color;",
        ".sjs_sp_placeholder": "color: $foreground-light;",
        //drag-drop
        ".sv-matrixdynamic__drag-icon": "padding-top:16px",
        ".sv-matrixdynamic__drag-icon:after": "content: ' '; display: block; height: 6px; width: 20px; border: 1px solid $border-color; box-sizing: border-box; border-radius: 10px; cursor: move; margin-top: 12px;",
        ".sv-matrix__drag-drop-ghost-position-top, .sv-matrix__drag-drop-ghost-position-bottom": "position: relative;",
        ".sv-matrix__drag-drop-ghost-position-top::after, .sv-matrix__drag-drop-ghost-position-bottom::after": "content: ''; width: 100%; height: 4px; background-color: var(--primary, #19b394); position: absolute; left: 0;",
        ".sv-matrix__drag-drop-ghost-position-top::after": "top: 0;",
        ".sv-matrix__drag-drop-ghost-position-bottom::after": "bottom: 0;",
        //eo drag-drop
        ".sv-skeleton-element": "background-color: $background-dim;",
        //ranking
        ".sv-ranking-item:focus .sv-ranking-item__index": "border: 2px solid $main-color;",
        ".sv-ranking-item__icon": "fill: $main-color;",
        "body .sv-ranking-shortcut .sv-ranking-item__icon": "fill: $main-color;"
        //eo ranking
    };
    StylesManager.bootstrapThemeCss = {
        ".sv_main .sv_q_imgsel.checked label>div": "background-color: $main-color",
        ".sv_main .sv_p_description": "padding-left: 1.66em;",
        ".sv_main .sv_qstn_error_bottom": "margin-top: 20px; margin-bottom: 0;",
        ".sv_main .progress": "width: 60%;",
        ".sv_main .progress-bar": "width: auto; margin-left: 2px; margin-right: 2px;",
        ".sv_main .table>tbody>tr>td": "min-width: 90px;",
        ".sv_main f-panel .sv_qstn": "padding: 0; vertical-align: middle;",
        ".sv_main .sv_q_image": "display: inline-block;",
        ".sv_main .sv_row .sv_qstn:first-child:last-child": "flex: none !important;",
        ".sv_main .sv_row .sv_p_container:first-child:last-child": "flex: none !important;",
        //progress bar
        ".sv_main .sv-progress": "background-color: $header-background-color;",
        ".sv_main .sv-progress__bar": "background-color: $main-color;",
        //progress buttons
        ".sv_main .sv_progress-buttons__list li:before": "border-color: $progress-buttons-color; background-color: $progress-buttons-color;",
        ".sv_main .sv_progress-buttons__list li:after": "background-color: $progress-buttons-line-color;",
        ".sv_main .sv_progress-buttons__list .sv_progress-buttons__page-title": "color: $text-color;",
        ".sv_main .sv_progress-buttons__list .sv_progress-buttons__page-description": "color: $text-color;",
        ".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before": "border-color: $main-color; background-color: $main-color;",
        ".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after": "background-color: $progress-buttons-color",
        ".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        ".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        //paneldynamic
        ".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled": "fill: $disable-color;",
        ".sv_main .sv-paneldynamic__progress-text": "color: $progress-text-color;",
        ".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn": "fill: $text-color",
        //boolean
        ".sv_main .sv-boolean__switch": "background-color: $main-color;",
        ".sv_main .sv-boolean__slider": "background-color: $slider-color;",
        ".sv_main .sv-boolean__label--disabled": "color: $disabled-label-color;",
        ".sv_main .sv-boolean--disabled .sv-boolean__switch": "background-color: $disabled-switch-color;",
        ".sv_main .sv-boolean--disabled  .sv-boolean__slider": "background-color: $disabled-slider-color;",
        //eo boolean
        //signature pad
        ".sv_main .sjs_sp_container": "border: 1px dashed $disable-color;",
        ".sv_main .sjs_sp_placeholder": "color: $foreground-light;",
        ".sv_main .sv_matrix_detail_row": "background-color: #ededed; border-top: 1px solid $header-background-color; border-bottom: 1px solid $header-background-color;",
        ".sv_main .sv-action-bar-item": "color: $text-color;",
        ".sv_main .sv-action-bar-item__icon use": "fill: $foreground-light;",
        ".sv_main .sv-action-bar-item:hover": "background-color: $background-dim;",
        ".sv-skeleton-element": "background-color: $background-dim;",
    };
    StylesManager.bootstrapmaterialThemeCss = {
        ".sv_main.sv_bootstrapmaterial_css .form-group.is-focused .form-control": "linear-gradient(0deg, $main-color 2px, $main-color 0),linear-gradient(0deg, #D2D2D2 1px, transparent 0);",
        ".sv_main.sv_bootstrapmaterial_css .sv_qstn": "margin-bottom: 1rem;",
        ".sv_main.sv_bootstrapmaterial_css .sv_qstn label.sv_q_m_label": "height: 100%;",
        ".sv_main.sv_bootstrapmaterial_css .sv_q_image": "display: inline-block;",
        ".sv_main .sv_row .sv_qstn:first-child:last-child": "flex: none !important;",
        ".sv_main .sv_row .sv_p_container:first-child:last-child": "flex: none !important;",
        ".sv_main.sv_bootstrapmaterial_css .checkbox input[type=checkbox]:checked + .checkbox-material .check": "border-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css label.checkbox-inline input[type=checkbox]:checked + .checkbox-material .check": "border-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css .checkbox input[type=checkbox]:checked + .checkbox-material .check:before": "color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css label.checkbox-inline input[type=checkbox]:checked + .checkbox-material .check:before": "color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css .radio input[type=radio]:checked ~ .circle": "border-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css label.radio-inline input[type=radio]:checked ~ .circle": "border-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css .radio input[type=radio]:checked ~ .check": "background-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css label.radio-inline input[type=radio]:checked ~ .check": "background-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css .btn-default.active": "background-color: $main-color; color: $body-background-color;",
        ".sv_main.sv_bootstrapmaterial_css .btn-default:active": "background-color: $main-color; color: $body-background-color;",
        ".sv_main.sv_bootstrapmaterial_css .btn-secondary.active": "background-color: $main-color; color: $body-background-color;",
        ".sv_main.sv_bootstrapmaterial_css .btn-secondary:active": "background-color: $main-color; color: $body-background-color;",
        ".sv_main.sv_bootstrapmaterial_css .open>.dropdown-toggle.btn-default": "background-color: $main-color; color: $body-background-color;",
        ".sv_main.sv_bootstrapmaterial_css input[type='button'].btn-primary, .sv_main.sv_bootstrapmaterial_css button.btn-primary": "color: $body-background-color; background-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css input[type='button'].btn-primary:hover, .sv_main.sv_bootstrapmaterial_css button.btn-primary:hover": "background-color: $main-hover-color;",
        ".sv_main .sv_q_imgsel.checked label>div": "background-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css .sv_q_file_remove:hover": "color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css .form-group input[type=file]": "position: relative; opacity: 1;",
        ".sv_main.sv_bootstrapmaterial_css .progress": "width: 60%; height: 1.5em;",
        ".sv_main.sv_bootstrapmaterial_css .progress-bar": "width: auto; margin-left: 2px; margin-right: 2px;",
        //progress bar
        ".sv_main .sv-progress": "background-color: $header-background-color;",
        ".sv_main .sv-progress__bar": "background-color: $main-color;",
        //progress buttons
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li:before": "border-color: $progress-buttons-color; background-color: $progress-buttons-color;",
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li:after": "background-color: $progress-buttons-line-color;",
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list .sv_progress-buttons__page-title": "color: $text-color;",
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list .sv_progress-buttons__page-description": "color: $text-color;",
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before": "border-color: $main-color; background-color: $main-color;",
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after": "background-color: $progress-buttons-color",
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        ".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before": "border-color: $main-color; background-color: white;",
        //paneldynamic
        ".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled": "fill: $disable-color;",
        ".sv_main .sv-paneldynamic__progress-text": "color: $progress-text-color;",
        ".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn": "fill: $text-color",
        //boolean
        ".sv_main .sv-boolean .checkbox-decorator": "display: none;",
        ".sv_main .sv-boolean__switch": "background-color: $main-color;",
        ".sv_main .sv-boolean__slider": "background-color: $slider-color;",
        ".sv_main .sv-boolean__label.sv-boolean__label--disabled": "color: $disabled-label-color;",
        ".sv_main .sv-boolean__label": "color: $text-color;",
        ".sv_main .sv-boolean--disabled .sv-boolean__switch": "background-color: $disabled-switch-color;",
        ".sv_main .sv-boolean--disabled  .sv-boolean__slider": "background-color: $disabled-slider-color;",
        //eo boolean
        ".sv_main .sv_matrix_detail_row": "background-color: #ededed; border-top: 1px solid $header-background-color; border-bottom: 1px solid $header-background-color;",
        //signature pad
        ".sv_main .sjs_sp_container": "border: 1px dashed $disable-color;",
        ".sv_main .sjs_sp_placeholder": "color: $foreground-light;",
        ".sv_main .sv-action-bar-item": "color: $text-color;",
        ".sv_main .sv-action-bar-item__icon use": "fill: $foreground-light;",
        ".sv_main .sv-action-bar-item:hover": "background-color: $background-dim;",
        ".sv-skeleton-element": "background-color: $background-dim;",
    };
    StylesManager.Enabled = true;
    return StylesManager;
}());



/***/ }),

/***/ "./src/survey-element.ts":
/*!*******************************!*\
  !*** ./src/survey-element.ts ***!
  \*******************************/
/*! exports provided: SurveyElementCore, DragTypeOverMeEnum, SurveyElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyElementCore", function() { return SurveyElementCore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragTypeOverMeEnum", function() { return DragTypeOverMeEnum; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyElement", function() { return SurveyElement; });
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions/adaptive-container */ "./src/actions/adaptive-container.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};






/**
 * A base class for the [`SurveyElement`](https://surveyjs.io/form-library/documentation/surveyelement) and [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) classes.
 */
var SurveyElementCore = /** @class */ (function (_super) {
    __extends(SurveyElementCore, _super);
    function SurveyElementCore() {
        var _this = _super.call(this) || this;
        _this.createLocTitleProperty();
        return _this;
    }
    SurveyElementCore.prototype.createLocTitleProperty = function () {
        return this.createLocalizableString("title", this, true);
    };
    Object.defineProperty(SurveyElementCore.prototype, "title", {
        /**
         * A title for the survey element. If `title` is undefined, the `name` property value is displayed instead.
         *
         * Empty pages and panels do not display their titles or names.
         *
         * @see [Configure Question Titles](https://surveyjs.io/form-library/documentation/design-survey-question-titles)
        */
        get: function () {
            return this.getLocalizableStringText("title", this.getDefaultTitleValue());
        },
        set: function (val) {
            this.setLocalizableStringText("title", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "locTitle", {
        get: function () {
            return this.getLocalizableString("title");
        },
        enumerable: false,
        configurable: true
    });
    SurveyElementCore.prototype.getDefaultTitleValue = function () { return undefined; };
    SurveyElementCore.prototype.updateDescriptionVisibility = function (newDescription) {
        this.hasDescription = !!newDescription;
    };
    Object.defineProperty(SurveyElementCore.prototype, "locDescription", {
        get: function () {
            return this.getLocalizableString("description");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "titleTagName", {
        get: function () {
            var titleTagName = this.getDefaultTitleTagName();
            var survey = this.getSurvey();
            return !!survey ? survey.getElementTitleTagName(this, titleTagName) : titleTagName;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElementCore.prototype.getDefaultTitleTagName = function () {
        return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].titleTags[this.getType()];
    };
    Object.defineProperty(SurveyElementCore.prototype, "hasTitle", {
        get: function () { return this.title.length > 0; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "hasTitleActions", {
        get: function () { return false; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "hasTitleEvents", {
        get: function () {
            return this.hasTitleActions;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElementCore.prototype.getTitleToolbar = function () { return null; };
    SurveyElementCore.prototype.getTitleOwner = function () { return undefined; };
    Object.defineProperty(SurveyElementCore.prototype, "isTitleOwner", {
        get: function () { return !!this.getTitleOwner(); },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "isTitleRenderedAsString", {
        get: function () { return this.getIsTitleRenderedAsString(); },
        enumerable: false,
        configurable: true
    });
    SurveyElementCore.prototype.toggleState = function () { return undefined; };
    Object.defineProperty(SurveyElementCore.prototype, "cssClasses", {
        get: function () { return {}; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "cssTitle", {
        get: function () { return ""; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "ariaTitleId", {
        get: function () { return undefined; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "titleTabIndex", {
        get: function () { return undefined; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "titleAriaExpanded", {
        get: function () { return undefined; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "ariaLabel", {
        get: function () {
            return this.locTitle.renderedHtml;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElementCore.prototype, "titleAriaLabel", {
        get: function () {
            return this.ariaLabel;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElementCore.prototype.getIsTitleRenderedAsString = function () { return !this.isTitleOwner; };
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], SurveyElementCore.prototype, "hasDescription", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
            localizable: true, onSet: function (newDescription, self) {
                self.updateDescriptionVisibility(self, newDescription);
            }
        })
    ], SurveyElementCore.prototype, "description", void 0);
    return SurveyElementCore;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));

var DragTypeOverMeEnum;
(function (DragTypeOverMeEnum) {
    DragTypeOverMeEnum[DragTypeOverMeEnum["InsideEmptyPanel"] = 1] = "InsideEmptyPanel";
    DragTypeOverMeEnum[DragTypeOverMeEnum["MultilineRight"] = 2] = "MultilineRight";
    DragTypeOverMeEnum[DragTypeOverMeEnum["MultilineLeft"] = 3] = "MultilineLeft";
})(DragTypeOverMeEnum || (DragTypeOverMeEnum = {}));
/**
 * A base class for all survey elements.
 */
var SurveyElement = /** @class */ (function (_super) {
    __extends(SurveyElement, _super);
    function SurveyElement(name) {
        var _this = _super.call(this) || this;
        _this.selectedElementInDesignValue = _this;
        _this.disableDesignActions = SurveyElement.CreateDisabledDesignElements;
        _this.parentQuestionValue = null;
        _this.isContentElement = false;
        _this.isEditableTemplateElement = false;
        _this.isInteractiveDesignElement = true;
        _this.isSingleInRow = true;
        _this.name = name;
        _this.createNewArray("errors");
        _this.createNewArray("titleActions");
        _this.registerPropertyChangedHandlers(["isReadOnly"], function () { _this.onReadOnlyChanged(); });
        _this.registerPropertyChangedHandlers(["errors"], function () { _this.updateVisibleErrors(); });
        _this.registerPropertyChangedHandlers(["isSingleInRow"], function () { _this.updateElementCss(false); });
        return _this;
    }
    SurveyElement.getProgressInfoByElements = function (children, isRequired) {
        var info = _base__WEBPACK_IMPORTED_MODULE_1__["Base"].createProgressInfo();
        for (var i = 0; i < children.length; i++) {
            if (!children[i].isVisible)
                continue;
            var childInfo = children[i].getProgressInfo();
            info.questionCount += childInfo.questionCount;
            info.answeredQuestionCount += childInfo.answeredQuestionCount;
            info.requiredQuestionCount += childInfo.requiredQuestionCount;
            info.requiredAnsweredQuestionCount +=
                childInfo.requiredAnsweredQuestionCount;
        }
        if (isRequired && info.questionCount > 0) {
            if (info.requiredQuestionCount == 0)
                info.requiredQuestionCount = 1;
            if (info.answeredQuestionCount > 0)
                info.requiredAnsweredQuestionCount = 1;
        }
        return info;
    };
    SurveyElement.ScrollElementToTop = function (elementId) {
        if (!elementId || typeof document === "undefined")
            return false;
        var el = document.getElementById(elementId);
        if (!el || !el.scrollIntoView)
            return false;
        var elemTop = el.getBoundingClientRect().top;
        if (elemTop < 0)
            el.scrollIntoView();
        return elemTop < 0;
    };
    SurveyElement.GetFirstNonTextElement = function (elements, removeSpaces) {
        if (removeSpaces === void 0) { removeSpaces = false; }
        if (!elements || !elements.length || elements.length == 0)
            return null;
        if (removeSpaces) {
            var tEl = elements[0];
            if (tEl.nodeName === "#text")
                tEl.data = "";
            tEl = elements[elements.length - 1];
            if (tEl.nodeName === "#text")
                tEl.data = "";
        }
        for (var i = 0; i < elements.length; i++) {
            if (elements[i].nodeName != "#text" && elements[i].nodeName != "#comment")
                return elements[i];
        }
        return null;
    };
    SurveyElement.FocusElement = function (elementId) {
        if (!elementId || typeof document === "undefined")
            return false;
        var res = SurveyElement.focusElementCore(elementId);
        if (!res) {
            setTimeout(function () {
                SurveyElement.focusElementCore(elementId);
            }, 10);
        }
        return res;
    };
    SurveyElement.focusElementCore = function (elementId) {
        if (!document)
            return false;
        var el = document.getElementById(elementId);
        if (el && !el["disabled"]) {
            el.focus();
            return true;
        }
        return false;
    };
    SurveyElement.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
        _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
        if (name === "state") {
            this.updateElementCss(false);
            if (this.stateChangedCallback)
                this.stateChangedCallback();
        }
    };
    SurveyElement.prototype.getSkeletonComponentNameCore = function () {
        if (this.survey) {
            return this.survey.getSkeletonComponentName(this);
        }
        return "";
    };
    Object.defineProperty(SurveyElement.prototype, "parentQuestion", {
        /**
         * A Dynamic Panel, Dynamic Matrix, or Dropdown Matrix that includes the current question.
         *
         * This property is `null` for standalone questions.
         */
        get: function () {
            return this.parentQuestionValue;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.setParentQuestion = function (val) {
        this.parentQuestionValue = val;
        this.onParentQuestionChanged();
    };
    SurveyElement.prototype.onParentQuestionChanged = function () { };
    Object.defineProperty(SurveyElement.prototype, "skeletonComponentName", {
        get: function () {
            return this.getSkeletonComponentNameCore();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "state", {
        /**
         * Gets and sets the survey element's expand state.
         *
         * Possible values:
         *
         * - `"default"` (default) - The survey element is displayed in full and cannot be collapsed in the UI.
         * - `"expanded"` - The survey element is displayed in full and can be collapsed in the UI.
         * - `"collapsed"` - The survey element displays only `title` and `description` and can be expanded in the UI.
         *
         * @see toggleState
         * @see collapse
         * @see expand
         * @see isCollapsed
         * @see isExpanded
         */
        get: function () {
            return this.getPropertyValue("state");
        },
        set: function (val) {
            this.setPropertyValue("state", val);
            this.notifyStateChanged();
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.notifyStateChanged = function () {
        if (this.survey) {
            this.survey.elementContentVisibilityChanged(this);
        }
    };
    Object.defineProperty(SurveyElement.prototype, "isCollapsed", {
        /**
         * Returns `true` if the survey element is collapsed.
         * @see state
         * @see toggleState
         * @see collapse
         * @see expand
         * @see isExpanded
         */
        get: function () {
            if (this.isDesignMode)
                return;
            return this.state === "collapsed";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "isExpanded", {
        /**
         * Returns `true` if the survey element is expanded.
         * @see state
         * @see toggleState
         * @see collapse
         * @see expand
         * @see isCollapsed
         */
        get: function () {
            return this.state === "expanded";
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Collapses the survey element.
     *
     * In collapsed state, the element displays only `title` and `description`.
     * @see title
     * @see description
     * @see state
     * @see toggleState
     * @see expand
     * @see isCollapsed
     * @see isExpanded
     */
    SurveyElement.prototype.collapse = function () {
        if (this.isDesignMode)
            return;
        this.state = "collapsed";
    };
    /**
     * Expands the survey element.
     * @see state
     * @see toggleState
     * @see collapse
     * @see isCollapsed
     * @see isExpanded
     */
    SurveyElement.prototype.expand = function () {
        this.state = "expanded";
    };
    /**
     * Toggles the survey element's `state` between collapsed and expanded.
     * @see state
     * @see collapse
     * @see expand
     * @see isCollapsed
     * @see isExpanded
     */
    SurveyElement.prototype.toggleState = function () {
        if (this.isCollapsed) {
            this.expand();
            return true;
        }
        if (this.isExpanded) {
            this.collapse();
            return false;
        }
        return true;
    };
    Object.defineProperty(SurveyElement.prototype, "hasStateButton", {
        get: function () {
            return this.isExpanded || this.isCollapsed;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "shortcutText", {
        get: function () {
            return this.title || this.name;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.getTitleToolbar = function () {
        if (!this.titleToolbarValue) {
            this.titleToolbarValue = this.createActionContainer(true);
            this.titleToolbarValue.containerCss = (this.isPanel ? this.cssClasses.panel.titleBar : this.cssClasses.titleBar) || "sv-action-title-bar";
            this.titleToolbarValue.setItems(this.getTitleActions());
        }
        return this.titleToolbarValue;
    };
    SurveyElement.prototype.createActionContainer = function (allowAdaptiveActions) {
        var actionContainer = allowAdaptiveActions ? new _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_2__["AdaptiveActionContainer"]() : new _actions_container__WEBPACK_IMPORTED_MODULE_5__["ActionContainer"]();
        if (this.survey && !!this.survey.getCss().actionBar) {
            actionContainer.cssClasses = this.survey.getCss().actionBar;
        }
        return actionContainer;
    };
    Object.defineProperty(SurveyElement.prototype, "titleActions", {
        get: function () {
            return this.getPropertyValue("titleActions");
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.getTitleActions = function () {
        if (!this.isTitleActionRequested) {
            this.updateTitleActions();
            this.isTitleActionRequested = true;
        }
        return this.titleActions;
    };
    SurveyElement.prototype.getDefaultTitleActions = function () {
        return [];
    };
    SurveyElement.prototype.updateTitleActions = function () {
        var actions = this.getDefaultTitleActions();
        if (!!this.survey) {
            actions = this.survey.getUpdatedElementTitleActions(this, actions);
        }
        this.setPropertyValue("titleActions", actions);
    };
    Object.defineProperty(SurveyElement.prototype, "hasTitleActions", {
        get: function () {
            return this.getTitleActions().length > 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "hasTitleEvents", {
        get: function () {
            return this.state !== undefined && this.state !== "default";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "titleTabIndex", {
        get: function () {
            return !this.isPage && this.state !== "default" ? 0 : undefined;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "titleAriaExpanded", {
        get: function () {
            if (this.isPage || this.state === "default")
                return undefined;
            return this.state === "expanded";
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.setSurveyImpl = function (value, isLight) {
        this.surveyImplValue = value;
        if (!this.surveyImplValue) {
            this.setSurveyCore(null);
            this.surveyDataValue = null;
        }
        else {
            this.surveyDataValue = this.surveyImplValue.getSurveyData();
            this.setSurveyCore(this.surveyImplValue.getSurvey());
            this.textProcessorValue = this.surveyImplValue.getTextProcessor();
            this.onSetData();
        }
        if (!!this.survey) {
            this.clearCssClasses();
        }
    };
    SurveyElement.prototype.canRunConditions = function () {
        return _super.prototype.canRunConditions.call(this) && !!this.data;
    };
    SurveyElement.prototype.getDataFilteredValues = function () {
        return !!this.data ? this.data.getFilteredValues() : null;
    };
    SurveyElement.prototype.getDataFilteredProperties = function () {
        var props = !!this.data ? this.data.getFilteredProperties() : {};
        props.question = this;
        return props;
    };
    Object.defineProperty(SurveyElement.prototype, "surveyImpl", {
        get: function () {
            return this.surveyImplValue;
        },
        enumerable: false,
        configurable: true
    });
    /* You shouldn't use this method ever */
    SurveyElement.prototype.__setData = function (data) {
        if (_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].supportCreatorV2) {
            this.surveyDataValue = data;
        }
    };
    Object.defineProperty(SurveyElement.prototype, "data", {
        get: function () {
            return this.surveyDataValue;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "survey", {
        /**
         * Returns the survey object.
         */
        get: function () {
            return this.getSurvey();
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        if (!!this.surveyValue)
            return this.surveyValue;
        if (!!this.surveyImplValue) {
            this.setSurveyCore(this.surveyImplValue.getSurvey());
        }
        return this.surveyValue;
    };
    SurveyElement.prototype.setSurveyCore = function (value) {
        this.surveyValue = value;
        if (!!this.surveyChangedCallback) {
            this.surveyChangedCallback();
        }
    };
    Object.defineProperty(SurveyElement.prototype, "isInternal", {
        get: function () {
            return this.isContentElement;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "areInvisibleElementsShowing", {
        get: function () {
            return (!!this.survey &&
                this.survey.areInvisibleElementsShowing &&
                !this.isContentElement);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "isVisible", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "isReadOnly", {
        /**
         * Returns `true` if the survey element or its parent element is read-only.
         *
         * If you want to switch a survey element to the read-only state based on a condition, specify the [`enableIf`](https://surveyjs.io/form-library/documentation/question#enableIf) property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see readOnly
         */
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "readOnly", {
        /**
         * Makes the survey element read-only.
         *
         * If you want to switch a survey element to the read-only state based on a condition, specify the [`enableIf`](https://surveyjs.io/form-library/documentation/question#enableIf) property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
         * @see isReadOnly
         */
        get: function () {
            return this.getPropertyValue("readOnly", false);
        },
        set: function (val) {
            if (this.readOnly == val)
                return;
            this.setPropertyValue("readOnly", val);
            if (!this.isLoadingFromJson) {
                this.setPropertyValue("isReadOnly", this.isReadOnly);
            }
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.onReadOnlyChanged = function () {
        if (!!this.readOnlyChangedCallback) {
            this.readOnlyChangedCallback();
        }
    };
    Object.defineProperty(SurveyElement.prototype, "css", {
        get: function () {
            return !!this.survey ? this.survey.getCss() : {};
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.ensureCssClassesValue = function () {
        if (!this.cssClassesValue) {
            this.cssClassesValue = this.calcCssClasses(this.css);
            this.updateElementCssCore(this.cssClassesValue);
        }
    };
    Object.defineProperty(SurveyElement.prototype, "cssClasses", {
        /**
         * Returns an object in which keys are UI elements and values are CSS classes applied to them.
         *
         * Use the following events of the [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) object to override CSS classes:
         *
         * - [`onUpdatePageCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePageCssClasses)
         * - [`onUpdatePanelCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePanelCssClasses)
         * - [`onUpdateQuestionCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdateQuestionCssClasses)
         */
        get: function () {
            if (!this.survey)
                return this.calcCssClasses(this.css);
            this.ensureCssClassesValue();
            return this.cssClassesValue;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.calcCssClasses = function (css) { return undefined; };
    SurveyElement.prototype.updateElementCssCore = function (cssClasses) { };
    Object.defineProperty(SurveyElement.prototype, "cssError", {
        get: function () { return ""; },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.updateElementCss = function (reNew) {
        this.clearCssClasses();
    };
    SurveyElement.prototype.clearCssClasses = function () {
        this.cssClassesValue = undefined;
    };
    SurveyElement.prototype.getIsLoadingFromJson = function () {
        if (_super.prototype.getIsLoadingFromJson.call(this))
            return true;
        return this.survey ? this.survey.isLoadingFromJson : false;
    };
    Object.defineProperty(SurveyElement.prototype, "name", {
        /**
         * A survey element identifier.
         */
        get: function () {
            return this.getPropertyValue("name", "");
        },
        set: function (val) {
            var oldValue = this.name;
            this.setPropertyValue("name", this.getValidName(val));
            if (!this.isLoadingFromJson && !!oldValue) {
                this.onNameChanged(oldValue);
            }
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.getValidName = function (name) {
        return name;
    };
    SurveyElement.prototype.onNameChanged = function (oldValue) { };
    SurveyElement.prototype.updateBindingValue = function (valueName, value) {
        if (!!this.data &&
            !this.isTwoValueEquals(value, this.data.getValue(valueName))) {
            this.data.setValue(valueName, value, false);
        }
    };
    Object.defineProperty(SurveyElement.prototype, "errors", {
        /**
         * Validation errors. Call the `hasErrors()` method to validate survey element data.
         * @see hasErrors
         */
        get: function () {
            return this.getPropertyValue("errors");
        },
        set: function (val) {
            this.setPropertyValue("errors", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.updateVisibleErrors = function () {
        var counter = 0;
        for (var i = 0; i < this.errors.length; i++) {
            if (this.errors[i].visible)
                counter++;
        }
        this.hasVisibleErrors = counter > 0;
    };
    Object.defineProperty(SurveyElement.prototype, "containsErrors", {
        /**
         * Returns `true` if the survey element or its child elements have validation errors.
         *
         * This property contains the result of the most recent validation. This result may be outdated. Call the `hasErrors` method to get an up-to-date value.
         * @see errors
         */
        get: function () {
            return this.getPropertyValue("containsErrors", false);
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.updateContainsErrors = function () {
        this.setPropertyValue("containsErrors", this.getContainsErrors());
    };
    SurveyElement.prototype.getContainsErrors = function () {
        return this.errors.length > 0;
    };
    Object.defineProperty(SurveyElement.prototype, "selectedElementInDesign", {
        get: function () {
            return this.selectedElementInDesignValue;
        },
        set: function (val) {
            this.selectedElementInDesignValue = val;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.updateCustomWidgets = function () { };
    SurveyElement.prototype.onSurveyLoad = function () { };
    SurveyElement.prototype.onFirstRendering = function () {
        this.ensureCssClassesValue();
    };
    SurveyElement.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        if (!this.survey) {
            this.onSurveyLoad();
        }
    };
    SurveyElement.prototype.setVisibleIndex = function (index) {
        return 0;
    };
    Object.defineProperty(SurveyElement.prototype, "isPage", {
        /**
         * Returns `true` if the survey element is a page.
         * @see Base.getType
         */
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "isPanel", {
        /**
         * Returns `true` if the survey element is a panel.
         * @see Base.getType
         */
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "isQuestion", {
        /**
         * Returns `true` if the survey element is a question.
         * @see Base.getType
         */
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.delete = function () { };
    /**
     * Returns the survey's [locale](https://surveyjs.io/form-library/documentation/surveymodel#locale).
     *
     * If a default locale is used, this method returns an empty string. To get the applied locale in this case, use the following code:
     *
     * ```js
     * import { surveyLocalization } from 'survey-core';
     * const defaultLocale = surveyLocalization.defaultLocale;
     * ```
     *
     * @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization)
     */
    SurveyElement.prototype.getLocale = function () {
        return this.survey
            ? this.survey.getLocale()
            : this.locOwner
                ? this.locOwner.getLocale()
                : "";
    };
    SurveyElement.prototype.getMarkdownHtml = function (text, name) {
        return this.survey
            ? this.survey.getSurveyMarkdownHtml(this, text, name)
            : this.locOwner
                ? this.locOwner.getMarkdownHtml(text, name)
                : undefined;
    };
    SurveyElement.prototype.getRenderer = function (name) {
        return this.survey && typeof this.survey.getRendererForString === "function"
            ? this.survey.getRendererForString(this, name)
            : this.locOwner && typeof this.locOwner.getRenderer === "function"
                ? this.locOwner.getRenderer(name)
                : null;
    };
    SurveyElement.prototype.getRendererContext = function (locStr) {
        return this.survey && typeof this.survey.getRendererContextForString === "function"
            ? this.survey.getRendererContextForString(this, locStr)
            : this.locOwner && typeof this.locOwner.getRendererContext === "function"
                ? this.locOwner.getRendererContext(locStr)
                : locStr;
    };
    SurveyElement.prototype.getProcessedText = function (text) {
        if (this.isLoadingFromJson)
            return text;
        if (this.textProcessor)
            return this.textProcessor.processText(text, this.getUseDisplayValuesInDynamicTexts());
        if (this.locOwner)
            return this.locOwner.getProcessedText(text);
        return text;
    };
    SurveyElement.prototype.getUseDisplayValuesInDynamicTexts = function () { return true; };
    SurveyElement.prototype.removeSelfFromList = function (list) {
        if (!list || !Array.isArray(list))
            return;
        var index = list.indexOf(this);
        if (index > -1) {
            list.splice(index, 1);
        }
    };
    Object.defineProperty(SurveyElement.prototype, "textProcessor", {
        get: function () {
            return this.textProcessorValue;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.getProcessedHtml = function (html) {
        if (!html || !this.textProcessor)
            return html;
        return this.textProcessor.processText(html, true);
    };
    SurveyElement.prototype.onSetData = function () { };
    Object.defineProperty(SurveyElement.prototype, "parent", {
        get: function () {
            return this.getPropertyValue("parent", null);
        },
        set: function (val) {
            this.setPropertyValue("parent", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.getPage = function (parent) {
        while (parent && parent.parent)
            parent = parent.parent;
        if (parent && parent.getType() == "page")
            return parent;
        return null;
    };
    SurveyElement.prototype.moveToBase = function (parent, container, insertBefore) {
        if (insertBefore === void 0) { insertBefore = null; }
        if (!container)
            return false;
        parent.removeElement(this);
        var index = -1;
        if (_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(insertBefore)) {
            index = parseInt(insertBefore);
        }
        if (index == -1 && !!insertBefore && !!insertBefore.getType) {
            index = container.indexOf(insertBefore);
        }
        container.addElement(this, index);
        return true;
    };
    SurveyElement.prototype.setPage = function (parent, newPage) {
        var oldPage = this.getPage(parent);
        //fix for the creator v1: https://github.com/surveyjs/survey-creator/issues/1744
        if (typeof newPage === "string") {
            var survey = this.getSurvey();
            survey.pages.forEach(function (page) {
                if (newPage === page.name)
                    newPage = page;
            });
        }
        if (oldPage === newPage)
            return;
        if (parent)
            parent.removeElement(this);
        if (newPage) {
            newPage.addElement(this, -1);
        }
    };
    SurveyElement.prototype.getSearchableLocKeys = function (keys) {
        keys.push("title");
        keys.push("description");
    };
    Object.defineProperty(SurveyElement.prototype, "isDefaultV2Theme", {
        get: function () {
            return this.survey && this.survey.getCss().root == "sd-root-modern";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "isErrorsModeTooltip", {
        get: function () {
            return this.getIsErrorsModeTooltip();
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.getIsErrorsModeTooltip = function () {
        return this.isDefaultV2Theme && this.hasParent && this.getIsTooltipErrorSupportedByParent();
    };
    SurveyElement.prototype.getIsTooltipErrorSupportedByParent = function () {
        var _a;
        return (_a = this.parent) === null || _a === void 0 ? void 0 : _a.getIsTooltipErrorInsideSupported();
    };
    SurveyElement.prototype.getIsTooltipErrorInsideSupported = function () {
        return false;
    };
    Object.defineProperty(SurveyElement.prototype, "hasParent", {
        get: function () {
            return (this.parent && !this.parent.isPage) || (this.parent === undefined);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "hasFrameV2", {
        get: function () {
            return !this.hasParent && this.isDefaultV2Theme && !this.isDesignMode && this.isSingleInRow;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "width", {
        /**
         * Sets survey element width in CSS values.
         *
         * Default value: ""
         * @see minWidth
         * @see maxWidth
        */
        get: function () {
            return this.getPropertyValue("width", "");
        },
        set: function (val) {
            this.setPropertyValue("width", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "minWidth", {
        /**
         * Gets or sets minimum survey element width in CSS values.
         *
         * Default value: "300px" (taken from [`settings.minWidth`](https://surveyjs.io/form-library/documentation/settings#minWidth))
         * @see maxWidth
         * @see renderWidth
         * @see width
         */
        get: function () {
            return this.getPropertyValue("minWidth");
        },
        set: function (val) {
            this.setPropertyValue("minWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "maxWidth", {
        /**
         * Gets or sets maximum survey element width in CSS values.
         *
         * Default value: "100%" (taken from [`settings.maxWidth`](https://surveyjs.io/form-library/documentation/settings#maxWidth))
         * @see minWidth
         * @see renderWidth
         * @see width
         */
        get: function () {
            return this.getPropertyValue("maxWidth");
        },
        set: function (val) {
            this.setPropertyValue("maxWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "renderWidth", {
        /**
         * Returns a calculated width of the rendered survey element in CSS values.
         * @see width
         * @see minWidth
         * @see maxWidth
         */
        get: function () {
            return this.getPropertyValue("renderWidth", "");
        },
        set: function (val) {
            this.setPropertyValue("renderWidth", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "indent", {
        /**
         * Increases or decreases an indent of survey element content from the left edge. Accepts positive integer values and 0. Does not apply in the Default V2 theme.
      
         * @see rightIndent
         */
        get: function () {
            return this.getPropertyValue("indent");
        },
        set: function (val) {
            this.setPropertyValue("indent", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "rightIndent", {
        /**
         * Increases or decreases an indent of survey element content from the right edge. Accepts positive integer values and 0. Does not apply in the Default V2 theme.
      
         * @see indent
         */
        get: function () {
            return this.getPropertyValue("rightIndent", 0);
        },
        set: function (val) {
            this.setPropertyValue("rightIndent", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "paddingLeft", {
        get: function () {
            return this.getPropertyValue("paddingLeft", "");
        },
        set: function (val) {
            this.setPropertyValue("paddingLeft", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "paddingRight", {
        get: function () {
            return this.getPropertyValue("paddingRight", "");
        },
        set: function (val) {
            this.setPropertyValue("paddingRight", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "rootStyle", {
        get: function () {
            var style = {};
            if (this.allowRootStyle && this.renderWidth) {
                // style["width"] = this.renderWidth;
                style["flexGrow"] = 1;
                style["flexShrink"] = 1;
                style["flexBasis"] = this.renderWidth;
                style["minWidth"] = this.minWidth;
                style["maxWidth"] = this.maxWidth;
            }
            return style;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyElement.prototype, "clickTitleFunction", {
        get: function () {
            var _this = this;
            if (this.needClickTitleFunction()) {
                return function () {
                    return _this.processTitleClick();
                };
            }
            return undefined;
        },
        enumerable: false,
        configurable: true
    });
    SurveyElement.prototype.needClickTitleFunction = function () {
        return this.state !== "default";
    };
    SurveyElement.prototype.processTitleClick = function () {
        if (this.state !== "default") {
            this.toggleState();
        }
    };
    SurveyElement.prototype.localeChanged = function () {
        _super.prototype.localeChanged.call(this);
        this.updateDescriptionVisibility(this.description);
        if (this.errors.length > 0) {
            this.errors.forEach(function (err) {
                err.updateText();
            });
        }
    };
    SurveyElement.CreateDisabledDesignElements = false;
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: null })
    ], SurveyElement.prototype, "dragTypeOverMe", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], SurveyElement.prototype, "isDragMe", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
    ], SurveyElement.prototype, "cssClassesValue", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
    ], SurveyElement.prototype, "hasVisibleErrors", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
    ], SurveyElement.prototype, "isSingleInRow", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
    ], SurveyElement.prototype, "allowRootStyle", void 0);
    return SurveyElement;
}(SurveyElementCore));



/***/ }),

/***/ "./src/survey-error.ts":
/*!*****************************!*\
  !*** ./src/survey-error.ts ***!
  \*****************************/
/*! exports provided: SurveyError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyError", function() { return SurveyError; });
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");


var SurveyError = /** @class */ (function () {
    function SurveyError(text, errorOwner) {
        if (text === void 0) { text = null; }
        if (errorOwner === void 0) { errorOwner = null; }
        this.text = text;
        this.errorOwner = errorOwner;
        this.visible = true;
        this.onUpdateErrorTextCallback = undefined;
    }
    SurveyError.prototype.equalsTo = function (error) {
        if (!error || !error.getErrorType)
            return false;
        if (this.getErrorType() !== error.getErrorType())
            return false;
        return this.text === error.text && this.visible === error.visible;
    };
    Object.defineProperty(SurveyError.prototype, "locText", {
        get: function () {
            if (!this.locTextValue) {
                this.locTextValue = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](this.errorOwner, true);
                this.locTextValue.storeDefaultText = true;
                this.locTextValue.text = this.getText();
            }
            return this.locTextValue;
        },
        enumerable: false,
        configurable: true
    });
    SurveyError.prototype.getText = function () {
        var res = this.text;
        if (!res)
            res = this.getDefaultText();
        if (!!this.errorOwner) {
            res = this.errorOwner.getErrorCustomText(res, this);
        }
        return res;
    };
    SurveyError.prototype.getErrorType = function () {
        return "base";
    };
    SurveyError.prototype.getDefaultText = function () {
        return "";
    };
    SurveyError.prototype.getLocale = function () {
        return !!this.errorOwner ? this.errorOwner.getLocale() : "";
    };
    SurveyError.prototype.getLocalizationString = function (locStrName) {
        return _surveyStrings__WEBPACK_IMPORTED_MODULE_1__["surveyLocalization"].getString(locStrName, this.getLocale());
    };
    SurveyError.prototype.updateText = function () {
        if (this.onUpdateErrorTextCallback) {
            this.onUpdateErrorTextCallback(this);
        }
        this.locText.text = this.getText();
    };
    return SurveyError;
}());



/***/ }),

/***/ "./src/survey.ts":
/*!***********************!*\
  !*** ./src/survey.ts ***!
  \***********************/
/*! exports provided: SurveyModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyModel", function() { return SurveyModel; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
/* harmony import */ var _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaultCss/cssstandard */ "./src/defaultCss/cssstandard.ts");
/* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
/* harmony import */ var _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./conditionProcessValue */ "./src/conditionProcessValue.ts");
/* harmony import */ var _dxSurveyService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./dxSurveyService */ "./src/dxSurveyService.ts");
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
/* harmony import */ var _stylesmanager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./stylesmanager */ "./src/stylesmanager.ts");
/* harmony import */ var _surveyTimerModel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./surveyTimerModel */ "./src/surveyTimerModel.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};



















/**
 * The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
 *
 * [View Demo](https://surveyjs.io/form-library/examples/nps-question/ (linkStyle))
 */
var SurveyModel = /** @class */ (function (_super) {
    __extends(SurveyModel, _super);
    //#endregion
    function SurveyModel(jsonObj, renderedElement) {
        if (jsonObj === void 0) { jsonObj = null; }
        if (renderedElement === void 0) { renderedElement = null; }
        var _this = _super.call(this) || this;
        _this.valuesHash = {};
        _this.variablesHash = {};
        //#region Event declarations
        /**
         * The event is fired after a trigger has been executed
         *- `sender` - the survey object that fires the event.
         *- `options.trigger` - An instance of a trigger that has been just perform it's action.
         * @see onComplete
         */
        _this.onTriggerExecuted = _this.addEvent();
        /**
         * The event is fired before the survey is completed and the `onComplete` event is fired. You can prevent the survey from completing by setting `options.allowComplete` to `false`
         *- `sender` - the survey object that fires the event.
         *- `options.allowComplete` - Specifies whether a user can complete a survey. Set this property to `false` to prevent the survey from completing. The default value is `true`.
         *- `options.isCompleteOnTrigger` - returns true if the survey is completing on "complete" trigger.
         * @see onComplete
         */
        _this.onCompleting = _this.addEvent();
        /**
         * The event is fired after a user clicks the 'Complete' button and finishes a survey. Use this event to send the survey data to your web server.
         *
         * - `sender` - the survey object that fires the event.
         * - `options.showDataSaving(text)` - call this method to show that the survey is saving survey data on your server. The `text` is an optional parameter to show a custom message instead of default.
         * - `options.showDataSavingError(text)` - call this method to show that an error occurred while saving the data on your server. If you want to show a custom error, use an optional `text` parameter.
         * - `options.showDataSavingSuccess(text)` - call this method to show that the data was successfully saved on the server.
         * - `options.showDataSavingClear` - call this method to hide the text about the saving progress.
         * - `options.isCompleteOnTrigger` - returns true if the survey is completed on "complete" trigger.
         *
         * > NOTE: Do not disable the [`showCompletedPage`](https://surveyjs.io/form-library/documentation/surveymodel#showCompletedPage) property if you call one of the `options.showDataSaving...` methods described above. This is required because the UI that indicates data saving progress is integrated into the Complete page. If you hide the Complete page, the UI also becomes invisible.
         *
         * @see data
         * @see clearInvisibleValues
         * @see completeLastPage
         * @see surveyPostId
         */
        _this.onComplete = _this.addEvent();
        /**
         * The event is fired before the survey is going to preview mode, state equals to `preview`. It happens when a user click on "Preview" button. It shows when "showPreviewBeforeComplete" proeprty equals to "showAllQuestions" or "showAnsweredQuestions".
         * You can prevent showing it by setting allowShowPreview to `false`.
         *- `sender` - the survey object that fires the event.
         *- `options.allowShowPreview` - Specifies whether a user can see a preview. Set this property to `false` to prevent from showing the preview. The default value is `true`.
         * @see showPreviewBeforeComplete
         */
        _this.onShowingPreview = _this.addEvent();
        /**
         * The event is fired after a user clicks the 'Complete' button. The event allows you to specify the URL opened after completing a survey.
         * Specify the `navigateToUrl` property to make survey navigate to another url.
         *- `sender` - the survey object that fires the event.
         *- `options.url` - Specifies a URL opened after completing a survey. Set this property to an empty string to cancel the navigation and show the completed survey page.
         * @see navigateToUrl
         * @see navigateToUrlOnCondition
         */
        _this.onNavigateToUrl = _this.addEvent();
        /**
         * The event is fired after the survey changed it's state from "starting" to "running". The "starting" state means that survey shows the started page.
         * The `firstPageIsStarted` property should be set to `true`, if you want to display a start page in your survey. In this case, an end user should click the "Start" button to start the survey.
         * @see firstPageIsStarted
         */
        _this.onStarted = _this.addEvent();
        /**
         * The event is fired on clicking the 'Next' button if the `sendResultOnPageNext` is set to `true`. You can use it to save the intermediate results, for example, if your survey is large enough.
         *- `sender` - the survey object that fires the event.
         * @see sendResultOnPageNext
         */
        _this.onPartialSend = _this.addEvent();
        /**
         * The event is fired before the current page changes to another page. Typically it happens when a user click the 'Next' or 'Prev' buttons.
         *- `sender` - the survey object that fires the event.
         *- `option.oldCurrentPage` - the previous current/active page.
         *- `option.newCurrentPage` - a new current/active page.
         *- `option.allowChanging` - set it to `false` to disable the current page changing. It is `true` by default.
         *- `option.isNextPage` - commonly means, that end-user press the next page button. In general, it means that options.newCurrentPage is the next page after options.oldCurrentPage
         *- `option.isPrevPage` - commonly means, that end-user press the previous page button. In general, it means that options.newCurrentPage is the previous page before options.oldCurrentPage
         * @see currentPage
         * @see currentPageNo
         * @see nextPage
         * @see prevPage
         * @see completeLastPage
         * @see onCurrentPageChanged
         **/
        _this.onCurrentPageChanging = _this.addEvent();
        /**
         * The event is fired when the current page has been changed to another page. Typically it happens when a user click on 'Next' or 'Prev' buttons.
         *- `sender` - the survey object that fires the event.
         *- `option.oldCurrentPage` - a previous current/active page.
         *- `option.newCurrentPage` - a new current/active page.
         *- `option.isNextPage` - commonly means, that end-user press the next page button. In general, it means that options.newCurrentPage is the next page after options.oldCurrentPage
         *- `option.isPrevPage` - commonly means, that end-user press the previous page button. In general, it means that options.newCurrentPage is the previous page before options.oldCurrentPage
         * @see currentPage
         * @see currentPageNo
         * @see nextPage
         * @see prevPage
         * @see completeLastPage
         * @see onCurrentPageChanging
         */
        _this.onCurrentPageChanged = _this.addEvent();
        /**
         * The event is fired before the question value (answer) is changed. It can be done via UI by a user or programmatically on calling the `setValue` method.
         *- `sender` - the survey object that fires the event.
         *- `options.name` - the value name that has being changed.
         *- `options.question` - a question which `question.name` equals to the value name. If there are several questions with the same name, the first question is used. If there is no such questions, the `options.question` is null.
         *- `options.oldValue` - an old, previous value.
         *- `options.value` - a new value. You can change it.
         * @see setValue
         * @see onValueChanged
         */
        _this.onValueChanging = _this.addEvent();
        /**
         * The event is fired when the question value (i.e., answer) has been changed. The question value can be changed in UI (by a user) or programmatically (on calling `setValue` method).
         * Use the `onDynamicPanelItemValueChanged` and `onMatrixCellValueChanged` events to handle changes in a question in the Panel Dynamic and a cell question in matrices.
         *- `sender` - the survey object that fires the event.
         *- `options.name` - the value name that has been changed.
         *- `options.question` - a question which `question.name` equals to the value name. If there are several questions with the same name, the first question is used. If there is no such questions, the `options.question` is `null`.
         *- `options.value` - a new value.
         * @see setValue
         * @see onValueChanging
         * @see onDynamicPanelItemValueChanged
         * @see onMatrixCellValueChanged
         */
        _this.onValueChanged = _this.addEvent();
        /**
         * The event is fired when setVariable function is called. It can be called on changing a calculated value.
         *- `sender` - the survey object that fires the event.
         *- `options.name` - the variable name that has been changed.
         *- `options.value` - a new value.
         * @see setVariable
         * @see onValueChanged
         * @see calculatedValues
         */
        _this.onVariableChanged = _this.addEvent();
        /**
         * The event is fired when a question visibility has been changed.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a question which visibility has been changed.
         *- `options.name` - a question name.
         *- `options.visible` - a question `visible` boolean value.
         * @see Question.visibile
         * @see Question.visibileIf
         */
        _this.onVisibleChanged = _this.addEvent();
        /**
         * The event is fired on changing a page visibility.
         *- `sender` - the survey object that fires the event.
         *- `options.page` - a page which visibility has been changed.
         *- `options.visible` - a page `visible` boolean value.
         * @see PageModel.visibile
         * @see PageModel.visibileIf
         */
        _this.onPageVisibleChanged = _this.addEvent();
        /**
         * The event is fired on changing a panel visibility.
         *- `sender` - the survey object that fires the event.
         *- `options.panel` - a panel which visibility has been changed.
         *- `options.visible` - a panel `visible` boolean value.
         * @see PanelModel.visibile
         * @see PanelModel.visibileIf
         */
        _this.onPanelVisibleChanged = _this.addEvent();
        /**
         * The event is fired on creating a new question.
         * Unlike the onQuestionAdded event, this event calls for all question created in survey including inside: a page, panel, matrix cell, dynamic panel and multiple text.
         * or inside a matrix cell or it can be a text question in multiple text items or inside a panel of a panel dynamic.
         * You can use this event to set up properties to a question based on it's type for all questions, regardless where they are located, on the page or inside a matrix cell.
         * Please note: If you want to use this event for questions loaded from JSON then you have to create survey with empty/null JSON parameter, assign the event and call survey.fromJSON(yourJSON) function.
         * ```js
         * import { Model } from "survey-core";
         *
         * const surveyJson = {
         *    // ...
         * };
         * // Create an empty model
         * const survey = new Model();
         * // Add an event handler
         * survey.onQuestionCreated.add((sender, options) => {
         *   //...
         * });
         * // Load the survey JSON schema
         * survey.fromJSON(surveyJson);
         * ```
         *
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a newly created question object.
         * @see Question
         * @see onQuestionAdded
         */
        _this.onQuestionCreated = _this.addEvent();
        /**
         * The event is fired on adding a new question into survey.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a newly added question object.
         *- `options.name` - a question name.
         *- `options.index` - an index of the question in the container (page or panel).
         *- `options.parentPanel` - a container where a new question is located. It can be a page or panel.
         *- `options.rootPanel` - typically, it is a page.
         * @see Question
         * @see onQuestionCreated
         */
        _this.onQuestionAdded = _this.addEvent();
        /**
         * The event is fired on removing a question from survey.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a removed question object.
         *- `options.name` - a question name.
         * @see Question
         */
        _this.onQuestionRemoved = _this.addEvent();
        /**
         * The event is fired on adding a panel into survey.
         *- `sender` - the survey object that fires the event.
         *- `options.panel` - a newly added panel object.
         *- `options.name` - a panel name.
         *- `options.index` - an index of the panel in the container (a page or panel).
         *- `options.parentPanel` - a container (a page or panel) where a new panel is located.
         *- `options.rootPanel` - a root container, typically it is a page.
         * @see PanelModel
         */
        _this.onPanelAdded = _this.addEvent();
        /**
         * The event is fired on removing a panel from survey.
         *- `sender` - the survey object that fires the event.
         *- `options.panel` - a removed panel object.
         *- `options.name` - a panel name.
         * @see PanelModel
         */
        _this.onPanelRemoved = _this.addEvent();
        /**
         * The event is fired on adding a page into survey.
         *- `sender` - the survey object that fires the event.
         *- `options.page` - a newly added `panel` object.
         * @see PanelModel
         */
        _this.onPageAdded = _this.addEvent();
        /**
         * The event is fired on validating value in a question. You can specify a custom error message using `options.error`. The survey blocks completing the survey or going to the next page when the error messages are displayed.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a validated question.
         *- `options.name` - a question name.
         *- `options.value` - the current question value (answer).
         *- `options.error` - an error string. It is empty by default.
         * @see onServerValidateQuestions
         * @see onSettingQuestionErrors
         */
        _this.onValidateQuestion = _this.addEvent();
        /**
         * The event is fired before errors are assigned to a question. You may add/remove/modify errors for a question.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a validated question.
         *- `options.errors` - the list of errors. The list is empty by default and remains empty if a validated question has no errors.
         * @see onValidateQuestion
         */
        _this.onSettingQuestionErrors = _this.addEvent();
        /**
         * Use this event to validate data on your server.
         *- `sender` - the survey object that fires the event.
         *- `options.data` - the values of all non-empty questions on the current page. You can get a question value as `options.data["myQuestionName"]`.
         *- `options.errors` - set your errors to this object as: `options.errors["myQuestionName"] = "Error text";`. It will be shown as a question error.
         *- `options.complete()` - call this function to tell survey that your server callback has been processed.
         * @see onValidateQuestion
         * @see onValidatePanel
         */
        _this.onServerValidateQuestions = _this.addEvent();
        /**
         * Use this event to modify the HTML before rendering, for example HTML on a completed page.
         *- `sender` - the survey object that fires the event.
         *- `options.html` - an HTML that you may change before text processing and then rendering.
         * @see completedHtml
         * @see loadingHtml
         * @see QuestionHtmlModel.html
         */
        /**
         * The event is fired on validating a panel. Set your error to `options.error` and survey will show the error for the panel and block completing the survey or going to the next page.
         *- `sender` - the survey object that fires the event.
         *- `options.name` - a panel name.
         *- `options.error` - an error string. It is empty by default.
         * @see onValidateQuestion
         */
        _this.onValidatePanel = _this.addEvent();
        /**
         * Use the event to change the default error text.
         *- `sender` - the survey object that fires the event.
         *- `options.text` - an error text.
         *- `options.error` - an instance of the `SurveyError` object.
         *- `options.obj` - an instance of Question, Panel or Survey object to where error is located.
         *- `options.name` - the error name. The following error names are available:
         * required, requireoneanswer, requirenumeric, exceedsize, webrequest, webrequestempty, otherempty,
         * uploadingfile, requiredinallrowserror, minrowcounterror, keyduplicationerror, custom
         */
        _this.onErrorCustomText = _this.addEvent();
        /**
         * Use the this event to be notified when the survey finished validate questions on the current page. It commonly happens when a user try to go to the next page or complete the survey
         * options.questions - the list of questions that have errors
         * options.errors - the list of errors
         * options.page - the page where question(s) are located
         */
        _this.onValidatedErrorsOnCurrentPage = _this.addEvent();
        /**
         * Use this event to modify the HTML content before rendering, for example `completeHtml` or `loadingHtml`.
         *- `options.html` - specifies the modified HTML content.
         * @see completedHtml
         * @see loadingHtml
         */
        _this.onProcessHtml = _this.addEvent();
        /**
         * Use this event to change the question title in code. If you want to remove question numbering then set showQuestionNumbers to "off".
         *- `sender` - the survey object that fires the event.
         *- `options.title` - a calculated question title, based on question `title`, `name`.
         *- `options.question` - a question object.
         * @see showQuestionNumbers
         * @see requiredText
         */
        _this.onGetQuestionTitle = _this.addEvent();
        /**
         * Use this event to change the element title tag name that renders by default.
         *- `sender` - the survey object that fires the event.
         *- `options.element` - an element (question, panel, page and survey) that SurveyJS is going to render.
         *- `options.tagName` - an element title tagName that are used to render a title. You can change it from the default value.
         * @see showQuestionNumbers
         * @see requiredText
         */
        _this.onGetTitleTagName = _this.addEvent();
        /**
         * Use this event to change the question no in code. If you want to remove question numbering then set showQuestionNumbers to "off".
         *- `sender` - the survey object that fires the event.
         *- `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it.
         *- `options.question` - a question object.
         * @see showQuestionNumbers
         * @see questionStartIndex
         */
        _this.onGetQuestionNo = _this.addEvent();
        /**
         * Use this event to change the progress text in code.
         *- `sender` - the survey object that fires the event.
         *- `options.text` - a progress text, that SurveyJS will render in progress bar.
         *- `options.questionCount` - a number of questions that have input(s). We do not count html or expression questions
         *- `options.answeredQuestionCount` - a number of questions that have input(s) and an user has answered.
         *- `options.requiredQuestionCount` - a number of required questions that have input(s). We do not count html or expression questions
         *- `options.requiredAnsweredQuestionCount` - a number of required questions that have input(s) and an user has answered.
         *  @see progressBarType
         */
        _this.onProgressText = _this.addEvent();
        /**
         * Use this event to process the markdown text.
         *- `sender` - the survey object that fires the event.
         *- `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
         *- `options.name` - a property name is going to be rendered.
         *- `options.text` - a text that is going to be rendered.
         *- `options.html` - an HTML content. It is `null` by default. Use this property to specify the HTML content rendered instead of `options.text`.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/ (linkStyle))
         */
        _this.onTextMarkdown = _this.addEvent();
        /**
         * Use this event to specity render component name used for text rendering.
         *- `sender` - the survey object that fires the event.
         *- `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
         *- `options.name` - a property name is going to be rendered.
         *- `options.renderAs` - a component name used for text rendering.
         */
        _this.onTextRenderAs = _this.addEvent();
        /**
         * The event fires when it gets response from the [api.surveyjs.io](https://api.surveyjs.io) service on saving survey results. Use it to find out if the results have been saved successfully.
         *- `sender` - the survey object that fires the event.
         *- `options.success` - it is `true` if the results has been sent to the service successfully.
         *- `options.response` - a response from the service.
         */
        _this.onSendResult = _this.addEvent();
        /**
         * Use it to get results after calling the `getResult` method. It returns a simple analytics from [api.surveyjs.io](https://api.surveyjs.io) service.
         *- `sender` - the survey object that fires the event.
         *- `options.success` - it is `true` if the results were got from the service successfully.
         *- `options.data` - the object `{AnswersCount, QuestionResult : {} }`. `AnswersCount` is the number of posted survey results. `QuestionResult` is an object with all possible unique answers to the question and number of these answers.
         *- `options.dataList` - an array of objects `{name, value}`, where `name` is a unique value/answer to the question and `value` is a number/count of such answers.
         *- `options.response` - the server response.
         * @see getResult
         */
        _this.onGetResult = _this.addEvent();
        /**
         * The event is fired on uploading the file in QuestionFile when `storeDataAsText` is set to `false`. Use this event to change the uploaded file name or to prevent a particular file from being uploaded.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - the file question instance.
         *- `options.name` - the question name.
         *- `options.files` - the Javascript File objects array to upload.
         *- `options.callback` - a callback function to get the file upload status and the updloaded file content.
         * @see uploadFiles
         * @see QuestionFileModel.storeDataAsText
         * @see onDownloadFile
         * @see onClearFiles
         * @see [View Examples](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fsurveyjs.io%2FExamples%2F+%22onUploadFiles%22)
         */
        _this.onUploadFiles = _this.addEvent();
        /**
         * The event is fired on downloading a file in QuestionFile. Use this event to pass the file to a preview.
         *- `sender` - the survey object that fires the event.
         *- `question` - the question instance.
         *- `options.name` - the question name.
         *- `options.content` - the file content.
         *- `options.fileValue` - single file question value.
         *- `options.callback` - a callback function to get the file downloading status and the downloaded file content.
         * @see downloadFile
         * @see onClearFiles
         * @see onUploadFiles
         * @see [View Examples](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fsurveyjs.io%2FExamples%2F+%22onDownloadFile%22)
         */
        _this.onDownloadFile = _this.addEvent();
        /**
         * This event is fired on clearing the value in a QuestionFile. Use this event to remove files stored on your server.
         *- `sender` - the survey object that fires the event.
         *- `question` - the question instance.
         *- `options.name` - the question name.
         *- `options.value` - the question value.
         *- `options.fileName` - a removed file's name, set it to `null` to clear all files.
         *- `options.callback` - a callback function to get the operation status.
         * @see clearFiles
         * @see onDownloadFile
         * @see onUploadFiles
         * @see [View Examples](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fsurveyjs.io%2FExamples%2F+%22onClearFiles%22)
         */
        _this.onClearFiles = _this.addEvent();
        /**
         * The event is fired after choices for radiogroup, checkbox, and dropdown has been loaded from a RESTful service and before they are assigned to a question.
         * You may change the choices, before they are assigned or disable/enabled make visible/invisible question, based on loaded results.
         *- `sender` - the survey object that fires the event.
         *- `question` - the question where loaded choices are going to be assigned.
         *- `choices` - the loaded choices. You can change the loaded choices to before they are assigned to question.
         *- `serverResult` - a result that comes from the server as it is.
         */
        _this.onLoadChoicesFromServer = _this.addEvent();
        /**
         * The event is fired after survey is loaded from api.surveyjs.io service.
         * You can use this event to perform manipulation with the survey model after it was loaded from the web service.
         *- `sender` - the survey object that fires the event.
         * @see surveyId
         * @see loadSurveyFromService
         */
        _this.onLoadedSurveyFromService = _this.addEvent();
        /**
         * The event is fired on processing the text when it finds a text in brackets: `{somevalue}`. By default, it uses the value of survey question values and variables.
         * For example, you may use the text processing in loading choices from the web. If your `choicesByUrl.url` equals to "UrlToServiceToGetAllCities/{country}/{state}",
         * you may set on this event `options.value` to "all" or empty string when the "state" value/question is non selected by a user.
         *- `sender` - the survey object that fires the event.
         *- `options.name` - the name of the processing value, for example, "state" in our example.
         *- `options.value` - the value of the processing text.
         *- `options.isExists` - a boolean value. Set it to `true` if you want to use the value and set it to `false` if you don't.
         */
        _this.onProcessTextValue = _this.addEvent();
        /**
         * The event is fired before rendering a question. Use it to override the default question CSS classes.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a question for which you can change the CSS classes.
         *- `options.cssClasses` - an object with CSS classes. For example `{root: "table", button: "button"}`. You can change them to your own CSS classes.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-cssclasses/ (linkStyle))
         */
        _this.onUpdateQuestionCssClasses = _this.addEvent();
        /**
         * The event is fired before rendering a panel. Use it to override the default panel CSS classes.
         *- `sender` - the survey object that fires the event.
         *- `options.panel` - a panel for which you can change the CSS classes.
         *- `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
         */
        _this.onUpdatePanelCssClasses = _this.addEvent();
        /**
         * The event is fired before rendering a page. Use it to override the default page CSS classes.
         *- `sender` - the survey object that fires the event.
         *- `options.page` - a page for which you can change the CSS classes.
         *- `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
         */
        _this.onUpdatePageCssClasses = _this.addEvent();
        /**
         * The event is fired before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a question where choice item is rendered.
         *- `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.choice.text
         *- `options.css` - a string with css classes divided by space. You can change it.
         */
        _this.onUpdateChoiceItemCss = _this.addEvent();
        /**
         * The event is fired right after survey is rendered in DOM.
         *- `sender` - the survey object that fires the event.
         *- `options.htmlElement` - a root HTML element bound to the survey object.
         */
        _this.onAfterRenderSurvey = _this.addEvent();
        /**
         * The event is fired right after a page is rendered in DOM. Use it to modify HTML elements.
         *- `sender` - the survey object that fires the event.
         *- `options.htmlElement` - an HTML element bound to the survey header object.
         */
        _this.onAfterRenderHeader = _this.addEvent();
        /**
         * The event is fired right after a page is rendered in DOM. Use it to modify HTML elements.
         *- `sender` - the survey object that fires the event.
         *- `options.page` - a page object for which the event is fired. Typically the current/active page.
         *- `options.htmlElement` - an HTML element bound to the page object.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
         */
        _this.onAfterRenderPage = _this.addEvent();
        /**
         * The event is fired right after a question is rendered in DOM. Use it to modify HTML elements.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a question object for which the event is fired.
         *- `options.htmlElement` - an HTML element bound to the question object.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
         */
        _this.onAfterRenderQuestion = _this.addEvent();
        /**
         * The event is fired right after a non-composite question (text, comment, dropdown, radiogroup, checkbox) is rendered in DOM. Use it to modify HTML elements.
         * This event is not fired for matrices, panels, multiple text and image picker.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a question object for which the event is fired.
         *- `options.htmlElement` - an HTML element bound to the question object.
         */
        _this.onAfterRenderQuestionInput = _this.addEvent();
        /**
         * The event is fired right after a panel is rendered in DOM. Use it to modify HTML elements.
         *- `sender` - the survey object that fires the event
         *- `options.panel` - a panel object for which the event is fired
         *- `options.htmlElement` - an HTML element bound to the panel object
         */
        _this.onAfterRenderPanel = _this.addEvent();
        /**
         * The event occurs when an element within a question gets focus.
         *- `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event.
         *- `options.question` - A [question](https://surveyjs.io/Documentation/Library?id=Question) whose child element gets focus.
         * @see onFocusInPanel
         */
        _this.onFocusInQuestion = _this.addEvent();
        /**
         * The event occurs when an element within a panel gets focus.
         *- `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event.
         *- `options.panel` - A [panel](https://surveyjs.io/Documentation/Library?id=PanelModelBase) whose child element gets focus.
         * @see onFocusInQuestion
         */
        _this.onFocusInPanel = _this.addEvent();
        /**
         * Use this event to change the visibility of an individual choice item in [Checkbox](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel), [Dropdown](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel), [Radiogroup](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel), and other similar question types.
         *
         * The event handler accepts the following arguments:
         *
         * - `sender` - A Survey instance that raised the event.
         * - `options.question` - A Question instance to which the choice item belongs.
         * - `options.item` - The choice item as specified in the [choices](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choices) array.
         * - `options.visible` - A Boolean value that specifies the item visibility. Set it to `false` to hide the item.
         */
        _this.onShowingChoiceItem = _this.addEvent();
        /**
         * Use this event to load choice items in [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel) and [Tag Box](https://surveyjs.io/form-library/documentation/questiontagboxmodel) questions on demand.
         *
         * This event is raised only for those questions that have the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadEnabled) property set to `true`.
         *
         * The event handler accepts the following arguments:
         *
         * - `sender` - A Survey instance that raised the event.
         * - `options.question` - A Question instance for which the event is raised.
         * - `options.skip`- The number of choice items to skip.
         * - `options.take` - The number of choice items to load. You can use the question's [`choicesLazyLoadPageSize`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadPageSize) property to change this number.
         * - `options.filter` - A search string used to filter choices.
         * - `options.setItems(items: Array<any>, totalCount: Number)` - A method that you should call to assign loaded items to the question.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
         * @see QuestionDropdownModel.choicesLazyLoadEnabled
         * @see QuestionDropdownModel.choicesLazyLoadPageSize
         */
        _this.onChoicesLazyLoad = _this.addEvent();
        /**
         * Use this event to load a display text for the [default choice item](https://surveyjs.io/form-library/documentation/questiondropdownmodel#defaultValue) in [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel) and [Tag Box](https://surveyjs.io/form-library/documentation/questiontagboxmodel) questions.
         *
         * If you load choices from a server (use [`choicesByUrl`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesByUrl) or [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad)), display texts become available only when data is loaded, which does not happen until a user opens the drop-down menu. However, a display text for a default choice item is required before that. In this case, you can load data individually for the default item within the `onGetChoiceDisplayValue` event handler.
         *
         * The event handler accepts the following arguments:
         *
         * - `sender` - A Survey instance that raised the event.
         * - `options.question` - A Question instance for which the event is raised.
         * - `options.values`- An array of one (in Dropdown) or more (in Tag Box) default values.
         * - `options.setItems(displayValues: Array<string>)` - A method that you should call to assign display texts to the question.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
         */
        _this.onGetChoiceDisplayValue = _this.addEvent();
        /**
         * The event is fired on adding a new row in Matrix Dynamic question.
         *- `sender` - the survey object that fires the event
         *- `options.question` - a matrix question.
         *- `options.row` - a new added row.
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDynamicModel.visibleRows
         */
        _this.onMatrixRowAdded = _this.addEvent();
        /**
         * The event is fired before adding a new row in Matrix Dynamic question.
         *- `sender` - the survey object that fires the event
         *- `options.question` - a matrix question.
         *- `options.canAddRow` - specifies whether a new row can be added
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDynamicModel.visibleRows
         */
        _this.onMatrixBeforeRowAdded = _this.addEvent();
        /**
         * The event is fired before removing a row from Matrix Dynamic question. You can disable removing and clear the data instead.
         *- `sender` - the survey object that fires the event
         *- `options.question` - a matrix question.
         *- `options.rowIndex` - a row index.
         *- `options.row` - a row object.
         *- `options.allow` - a boolean property. Set it to `false` to disable the row removing.
         * @see QuestionMatrixDynamicModel
         * @see onMatrixRowRemoved
         * @see onMatrixAllowRemoveRow
         */
        _this.onMatrixRowRemoving = _this.addEvent();
        /**
         * The event is fired on removing a row from Matrix Dynamic question.
         *- `sender` - the survey object that fires the event
         *- `options.question` - a matrix question
         *- `options.rowIndex` - a removed row index
         *- `options.row` - a removed row object
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDynamicModel.visibleRows
         * @see onMatrixRowRemoving
         * @see onMatrixAllowRemoveRow
         */
        _this.onMatrixRowRemoved = _this.addEvent();
        /**
         * The event is fired before rendering "Remove" button for removing a row from Matrix Dynamic question.
         *- `sender` - the survey object that fires the event
         *- `options.question` - a matrix question.
         *- `options.rowIndex` - a row index.
         *- `options.row` - a row object.
         *- `options.allow` - a boolean property. Set it to `false` to disable the row removing.
         * @see QuestionMatrixDynamicModel
         * @see onMatrixRowRemoving
         * @see onMatrixRowRemoved
         */
        _this.onMatrixAllowRemoveRow = _this.addEvent();
        /**
         * The event is fired before creating cell question in the matrix. You can change the cell question type by setting different options.cellType.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - the matrix question.
         *- `options.cellType` - the cell question type. You can change it.
         *- `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
         *- `options.column` - the matrix column object.
         *- `options.columnName` - the matrix column name.
         *- `options.row` - the matrix row object.
         * @see onMatrixBeforeRowAdded
         * @see onMatrixCellCreated
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDropdownModel
         */
        _this.onMatrixCellCreating = _this.addEvent();
        /**
          * The event is fired for every cell created in Matrix Dynamic and Matrix Dropdown questions.
          *- `sender` - the survey object that fires the event.
          *- `options.question` - the matrix question.
          *- `options.cell` - the matrix cell.
          *- `options.cellQuestion` - the question/editor in the cell. You may customize it, change it's properties, like choices or visible.
          *- `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
          *- `options.column` - the matrix column object.
          *- `options.columnName` - the matrix column name.
          *- `options.row` - the matrix row object.
          * @see onMatrixBeforeRowAdded
          * @see onMatrixCellCreating
          * @see onMatrixRowAdded
          * @see QuestionMatrixDynamicModel
          * @see QuestionMatrixDropdownModel
          */
        _this.onMatrixCellCreated = _this.addEvent();
        /**
         * The event is fired for every cell after is has been rendered in DOM.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - the matrix question.
         *- `options.cell` - the matrix cell.
         *- `options.cellQuestion` - the question/editor in the cell.
         *- `options.htmlElement` - an HTML element bound to the `cellQuestion` object.
         *- `options.column` - the matrix column object.
         *- `options.row` - the matrix row object.
         * @see onMatrixCellCreated
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDropdownModel
         */
        _this.onMatrixAfterCellRender = _this.addEvent();
        /**
         * The event is fired when cell value is changed in Matrix Dynamic and Matrix Dropdown questions.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - the matrix question.
         *- `options.columnName` - the matrix column name.
         *- `options.value` - a new value.
         *- `options.row` - the matrix row object.
         *- `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
         * @see onMatrixCellValueChanging
         * @see onMatrixBeforeRowAdded
         * @see onMatrixRowAdded
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDropdownModel
         */
        _this.onMatrixCellValueChanged = _this.addEvent();
        /**
         * The event is fired on changing cell value in Matrix Dynamic and Matrix Dropdown questions. You may change the `options.value` property to change a cell value.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - the matrix question.
         *- `options.columnName` - the matrix column name.
         *- `options.value` - a new value.
         *- `options.oldValue` - the old value.
         *- `options.row` - the matrix row object.
         *- `options.getCellQuestion(columnName)` - the function that returns a cell question by column name.
         * @see onMatrixCellValueChanged
         * @see onMatrixBeforeRowAdded
         * @see onMatrixRowAdded
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDropdownModel
         */
        _this.onMatrixCellValueChanging = _this.addEvent();
        /**
         * The event is fired when Matrix Dynamic and Matrix Dropdown questions validate the cell value.
         *- `sender` - the survey object that fires the event.
         *- `options.error` - an error string. It is empty by default.
         *- `options.question` - the matrix question.
         *- `options.columnName` - the matrix column name.
         *- `options.value` - a cell value.
         *- `options.row` - the matrix row object.
         *- `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
         * @see onMatrixBeforeRowAdded
         * @see onMatrixRowAdded
         * @see QuestionMatrixDynamicModel
         * @see QuestionMatrixDropdownModel
         */
        _this.onMatrixCellValidate = _this.addEvent();
        /**
         * The event is fired on adding a new panel in Panel Dynamic question.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a panel question.
         *- `options.panel` - an added panel.
         * @see QuestionPanelDynamicModel
         * @see QuestionPanelDynamicModel.panels
         */
        _this.onDynamicPanelAdded = _this.addEvent();
        /**
         * The event is fired on removing a panel from Panel Dynamic question.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a panel question.
         *- `options.panelIndex` - a removed panel index.
         *- `options.panel` - a removed panel.
         * @see QuestionPanelDynamicModel
         * @see QuestionPanelDynamicModel.panels
         * @see onDynamicPanelRemoving
         */
        _this.onDynamicPanelRemoved = _this.addEvent();
        /**
         * An event that is raised before a panel is removed from a Dynamic Panel question. Use this event to cancel the removal.
         *
         * Parameters:
         *
         * - `sender` - A Survey instance that raised the event.
         * - `options.question` - A [Panel Dynamic](https://surveyjs.io/Documentation/Library?id=questionpaneldynamicmodel) question instance.
         * - `options.panelIndex` - The index of the removed panel.
         * - `options.panel` - The [instance of the removed panel](https://surveyjs.io/Documentation/Library?id=panelmodel).
         * - `options.allow` - A Boolean property that you should set to `false` if you want to cancel the panel removal.
         * @see QuestionPanelDynamicModel
         * @see QuestionPanelDynamicModel.panels
         * @see onDynamicPanelRemoved
         */
        _this.onDynamicPanelRemoving = _this.addEvent();
        /**
        * The event is fired every second if the method `startTimer` has been called.
        * @see startTimer
        * @see timeSpent
        * @see Page.timeSpent
        */
        _this.onTimer = _this.addEvent();
        /**
         * The event is fired before displaying a new information in the Timer Panel. Use it to change the default text.
         *- `sender` - the survey object that fires the event.
         *- `options.text` - the timer panel info text.
         */
        _this.onTimerPanelInfoText = _this.addEvent();
        /**
         * The event is fired when item value is changed in Panel Dynamic question.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - the panel question.
         *- `options.panel` - the dynamic panel item.
         *- `options.name` - the item name.
         *- `options.value` - a new value.
         *- `options.itemIndex` - the panel item index.
         *- `options.itemValue` - the panel item object.
         * @see onDynamicPanelAdded
         * @see QuestionPanelDynamicModel
         */
        _this.onDynamicPanelItemValueChanged = _this.addEvent();
        /**
         * Use this event to define, whether an answer to a question is correct or not.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - a question on which you have to decide if the answer is correct or not.
         *- `options.result` - returns `true`, if an answer is correct, or `false`, if the answer is not correct. Use questions' `value` and `correctAnswer` properties to return the correct value.
         *- `options.correctAnswers` - you may change the default number of correct or incorrect answers in the question, for example for matrix, where each row is a quiz question.
         * @see Question.value
         * @see Question.correctAnswer
         */
        _this.onIsAnswerCorrect = _this.addEvent();
        /**
         * Use this event to control drag&drop operations during design mode.
         *- `sender` - the survey object that fires the event.
         *- `options.allow` - set it to `false` to disable dragging.
         *- `options.target` - a target element that is dragged.
         *- `options.source` - a source element. It can be `null`, if it is a new element, dragging from toolbox.
         *- `options.parent` - a page or panel where target element is dragging.
         *- `options.insertBefore` - an element before the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging an element after the last element in a container.
         *- `options.insertAfter` - an element after the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging element to the first position within the parent container.
         * @see setDesignMode
         * @see isDesignMode
         */
        _this.onDragDropAllow = _this.addEvent();
        /**
         * Use this event to control scrolling element to top. You can cancel the default behavior by setting options.cancel property to true.
         *- `sender` - the survey object that fires the event.
         *- `options.element` - an element that is going to be scrolled on top.
         *- `options.question` - a question that is going to be scrolled on top. It can be null if options.page is not null.
         *- `options.page` - a page that is going to be scrolled on top. It can be null if options.question is not null.
         *- `options.elementId` - the unique element DOM Id.
         *- `options.cancel` - set this property to true to cancel the default scrolling.
         */
        _this.onScrollingElementToTop = _this.addEvent();
        _this.onLocaleChangedEvent = _this.addEvent();
        /**
         * Use this event to create/customize actions to be displayed in a question's title.
         *- `sender` - A [Survey](https://surveyjs.io/Documentation/Library?id=SurveyModel) object that fires the event.
         *- `options.question` - A [Question](https://surveyjs.io/Documentation/Library?id=Question) object for which the event is fired.
         *- `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed question.
         * @see IAction
         * @see Question
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-titleactions/ (linkStyle))
         */
        _this.onGetQuestionTitleActions = _this.addEvent();
        /**
         * Use this event to create/customize actions to be displayed in a panel's title.
         *- `sender` - A survey object that fires the event.
         *- `options.panel` - A panel ([PanelModel](https://surveyjs.io/Documentation/Library?id=panelmodel) object) for which the event is fired.
         *- `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed panel.
         * @see IAction
         * @see PanelModel
         */
        _this.onGetPanelTitleActions = _this.addEvent();
        /**
         * Use this event to create/customize actions to be displayed in a page's title.
         *- `sender` - A survey object that fires the event.
         *- `options.page` - A page ([PageModel](https://surveyjs.io/Documentation/Library?id=pagemodel) object) for which the event is fired.
         *- `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed page.
         * @see IAction
         * @see PageModel
         */
        _this.onGetPageTitleActions = _this.addEvent();
        /**
         * Use this event to create/customize actions to be displayed in a matrix question's row.
         *- `sender` - A survey object that fires the event.
         *- `options.question` - A matrix question ([QuestionMatrixBaseModel](https://surveyjs.io/Documentation/Library?id=questionmatrixbasemodel) object) for which the event is fired.
         *- `options.row` - A matrix row for which the event is fired.
         *- `options.actions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed matrix question and row.
         * @see IAction
         * @see QuestionMatrixDropdownModelBase
         */
        _this.onGetMatrixRowActions = _this.addEvent();
        /**
         * The event is fired after the survey element content was collapsed or expanded.
         *- `sender` - the survey object that fires the event.
         *- `options.element` - Specifies which survey element content was collapsed or expanded.
         * @see onElementContentVisibilityChanged
         */
        _this.onElementContentVisibilityChanged = _this.addEvent();
        /**
         * The event is fired before expression question convert it's value into display value for rendering.
         *- `sender` - the survey object that fires the event.
         *- `options.question` - The expression question.
         *- `options.value` - The question value.
         *- `options.displayValue` - the display value that you can change before rendering.
         */
        _this.onGetExpressionDisplayValue = _this.addEvent();
        /**
         * The list of errors on loading survey JSON. If the list is empty after loading a JSON, then the JSON is correct and has no errors.
         * @see JsonError
         */
        _this.jsonErrors = null;
        _this.cssValue = null;
        /**
         * Gets or sets whether to hide all required errors.
         */
        _this.hideRequiredErrors = false;
        //#endregion
        _this._isMobile = false;
        _this._isDesignMode = false;
        /**
         * Gets or sets whether the survey must ignore validation like required questions and others, on `nextPage` and `completeLastPage` function calls. The default is `false`.
         * @see nextPage
         * @see completeLastPage
         * @see mode
         */
        _this.ignoreValidation = false;
        _this.isNavigationButtonPressed = false;
        _this.mouseDownPage = null;
        _this.isCalculatingProgressText = false;
        _this.isFirstPageRendering = true;
        _this.isCurrentPageRendering = true;
        _this.isTriggerIsRunning = false;
        _this.triggerValues = null;
        _this.triggerKeys = null;
        _this.conditionValues = null;
        _this.isValueChangedOnRunningCondition = false;
        _this.conditionRunnerCounter = 0;
        _this.conditionUpdateVisibleIndexes = false;
        _this.conditionNotifyElementsOnAnyValueOrVariableChanged = false;
        _this.isEndLoadingFromJson = null;
        _this.questionHashes = {
            names: {},
            namesInsensitive: {},
            valueNames: {},
            valueNamesInsensitive: {},
        };
        _this.needRenderIcons = true;
        _this.skeletonComponentName = "sv-skeleton";
        if (typeof document !== "undefined") {
            SurveyModel.stylesManager = new _stylesmanager__WEBPACK_IMPORTED_MODULE_11__["StylesManager"]();
        }
        var htmlCallBack = function (str) { return "<h3>" + str + "</h3>"; };
        _this.createHtmlLocString("completedHtml", "completingSurvey", htmlCallBack);
        _this.createHtmlLocString("completedBeforeHtml", "completingSurveyBefore", htmlCallBack);
        _this.createHtmlLocString("loadingHtml", "loadingSurvey", htmlCallBack);
        _this.createLocalizableString("logo", _this, false);
        _this.createLocalizableString("startSurveyText", _this, false, true);
        _this.createLocalizableString("pagePrevText", _this, false, true);
        _this.createLocalizableString("pageNextText", _this, false, true);
        _this.createLocalizableString("completeText", _this, false, true);
        _this.createLocalizableString("previewText", _this, false, true);
        _this.createLocalizableString("editText", _this, false, true);
        _this.createLocalizableString("questionTitleTemplate", _this, true);
        _this.textPreProcessor = new _textPreProcessor__WEBPACK_IMPORTED_MODULE_5__["TextPreProcessor"]();
        _this.textPreProcessor.onProcess = function (textValue) {
            _this.getProcessedTextValue(textValue);
        };
        _this.timerModelValue = new _surveyTimerModel__WEBPACK_IMPORTED_MODULE_12__["SurveyTimerModel"](_this);
        _this.timerModelValue.onTimer = function (page) {
            _this.doTimer(page);
        };
        _this.createNewArray("pages", function (value) {
            _this.doOnPageAdded(value);
        }, function (value) {
            _this.doOnPageRemoved(value);
        });
        _this.createNewArray("triggers", function (value) {
            value.setOwner(_this);
        });
        _this.createNewArray("calculatedValues", function (value) {
            value.setOwner(_this);
        });
        _this.createNewArray("completedHtmlOnCondition", function (value) {
            value.locOwner = _this;
        });
        _this.createNewArray("navigateToUrlOnCondition", function (value) {
            value.locOwner = _this;
        });
        _this.registerPropertyChangedHandlers(["locale"], function () {
            _this.onSurveyLocaleChanged();
        });
        _this.registerPropertyChangedHandlers(["firstPageIsStarted"], function () {
            _this.onFirstPageIsStartedChanged();
        });
        _this.registerPropertyChangedHandlers(["mode"], function () {
            _this.onModeChanged();
        });
        _this.registerPropertyChangedHandlers(["progressBarType"], function () {
            _this.updateProgressText();
        });
        _this.registerPropertyChangedHandlers(["questionStartIndex", "requiredText", "questionTitlePattern"], function () {
            _this.resetVisibleIndexes();
        });
        _this.registerPropertyChangedHandlers(["isLoading", "isCompleted", "isCompletedBefore", "mode", "isStartedState", "currentPage"], function () { _this.updateState(); });
        _this.registerPropertyChangedHandlers(["state", "currentPage", "showPreviewBeforeComplete"], function () { _this.onStateAndCurrentPageChanged(); });
        _this.registerPropertyChangedHandlers(["logo", "logoPosition"], function () { _this.updateHasLogo(); });
        _this.onGetQuestionNo.onCallbacksChanged = function () {
            _this.resetVisibleIndexes();
        };
        _this.onProgressText.onCallbacksChanged = function () {
            _this.updateProgressText();
        };
        _this.onTextMarkdown.onCallbacksChanged = function () {
            _this.locStrsChanged();
        };
        _this.onProcessHtml.onCallbacksChanged = function () {
            _this.locStrsChanged();
        };
        _this.onGetQuestionTitle.onCallbacksChanged = function () {
            _this.locStrsChanged();
        };
        _this.onUpdatePageCssClasses.onCallbacksChanged = function () {
            _this.currentPage && _this.currentPage.updateElementCss();
        };
        _this.onUpdatePanelCssClasses.onCallbacksChanged = function () {
            _this.currentPage && _this.currentPage.updateElementCss();
        };
        _this.onUpdateQuestionCssClasses.onCallbacksChanged = function () {
            _this.currentPage && _this.currentPage.updateElementCss();
        };
        _this.onShowingChoiceItem.onCallbacksChanged = function () {
            _this.rebuildQuestionChoices();
        };
        _this.navigationBarValue = _this.createNavigationBar();
        _this.navigationBar.locOwner = _this;
        _this.onBeforeCreating();
        if (jsonObj) {
            if (typeof jsonObj === "string" || jsonObj instanceof String) {
                jsonObj = JSON.parse(jsonObj);
            }
            if (jsonObj && jsonObj.clientId) {
                _this.clientId = jsonObj.clientId;
            }
            _this.fromJSON(jsonObj);
            if (_this.surveyId) {
                _this.loadSurveyFromService(_this.surveyId, _this.clientId);
            }
        }
        _this.onCreating();
        if (!!renderedElement) {
            _this.render(renderedElement);
        }
        _this.updateCss();
        _this.setCalculatedWidthModeUpdater();
        return _this;
    }
    Object.defineProperty(SurveyModel, "cssType", {
        get: function () {
            return _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_4__["surveyCss"].currentType;
        },
        set: function (value) {
            _stylesmanager__WEBPACK_IMPORTED_MODULE_11__["StylesManager"].applyTheme(value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "platformName", {
        get: function () {
            return SurveyModel.platform;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "commentPrefix", {
        /**
         * You can display an additional field (comment field) for the most of questions; users can enter additional comments to their response.
         * The comment field input is saved as `'question name' + 'commentPrefix'`.
         * @see data
         * @see Question.showCommentArea
         */
        get: function () {
            return _settings__WEBPACK_IMPORTED_MODULE_14__["settings"].commentPrefix;
        },
        set: function (val) {
            _settings__WEBPACK_IMPORTED_MODULE_14__["settings"].commentPrefix = val;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.createHtmlLocString = function (name, locName, func) {
        this.createLocalizableString(name, this, false, locName).onGetLocalizationTextCallback = func;
    };
    SurveyModel.prototype.getType = function () {
        return "survey";
    };
    SurveyModel.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
        if (name === "questionsOnPageMode") {
            this.onQuestionsOnPageModeChanged(oldValue);
        }
    };
    Object.defineProperty(SurveyModel.prototype, "pages", {
        /**
         * Returns a list of all pages in the survey, including invisible pages.
         * @see PageModel
         * @see visiblePages
         */
        get: function () {
            return this.getPropertyValue("pages");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.render = function (element) {
        if (element === void 0) { element = null; }
        if (this.renderCallback) {
            this.renderCallback();
        }
    };
    SurveyModel.prototype.updateSurvey = function (newProps, oldProps) {
        var _loop_1 = function () {
            if (key == "model" || key == "children")
                return "continue";
            if (key.indexOf("on") == 0 && this_1[key] && this_1[key].add) {
                var funcBody_1 = newProps[key];
                var func = function (sender, options) {
                    funcBody_1(sender, options);
                };
                this_1[key].add(func);
            }
            else {
                this_1[key] = newProps[key];
            }
        };
        var this_1 = this;
        for (var key in newProps) {
            _loop_1();
        }
        if (newProps && newProps.data)
            this.onValueChanged.add(function (sender, options) {
                newProps.data[options.name] = options.value;
            });
    };
    SurveyModel.prototype.getCss = function () {
        return this.css;
    };
    SurveyModel.prototype.updateCompletedPageCss = function () {
        this.containerCss = this.css.container;
        this.completedCss = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]().append(this.css.body)
            .append(this.css.completedPage).toString(); // for completed page
    };
    SurveyModel.prototype.updateCss = function () {
        this.rootCss = this.getRootCss();
        this.updateNavigationCss();
        this.updateCompletedPageCss();
    };
    Object.defineProperty(SurveyModel.prototype, "css", {
        get: function () {
            if (!this.cssValue) {
                this.cssValue = {};
                this.copyCssClasses(this.cssValue, _defaultCss_cssstandard__WEBPACK_IMPORTED_MODULE_4__["surveyCss"].getCss());
            }
            return this.cssValue;
        },
        set: function (value) {
            this.setCss(value);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.setCss = function (value, needMerge) {
        if (needMerge === void 0) { needMerge = true; }
        if (needMerge) {
            this.mergeValues(value, this.css);
        }
        else {
            this.cssValue = value;
        }
        this.updateCss();
        this.updateElementCss(false);
    };
    Object.defineProperty(SurveyModel.prototype, "cssTitle", {
        get: function () {
            return this.css.title;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cssNavigationComplete", {
        get: function () {
            return this.getNavigationCss(this.cssSurveyNavigationButton, this.css.navigation.complete);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cssNavigationPreview", {
        get: function () {
            return this.getNavigationCss(this.cssSurveyNavigationButton, this.css.navigation.preview);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cssNavigationEdit", {
        get: function () {
            return this.getNavigationCss(this.css.navigationButton, this.css.navigation.edit);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cssNavigationPrev", {
        get: function () {
            return this.getNavigationCss(this.cssSurveyNavigationButton, this.css.navigation.prev);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cssNavigationStart", {
        get: function () {
            return this.getNavigationCss(this.cssSurveyNavigationButton, this.css.navigation.start);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cssNavigationNext", {
        get: function () {
            return this.getNavigationCss(this.cssSurveyNavigationButton, this.css.navigation.next);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cssSurveyNavigationButton", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]().append(this.css.navigationButton).append(this.css.bodyNavigationButton).toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "bodyCss", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]().append(this.css.body)
                .append(this.css.bodyWithTimer, this.showTimerPanel != "none" && this.state === "running")
                .append(this.css.body + "--" + this.calculatedWidthMode).toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "completedStateCss", {
        get: function () {
            return this.getPropertyValue("completedStateCss", "");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getCompletedStateCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]().append(this.css.saveData[this.completedState], this.completedState !== "").toString();
    };
    SurveyModel.prototype.getNavigationCss = function (main, btn) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]().append(main)
            .append(btn).toString();
    };
    Object.defineProperty(SurveyModel.prototype, "lazyRendering", {
        /**
         * By default all rows are rendered no matters if they are visible or not.
         * Set it true, and survey markup rows will be rendered only if they are visible in viewport.
         * This feature is experimantal and might do not support all the use cases.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-lazy/ (linkStyle))
         */
        get: function () {
            return this.lazyRenderingValue === true;
        },
        set: function (val) {
            if (this.lazyRendering === val)
                return;
            this.lazyRenderingValue = val;
            var page = this.currentPage;
            if (!!page) {
                page.updateRows();
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isLazyRendering", {
        get: function () {
            return this.lazyRendering || _settings__WEBPACK_IMPORTED_MODULE_14__["settings"].lazyRowsRendering;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateLazyRenderingRowsOnRemovingElements = function () {
        if (!this.isLazyRendering)
            return;
        var page = this.currentPage;
        if (!!page) {
            Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["scrollElementByChildId"])(page.id);
        }
    };
    Object.defineProperty(SurveyModel.prototype, "triggers", {
        /**
         * Gets or sets a list of triggers in the survey.
         * @see SurveyTrigger
         */
        get: function () {
            return this.getPropertyValue("triggers");
        },
        set: function (val) {
            this.setPropertyValue("triggers", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "calculatedValues", {
        /**
         * Gets or sets a list of calculated values in the survey.
         * @see CalculatedValue
         *
         * For more information, refer to [Calculated Values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
         *
         */
        get: function () {
            return this.getPropertyValue("calculatedValues");
        },
        set: function (val) {
            this.setPropertyValue("calculatedValues", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "surveyId", {
        /**
         * Gets or sets an identifier of a survey model loaded from the [api.surveyjs.io](https://api.surveyjs.io) service. When specified, the survey JSON is automatically loaded from [api.surveyjs.io](https://api.surveyjs.io) service.
         * @see loadSurveyFromService
         * @see onLoadedSurveyFromService
         */
        get: function () {
            return this.getPropertyValue("surveyId", "");
        },
        set: function (val) {
            this.setPropertyValue("surveyId", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "surveyPostId", {
        /**
         * Gets or sets an identifier of a survey model saved to the [api.surveyjs.io](https://api.surveyjs.io) service. When specified, the survey data is automatically saved to the [api.surveyjs.io](https://api.surveyjs.io) service.
         * @see onComplete
         * @see surveyShowDataSaving
         */
        get: function () {
            return this.getPropertyValue("surveyPostId", "");
        },
        set: function (val) {
            this.setPropertyValue("surveyPostId", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "clientId", {
        /**
         * Gets or sets user's identifier (e.g., e-mail or unique customer id) in your web application.
         * If you load survey or post survey results from/to [api.surveyjs.io](https://api.surveyjs.io) service, then the library do not allow users to run the same survey the second time.
         * On the second run, the user will see the survey complete page.
         */
        get: function () {
            return this.getPropertyValue("clientId", "");
        },
        set: function (val) {
            this.setPropertyValue("clientId", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "cookieName", {
        /**
         * Gets or sets a cookie name used to save information about completing the survey.
         * If the property is not empty, before starting the survey, the Survey library checks if the cookie with this name exists.
         * If it is `true`, the survey goes to complete mode and a user sees the survey complete page. On completing the survey the cookie with this name is created.
         */
        get: function () {
            return this.getPropertyValue("cookieName", "");
        },
        set: function (val) {
            this.setPropertyValue("cookieName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "sendResultOnPageNext", {
        /**
         * Gets or sets whether to save survey results on completing every page. If the property value is set to `true`, the `onPartialSend` event is fired.
         * @see onPartialSend
         * @see clientId
         */
        get: function () {
            return this.getPropertyValue("sendResultOnPageNext", false);
        },
        set: function (val) {
            this.setPropertyValue("sendResultOnPageNext", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "surveyShowDataSaving", {
        /**
         * Gets or sets whether to show the progress on saving/sending data into the [api.surveyjs.io](https://api.surveyjs.io) service.
         * @see surveyPostId
         */
        get: function () {
            return this.getPropertyValue("surveyShowDataSaving", false);
        },
        set: function (val) {
            this.setPropertyValue("surveyShowDataSaving", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "focusFirstQuestionAutomatic", {
        /**
         * Gets or sets whether the first input is focused on showing a next or a previous page.
         */
        get: function () {
            return this.getPropertyValue("focusFirstQuestionAutomatic");
        },
        set: function (val) {
            this.setPropertyValue("focusFirstQuestionAutomatic", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "focusOnFirstError", {
        /**
         * Gets or sets whether the first input is focused if the current page has errors.
         * Set this property to `false` (the default value is `true`) if you do not want to bring the focus to the first question that has error on the page.
         */
        get: function () {
            return this.getPropertyValue("focusOnFirstError");
        },
        set: function (val) {
            this.setPropertyValue("focusOnFirstError", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showNavigationButtons", {
        /**
         * Gets or sets the navigation buttons position.
         * Possible values: 'bottom' (default), 'top', 'both' and 'none'. Set it to 'none' to hide 'Prev', 'Next' and 'Complete' buttons.
         * It makes sense if you are going to create a custom navigation, have only a single page, or the `goNextPageAutomatic` property is set to `true`.
         * @see goNextPageAutomatic
         * @see showPrevButton
         */
        get: function () {
            return this.getPropertyValue("showNavigationButtons");
        },
        set: function (val) {
            if (val === true || val === undefined) {
                val = "bottom";
            }
            if (val === false) {
                val = "none";
            }
            this.setPropertyValue("showNavigationButtons", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showPrevButton", {
        /**
         * Gets or sets whether the Survey displays "Prev" button in its pages. Set it to `false` to prevent end-users from going back to their answers.
         * @see showNavigationButtons
         */
        get: function () {
            return this.getPropertyValue("showPrevButton");
        },
        set: function (val) {
            this.setPropertyValue("showPrevButton", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showTitle", {
        /**
         * Gets or sets whether the Survey displays survey title in its pages. Set it to `false` to hide a survey title.
         * @see title
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("showTitle");
        },
        set: function (val) {
            this.setPropertyValue("showTitle", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showPageTitles", {
        /**
         * Gets or sets whether the Survey displays page titles. Set it to `false` to hide page titles.
         * @see PageModel.title
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("showPageTitles");
        },
        set: function (val) {
            this.setPropertyValue("showPageTitles", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showCompletedPage", {
        /**
         * On finishing the survey the complete page is shown. Set the property to `false`, to hide the complete page.
         * @see data
         * @see onComplete
         * @see navigateToUrl
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("showCompletedPage");
        },
        set: function (val) {
            this.setPropertyValue("showCompletedPage", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "navigateToUrl", {
        /**
         * Set this property to a url you want to navigate after a user completing the survey.
         * By default it uses after calling onComplete event. In case calling options.showDataSaving callback in onComplete event, navigateToUrl will be used on calling options.showDataSavingSuccess callback.
         */
        get: function () {
            return this.getPropertyValue("navigateToUrl");
        },
        set: function (val) {
            this.setPropertyValue("navigateToUrl", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "navigateToUrlOnCondition", {
        /**
         * Gets or sets a list of URL condition items. If the expression of this item returns `true`, then survey will navigate to the item URL.
         * @see UrlConditionItem
         * @see navigateToUrl
         */
        get: function () {
            return this.getPropertyValue("navigateToUrlOnCondition");
        },
        set: function (val) {
            this.setPropertyValue("navigateToUrlOnCondition", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getNavigateToUrl = function () {
        var item = this.getExpressionItemOnRunCondition(this.navigateToUrlOnCondition);
        var url = !!item ? item.url : this.navigateToUrl;
        if (!!url) {
            url = this.processText(url, true);
        }
        return url;
    };
    SurveyModel.prototype.navigateTo = function () {
        var url = this.getNavigateToUrl();
        var options = { url: url };
        this.onNavigateToUrl.fire(this, options);
        if (!options.url || typeof window === "undefined" || !window.location)
            return;
        window.location.href = options.url;
    };
    Object.defineProperty(SurveyModel.prototype, "requiredText", {
        /**
         * Gets or sets the required question mark. The required question mark is a char or string that is rendered in the required questions' titles.
         * @see Question.title
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-processtext/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("requiredText", "*");
        },
        set: function (val) {
            this.setPropertyValue("requiredText", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.beforeSettingQuestionErrors = function (question, errors) {
        this.maakeRequiredErrorsInvisibgle(errors);
        this.onSettingQuestionErrors.fire(this, {
            question: question,
            errors: errors,
        });
    };
    SurveyModel.prototype.beforeSettingPanelErrors = function (question, errors) {
        this.maakeRequiredErrorsInvisibgle(errors);
    };
    SurveyModel.prototype.maakeRequiredErrorsInvisibgle = function (errors) {
        if (!this.hideRequiredErrors)
            return;
        for (var i = 0; i < errors.length; i++) {
            var erType = errors[i].getErrorType();
            if (erType == "required" || erType == "requireoneanswer") {
                errors[i].visible = false;
            }
        }
    };
    Object.defineProperty(SurveyModel.prototype, "questionStartIndex", {
        /**
         * Gets or sets the first question index. The first question index is '1' by default. You may start it from '100' or from 'A', by setting '100' or 'A' to this property.
         * You can set the start index to "(1)" or "# A)" or "a)" to render question number as (1), # A) and a) accordingly.
         * @see Question.title
         * @see requiredText
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-processtext/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("questionStartIndex", "");
        },
        set: function (val) {
            this.setPropertyValue("questionStartIndex", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "storeOthersAsComment", {
        /**
         * Gets or sets whether the "Others" option text is stored as question comment.
         *
         * By default the entered text in the "Others" input in the checkbox/radiogroup/dropdown is stored as `"question name " + "-Comment"`. The value itself is `"question name": "others"`.
         * Set this property to `false`, to store the entered text directly in the `"question name"` key.
         * @see commentPrefix
         */
        get: function () {
            return this.getPropertyValue("storeOthersAsComment");
        },
        set: function (val) {
            this.setPropertyValue("storeOthersAsComment", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "maxTextLength", {
        /**
         * Specifies the default maximum length for questions like text and comment, including matrix cell questions.
         *
         * The default value is `0`, that means that the text and comment have the same max length as the standard HTML input - 524288 characters: https://www.w3schools.com/tags/att_input_maxlength.asp.
         * @see maxOthersLength
         */
        get: function () {
            return this.getPropertyValue("maxTextLength");
        },
        set: function (val) {
            this.setPropertyValue("maxTextLength", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "maxOthersLength", {
        /**
         * Gets or sets the default maximum length for question comments and others
         *
         * The default value is `0`, that means that the question comments have the same max length as the standard HTML input - 524288 characters: https://www.w3schools.com/tags/att_input_maxlength.asp.
         * @see Question.showCommentArea
         * @see Question.showOtherItem
         * @see maxTextLength
         */
        get: function () {
            return this.getPropertyValue("maxOthersLength");
        },
        set: function (val) {
            this.setPropertyValue("maxOthersLength", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "goNextPageAutomatic", {
        /**
         * Gets or ses whether user proceeds to the next page without pressing the "Next" button after answering all page questions.
         * The available options:
         *
         * - `true` - navigate to the next page and submit survey data automatically.
         * - `autogonext` - navigate to the next page automatically but do not submit survey data.
         * - `false` - do not navigate to the next page and do not submit survey data automatically.
         *
         * > NOTE: If any of the following questions is answered last, the survey won't be switched to the next page: Checkbox, Boolean (rendered as Checkbox), Comment, Signature Pad, Image Picker (with Multi Select), File, Single-Choice Matrix (not all rows are answered), Dynamic Matrix, Panel Dynamic.
         *
         * @see showNavigationButtons
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-autonextpage/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("goNextPageAutomatic", false);
        },
        set: function (val) {
            this.setPropertyValue("goNextPageAutomatic", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "allowCompleteSurveyAutomatic", {
        /**
         * Gets or sets whether a survey is automatically completed when `goNextPageAutomatic = true`. Set it to `false` if you do not want to submit survey automatically on completing the last survey page.
         * @see goNextPageAutomatic
         */
        get: function () {
            return this.getPropertyValue("allowCompleteSurveyAutomatic", true);
        },
        set: function (val) {
            this.setPropertyValue("allowCompleteSurveyAutomatic", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "checkErrorsMode", {
        /**
         * Gets or sets a value that specifies how the survey validates the question answers.
         *
         * The following options are available:
         *
         * - `onNextPage` (default) - check errors on navigating to the next page or on completing the survey.
         * - `onValueChanged` - check errors on every question value (i.e., answer) changing.
         * - `onValueChanging` - check errors before setting value into survey. If there is an error, then survey data is not changed, but question value will be keeped.
         * - `onComplete` - to validate all visible questions on complete button click. If there are errors on previous pages, then the page with the first error becomes the current.
         */
        get: function () {
            return this.getPropertyValue("checkErrorsMode");
        },
        set: function (val) {
            this.setPropertyValue("checkErrorsMode", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "autoGrowComment", {
        /**
         * Specifies whether the text area of [comment](https://surveyjs.io/Documentation/Library?id=questioncommentmodel) questions/elements automatically expands its height to avoid the vertical scrollbar and to display the entire multi-line contents entered by respondents.
         * Default value is false.
         * @see QuestionCommentModel.autoGrow
         */
        get: function () {
            return this.getPropertyValue("autoGrowComment");
        },
        set: function (val) {
            this.setPropertyValue("autoGrowComment", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
        /**
         * Gets or sets a value that specifies how the survey updates its questions' text values.
         *
         * The following options are available:
         *
         * - `onBlur` (default) - the value is updated after an input loses the focus.
         * - `onTyping` - update the value of text questions, "text" and "comment", on every key press.
         *
         * Note, that setting to "onTyping" may lead to a performance degradation, in case you have many expressions in the survey.
         */
        get: function () {
            return this.getPropertyValue("textUpdateMode");
        },
        set: function (val) {
            this.setPropertyValue("textUpdateMode", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "clearInvisibleValues", {
        /**
         * Gets or sets a value that specifies how the invisible data is included in survey data.
         *
         * The following options are available:
         *
         * - `none` - include the invisible values into the survey data.
         * - `onHidden` - clear the question value when it becomes invisible. If a question has value and it was invisible initially then survey clears the value on completing.
         * - `onHiddenContainer` - clear the question value when it or its parent (page or panel) becomes invisible. If a question has value and it was invisible initially then survey clears the value on completing.
         * - `onComplete` (default) - clear invisible question values on survey complete. In this case, the invisible questions will not be stored on the server.
         * @see Question.visible
         * @see onComplete
         */
        get: function () {
            return this.getPropertyValue("clearInvisibleValues");
        },
        set: function (val) {
            if (val === true)
                val = "onComplete";
            if (val === false)
                val = "none";
            this.setPropertyValue("clearInvisibleValues", val);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Call this function to remove all question values from the survey, that end-user will not be able to enter.
     * For example the value that doesn't exists in a radiogroup/dropdown/checkbox choices or matrix rows/columns.
     * Please note, this function doesn't clear values for invisible questions or values that doesn't associated with questions.
     * In fact this function just call clearIncorrectValues function of all questions in the survey
     * @param removeNonExisingRootKeys - set this parameter to true to remove keys from survey.data that doesn't have corresponded questions and calculated values
     * @see Question.clearIncorrectValues
     * @see Page.clearIncorrectValues
     * @see Panel.clearIncorrectValues
     */
    SurveyModel.prototype.clearIncorrectValues = function (removeNonExisingRootKeys) {
        if (removeNonExisingRootKeys === void 0) { removeNonExisingRootKeys = false; }
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].clearIncorrectValues();
        }
        if (!removeNonExisingRootKeys)
            return;
        var data = this.data;
        var hasChanges = false;
        for (var key in data) {
            if (!!this.getQuestionByValueName(key))
                continue;
            if (this.iscorrectValueWithPostPrefix(key, _settings__WEBPACK_IMPORTED_MODULE_14__["settings"].commentPrefix) ||
                this.iscorrectValueWithPostPrefix(key, _settings__WEBPACK_IMPORTED_MODULE_14__["settings"].matrixTotalValuePostFix))
                continue;
            var calcValue = this.getCalculatedValueByName(key);
            if (!!calcValue && calcValue.includeIntoResult)
                continue;
            hasChanges = true;
            delete data[key];
        }
        if (hasChanges) {
            this.data = data;
        }
    };
    SurveyModel.prototype.iscorrectValueWithPostPrefix = function (key, postPrefix) {
        if (key.indexOf(postPrefix) !== key.length - postPrefix.length)
            return false;
        return !!this.getQuestionByValueName(key.substring(0, key.indexOf(postPrefix)));
    };
    Object.defineProperty(SurveyModel.prototype, "locale", {
        /**
         * Gets or sets the survey locale. The default value it is empty, this means the 'en' locale is used.
         * You can set it to 'de' - German, 'fr' - French and so on. The library has built-in localization for several languages. The library has a multi-language support as well.
         */
        get: function () {
            return this.getPropertyValue("locale", _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale);
        },
        set: function (value) {
            if (value === _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale && !_surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale) {
                value = "";
            }
            this.setPropertyValue("locale", value);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.onSurveyLocaleChanged = function () {
        this.notifyElementsOnAnyValueOrVariableChanged("locale");
        this.localeChanged();
        this.onLocaleChangedEvent.fire(this, this.locale);
    };
    /**
     * Returns an array of locales that are used in the survey's translation.
     */
    SurveyModel.prototype.getUsedLocales = function () {
        var locs = new Array();
        this.addUsedLocales(locs);
        //Replace the default locale with the real one
        var index = locs.indexOf("default");
        if (index > -1) {
            var defaultLoc = _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale;
            //Remove the defaultLoc
            var defIndex = locs.indexOf(defaultLoc);
            if (defIndex > -1) {
                locs.splice(defIndex, 1);
            }
            index = locs.indexOf("default");
            locs[index] = defaultLoc;
        }
        return locs;
    };
    SurveyModel.prototype.localeChanged = function () {
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].localeChanged();
        }
    };
    //ILocalizableOwner
    SurveyModel.prototype.getLocale = function () {
        return this.locale;
    };
    SurveyModel.prototype.locStrsChanged = function () {
        _super.prototype.locStrsChanged.call(this);
        if (!this.currentPage)
            return;
        if (!this.isShowStartingPage) {
            this.updateProgressText();
        }
        var page = this.activePage;
        if (!!page) {
            page.locStrsChanged();
        }
        var visPages = this.visiblePages;
        for (var i = 0; i < visPages.length; i++) {
            visPages[i].navigationLocStrChanged();
        }
        this.navigationBar.locStrsChanged();
    };
    SurveyModel.prototype.getMarkdownHtml = function (text, name) {
        return this.getSurveyMarkdownHtml(this, text, name);
    };
    SurveyModel.prototype.getRenderer = function (name) {
        return this.getRendererForString(this, name);
    };
    SurveyModel.prototype.getRendererContext = function (locStr) {
        return this.getRendererContextForString(this, locStr);
    };
    SurveyModel.prototype.getRendererForString = function (element, name) {
        var renderAs = this.getBuiltInRendererForString(element, name);
        var options = { element: element, name: name, renderAs: renderAs };
        this.onTextRenderAs.fire(this, options);
        return options.renderAs;
    };
    SurveyModel.prototype.getRendererContextForString = function (element, locStr) {
        return locStr;
    };
    SurveyModel.prototype.getExpressionDisplayValue = function (question, value, displayValue) {
        var options = {
            question: question,
            value: value,
            displayValue: displayValue,
        };
        this.onGetExpressionDisplayValue.fire(this, options);
        return options.displayValue;
    };
    SurveyModel.prototype.getBuiltInRendererForString = function (element, name) {
        if (this.isDesignMode)
            return _localizablestring__WEBPACK_IMPORTED_MODULE_10__["LocalizableString"].editableRenderer;
        return undefined;
    };
    SurveyModel.prototype.getProcessedText = function (text) {
        return this.processText(text, true);
    };
    SurveyModel.prototype.getLocString = function (str) {
        return this.getLocalizationString(str);
    };
    //ISurveyErrorOwner
    SurveyModel.prototype.getErrorCustomText = function (text, error) {
        return this.getSurveyErrorCustomText(this, text, error);
    };
    SurveyModel.prototype.getSurveyErrorCustomText = function (obj, text, error) {
        var options = {
            text: text,
            name: error.getErrorType(),
            obj: obj,
            error: error
        };
        this.onErrorCustomText.fire(this, options);
        return options.text;
    };
    Object.defineProperty(SurveyModel.prototype, "emptySurveyText", {
        /**
         * Returns the text displayed when a survey has no visible pages and questions.
         */
        get: function () {
            return this.getLocalizationString("emptySurvey");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "logo", {
        //#region Title/Header options
        /**
         * Gets or sets a survey logo.
         * @see title
         */
        get: function () {
            return this.getLocalizableStringText("logo");
        },
        set: function (value) {
            this.setLocalizableStringText("logo", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locLogo", {
        get: function () {
            return this.getLocalizableString("logo");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "logoWidth", {
        /**
         * Gets or sets a survey logo width.
         * @see logo
         */
        get: function () {
            var width = this.getPropertyValue("logoWidth");
            return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["getSize"])(width);
        },
        set: function (value) {
            this.setPropertyValue("logoWidth", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "logoHeight", {
        /**
         * Gets or sets a survey logo height.
         * @see logo
         */
        get: function () {
            var height = this.getPropertyValue("logoHeight");
            return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["getSize"])(height);
        },
        set: function (value) {
            this.setPropertyValue("logoHeight", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "logoPosition", {
        /**
         * Gets or sets a survey logo position.
         * @see logo
         */
        get: function () {
            return this.getPropertyValue("logoPosition");
        },
        set: function (value) {
            this.setPropertyValue("logoPosition", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "hasLogo", {
        get: function () {
            return this.getPropertyValue("hasLogo", false);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateHasLogo = function () {
        this.setPropertyValue("hasLogo", !!this.logo && this.logoPosition !== "none");
    };
    Object.defineProperty(SurveyModel.prototype, "isLogoBefore", {
        get: function () {
            if (this.isDesignMode)
                return false;
            return (this.renderedHasLogo &&
                (this.logoPosition === "left" || this.logoPosition === "top"));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isLogoAfter", {
        get: function () {
            if (this.isDesignMode)
                return this.renderedHasLogo;
            return (this.renderedHasLogo &&
                (this.logoPosition === "right" || this.logoPosition === "bottom"));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "logoClassNames", {
        get: function () {
            var logoClasses = {
                left: "sv-logo--left",
                right: "sv-logo--right",
                top: "sv-logo--top",
                bottom: "sv-logo--bottom",
            };
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]().append(this.css.logo)
                .append(logoClasses[this.logoPosition]).toString();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "renderedHasTitle", {
        get: function () {
            if (this.isDesignMode)
                return this.isPropertyVisible("title");
            return !this.locTitle.isEmpty && this.showTitle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "renderedHasDescription", {
        get: function () {
            if (this.isDesignMode)
                return this.isPropertyVisible("description");
            return !!this.hasDescription;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "hasTitle", {
        get: function () {
            return this.renderedHasTitle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "renderedHasLogo", {
        get: function () {
            if (this.isDesignMode)
                return this.isPropertyVisible("logo");
            return this.hasLogo;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "renderedHasHeader", {
        get: function () {
            return this.renderedHasTitle || this.renderedHasLogo;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "logoFit", {
        /**
         * The logo fit mode.
         * @see logo
         */
        get: function () {
            return this.getPropertyValue("logoFit");
        },
        set: function (val) {
            this.setPropertyValue("logoFit", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.setIsMobile = function (newVal) {
        if (newVal === void 0) { newVal = true; }
        if (this.isMobile !== newVal) {
            this._isMobile = newVal;
            this.updateCss();
            this.getAllQuestions().map(function (q) { return q.isMobile = newVal; });
        }
    };
    Object.defineProperty(SurveyModel.prototype, "isMobile", {
        get: function () {
            return this._isMobile;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.isLogoImageChoosen = function () {
        return this.locLogo.renderedHtml;
    };
    Object.defineProperty(SurveyModel.prototype, "titleMaxWidth", {
        get: function () {
            if (!(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["isMobile"])() || this.isMobile) &&
                !this.isValueEmpty(this.isLogoImageChoosen()) &&
                !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].supportCreatorV2) {
                var logoWidth = this.logoWidth;
                if (this.logoPosition === "left" || this.logoPosition === "right") {
                    return "calc(100% - 5px - 2em - " + logoWidth + ")";
                }
            }
            return "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "completedHtml", {
        /**
         * Gets or sets the HTML content displayed on the complete page. Use this property to change the default complete page text.
         * @see showCompletedPage
         * @see completedHtmlOnCondition
         * @see locale
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
         */
        get: function () {
            return this.getLocalizableStringText("completedHtml");
        },
        set: function (value) {
            this.setLocalizableStringText("completedHtml", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locCompletedHtml", {
        get: function () {
            return this.getLocalizableString("completedHtml");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "completedHtmlOnCondition", {
        /**
         * The list of HTML condition items. If the expression of this item returns `true`, then a survey will use this item HTML instead of `completedHtml`.
         * @see HtmlConditionItem
         * @see completeHtml
         */
        get: function () {
            return this.getPropertyValue("completedHtmlOnCondition");
        },
        set: function (val) {
            this.setPropertyValue("completedHtmlOnCondition", val);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Calculates a given expression and returns a result value.
     * @param expression
     */
    SurveyModel.prototype.runExpression = function (expression) {
        if (!expression)
            return null;
        var values = this.getFilteredValues();
        var properties = this.getFilteredProperties();
        return new _conditions__WEBPACK_IMPORTED_MODULE_13__["ExpressionRunner"](expression).run(values, properties);
    };
    /**
     * Calculates a given expression and returns `true` or `false`.
     * @param expression
     */
    SurveyModel.prototype.runCondition = function (expression) {
        if (!expression)
            return false;
        var values = this.getFilteredValues();
        var properties = this.getFilteredProperties();
        return new _conditions__WEBPACK_IMPORTED_MODULE_13__["ConditionRunner"](expression).run(values, properties);
    };
    /**
     * Run all triggers that performs on value changed and not on moving to the next page.
     */
    SurveyModel.prototype.runTriggers = function () {
        this.checkTriggers(this.getFilteredValues(), false);
    };
    Object.defineProperty(SurveyModel.prototype, "renderedCompletedHtml", {
        get: function () {
            var item = this.getExpressionItemOnRunCondition(this.completedHtmlOnCondition);
            return !!item ? item.html : this.completedHtml;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getExpressionItemOnRunCondition = function (items) {
        if (items.length == 0)
            return null;
        var values = this.getFilteredValues();
        var properties = this.getFilteredProperties();
        for (var i = 0; i < items.length; i++) {
            if (items[i].runCondition(values, properties)) {
                return items[i];
            }
        }
        return null;
    };
    Object.defineProperty(SurveyModel.prototype, "completedBeforeHtml", {
        /**
         * The HTML content displayed to an end user that has already completed the survey.
         * @see clientId
         * @see locale
         */
        get: function () {
            return this.getLocalizableStringText("completedBeforeHtml");
        },
        set: function (value) {
            this.setLocalizableStringText("completedBeforeHtml", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locCompletedBeforeHtml", {
        get: function () {
            return this.getLocalizableString("completedBeforeHtml");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "loadingHtml", {
        /**
         * The HTML that shows on loading survey Json from the [api.surveyjs.io](https://api.surveyjs.io) service.
         * @see surveyId
         * @see locale
         */
        get: function () {
            return this.getLocalizableStringText("loadingHtml");
        },
        set: function (value) {
            this.setLocalizableStringText("loadingHtml", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locLoadingHtml", {
        get: function () {
            return this.getLocalizableString("loadingHtml");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "defaultLoadingHtml", {
        /**
         * Default value for loadingHtml property
         * @see loadingHtml
         */
        get: function () {
            return "<h3>" + this.getLocalizationString("loadingSurvey") + "</h3>";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "navigationBar", {
        get: function () {
            return this.navigationBarValue;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Adds a custom navigation item similar to the Previous Page, Next Page, and Complete buttons.
     * Accepts an object described in the [IAction](https://surveyjs.io/Documentation/Library?id=IAction) help section.
     *
     * [View Demo](https://surveyjs.io/form-library/examples/survey-changenavigation/ (linkStyle))
    */
    SurveyModel.prototype.addNavigationItem = function (val) {
        if (!val.component) {
            val.component = "sv-nav-btn";
        }
        if (!val.innerCss) {
            val.innerCss = this.cssSurveyNavigationButton;
        }
        return this.navigationBar.addAction(val);
    };
    Object.defineProperty(SurveyModel.prototype, "startSurveyText", {
        /**
         * Gets or sets the 'Start' button caption.
         * The 'Start' button is shown on the started page. Set the `firstPageIsStarted` property to `true`, to display the started page.
         * @see firstPageIsStarted
         * @see locale
         */
        get: function () {
            return this.getLocalizableStringText("startSurveyText");
        },
        set: function (newValue) {
            this.setLocalizableStringText("startSurveyText", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locStartSurveyText", {
        get: function () {
            return this.getLocalizableString("startSurveyText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "pagePrevText", {
        /**
         * Gets or sets the 'Prev' button caption.
         * @see locale
         */
        get: function () {
            return this.getLocalizableStringText("pagePrevText");
        },
        set: function (newValue) {
            this.setLocalizableStringText("pagePrevText", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locPagePrevText", {
        get: function () {
            return this.getLocalizableString("pagePrevText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "pageNextText", {
        /**
         * Gets or sets the 'Next' button caption.
         * @see locale
         */
        get: function () {
            return this.getLocalizableStringText("pageNextText");
        },
        set: function (newValue) {
            this.setLocalizableStringText("pageNextText", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locPageNextText", {
        get: function () {
            return this.getLocalizableString("pageNextText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "completeText", {
        /**
         *  Gets or sets the 'Complete' button caption.
         * @see locale
         */
        get: function () {
            return this.getLocalizableStringText("completeText");
        },
        set: function (newValue) {
            this.setLocalizableStringText("completeText", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locCompleteText", {
        get: function () {
            return this.getLocalizableString("completeText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "previewText", {
        /**
         *  Gets or sets the 'Preview' button caption.
         * @see locale
         * @see showPreviewBeforeComplete
         * @see editText
         * @see showPreview
         */
        get: function () {
            return this.getLocalizableStringText("previewText");
        },
        set: function (newValue) {
            this.setLocalizableStringText("previewText", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locPreviewText", {
        get: function () {
            return this.getLocalizableString("previewText");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "editText", {
        /**
         *  Gets or sets the 'Edit' button caption.
         * @see locale
         * @see showPreviewBeforeComplete
         * @see previewText
         * @see cancelPreview
         */
        get: function () {
            return this.getLocalizableStringText("editText");
        },
        set: function (newValue) {
            this.setLocalizableStringText("editText", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "locEditText", {
        get: function () {
            return this.getLocalizableString("editText");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getElementTitleTagName = function (element, tagName) {
        if (this.onGetTitleTagName.isEmpty)
            return tagName;
        var options = { element: element, tagName: tagName };
        this.onGetTitleTagName.fire(this, options);
        return options.tagName;
    };
    Object.defineProperty(SurveyModel.prototype, "questionTitlePattern", {
        /**
         * Set the pattern for question title. Default is "numTitleRequire", 1. What is your name? *,
         * You can set it to numRequireTitle: 1. * What is your name?
         * You can set it to requireNumTitle: * 1. What is your name?
         * You can set it to numTitle (remove require symbol completely): 1. What is your name?
         * @see QuestionModel.title
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-processtext/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("questionTitlePattern", "numTitleRequire");
        },
        set: function (val) {
            if (val !== "numRequireTitle" &&
                val !== "requireNumTitle" &&
                val != "numTitle") {
                val = "numTitleRequire";
            }
            this.setPropertyValue("questionTitlePattern", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getQuestionTitlePatternOptions = function () {
        var res = new Array();
        var title = this.getLocalizationString("questionTitlePatternText");
        var num = !!this.questionStartIndex ? this.questionStartIndex : "1.";
        res.push({
            value: "numTitleRequire",
            text: num + " " + title + " " + this.requiredText
        });
        res.push({
            value: "numRequireTitle",
            text: num + " " + this.requiredText + " " + title
        });
        res.push({
            value: "requireNumTitle",
            text: this.requiredText + " " + num + " " + title
        });
        res.push({
            value: "numTitle",
            text: num + " " + title
        });
        return res;
    };
    Object.defineProperty(SurveyModel.prototype, "questionTitleTemplate", {
        get: function () {
            return this.getLocalizableStringText("questionTitleTemplate");
        },
        set: function (value) {
            this.setLocalizableStringText("questionTitleTemplate", value);
            this.questionTitlePattern = this.getNewTitlePattern(value);
            this.questionStartIndex = this.getNewQuestionTitleElement(value, "no", this.questionStartIndex, "1");
            this.requiredText = this.getNewQuestionTitleElement(value, "require", this.requiredText, "*");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getNewTitlePattern = function (template) {
        if (!!template) {
            var strs = [];
            while (template.indexOf("{") > -1) {
                template = template.substring(template.indexOf("{") + 1);
                var ind = template.indexOf("}");
                if (ind < 0)
                    break;
                strs.push(template.substring(0, ind));
                template = template.substring(ind + 1);
            }
            if (strs.length > 1) {
                if (strs[0] == "require")
                    return "requireNumTitle";
                if (strs[1] == "require" && strs.length == 3)
                    return "numRequireTitle";
                if (strs.indexOf("require") < 0)
                    return "numTitle";
            }
            if (strs.length == 1 && strs[0] == "title") {
                return "numTitle";
            }
        }
        return "numTitleRequire";
    };
    SurveyModel.prototype.getNewQuestionTitleElement = function (template, name, currentValue, defaultValue) {
        name = "{" + name + "}";
        if (!template || template.indexOf(name) < 0)
            return currentValue;
        var ind = template.indexOf(name);
        var prefix = "";
        var postfix = "";
        var i = ind - 1;
        for (; i >= 0; i--) {
            if (template[i] == "}")
                break;
        }
        if (i < ind - 1) {
            prefix = template.substring(i + 1, ind);
        }
        ind += name.length;
        i = ind;
        for (; i < template.length; i++) {
            if (template[i] == "{")
                break;
        }
        if (i > ind) {
            postfix = template.substring(ind, i);
        }
        i = 0;
        while (i < prefix.length && prefix.charCodeAt(i) < 33)
            i++;
        prefix = prefix.substring(i);
        i = postfix.length - 1;
        while (i >= 0 && postfix.charCodeAt(i) < 33)
            i--;
        postfix = postfix.substring(0, i + 1);
        if (!prefix && !postfix)
            return currentValue;
        var value = !!currentValue ? currentValue : defaultValue;
        return prefix + value + postfix;
    };
    Object.defineProperty(SurveyModel.prototype, "locQuestionTitleTemplate", {
        get: function () {
            return this.getLocalizableString("questionTitleTemplate");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getUpdatedQuestionTitle = function (question, title) {
        if (this.onGetQuestionTitle.isEmpty)
            return title;
        var options = { question: question, title: title };
        this.onGetQuestionTitle.fire(this, options);
        return options.title;
    };
    SurveyModel.prototype.getUpdatedQuestionNo = function (question, no) {
        if (this.onGetQuestionNo.isEmpty)
            return no;
        var options = { question: question, no: no };
        this.onGetQuestionNo.fire(this, options);
        return options.no;
    };
    Object.defineProperty(SurveyModel.prototype, "showPageNumbers", {
        /**
         * Gets or sets whether the survey displays page numbers on pages titles.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("showPageNumbers", false);
        },
        set: function (value) {
            if (value === this.showPageNumbers)
                return;
            this.setPropertyValue("showPageNumbers", value);
            this.updateVisibleIndexes();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showQuestionNumbers", {
        /**
         * Gets or sets a value that specifies how the question numbers are displayed.
         *
         * The following options are available:
         *
         * - `on` - display question numbers
         * - `onpage` - display question numbers, start numbering on every page
         * - `off` - turn off the numbering for questions titles
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("showQuestionNumbers");
        },
        set: function (value) {
            if (value === true) {
                value = "on";
            }
            if (value === false) {
                value = "off";
            }
            value = value.toLowerCase();
            value = value === "onpage" ? "onPage" : value;
            if (value === this.showQuestionNumbers)
                return;
            this.setPropertyValue("showQuestionNumbers", value);
            this.updateVisibleIndexes();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showProgressBar", {
        /**
         * Gets or sets the survey progress bar position.
         *
         * The following options are available:
         *
         * - `off` (default) - don't show progress bar
         * - `top` - show progress bar in the top
         * - `bottom` - show progress bar in the bottom
         * - `both` - show progress bar in both sides: top and bottom.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/navigation-default/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("showProgressBar");
        },
        set: function (newValue) {
            this.setPropertyValue("showProgressBar", newValue.toLowerCase());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "progressBarType", {
        /**
         * Gets or sets the type of info in the progress bar.
         *
         * The following options are available:
         *
         * - `pages` (default),
         * - `questions`,
         * - `requiredQuestions`,
         * - `correctQuestions`,
         * - `buttons`
         *
         * [View Demo](https://surveyjs.io/form-library/examples/navigation-buttons/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("progressBarType");
        },
        set: function (newValue) {
            if (newValue === "correctquestion")
                newValue = "correctQuestion";
            if (newValue === "requiredquestion")
                newValue = "requiredQuestion";
            this.setPropertyValue("progressBarType", newValue);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isShowProgressBarOnTop", {
        get: function () {
            if (!this.canShowProresBar())
                return false;
            return this.showProgressBar === "top" || this.showProgressBar === "both";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isShowProgressBarOnBottom", {
        get: function () {
            if (!this.canShowProresBar())
                return false;
            return this.showProgressBar === "bottom" || this.showProgressBar === "both";
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.canShowProresBar = function () {
        return (!this.isShowingPreview ||
            this.showPreviewBeforeComplete != "showAllQuestions");
    };
    Object.defineProperty(SurveyModel.prototype, "processedTitle", {
        get: function () {
            return this.locTitle.renderedHtml;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "questionTitleLocation", {
        /**
         * Gets or sets question title location relative to the input field: `"top"`, `"bottom"`, or `"left"`.
         *
         * > NOTE: Certain question types (Matrix, Multiple Text) do not support the `"left"` value. For them, the `"top"` value is used.
         *
         * You can override this setting if you specify the `questionTitleLocation` property for an [individual page](https://surveyjs.io/form-library/documentation/pagemodel#questionTitleLocation) or [panel](https://surveyjs.io/form-library/documentation/panelmodel#questionTitleLocation) or set the `titleLocation` property for a [specific question](https://surveyjs.io/form-library/documentation/question#titleLocation).
         */
        get: function () {
            return this.getPropertyValue("questionTitleLocation");
        },
        set: function (value) {
            this.setPropertyValue("questionTitleLocation", value.toLowerCase());
            if (!this.isLoadingFromJson) {
                this.updateElementCss(true);
            }
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateElementCss = function (reNew) {
        if (!!this.startedPage) {
            this.startedPage.updateElementCss(reNew);
        }
        var pages = this.visiblePages;
        for (var i = 0; i < pages.length; i++) {
            pages[i].updateElementCss(reNew);
        }
    };
    Object.defineProperty(SurveyModel.prototype, "questionErrorLocation", {
        /**
         * Gets or sets the error message position.
         *
         * The following options are available:
         *
         * - `top` - to show question error(s) over the question,
         * - `bottom` - to show question error(s) under the question.
         */
        get: function () {
            return this.getPropertyValue("questionErrorLocation");
        },
        set: function (value) {
            this.setPropertyValue("questionErrorLocation", value.toLowerCase());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "questionDescriptionLocation", {
        /**
         * Gets or sets the question description position. The default value is `underTitle`.
         *
         * The following options are available:
         *
         * - `underTitle` - show question description under the question title,
         * - `underInput` - show question description under the question input instead of question title.
         */
        get: function () {
            return this.getPropertyValue("questionDescriptionLocation");
        },
        set: function (value) {
            this.setPropertyValue("questionDescriptionLocation", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "mode", {
        /**
         * Gets or sets the survey edit mode.
         *
         * The following options are available:
         *
         * - `edit` (default) - make a survey editable,
         * - `display` - make a survey read-only.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-displaymode/ (linkStyle))
         */
        get: function () {
            return this.getPropertyValue("mode");
        },
        set: function (value) {
            value = value.toLowerCase();
            if (value == this.mode)
                return;
            if (value != "edit" && value != "display")
                return;
            this.setPropertyValue("mode", value);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.onModeChanged = function () {
        for (var i = 0; i < this.pages.length; i++) {
            var page = this.pages[i];
            page.setPropertyValue("isReadOnly", page.isReadOnly);
        }
        this.updateButtonsVisibility();
        this.updateCss();
    };
    Object.defineProperty(SurveyModel.prototype, "data", {
        /**
         * Gets or sets an object that stores the survey results/data. You can set it directly as `{ 'question name': questionValue, ... }`
         *
         * > If you set the `data` property after creating the survey, you may need to set the `currentPageNo` to `0`, if you are using `visibleIf` properties for questions/pages/panels to ensure that you are starting from the first page.
         * @see setValue
         * @see getValue
         * @see mergeData
         * @see currentPageNo
         */
        get: function () {
            var result = {};
            var keys = this.getValuesKeys();
            for (var i = 0; i < keys.length; i++) {
                var key = keys[i];
                var dataValue = this.getDataValueCore(this.valuesHash, key);
                if (dataValue !== undefined) {
                    result[key] = dataValue;
                }
            }
            this.setCalculatedValuesIntoResult(result);
            return result;
        },
        set: function (data) {
            this.valuesHash = {};
            this.setDataCore(data);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Merge the values into survey.data. It works as survey.data, except it doesn't clean the existing data, but overrides them.
     * @param data data to merge. It should be an object {keyValue: Value, ...}
     * @see data
     * @see setValue
     */
    SurveyModel.prototype.mergeData = function (data) {
        if (!data)
            return;
        this.setDataCore(data);
    };
    SurveyModel.prototype.setDataCore = function (data) {
        if (data) {
            for (var key in data) {
                this.setDataValueCore(this.valuesHash, key, data[key]);
            }
        }
        this.updateAllQuestionsValue();
        this.notifyAllQuestionsOnValueChanged();
        this.notifyElementsOnAnyValueOrVariableChanged("");
        this.runConditions();
        this.updateAllQuestionsValue();
    };
    Object.defineProperty(SurveyModel.prototype, "editingObj", {
        get: function () {
            return this.editingObjValue;
        },
        set: function (val) {
            var _this = this;
            if (this.editingObj == val)
                return;
            if (!!this.editingObj) {
                this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
            }
            this.editingObjValue = val;
            if (this.isDisposed)
                return;
            if (!val) {
                var questions = this.getAllQuestions();
                for (var i = 0; i < questions.length; i++) {
                    questions[i].unbindValue();
                }
            }
            if (!!this.editingObj) {
                this.setDataCore({});
                this.onEditingObjPropertyChanged = function (sender, options) {
                    if (!_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].hasOriginalProperty(_this.editingObj, options.name))
                        return;
                    _this.updateOnSetValue(options.name, _this.editingObj[options.name], options.oldValue);
                };
                this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isEditingSurveyElement", {
        get: function () {
            return !!this.editingObj;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.setCalculatedValuesIntoResult = function (result) {
        for (var i = 0; i < this.calculatedValues.length; i++) {
            var calValue = this.calculatedValues[i];
            if (calValue.includeIntoResult &&
                !!calValue.name &&
                this.getVariable(calValue.name) !== undefined) {
                result[calValue.name] = this.getVariable(calValue.name);
            }
        }
    };
    SurveyModel.prototype.getAllValues = function () {
        return this.data;
    };
    /**
     * Returns survey results as an array of objects in which the question name, title, value, and other parameters are stored as individual properties.
     *
     * If a question can have more than one value (Matrix, Multiple Text), its object enables the `isNode` flag and stores information about these values in the `data` property. Refer to the following help topic for more information: [Access Full Survey Results](https://surveyjs.io/form-library/documentation/handle-survey-results-access#access-full-survey-results).
     *
     * If you want to skip empty answers, pass an object with the `includeEmpty` property set to `false`.
     */
    SurveyModel.prototype.getPlainData = function (options) {
        if (!options) {
            options = { includeEmpty: true, includeQuestionTypes: false, includeValues: false };
        }
        var result = [];
        var questionValueNames = [];
        this.getAllQuestions().forEach(function (question) {
            var resultItem = question.getPlainData(options);
            if (!!resultItem) {
                result.push(resultItem);
                questionValueNames.push(question.valueName || question.name);
            }
        });
        if (!!options.includeValues) {
            var keys = this.getValuesKeys();
            for (var i = 0; i < keys.length; i++) {
                var key = keys[i];
                if (questionValueNames.indexOf(key) == -1) {
                    var dataValue = this.getDataValueCore(this.valuesHash, key);
                    if (!!dataValue) {
                        result.push({
                            name: key,
                            title: key,
                            value: dataValue,
                            displayValue: dataValue,
                            isNode: false,
                            getString: function (val) {
                                return typeof val === "object" ? JSON.stringify(val) : val;
                            },
                        });
                    }
                }
            }
        }
        return result;
    };
    SurveyModel.prototype.getFilteredValues = function () {
        var values = {};
        for (var key in this.variablesHash)
            values[key] = this.variablesHash[key];
        this.addCalculatedValuesIntoFilteredValues(values);
        var keys = this.getValuesKeys();
        for (var i = 0; i < keys.length; i++) {
            var key = keys[i];
            values[key] = this.getDataValueCore(this.valuesHash, key);
        }
        return values;
    };
    SurveyModel.prototype.addCalculatedValuesIntoFilteredValues = function (values) {
        var caclValues = this.calculatedValues;
        for (var i = 0; i < caclValues.length; i++)
            values[caclValues[i].name] = caclValues[i].value;
    };
    SurveyModel.prototype.getFilteredProperties = function () {
        return { survey: this };
    };
    SurveyModel.prototype.getValuesKeys = function () {
        if (!this.editingObj)
            return Object.keys(this.valuesHash);
        var props = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getPropertiesByObj(this.editingObj);
        var res = [];
        for (var i = 0; i < props.length; i++) {
            res.push(props[i].name);
        }
        return res;
    };
    SurveyModel.prototype.getDataValueCore = function (valuesHash, key) {
        if (!!this.editingObj)
            return _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getObjPropertyValue(this.editingObj, key);
        return this.getDataFromValueHash(valuesHash, key);
    };
    SurveyModel.prototype.setDataValueCore = function (valuesHash, key, value) {
        if (!!this.editingObj) {
            _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].setObjPropertyValue(this.editingObj, key, value);
        }
        else {
            this.setDataToValueHash(valuesHash, key, value);
        }
    };
    SurveyModel.prototype.deleteDataValueCore = function (valuesHash, key) {
        if (!!this.editingObj) {
            this.editingObj[key] = null;
        }
        else {
            this.deleteDataFromValueHash(valuesHash, key);
        }
    };
    SurveyModel.prototype.getDataFromValueHash = function (valuesHash, key) {
        if (!!this.valueHashGetDataCallback)
            return this.valueHashGetDataCallback(valuesHash, key);
        return valuesHash[key];
    };
    SurveyModel.prototype.setDataToValueHash = function (valuesHash, key, value) {
        if (!!this.valueHashSetDataCallback) {
            this.valueHashSetDataCallback(valuesHash, key, value);
        }
        else {
            valuesHash[key] = value;
        }
    };
    SurveyModel.prototype.deleteDataFromValueHash = function (valuesHash, key) {
        if (!!this.valueHashDeleteDataCallback) {
            this.valueHashDeleteDataCallback(valuesHash, key);
        }
        else {
            delete valuesHash[key];
        }
    };
    Object.defineProperty(SurveyModel.prototype, "comments", {
        /**
         * Returns all comments from the data.
         * @see data
         */
        get: function () {
            var result = {};
            var keys = this.getValuesKeys();
            for (var i = 0; i < keys.length; i++) {
                var key = keys[i];
                if (key.indexOf(this.commentPrefix) > 0) {
                    result[key] = this.getDataValueCore(this.valuesHash, key);
                }
            }
            return result;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "visiblePages", {
        /**
         * Returns a list of visible pages. If all pages are visible, then this property returns the same list as the `pages` property.
         * @see pages
         * @see PageModel.visible
         * @see PageModel.visibleIf
         */
        get: function () {
            if (this.isDesignMode)
                return this.pages;
            var result = new Array();
            for (var i = 0; i < this.pages.length; i++) {
                if (this.isPageInVisibleList(this.pages[i])) {
                    result.push(this.pages[i]);
                }
            }
            return result;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.isPageInVisibleList = function (page) {
        return this.isDesignMode || page.isVisible && !page.isStarted;
    };
    Object.defineProperty(SurveyModel.prototype, "isEmpty", {
        /**
         * Returns `true` if the survey contains no pages. The survey is empty.
         */
        get: function () {
            return this.pages.length == 0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "PageCount", {
        /**
         * Deprecated. Use the `pageCount` property instead.
         */
        get: function () {
            return this.pageCount;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "pageCount", {
        /**
         * Returns the survey page count.
         * @see visiblePageCount
         * @see pages
         */
        get: function () {
            return this.pages.length;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "visiblePageCount", {
        /**
         * Returns a number of visible pages within the survey.
         * @see pageCount
         * @see visiblePages
         */
        get: function () {
            return this.visiblePages.length;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "startedPage", {
        /**
         * Returns the started page. This property works if the `firstPageIsStarted` property is set to `true`.
         * @see firstPageIsStarted
         */
        get: function () {
            var page = this.firstPageIsStarted && this.pages.length > 1 ? this.pages[0] : null;
            if (!!page) {
                page.onFirstRendering();
                page.setWasShown(true);
            }
            return page;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "currentPage", {
        /**
         * Gets or sets the current survey page. If a survey is rendered, then this property returns a page that a user can see/edit.
         */
        get: function () {
            return this.getPropertyValue("currentPage", null);
        },
        set: function (value) {
            if (this.isLoadingFromJson)
                return;
            var newPage = this.getPageByObject(value);
            if (!!value && !newPage)
                return;
            if (!newPage && this.isCurrentPageAvailable)
                return;
            var vPages = this.visiblePages;
            if (newPage != null && vPages.indexOf(newPage) < 0)
                return;
            if (newPage == this.currentPage)
                return;
            var oldValue = this.currentPage;
            if (!this.currentPageChanging(newPage, oldValue))
                return;
            this.setPropertyValue("currentPage", newPage);
            if (!!newPage) {
                newPage.onFirstRendering();
                newPage.updateCustomWidgets();
                newPage.setWasShown(true);
            }
            this.locStrsChanged();
            this.currentPageChanged(newPage, oldValue);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateCurrentPage = function () {
        if (this.isCurrentPageAvailable)
            return;
        this.currentPage = this.firstVisiblePage;
    };
    Object.defineProperty(SurveyModel.prototype, "isCurrentPageAvailable", {
        get: function () {
            var page = this.currentPage;
            return !!page && this.isPageInVisibleList(page) && this.isPageExistsInSurvey(page);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.isPageExistsInSurvey = function (page) {
        if (this.pages.indexOf(page) > -1)
            return true;
        return !!this.onContainsPageCallback && this.onContainsPageCallback(page);
    };
    Object.defineProperty(SurveyModel.prototype, "activePage", {
        /**
         * Returns the currentPage, unless the started page is showing. In this case returns the started page.
         * @see currentPage
         * @see firstPageIsStarted
         * @see startedPage
         */
        get: function () {
            return this.getPropertyValue("activePage");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isShowStartingPage", {
        /**
         * The started page is showing right now. survey state equals to "starting"
         */
        get: function () {
            return this.state === "starting";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isShowingPage", {
        /**
         * Survey is showing a page right now. It is in "running", "preview" or starting state.
         */
        get: function () {
            return this.state == "running" || this.state == "preview" || this.isShowStartingPage;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateActivePage = function () {
        var newPage = this.isShowStartingPage ? this.startedPage : this.currentPage;
        this.setPropertyValue("activePage", newPage);
    };
    SurveyModel.prototype.onStateAndCurrentPageChanged = function () {
        this.updateActivePage();
        this.updateButtonsVisibility();
    };
    SurveyModel.prototype.getPageByObject = function (value) {
        if (!value)
            return null;
        if (value.getType && value.getType() == "page")
            return value;
        if (typeof value === "string" || value instanceof String)
            return this.getPageByName(String(value));
        if (!isNaN(value)) {
            var index = Number(value);
            var vPages = this.visiblePages;
            if (value < 0 || value >= vPages.length)
                return null;
            return vPages[index];
        }
        return value;
    };
    Object.defineProperty(SurveyModel.prototype, "currentPageNo", {
        /**
         * The zero-based index of the current page in the visible pages array.
         *
         * [View Demo](https://surveyjs.io/form-library/examples/survey-editprevious/ (linkStyle))
         */
        get: function () {
            return this.visiblePages.indexOf(this.currentPage);
        },
        set: function (value) {
            var vPages = this.visiblePages;
            if (value < 0 || value >= vPages.length)
                return;
            this.currentPage = vPages[value];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "questionsOrder", {
        /**
         * Gets or sets the question display order. Use this property to randomize questions. You can randomize questions on a specific page.
         *
         * The following options are available:
         *
         * - `random` - randomize questions
         * - `initial` - keep questions in the same order, as in a survey model.
         * @see SurveyPage.questionsOrder
         */
        get: function () {
            return this.getPropertyValue("questionsOrder");
        },
        set: function (val) {
            this.setPropertyValue("questionsOrder", val);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Sets the input focus to the first question with the input field.
     */
    SurveyModel.prototype.focusFirstQuestion = function () {
        if (this.isFocusingQuestion)
            return;
        var page = this.activePage;
        if (page) {
            page.scrollToTop();
            page.focusFirstQuestion();
        }
    };
    SurveyModel.prototype.scrollToTopOnPageChange = function (doScroll) {
        if (doScroll === void 0) { doScroll = true; }
        var page = this.activePage;
        if (!page)
            return;
        if (doScroll) {
            page.scrollToTop();
        }
        if (this.isCurrentPageRendering && this.focusFirstQuestionAutomatic && !this.isFocusingQuestion) {
            page.focusFirstQuestion();
            this.isCurrentPageRendering = false;
        }
    };
    Object.defineProperty(SurveyModel.prototype, "state", {
        /**
         * Returns the current survey state:
         *
         * - `loading` - the survey is being loaded from JSON,
         * - `empty` - there is nothing to display in the current survey,
         * - `starting` - the survey's start page is displayed,
         * - `running` - a respondent is answering survey questions right now,
         * - `preview` - a respondent is previewing answered questions before submitting the survey (see [example](https://surveyjs.io/Examples/Library?id=survey-showpreview)),
         * - `completed` - a respondent has completed the survey and submitted the results.
         *
         * Details: [Preview State](https://surveyjs.io/Documentation/Library#states)
         */
        get: function () {
            return this.getPropertyValue("state", "empty");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateState = function () {
        this.setPropertyValue("state", this.calcState());
    };
    SurveyModel.prototype.calcState = function () {
        if (this.isLoading)
            return "loading";
        if (this.isCompleted)
            return "completed";
        if (this.isCompletedBefore)
            return "completedbefore";
        if (!this.isDesignMode &&
            this.isEditMode &&
            this.isStartedState &&
            this.startedPage)
            return "starting";
        if (this.isShowingPreview)
            return this.currentPage ? "preview" : "empty";
        return this.currentPage ? "running" : "empty";
    };
    Object.defineProperty(SurveyModel.prototype, "isCompleted", {
        get: function () {
            return this.getPropertyValue("isCompleted", false);
        },
        set: function (val) {
            this.setPropertyValue("isCompleted", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isShowingPreview", {
        get: function () {
            return this.getPropertyValue("isShowingPreview", false);
        },
        set: function (val) {
            if (this.isShowingPreview == val)
                return;
            this.setPropertyValue("isShowingPreview", val);
            this.onShowingPreviewChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isStartedState", {
        get: function () {
            return this.getPropertyValue("isStartedState", false);
        },
        set: function (val) {
            this.setPropertyValue("isStartedState", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isCompletedBefore", {
        get: function () {
            return this.getPropertyValue("isCompletedBefore", false);
        },
        set: function (val) {
            this.setPropertyValue("isCompletedBefore", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isLoading", {
        get: function () {
            return this.getPropertyValue("isLoading", false);
        },
        set: function (val) {
            this.setPropertyValue("isLoading", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "completedState", {
        get: function () {
            return this.getPropertyValue("completedState", "");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "completedStateText", {
        get: function () {
            return this.getPropertyValue("completedStateText", "");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.setCompletedState = function (value, text) {
        this.setPropertyValue("completedState", value);
        if (!text) {
            if (value == "saving")
                text = this.getLocalizationString("savingData");
            if (value == "error")
                text = this.getLocalizationString("savingDataError");
            if (value == "success")
                text = this.getLocalizationString("savingDataSuccess");
        }
        this.setPropertyValue("completedStateText", text);
        this.setPropertyValue("completedStateCss", this.getCompletedStateCss());
    };
    /**
     * Clears the survey data and state. If the survey has a `completed` state, it will get a `running` state.
     * @param clearData clear the data
     * @param gotoFirstPage make the first page as a current page.
     * @see data
     * @see state
     * @see currentPage
     */
    SurveyModel.prototype.clear = function (clearData, gotoFirstPage) {
        if (clearData === void 0) { clearData = true; }
        if (gotoFirstPage === void 0) { gotoFirstPage = true; }
        this.isCompleted = false;
        this.isCompletedBefore = false;
        this.isLoading = false;
        this.canBeCompletedByTrigger = false;
        if (clearData) {
            this.data = null;
            this.variablesHash = {};
        }
        this.timerModel.spent = 0;
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].timeSpent = 0;
            this.pages[i].setWasShown(false);
            this.pages[i].passed = false;
        }
        this.onFirstPageIsStartedChanged();
        if (gotoFirstPage) {
            this.currentPage = this.firstVisiblePage;
        }
        if (clearData) {
            this.updateValuesWithDefaults();
        }
    };
    SurveyModel.prototype.mergeValues = function (src, dest) {
        Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["mergeValues"])(src, dest);
    };
    SurveyModel.prototype.updateValuesWithDefaults = function () {
        if (this.isDesignMode || this.isLoading)
            return;
        for (var i = 0; i < this.pages.length; i++) {
            var questions = this.pages[i].questions;
            for (var j = 0; j < questions.length; j++) {
                questions[j].updateValueWithDefaults();
            }
        }
    };
    SurveyModel.prototype.updateCustomWidgets = function (page) {
        if (!page)
            return;
        page.updateCustomWidgets();
    };
    SurveyModel.prototype.currentPageChanging = function (newValue, oldValue) {
        var options = {
            oldCurrentPage: oldValue,
            newCurrentPage: newValue,
            allowChanging: true,
            isNextPage: this.isNextPage(newValue, oldValue),
            isPrevPage: this.isPrevPage(newValue, oldValue),
        };
        this.onCurrentPageChanging.fire(this, options);
        if (options.allowChanging) {
            this.isCurrentPageRendering = true;
        }
        return options.allowChanging;
    };
    SurveyModel.prototype.currentPageChanged = function (newValue, oldValue) {
        var isNextPage = this.isNextPage(newValue, oldValue);
        if (isNextPage) {
            oldValue.passed = true;
        }
        this.onCurrentPageChanged.fire(this, {
            oldCurrentPage: oldValue,
            newCurrentPage: newValue,
            isNextPage: isNextPage,
            isPrevPage: this.isPrevPage(newValue, oldValue),
        });
    };
    SurveyModel.prototype.isNextPage = function (newValue, oldValue) {
        if (!newValue || !oldValue)
            return false;
        return newValue.visibleIndex == oldValue.visibleIndex + 1;
    };
    SurveyModel.prototype.isPrevPage = function (newValue, oldValue) {
        if (!newValue || !oldValue)
            return false;
        return newValue.visibleIndex + 1 == oldValue.visibleIndex;
    };
    /**
     * Returns the progress that a user made while going through the survey.
     * It depends from progressBarType property
     * @see progressBarType
     * @see progressValue
     */
    SurveyModel.prototype.getProgress = function () {
        if (this.currentPage == null)
            return 0;
        if (this.progressBarType !== "pages") {
            var info = this.getProgressInfo();
            if (this.progressBarType === "requiredQuestions") {
                return info.requiredQuestionCount >= 1
                    ? Math.ceil((info.requiredAnsweredQuestionCount * 100) /
                        info.requiredQuestionCount)
                    : 100;
            }
            return info.questionCount >= 1
                ? Math.ceil((info.answeredQuestionCount * 100) / info.questionCount)
                : 100;
        }
        var visPages = this.visiblePages;
        var index = visPages.indexOf(this.currentPage) + 1;
        return Math.ceil((index * 100) / visPages.length);
    };
    Object.defineProperty(SurveyModel.prototype, "progressValue", {
        /**
         * Returns the progress that a user made while going through the survey.
         * It depends from progressBarType property
         * @see progressBarType
         */
        get: function () {
            return this.getPropertyValue("progressValue", 0);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isNavigationButtonsShowing", {
        /**
         * Returns the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') position.
         */
        get: function () {
            if (this.isDesignMode)
                return "none";
            var page = this.currentPage;
            if (!page)
                return "none";
            if (page.navigationButtonsVisibility === "show") {
                return "bottom";
            }
            if (page.navigationButtonsVisibility === "hide") {
                return "none";
            }
            return this.showNavigationButtons;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isNavigationButtonsShowingOnTop", {
        /**
         * Returns true if the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') are shows on top.
         */
        get: function () {
            return this.getIsNavigationButtonsShowingOn("top");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isNavigationButtonsShowingOnBottom", {
        /**
         * Returns true if the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') are shows on bottom.
         */
        get: function () {
            return this.getIsNavigationButtonsShowingOn("bottom");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getIsNavigationButtonsShowingOn = function (buttonPosition) {
        var res = this.isNavigationButtonsShowing;
        return res == "both" || res == buttonPosition;
    };
    Object.defineProperty(SurveyModel.prototype, "isEditMode", {
        /**
         * Returns `true` if the survey is in edit mode.
         * @see mode
         */
        get: function () {
            return this.mode == "edit";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isDisplayMode", {
        /**
         * Returns `true` if the survey is in display mode or in preview mode.
         * @see mode
         * @see showPreviewBeforeComplete
         */
        get: function () {
            return this.mode == "display" || this.state == "preview";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isUpdateValueTextOnTyping", {
        get: function () {
            return this.textUpdateMode == "onTyping";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isDesignMode", {
        /**
         * Returns `true` if the survey is in design mode. It is used by SurveyJS Editor.
         * @see setDesignMode
         */
        get: function () {
            return this._isDesignMode;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Sets the survey into design mode.
     * @param value use true to set the survey into the design mode.
     */
    SurveyModel.prototype.setDesignMode = function (value) {
        this._isDesignMode = value;
        this.onQuestionsOnPageModeChanged("standard");
    };
    Object.defineProperty(SurveyModel.prototype, "showInvisibleElements", {
        /**
         * Gets or sets whether to show all elements in the survey, regardless their visibility. The default value is `false`.
         */
        get: function () {
            return this.getPropertyValue("showInvisibleElements", false);
        },
        set: function (val) {
            var visPages = this.visiblePages;
            this.setPropertyValue("showInvisibleElements", val);
            if (this.isLoadingFromJson)
                return;
            this.runConditions();
            this.updateAllElementsVisibility(visPages);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateAllElementsVisibility = function (visPages) {
        for (var i = 0; i < this.pages.length; i++) {
            var page = this.pages[i];
            page.updateElementVisibility();
            if (visPages.indexOf(page) > -1 != page.isVisible) {
                this.onPageVisibleChanged.fire(this, {
                    page: page,
                    visible: page.isVisible,
                });
            }
        }
    };
    Object.defineProperty(SurveyModel.prototype, "areInvisibleElementsShowing", {
        get: function () {
            return this.isDesignMode || this.showInvisibleElements;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "areEmptyElementsHidden", {
        get: function () {
            return (this.isShowingPreview &&
                this.showPreviewBeforeComplete == "showAnsweredQuestions");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "hasCookie", {
        /**
         * Returns `true`, if a user has already completed the survey in this browser and there is a cookie about it. Survey goes to `completed` state if the function returns `true`.
         * @see cookieName
         * @see setCookie
         * @see deleteCookie
         * @see state
         */
        get: function () {
            if (!this.cookieName || typeof document === "undefined")
                return false;
            var cookies = document.cookie;
            return cookies && cookies.indexOf(this.cookieName + "=true") > -1;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Set the cookie with `cookieName` in user's browser. It is done automatically on survey complete if the `cookieName` property value is not empty.
     * @see cookieName
     * @see hasCookie
     * @see deleteCookie
     */
    SurveyModel.prototype.setCookie = function () {
        if (!this.cookieName || typeof document === "undefined")
            return;
        document.cookie =
            this.cookieName + "=true; expires=Fri, 31 Dec 9999 0:0:0 GMT";
    };
    /**
     * Deletes the cookie with `cookieName` from the browser.
     * @see cookieName
     * @see hasCookie
     * @see setCookie
     */
    SurveyModel.prototype.deleteCookie = function () {
        if (!this.cookieName)
            return;
        document.cookie = this.cookieName + "=;";
    };
    /**
     * Navigates user to the next page.
     *
     * Returns `false` in the following cases:
     *
     * - if the current page is the last page.
     * - if the current page contains errors (for example, a required question is empty).
     * @see isCurrentPageHasErrors
     * @see prevPage
     * @see completeLastPage
     */
    SurveyModel.prototype.nextPage = function () {
        if (this.isLastPage)
            return false;
        return this.doCurrentPageComplete(false);
    };
    SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
        var _this = this;
        if (this.ignoreValidation || !this.isEditMode)
            return false;
        var func = function (hasErrors) {
            if (!hasErrors) {
                _this.doCurrentPageCompleteCore(doComplete);
            }
        };
        if (this.checkErrorsMode === "onComplete") {
            if (!this.isLastPage)
                return false;
            return this.hasErrors(true, true, func) !== false;
        }
        return this.hasCurrentPageErrors(func) !== false;
    };
    SurveyModel.prototype.checkForAsyncQuestionValidation = function (questions, func) {
        var _this = this;
        this.clearAsyncValidationQuesitons();
        var _loop_2 = function () {
            if (questions[i].isRunningValidators) {
                var q_1 = questions[i];
                q_1.onCompletedAsyncValidators = function (hasErrors) {
                    _this.onCompletedAsyncQuestionValidators(q_1, func, hasErrors);
                };
                this_2.asyncValidationQuesitons.push(questions[i]);
            }
        };
        var this_2 = this;
        for (var i = 0; i < questions.length; i++) {
            _loop_2();
        }
        return this.asyncValidationQuesitons.length > 0;
    };
    SurveyModel.prototype.clearAsyncValidationQuesitons = function () {
        if (!!this.asyncValidationQuesitons) {
            var asynQuestions = this.asyncValidationQuesitons;
            for (var i = 0; i < asynQuestions.length; i++) {
                asynQuestions[i].onCompletedAsyncValidators = null;
            }
        }
        this.asyncValidationQuesitons = [];
    };
    SurveyModel.prototype.onCompletedAsyncQuestionValidators = function (question, func, hasErrors) {
        if (hasErrors) {
            this.clearAsyncValidationQuesitons();
            func(true);
            if (this.focusOnFirstError && !!question && !!question.page && question.page === this.currentPage) {
                var questions = this.currentPage.questions;
                for (var i_1 = 0; i_1 < questions.length; i_1++) {
                    if (questions[i_1] !== question && questions[i_1].errors.length > 0)
                        return;
                }
                question.focus(true);
            }
            return;
        }
        var asynQuestions = this.asyncValidationQuesitons;
        for (var i = 0; i < asynQuestions.length; i++) {
            if (asynQuestions[i].isRunningValidators)
                return;
        }
        func(false);
    };
    Object.defineProperty(SurveyModel.prototype, "isCurrentPageHasErrors", {
        /**
         * Returns `true`, if the current page contains errors, for example, the required question is empty or a question validation is failed.
         * @see nextPage
         */
        get: function () {
            return this.checkIsCurrentPageHasErrors();
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Returns `true`, if the current page contains any error. If there is an async function in an expression, then the function will return `undefined` value.
     * In this case, you should use `onAsyncValidation` parameter, which is a callback function: (hasErrors: boolean) => void
     * @param onAsyncValidation use this parameter if you use async functions in your expressions. This callback function will be called with hasErrors value equals to `true` or `false`.
     * @see hasPageErrors
     * @see hasErrors
     * @see currentPage
     */
    SurveyModel.prototype.hasCurrentPageErrors = function (onAsyncValidation) {
        return this.hasPageErrors(undefined, onAsyncValidation);
    };
    /**
     * Returns `true`, if a page contains an error. If there is an async function in an expression, then the function will return `undefined` value.
     * In this case, you should use the second `onAsyncValidation` parameter,  which is a callback function: (hasErrors: boolean) => void
     * @param page the page that you want to validate. If the parameter is undefined then the `activePage` is using
     * @param onAsyncValidation use this parameter if you use async functions in your expressions. This callback function will be called with hasErrors value equals to `true` or `false`.
     * @see hasCurrentPageErrors
     * @see hasErrors
     * @see activePage
     * @see currentPage
     */
    SurveyModel.prototype.hasPageErrors = function (page, onAsyncValidation) {
        if (!page) {
            page = this.activePage;
        }
        if (!page)
            return false;
        if (this.checkIsPageHasErrors(page))
            return true;
        if (!onAsyncValidation)
            return false;
        return this.checkForAsyncQuestionValidation(page.questions, function (hasErrors) { return onAsyncValidation(hasErrors); })
            ? undefined
            : false;
    };
    /**
     * Returns `true`, if any of the survey pages contains errors. If there is an async function in an expression, then the function will return `undefined` value.
     * In this case, you should use  the third `onAsyncValidation` parameter, which is a callback function: (hasErrors: boolean) => void
     * @param fireCallback set it to `true`, to show errors in UI.
     * @param focusOnFirstError set it to `true` to focus on the first question that doesn't pass the validation and make the page, where the question is located, the current.
     * @param onAsyncValidation use this parameter if you use async functions in your expressions. This callback function will be called with hasErrors value equals to `true` or `false`.
     * @see hasCurrentPageErrors
     * @see hasPageErrors
     */
    SurveyModel.prototype.hasErrors = function (fireCallback, focusOnFirstError, onAsyncValidation) {
        if (fireCallback === void 0) { fireCallback = true; }
        if (focusOnFirstError === void 0) { focusOnFirstError = false; }
        if (!!onAsyncValidation) {
            fireCallback = true;
        }
        var visPages = this.visiblePages;
        var firstErrorPage = null;
        var res = false;
        for (var i = 0; i < visPages.length; i++) {
            if (visPages[i].hasErrors(fireCallback, false)) {
                if (!firstErrorPage)
                    firstErrorPage = visPages[i];
                res = true;
            }
        }
        if (focusOnFirstError && !!firstErrorPage) {
            this.currentPage = firstErrorPage;
            var questions = firstErrorPage.questions;
            for (var i = 0; i < questions.length; i++) {
                if (questions[i].errors.length > 0) {
                    questions[i].focus(true);
                    break;
                }
            }
        }
        if (res || !onAsyncValidation)
            return res;
        return this.checkForAsyncQuestionValidation(this.getAllQuestions(), function (hasErrors) { return onAsyncValidation(hasErrors); })
            ? undefined
            : false;
    };
    /**
     * Checks whether survey elements (pages, panels, and questions) have unique question names.
     * You can check for unique names for individual page and panel (and all their elements) or a question.
     * If the parameter is not specified, then a survey checks that all its elements have unique names.
     * @param element page, panel or question, it is `null` by default, that means all survey elements will be checked
     */
    SurveyModel.prototype.ensureUniqueNames = function (element) {
        if (element === void 0) { element = null; }
        if (element == null) {
            for (var i = 0; i < this.pages.length; i++) {
                this.ensureUniqueName(this.pages[i]);
            }
        }
        else {
            this.ensureUniqueName(element);
        }
    };
    SurveyModel.prototype.ensureUniqueName = function (element) {
        if (element.isPage) {
            this.ensureUniquePageName(element);
        }
        if (element.isPanel) {
            this.ensureUniquePanelName(element);
        }
        if (element.isPage || element.isPanel) {
            var elements = element.elements;
            for (var i = 0; i < elements.length; i++) {
                this.ensureUniqueNames(elements[i]);
            }
        }
        else {
            this.ensureUniqueQuestionName(element);
        }
    };
    SurveyModel.prototype.ensureUniquePageName = function (element) {
        var _this = this;
        return this.ensureUniqueElementName(element, function (name) {
            return _this.getPageByName(name);
        });
    };
    SurveyModel.prototype.ensureUniquePanelName = function (element) {
        var _this = this;
        return this.ensureUniqueElementName(element, function (name) {
            return _this.getPanelByName(name);
        });
    };
    SurveyModel.prototype.ensureUniqueQuestionName = function (element) {
        var _this = this;
        return this.ensureUniqueElementName(element, function (name) {
            return _this.getQuestionByName(name);
        });
    };
    SurveyModel.prototype.ensureUniqueElementName = function (element, getElementByName) {
        var existingElement = getElementByName(element.name);
        if (!existingElement || existingElement == element)
            return;
        var newName = this.getNewName(element.name);
        while (!!getElementByName(newName)) {
            var newName = this.getNewName(element.name);
        }
        element.name = newName;
    };
    SurveyModel.prototype.getNewName = function (name) {
        var pos = name.length;
        while (pos > 0 && name[pos - 1] >= "0" && name[pos - 1] <= "9") {
            pos--;
        }
        var base = name.substring(0, pos);
        var num = 0;
        if (pos < name.length) {
            num = parseInt(name.substring(pos));
        }
        num++;
        return base + num;
    };
    SurveyModel.prototype.checkIsCurrentPageHasErrors = function (isFocuseOnFirstError) {
        if (isFocuseOnFirstError === void 0) { isFocuseOnFirstError = undefined; }
        return this.checkIsPageHasErrors(this.activePage, isFocuseOnFirstError);
    };
    SurveyModel.prototype.checkIsPageHasErrors = function (page, isFocuseOnFirstError) {
        if (isFocuseOnFirstError === void 0) { isFocuseOnFirstError = undefined; }
        if (isFocuseOnFirstError === undefined) {
            isFocuseOnFirstError = this.focusOnFirstError;
        }
        if (!page)
            return true;
        var res = page.hasErrors(true, isFocuseOnFirstError);
        this.fireValidatedErrorsOnPage(page);
        return res;
    };
    SurveyModel.prototype.fireValidatedErrorsOnPage = function (page) {
        if (this.onValidatedErrorsOnCurrentPage.isEmpty || !page)
            return;
        var questionsOnPage = page.questions;
        var questions = new Array();
        var errors = new Array();
        for (var i = 0; i < questionsOnPage.length; i++) {
            var q = questionsOnPage[i];
            if (q.errors.length > 0) {
                questions.push(q);
                for (var j = 0; j < q.errors.length; j++) {
                    errors.push(q.errors[j]);
                }
            }
        }
        this.onValidatedErrorsOnCurrentPage.fire(this, {
            questions: questions,
            errors: errors,
            page: page,
        });
    };
    /**
     * Navigates user to a previous page. If the current page is the first page, `prevPage` returns `false`. `prevPage` does not perform any checks, required questions can be empty.
     * @see isFirstPage
     */
    SurveyModel.prototype.prevPage = function () {
        if (this.isFirstPage || this.state === "starting")
            return false;
        this.resetNavigationButton();
        var vPages = this.visiblePages;
        var index = vPages.indexOf(this.currentPage);
        this.currentPage = vPages[index - 1];
        return true;
    };
    /**
     * Completes the survey, if the current page is the last one. It returns `false` if the last page has errors.
     * If the last page has no errors, `completeLastPage` calls `doComplete` and returns `true`.
     * @see isCurrentPageHasErrors
     * @see nextPage
     * @see doComplete
     */
    SurveyModel.prototype.completeLastPage = function () {
        var res = this.doCurrentPageComplete(true);
        if (res) {
            this.cancelPreview();
        }
        return res;
    };
    SurveyModel.prototype.navigationMouseDown = function () {
        this.isNavigationButtonPressed = true;
        return true;
    };
    SurveyModel.prototype.resetNavigationButton = function () {
        this.isNavigationButtonPressed = false;
    };
    SurveyModel.prototype.nextPageUIClick = function () {
        if (!!this.mouseDownPage && this.mouseDownPage !== this.activePage)
            return;
        this.mouseDownPage = null;
        this.nextPage();
    };
    SurveyModel.prototype.nextPageMouseDown = function () {
        this.mouseDownPage = this.activePage;
        return this.navigationMouseDown();
    };
    /**
     * Shows preview for the survey. Switches the survey to the "preview" state.
     *
     * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
     * @see showPreviewBeforeComplete
     * @see cancelPreview
     * @see state
     * @see previewText
     * @see editText
     */
    SurveyModel.prototype.showPreview = function () {
        this.resetNavigationButton();
        if (this.hasErrorsOnNavigate(true))
            return false;
        if (this.doServerValidation(true, true))
            return false;
        this.showPreviewCore();
        return true;
    };
    SurveyModel.prototype.showPreviewCore = function () {
        var options = { allowShowPreview: true };
        this.onShowingPreview.fire(this, options);
        this.isShowingPreview = options.allowShowPreview;
    };
    /**
     * Cancels preview and switches back to the "running" state.
     *
     * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
     * @param curPage - A new current page. If the parameter is undefined then the last page becomes the current.
     * @see showPreviewBeforeComplete
     * @see showPreview
     * @see state
     */
    SurveyModel.prototype.cancelPreview = function (curPage) {
        if (curPage === void 0) { curPage = null; }
        if (!this.isShowingPreview)
            return;
        this.isShowingPreview = false;
        if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(curPage) && this.visiblePageCount > 0) {
            curPage = this.visiblePageCount - 1;
        }
        if (curPage !== null) {
            this.currentPage = curPage;
        }
    };
    SurveyModel.prototype.cancelPreviewByPage = function (panel) {
        this.cancelPreview(panel["originalPage"]);
    };
    SurveyModel.prototype.doCurrentPageComplete = function (doComplete) {
        if (this.isValidatingOnServer)
            return false;
        this.resetNavigationButton();
        if (this.hasErrorsOnNavigate(doComplete))
            return false;
        return this.doCurrentPageCompleteCore(doComplete);
    };
    SurveyModel.prototype.doCurrentPageCompleteCore = function (doComplete) {
        if (this.doServerValidation(doComplete))
            return false;
        if (doComplete) {
            this.currentPage.passed = true;
            return this.doComplete();
        }
        this.doNextPage();
        return true;
    };
    Object.defineProperty(SurveyModel.prototype, "isSinglePage", {
        /**
         * Obsolete. Use the `questionsOnPageMode` property instead.
         * @see questionsOnPageMode
         */
        get: function () {
            return this.questionsOnPageMode == "singlePage";
        },
        set: function (val) {
            this.questionsOnPageMode = val ? "singlePage" : "standard";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "questionsOnPageMode", {
        /**
         * Gets or sets a value that specifies how the survey combines questions, panels, and pages.
         *
         * The following options are available:
         *
         * - `singlePage` - combine all survey pages in a single page. Pages will be converted to panels.
         * - `questionPerPage` - show one question per page. Survey will create a separate page for every question.
         */
        get: function () {
            return this.getPropertyValue("questionsOnPageMode");
        },
        set: function (val) {
            this.setPropertyValue("questionsOnPageMode", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "firstPageIsStarted", {
        /**
         * Gets or sets whether the first survey page is a start page. Set this property to `true`, to make the first page a starting page.
         * An end user cannot navigate to the start page and the start page does not affect a survey progress.
         */
        get: function () {
            return this.getPropertyValue("firstPageIsStarted", false);
        },
        set: function (val) {
            this.setPropertyValue("firstPageIsStarted", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.isPageStarted = function (page) {
        return (this.firstPageIsStarted && this.pages.length > 1 && this.pages[0] === page);
    };
    Object.defineProperty(SurveyModel.prototype, "showPreviewBeforeComplete", {
        /**
         * Set this property to "showAllQuestions" or "showAnsweredQuestions" to allow respondents to preview answers before submitting the survey results.
         *
         * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
         * [View Demo](https://surveyjs.io/Examples/Library?id=survey-showpreview (linkStyle))
         * @see showPreview
         * @see cancelPreview
         * @see state
         * @see previewText
         * @see editText
         */
        get: function () {
            return this.getPropertyValue("showPreviewBeforeComplete");
        },
        set: function (val) {
            this.setPropertyValue("showPreviewBeforeComplete", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isShowPreviewBeforeComplete", {
        get: function () {
            var preview = this.showPreviewBeforeComplete;
            return preview == "showAllQuestions" || preview == "showAnsweredQuestions";
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.onFirstPageIsStartedChanged = function () {
        this.isStartedState = this.firstPageIsStarted && this.pages.length > 1;
        this.pageVisibilityChanged(this.pages[0], !this.isStartedState);
    };
    SurveyModel.prototype.onShowingPreviewChanged = function () {
        if (this.isDesignMode)
            return;
        if (this.isShowingPreview) {
            this.runningPages = this.pages.slice(0, this.pages.length);
            this.setupPagesForPageModes(true);
        }
        else {
            if (this.runningPages) {
                this.restoreOrigionalPages(this.runningPages);
            }
            this.runningPages = undefined;
        }
        this.runConditions();
        this.updateAllElementsVisibility(this.pages);
        this.updateVisibleIndexes();
        this.currentPageNo = 0;
    };
    SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
        if (this.isShowingPreview)
            return;
        if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
            if (this.origionalPages) {
                this.restoreOrigionalPages(this.origionalPages);
            }
            this.origionalPages = undefined;
        }
        else {
            if (!oldValue || oldValue == "standard") {
                this.origionalPages = this.pages.slice(0, this.pages.length);
            }
            this.setupPagesForPageModes(this.isSinglePage);
        }
        this.runConditions();
        this.updateVisibleIndexes();
    };
    SurveyModel.prototype.restoreOrigionalPages = function (originalPages) {
        this.questionHashesClear();
        this.pages.splice(0, this.pages.length);
        for (var i = 0; i < originalPages.length; i++) {
            this.pages.push(originalPages[i]);
        }
    };
    SurveyModel.prototype.getPageStartIndex = function () {
        return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
    };
    SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage) {
        this.questionHashesClear();
        var startIndex = this.getPageStartIndex();
        _super.prototype.startLoadingFromJson.call(this);
        var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
        var deletedLen = this.pages.length - startIndex;
        this.pages.splice(startIndex, deletedLen);
        for (var i = 0; i < newPages.length; i++) {
            this.pages.push(newPages[i]);
        }
        _super.prototype.endLoadingFromJson.call(this);
        for (var i = 0; i < newPages.length; i++) {
            newPages[i].setSurveyImpl(this, true);
        }
        this.doElementsOnLoad();
        this.updateCurrentPage();
    };
    SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
        if (isSinglePage) {
            return [this.createSinglePage(startIndex)];
        }
        return this.createPagesForEveryQuestion(startIndex);
    };
    SurveyModel.prototype.createSinglePage = function (startIndex) {
        var single = this.createNewPage("all");
        single.setSurveyImpl(this);
        for (var i = startIndex; i < this.pages.length; i++) {
            var page = this.pages[i];
            var panel = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass("panel");
            panel.originalPage = page;
            single.addPanel(panel);
            var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toJsonObject(page);
            new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toObject(json, panel);
            if (!this.showPageTitles) {
                panel.title = "";
            }
        }
        return single;
    };
    SurveyModel.prototype.createPagesForEveryQuestion = function (startIndex) {
        var res = [];
        for (var i = startIndex; i < this.pages.length; i++) {
            var originalPage = this.pages[i];
            // Initialize randomization
            originalPage.setWasShown(true);
            for (var j = 0; j < originalPage.elements.length; j++) {
                var originalElement = originalPage.elements[j];
                var element = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(originalElement.getType());
                if (!element)
                    continue;
                var jsonObj = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]();
                //Deserialize page properties only, excluding elements
                jsonObj.lightSerializing = true;
                var pageJson = jsonObj.toJsonObject(originalPage);
                var page = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(originalPage.getType());
                page.fromJSON(pageJson);
                page.name = originalElement.name;
                page.setSurveyImpl(this);
                res.push(page);
                var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toJsonObject(originalElement);
                page.addElement(element);
                new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toObject(json, element);
                for (var k = 0; k < page.questions.length; k++) {
                    this.questionHashesAdded(page.questions[k]);
                }
            }
        }
        return res;
    };
    Object.defineProperty(SurveyModel.prototype, "isFirstPage", {
        /**
         * Gets whether the current page is the first one.
         */
        get: function () {
            return this.getPropertyValue("isFirstPage");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isLastPage", {
        /**
         * Gets whether the current page is the last one.
         */
        get: function () {
            return this.getPropertyValue("isLastPage");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateButtonsVisibility = function () {
        this.updateIsFirstLastPageState();
        this.setPropertyValue("isShowPrevButton", this.calcIsShowPrevButton());
        this.setPropertyValue("isShowNextButton", this.calcIsShowNextButton());
        this.setPropertyValue("isCompleteButtonVisible", this.calcIsCompleteButtonVisible());
        this.setPropertyValue("isPreviewButtonVisible", this.calcIsPreviewButtonVisible());
        this.setPropertyValue("isCancelPreviewButtonVisible", this.calcIsCancelPreviewButtonVisible());
    };
    Object.defineProperty(SurveyModel.prototype, "isShowPrevButton", {
        get: function () {
            return this.getPropertyValue("isShowPrevButton");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isShowNextButton", {
        get: function () {
            return this.getPropertyValue("isShowNextButton");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isCompleteButtonVisible", {
        get: function () {
            return this.getPropertyValue("isCompleteButtonVisible");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isPreviewButtonVisible", {
        get: function () {
            return this.getPropertyValue("isPreviewButtonVisible");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isCancelPreviewButtonVisible", {
        get: function () {
            return this.getPropertyValue("isCancelPreviewButtonVisible");
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateIsFirstLastPageState = function () {
        var curPage = this.currentPage;
        this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage);
        this.setPropertyValue("isLastPage", !!curPage && curPage === this.lastVisiblePage);
    };
    SurveyModel.prototype.calcIsShowPrevButton = function () {
        if (this.isFirstPage || !this.showPrevButton || this.state !== "running")
            return false;
        var page = this.visiblePages[this.currentPageNo - 1];
        return this.getPageMaxTimeToFinish(page) <= 0;
    };
    SurveyModel.prototype.calcIsShowNextButton = function () {
        return this.state === "running" && !this.isLastPage && !this.canBeCompletedByTrigger;
    };
    SurveyModel.prototype.calcIsCompleteButtonVisible = function () {
        var state = this.state;
        return this.isEditMode && (this.state === "running" &&
            (this.isLastPage && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
            || state === "preview");
    };
    SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
        return (this.isEditMode &&
            this.isShowPreviewBeforeComplete &&
            this.state == "running" && this.isLastPage);
    };
    SurveyModel.prototype.calcIsCancelPreviewButtonVisible = function () {
        return (this.isEditMode &&
            this.isShowPreviewBeforeComplete &&
            this.state == "preview");
    };
    Object.defineProperty(SurveyModel.prototype, "firstVisiblePage", {
        get: function () {
            var pages = this.pages;
            for (var i = 0; i < pages.length; i++) {
                if (this.isPageInVisibleList(pages[i]))
                    return pages[i];
            }
            return null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "lastVisiblePage", {
        get: function () {
            var pages = this.pages;
            for (var i = pages.length - 1; i >= 0; i--) {
                if (this.isPageInVisibleList(pages[i]))
                    return pages[i];
            }
            return null;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Completes the survey.
     *
     * Calling this function performs the following tasks:
     *
     * - writes cookie if the `cookieName` property is not empty
     * - sets the survey into `completed` state
     * - fires the `onComplete` event
     * - calls `sendResult` function.
     *
     * Calling the `doComplete` function does not perform any validation, unlike the `completeLastPage` function.
     * The function can return false, if you set options.allowComplete to false in onCompleting event. Otherwise it returns true.
     * It calls `navigateToUrl` after calling `onComplete` event.
     * In case calling `options.showDataSaving` callback in the `onComplete` event, `navigateToUrl` is used on calling `options.showDataSavingSuccess` callback.
     * @see completeLastPage
     * @see onCompleting
     * @see cookieName
     * @see state
     * @see onComplete
     * @see surveyPostId
     * @see completeLastPage
     * @see navigateToUrl
     * @see navigateToUrlOnCondition
     */
    SurveyModel.prototype.doComplete = function (isCompleteOnTrigger) {
        if (isCompleteOnTrigger === void 0) { isCompleteOnTrigger = false; }
        var onCompletingOptions = {
            allowComplete: true,
            isCompleteOnTrigger: isCompleteOnTrigger,
        };
        this.onCompleting.fire(this, onCompletingOptions);
        if (!onCompletingOptions.allowComplete) {
            this.isCompleted = false;
            return false;
        }
        var previousCookie = this.hasCookie;
        this.stopTimer();
        this.setCompleted();
        this.clearUnusedValues();
        this.setCookie();
        var self = this;
        var savingDataStarted = false;
        var onCompleteOptions = {
            isCompleteOnTrigger: isCompleteOnTrigger,
            showDataSaving: function (text) {
                savingDataStarted = true;
                self.setCompletedState("saving", text);
            },
            showDataSavingError: function (text) {
                self.setCompletedState("error", text);
            },
            showDataSavingSuccess: function (text) {
                self.setCompletedState("success", text);
                self.navigateTo();
            },
            showDataSavingClear: function (text) {
                self.setCompletedState("", "");
            },
        };
        this.onComplete.fire(this, onCompleteOptions);
        if (!previousCookie && this.surveyPostId) {
            this.sendResult();
        }
        if (!savingDataStarted) {
            this.navigateTo();
        }
        return true;
    };
    /**
     * Starts the survey. Changes the survey mode from "starting" to "running". Call this function if your survey has a start page, otherwise this function does nothing.
     * @see firstPageIsStarted
     */
    SurveyModel.prototype.start = function () {
        if (!this.firstPageIsStarted)
            return false;
        if (this.checkIsPageHasErrors(this.startedPage, true))
            return false;
        this.isStartedState = false;
        this.startTimerFromUI();
        this.onStarted.fire(this, {});
        this.updateVisibleIndexes();
        if (!!this.currentPage) {
            this.currentPage.locStrsChanged();
        }
        return true;
    };
    Object.defineProperty(SurveyModel.prototype, "isValidatingOnServer", {
        /**
         * Gets whether the question values on the current page are validating on the server at the current moment.
         * @see onServerValidateQuestions
         */
        get: function () {
            return this.getPropertyValue("isValidatingOnServer", false);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.setIsValidatingOnServer = function (val) {
        if (val == this.isValidatingOnServer)
            return;
        this.setPropertyValue("isValidatingOnServer", val);
        this.onIsValidatingOnServerChanged();
    };
    SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview) {
        var self = this;
        var options = {
            data: {},
            errors: {},
            survey: this,
            complete: function () {
                self.completeServerValidation(options, isPreview);
            },
        };
        if (doComplete && this.checkErrorsMode === "onComplete") {
            options.data = this.data;
        }
        else {
            var questions = this.activePage.questions;
            for (var i = 0; i < questions.length; i++) {
                var question = questions[i];
                if (!question.visible)
                    continue;
                var value = this.getValue(question.getValueName());
                if (!this.isValueEmpty(value))
                    options.data[question.getValueName()] = value;
            }
        }
        return options;
    };
    SurveyModel.prototype.onIsValidatingOnServerChanged = function () { };
    SurveyModel.prototype.doServerValidation = function (doComplete, isPreview) {
        var _this = this;
        if (isPreview === void 0) { isPreview = false; }
        if (!this.onServerValidateQuestions ||
            this.onServerValidateQuestions.isEmpty)
            return false;
        if (!doComplete && this.checkErrorsMode === "onComplete")
            return false;
        this.setIsValidatingOnServer(true);
        var isFunc = typeof this.onServerValidateQuestions === "function";
        this.serverValidationEventCount = !isFunc ? this.onServerValidateQuestions.length : 1;
        if (isFunc) {
            this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview));
        }
        else {
            this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview); });
        }
        return true;
    };
    SurveyModel.prototype.completeServerValidation = function (options, isPreview) {
        if (this.serverValidationEventCount > 1) {
            this.serverValidationEventCount--;
            if (!!options && !!options.errors && Object.keys(options.errors).length === 0)
                return;
        }
        this.serverValidationEventCount = 0;
        this.setIsValidatingOnServer(false);
        if (!options && !options.survey)
            return;
        var self = options.survey;
        var hasErrors = false;
        if (options.errors) {
            var hasToFocus = this.focusOnFirstError;
            for (var name in options.errors) {
                var question = self.getQuestionByName(name);
                if (question && question["errors"]) {
                    hasErrors = true;
                    question.addError(new _error__WEBPACK_IMPORTED_MODULE_9__["CustomError"](options.errors[name], this));
                    if (hasToFocus) {
                        hasToFocus = false;
                        if (!!question.page) {
                            this.currentPage = question.page;
                        }
                        question.focus(true);
                    }
                }
            }
            this.fireValidatedErrorsOnPage(this.currentPage);
        }
        if (!hasErrors) {
            if (isPreview) {
                this.showPreviewCore();
            }
            else {
                if (self.isLastPage)
                    self.doComplete();
                else
                    self.doNextPage();
            }
        }
    };
    SurveyModel.prototype.doNextPage = function () {
        var curPage = this.currentPage;
        this.checkOnPageTriggers();
        if (!this.isCompleted) {
            if (this.sendResultOnPageNext) {
                this.sendResult(this.surveyPostId, this.clientId, true);
            }
            if (curPage === this.currentPage) {
                var vPages = this.visiblePages;
                var index = vPages.indexOf(this.currentPage);
                this.currentPage = vPages[index + 1];
            }
        }
        else {
            this.doComplete(true);
        }
    };
    SurveyModel.prototype.setCompleted = function () {
        this.isCompleted = true;
    };
    SurveyModel.prototype.canBeCompleted = function () {
        if (!_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].changeNavigationButtonsOnCompleteTrigger)
            return;
        if (!this.canBeCompletedByTrigger) {
            this.canBeCompletedByTrigger = true;
            this.updateButtonsVisibility();
        }
    };
    Object.defineProperty(SurveyModel.prototype, "processedCompletedHtml", {
        /**
         * Returns the HTML content for the complete page.
         * @see completedHtml
         */
        get: function () {
            var html = this.renderedCompletedHtml;
            return !!html ? this.processHtml(html) : "";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "processedCompletedBeforeHtml", {
        /**
         * Returns the HTML content, that is shown to a user that had completed the survey before.
         * @see completedHtml
         * @see cookieName
         */
        get: function () {
            return this.processHtml(this.completedBeforeHtml);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "processedLoadingHtml", {
        /**
         * Returns the HTML content, that is shows when a survey loads the survey JSON.
         */
        get: function () {
            return this.processHtml(this.loadingHtml);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getProgressInfo = function () {
        var pages = this.isDesignMode ? this.pages : this.visiblePages;
        return _survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].getProgressInfoByElements(pages, false);
    };
    Object.defineProperty(SurveyModel.prototype, "progressText", {
        /**
         * Returns the text for the current progress.
         */
        get: function () {
            var res = this.getPropertyValue("progressText", "");
            if (!res) {
                this.updateProgressText();
                res = this.getPropertyValue("progressText", "");
            }
            return res;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.updateProgressText = function (onValueChanged) {
        if (onValueChanged === void 0) { onValueChanged = false; }
        if (this.isCalculatingProgressText)
            return;
        if (onValueChanged &&
            this.progressBarType == "pages" &&
            this.onProgressText.isEmpty)
            return;
        this.isCalculatingProgressText = true;
        this.setPropertyValue("progressText", this.getProgressText());
        this.setPropertyValue("progressValue", this.getProgress());
        this.isCalculatingProgressText = false;
    };
    SurveyModel.prototype.getProgressText = function () {
        if (!this.isDesignMode && this.currentPage == null)
            return "";
        var options = {
            questionCount: 0,
            answeredQuestionCount: 0,
            requiredQuestionCount: 0,
            requiredAnsweredQuestionCount: 0,
            text: "",
        };
        var type = this.progressBarType.toLowerCase();
        if (type === "questions" ||
            type === "requiredquestions" ||
            type === "correctquestions" ||
            !this.onProgressText.isEmpty) {
            var info = this.getProgressInfo();
            options.questionCount = info.questionCount;
            options.answeredQuestionCount = info.answeredQuestionCount;
            options.requiredQuestionCount = info.requiredQuestionCount;
            options.requiredAnsweredQuestionCount =
                info.requiredAnsweredQuestionCount;
        }
        options.text = this.getProgressTextCore(options);
        this.onProgressText.fire(this, options);
        return options.text;
    };
    SurveyModel.prototype.getProgressTextCore = function (info) {
        var type = this.progressBarType.toLowerCase();
        if (type === "questions") {
            return this.getLocalizationFormatString("questionsProgressText", info.answeredQuestionCount, info.questionCount);
        }
        if (type === "requiredquestions") {
            return this.getLocalizationFormatString("questionsProgressText", info.requiredAnsweredQuestionCount, info.requiredQuestionCount);
        }
        if (type === "correctquestions") {
            var correctAnswersCount = this.getCorrectedAnswerCount();
            return this.getLocalizationFormatString("questionsProgressText", correctAnswersCount, info.questionCount);
        }
        var vPages = this.isDesignMode ? this.pages : this.visiblePages;
        var index = vPages.indexOf(this.currentPage) + 1;
        return this.getLocalizationFormatString("progressText", index, vPages.length);
    };
    SurveyModel.prototype.getRootCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
            .append(this.css.root)
            .append(this.css.rootMobile, this.isMobile)
            .append(this.css.rootReadOnly, this.mode === "display")
            .toString();
    };
    SurveyModel.prototype.afterRenderSurvey = function (htmlElement) {
        var _this = this;
        this.destroyResizeObserver();
        if (Array.isArray(htmlElement)) {
            htmlElement = _survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].GetFirstNonTextElement(htmlElement);
        }
        var observedElement = htmlElement;
        var cssVariables = this.css.variables;
        if (!!cssVariables) {
            var mobileWidth_1 = Number.parseFloat(window.getComputedStyle(observedElement).getPropertyValue(cssVariables.mobileWidth));
            if (!!mobileWidth_1) {
                var isProcessed_1 = false;
                this.resizeObserver = new ResizeObserver(function () {
                    if (isProcessed_1 || !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["isContainerVisible"])(observedElement)) {
                        isProcessed_1 = false;
                    }
                    else {
                        isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1);
                    }
                });
                this.resizeObserver.observe(observedElement);
            }
        }
        this.onAfterRenderSurvey.fire(this, {
            survey: this,
            htmlElement: htmlElement,
        });
    };
    SurveyModel.prototype.processResponsiveness = function (width, mobileWidth) {
        var isMobile = width < mobileWidth;
        if (this.isMobile === isMobile) {
            return false;
        }
        else {
            this.setIsMobile(isMobile);
            return true;
        }
    };
    SurveyModel.prototype.destroyResizeObserver = function () {
        if (!!this.resizeObserver) {
            this.resizeObserver.disconnect();
            this.resizeObserver = undefined;
        }
    };
    SurveyModel.prototype.updateQuestionCssClasses = function (question, cssClasses) {
        this.onUpdateQuestionCssClasses.fire(this, {
            question: question,
            cssClasses: cssClasses,
        });
    };
    SurveyModel.prototype.updatePanelCssClasses = function (panel, cssClasses) {
        this.onUpdatePanelCssClasses.fire(this, {
            panel: panel,
            cssClasses: cssClasses,
        });
    };
    SurveyModel.prototype.updatePageCssClasses = function (page, cssClasses) {
        this.onUpdatePageCssClasses.fire(this, {
            page: page,
            cssClasses: cssClasses,
        });
    };
    SurveyModel.prototype.updateChoiceItemCss = function (question, options) {
        options.question = question;
        this.onUpdateChoiceItemCss.fire(this, options);
    };
    SurveyModel.prototype.afterRenderPage = function (htmlElement) {
        var _this = this;
        if (!this.isDesignMode) {
            setTimeout(function () { return _this.scrollToTopOnPageChange(!_this.isFirstPageRendering); }, 1);
        }
        this.isFirstPageRendering = false;
        if (this.onAfterRenderPage.isEmpty)
            return;
        this.onAfterRenderPage.fire(this, {
            page: this.activePage,
            htmlElement: htmlElement,
        });
    };
    SurveyModel.prototype.afterRenderHeader = function (htmlElement) {
        if (this.onAfterRenderHeader.isEmpty)
            return;
        this.onAfterRenderHeader.fire(this, {
            htmlElement: htmlElement,
        });
    };
    SurveyModel.prototype.afterRenderQuestion = function (question, htmlElement) {
        this.onAfterRenderQuestion.fire(this, {
            question: question,
            htmlElement: htmlElement,
        });
    };
    SurveyModel.prototype.afterRenderQuestionInput = function (question, htmlElement) {
        if (this.onAfterRenderQuestionInput.isEmpty)
            return;
        var id = question.inputId;
        if (!!id && htmlElement.id !== id && typeof document !== "undefined") {
            var el = document.getElementById(id);
            if (!!el) {
                htmlElement = el;
            }
        }
        this.onAfterRenderQuestionInput.fire(this, {
            question: question,
            htmlElement: htmlElement,
        });
    };
    SurveyModel.prototype.afterRenderPanel = function (panel, htmlElement) {
        this.onAfterRenderPanel.fire(this, {
            panel: panel,
            htmlElement: htmlElement,
        });
    };
    SurveyModel.prototype.whenQuestionFocusIn = function (question) {
        this.onFocusInQuestion.fire(this, {
            question: question
        });
    };
    SurveyModel.prototype.whenPanelFocusIn = function (panel) {
        this.onFocusInPanel.fire(this, {
            panel: panel
        });
    };
    SurveyModel.prototype.rebuildQuestionChoices = function () {
        this.getAllQuestions().forEach(function (q) { return q.surveyChoiceItemVisibilityChange(); });
    };
    SurveyModel.prototype.canChangeChoiceItemsVisibility = function () {
        return !this.onShowingChoiceItem.isEmpty;
    };
    SurveyModel.prototype.getChoiceItemVisibility = function (question, item, val) {
        var options = { question: question, item: item, visible: val };
        this.onShowingChoiceItem.fire(this, options);
        return options.visible;
    };
    SurveyModel.prototype.loadQuestionChoices = function (options) {
        this.onChoicesLazyLoad.fire(this, options);
    };
    SurveyModel.prototype.getChoiceDisplayValue = function (options) {
        this.onGetChoiceDisplayValue.fire(this, options);
    };
    SurveyModel.prototype.matrixBeforeRowAdded = function (options) {
        this.onMatrixBeforeRowAdded.fire(this, options);
    };
    SurveyModel.prototype.matrixRowAdded = function (question, row) {
        this.onMatrixRowAdded.fire(this, { question: question, row: row });
    };
    SurveyModel.prototype.getQuestionByValueNameFromArray = function (valueName, name, index) {
        var questions = this.getQuestionsByValueName(valueName);
        if (!questions)
            return;
        for (var i = 0; i < questions.length; i++) {
            var res = questions[i].getQuestionFromArray(name, index);
            if (!!res)
                return res;
        }
        return null;
    };
    SurveyModel.prototype.matrixRowRemoved = function (question, rowIndex, row) {
        this.onMatrixRowRemoved.fire(this, {
            question: question,
            rowIndex: rowIndex,
            row: row,
        });
    };
    SurveyModel.prototype.matrixRowRemoving = function (question, rowIndex, row) {
        var options = {
            question: question,
            rowIndex: rowIndex,
            row: row,
            allow: true,
        };
        this.onMatrixRowRemoving.fire(this, options);
        return options.allow;
    };
    SurveyModel.prototype.matrixAllowRemoveRow = function (question, rowIndex, row) {
        var options = {
            question: question,
            rowIndex: rowIndex,
            row: row,
            allow: true,
        };
        this.onMatrixAllowRemoveRow.fire(this, options);
        return options.allow;
    };
    SurveyModel.prototype.matrixCellCreating = function (question, options) {
        options.question = question;
        this.onMatrixCellCreating.fire(this, options);
    };
    SurveyModel.prototype.matrixCellCreated = function (question, options) {
        options.question = question;
        this.onMatrixCellCreated.fire(this, options);
    };
    SurveyModel.prototype.matrixAfterCellRender = function (question, options) {
        options.question = question;
        this.onMatrixAfterCellRender.fire(this, options);
    };
    SurveyModel.prototype.matrixCellValueChanged = function (question, options) {
        options.question = question;
        this.onMatrixCellValueChanged.fire(this, options);
    };
    SurveyModel.prototype.matrixCellValueChanging = function (question, options) {
        options.question = question;
        this.onMatrixCellValueChanging.fire(this, options);
    };
    Object.defineProperty(SurveyModel.prototype, "isValidateOnValueChanging", {
        get: function () {
            return this.checkErrorsMode === "onValueChanging";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isValidateOnValueChanged", {
        get: function () {
            return this.checkErrorsMode === "onValueChanged";
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.matrixCellValidate = function (question, options) {
        options.question = question;
        this.onMatrixCellValidate.fire(this, options);
        return options.error ? new _error__WEBPACK_IMPORTED_MODULE_9__["CustomError"](options.error, this) : null;
    };
    SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel) {
        if (!this.isLoadingFromJson) {
            this.updateVisibleIndexes();
        }
        if (this.onDynamicPanelAdded.isEmpty)
            return;
        var panels = question.panels;
        if (panelIndex === undefined) {
            panelIndex = panels.length - 1;
            panel = panels[panelIndex];
        }
        this.onDynamicPanelAdded.fire(this, { question: question, panel: panel, panelIndex: panelIndex });
    };
    SurveyModel.prototype.dynamicPanelRemoved = function (question, panelIndex, panel) {
        var questions = !!panel ? panel.questions : [];
        for (var i = 0; i < questions.length; i++) {
            questions[i].clearOnDeletingContainer();
        }
        this.updateVisibleIndexes();
        this.onDynamicPanelRemoved.fire(this, {
            question: question,
            panelIndex: panelIndex,
            panel: panel,
        });
    };
    SurveyModel.prototype.dynamicPanelRemoving = function (question, panelIndex, panel) {
        var options = {
            question: question,
            panelIndex: panelIndex,
            panel: panel,
            allow: true
        };
        this.onDynamicPanelRemoving.fire(this, options);
        return options.allow;
    };
    SurveyModel.prototype.dynamicPanelItemValueChanged = function (question, options) {
        options.question = question;
        this.onDynamicPanelItemValueChanged.fire(this, options);
    };
    SurveyModel.prototype.dragAndDropAllow = function (options) {
        options.allow = true;
        this.onDragDropAllow.fire(this, options);
        return options.allow;
    };
    SurveyModel.prototype.elementContentVisibilityChanged = function (element) {
        if (this.currentPage) {
            this.currentPage.ensureRowsVisibility();
        }
        this.onElementContentVisibilityChanged.fire(this, { element: element });
    };
    SurveyModel.prototype.getUpdatedElementTitleActions = function (element, titleActions) {
        if (element.isPage)
            return this.getUpdatedPageTitleActions(element, titleActions);
        if (element.isPanel)
            return this.getUpdatedPanelTitleActions(element, titleActions);
        return this.getUpdatedQuestionTitleActions(element, titleActions);
    };
    SurveyModel.prototype.getUpdatedQuestionTitleActions = function (question, titleActions) {
        var options = {
            question: question,
            titleActions: titleActions,
        };
        this.onGetQuestionTitleActions.fire(this, options);
        return options.titleActions;
    };
    SurveyModel.prototype.getUpdatedPanelTitleActions = function (panel, titleActions) {
        var options = {
            panel: panel,
            titleActions: titleActions,
        };
        this.onGetPanelTitleActions.fire(this, options);
        return options.titleActions;
    };
    SurveyModel.prototype.getUpdatedPageTitleActions = function (page, titleActions) {
        var options = {
            page: page,
            titleActions: titleActions,
        };
        this.onGetPageTitleActions.fire(this, options);
        return options.titleActions;
    };
    SurveyModel.prototype.getUpdatedMatrixRowActions = function (question, row, actions) {
        var options = {
            question: question,
            actions: actions,
            row: row,
        };
        this.onGetMatrixRowActions.fire(this, options);
        return options.actions;
    };
    SurveyModel.prototype.scrollElementToTop = function (element, question, page, id) {
        var options = {
            element: element,
            question: question,
            page: page,
            elementId: id,
            cancel: false,
        };
        this.onScrollingElementToTop.fire(this, options);
        if (!options.cancel) {
            _survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].ScrollElementToTop(options.elementId);
        }
    };
    /**
     * Uploads a file to server.
     * @param question a file question object
     * @param name a question name
     * @param files files to upload
     * @param uploadingCallback a call back function to get the status on uploading the files
     */
    SurveyModel.prototype.uploadFiles = function (question, name, files, uploadingCallback) {
        if (this.onUploadFiles.isEmpty) {
            uploadingCallback("error", files);
        }
        else {
            this.onUploadFiles.fire(this, {
                question: question,
                name: name,
                files: files || [],
                callback: uploadingCallback,
            });
        }
        if (this.surveyPostId) {
            this.uploadFilesCore(name, files, uploadingCallback);
        }
    };
    /**
     * Downloads a file from server
     * @param name a question name
     * @param fileValue a single file question value
     * @param callback a call back function to get the status on downloading the file and the downloaded file content
     */
    SurveyModel.prototype.downloadFile = function (question, questionName, fileValue, callback) {
        if (this.onDownloadFile.isEmpty) {
            !!callback && callback("success", fileValue.content || fileValue);
        }
        this.onDownloadFile.fire(this, {
            question: question,
            name: questionName,
            content: fileValue.content || fileValue,
            fileValue: fileValue,
            callback: callback,
        });
    };
    /**
     * Clears files from server.
     * @param question question
     * @param name question name
     * @param value file question value
     * @param callback call back function to get the status of the clearing operation
     */
    SurveyModel.prototype.clearFiles = function (question, name, value, fileName, callback) {
        if (this.onClearFiles.isEmpty) {
            !!callback && callback("success", value);
        }
        this.onClearFiles.fire(this, {
            question: question,
            name: name,
            value: value,
            fileName: fileName,
            callback: callback,
        });
    };
    SurveyModel.prototype.updateChoicesFromServer = function (question, choices, serverResult) {
        var options = {
            question: question,
            choices: choices,
            serverResult: serverResult,
        };
        this.onLoadChoicesFromServer.fire(this, options);
        return options.choices;
    };
    SurveyModel.prototype.loadedChoicesFromServer = function (question) {
        this.locStrsChanged();
    };
    SurveyModel.prototype.createSurveyService = function () {
        return new _dxSurveyService__WEBPACK_IMPORTED_MODULE_7__["dxSurveyService"]();
    };
    SurveyModel.prototype.uploadFilesCore = function (name, files, uploadingCallback) {
        var _this = this;
        var responses = [];
        files.forEach(function (file) {
            if (uploadingCallback)
                uploadingCallback("uploading", file);
            _this.createSurveyService().sendFile(_this.surveyPostId, file, function (success, response) {
                if (success) {
                    responses.push({ content: response, file: file });
                    if (responses.length === files.length) {
                        if (uploadingCallback)
                            uploadingCallback("success", responses);
                    }
                }
                else {
                    if (uploadingCallback)
                        uploadingCallback("error", {
                            response: response,
                            file: file,
                        });
                }
            });
        });
    };
    SurveyModel.prototype.getPage = function (index) {
        return this.pages[index];
    };
    /**
     * Adds an existing page to the survey.
     * @param page a newly added page
     * @param index - a page index to where insert a page. It is -1 by default and the page will be added into the end.
     * @see addNewPage
     */
    SurveyModel.prototype.addPage = function (page, index) {
        if (index === void 0) { index = -1; }
        if (page == null)
            return;
        if (index < 0 || index >= this.pages.length) {
            this.pages.push(page);
        }
        else {
            this.pages.splice(index, 0, page);
        }
    };
    /**
     * Creates a new page and adds it to a survey. Generates a new name if the `name` parameter is not specified.
     * @param name a page name
     * @param index - a page index to where insert a new page. It is -1 by default and the page will be added into the end.
     * @see addPage
     */
    SurveyModel.prototype.addNewPage = function (name, index) {
        if (name === void 0) { name = null; }
        if (index === void 0) { index = -1; }
        var page = this.createNewPage(name);
        this.addPage(page, index);
        return page;
    };
    /**
     * Removes a page from a survey.
     * @param page
     */
    SurveyModel.prototype.removePage = function (page) {
        var index = this.pages.indexOf(page);
        if (index < 0)
            return;
        this.pages.splice(index, 1);
        if (this.currentPage == page) {
            this.currentPage = this.pages.length > 0 ? this.pages[0] : null;
        }
    };
    /**
     * Returns a question by its name.
     * @param name a question name
     * @param caseInsensitive
     * @see getQuestionByValueName
     */
    SurveyModel.prototype.getQuestionByName = function (name, caseInsensitive) {
        if (caseInsensitive === void 0) { caseInsensitive = false; }
        if (!name)
            return null;
        if (caseInsensitive) {
            name = name.toLowerCase();
        }
        var hash = !!caseInsensitive
            ? this.questionHashes.namesInsensitive
            : this.questionHashes.names;
        var res = hash[name];
        if (!res)
            return null;
        return res[0];
    };
    /**
     * Returns a question by its value name
     * @param valueName a question name
     * @param caseInsensitive
     * @see getQuestionByName
     * @see getQuestionsByValueName
     * @see Question.valueName
     */
    SurveyModel.prototype.getQuestionByValueName = function (valueName, caseInsensitive) {
        if (caseInsensitive === void 0) { caseInsensitive = false; }
        var res = this.getQuestionsByValueName(valueName, caseInsensitive);
        return !!res ? res[0] : null;
    };
    /**
     * Returns all questions by their valueName. name property is used if valueName property is empty.
     * @param valueName a question name
     * @param caseInsensitive
     * @see getQuestionByName
     * @see getQuestionByValueName
     * @see Question.valueName
     */
    SurveyModel.prototype.getQuestionsByValueName = function (valueName, caseInsensitive) {
        if (caseInsensitive === void 0) { caseInsensitive = false; }
        var hash = !!caseInsensitive
            ? this.questionHashes.valueNamesInsensitive
            : this.questionHashes.valueNames;
        var res = hash[valueName];
        if (!res)
            return null;
        return res;
    };
    SurveyModel.prototype.getCalculatedValueByName = function (name) {
        for (var i = 0; i < this.calculatedValues.length; i++) {
            if (name == this.calculatedValues[i].name)
                return this.calculatedValues[i];
        }
        return null;
    };
    /**
     * Gets a list of questions by their names.
     * @param names an array of question names
     * @param caseInsensitive
     */
    SurveyModel.prototype.getQuestionsByNames = function (names, caseInsensitive) {
        if (caseInsensitive === void 0) { caseInsensitive = false; }
        var result = [];
        if (!names)
            return result;
        for (var i = 0; i < names.length; i++) {
            if (!names[i])
                continue;
            var question = this.getQuestionByName(names[i], caseInsensitive);
            if (question)
                result.push(question);
        }
        return result;
    };
    /**
     * Returns a page on which an element (question or panel) is placed.
     * @param element Question or Panel
     */
    SurveyModel.prototype.getPageByElement = function (element) {
        for (var i = 0; i < this.pages.length; i++) {
            var page = this.pages[i];
            if (page.containsElement(element))
                return page;
        }
        return null;
    };
    /**
     * Returns a page on which a question is located.
     * @param question
     */
    SurveyModel.prototype.getPageByQuestion = function (question) {
        return this.getPageByElement(question);
    };
    /**
     * Returns a page by it's name.
     * @param name
     */
    SurveyModel.prototype.getPageByName = function (name) {
        for (var i = 0; i < this.pages.length; i++) {
            if (this.pages[i].name == name)
                return this.pages[i];
        }
        return null;
    };
    /**
     * Returns a list of pages by their names.
     * @param names a list of page names
     */
    SurveyModel.prototype.getPagesByNames = function (names) {
        var result = [];
        if (!names)
            return result;
        for (var i = 0; i < names.length; i++) {
            if (!names[i])
                continue;
            var page = this.getPageByName(names[i]);
            if (page)
                result.push(page);
        }
        return result;
    };
    /**
     * Returns a list of all questions in a survey.
     * @param visibleOnly set it `true`, if you want to get only visible questions
     */
    SurveyModel.prototype.getAllQuestions = function (visibleOnly, includingDesignTime) {
        if (visibleOnly === void 0) { visibleOnly = false; }
        if (includingDesignTime === void 0) { includingDesignTime = false; }
        var result = new Array();
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].addQuestionsToList(result, visibleOnly, includingDesignTime);
        }
        return result;
    };
    /**
     * Returns quiz questions. All visible questions that has input(s) widgets.
     * @see getQuizQuestionCount
     */
    SurveyModel.prototype.getQuizQuestions = function () {
        var result = new Array();
        var startIndex = this.getPageStartIndex();
        for (var i = startIndex; i < this.pages.length; i++) {
            if (!this.pages[i].isVisible)
                continue;
            var questions = this.pages[i].questions;
            for (var j = 0; j < questions.length; j++) {
                var q = questions[j];
                if (q.quizQuestionCount > 0) {
                    result.push(q);
                }
            }
        }
        return result;
    };
    /**
     * Returns a panel by its name.
     * @param name a panel name
     * @param caseInsensitive
     * @see getQuestionByName
     */
    SurveyModel.prototype.getPanelByName = function (name, caseInsensitive) {
        if (caseInsensitive === void 0) { caseInsensitive = false; }
        var panels = this.getAllPanels();
        if (caseInsensitive)
            name = name.toLowerCase();
        for (var i = 0; i < panels.length; i++) {
            var panelName = panels[i].name;
            if (caseInsensitive)
                panelName = panelName.toLowerCase();
            if (panelName == name)
                return panels[i];
        }
        return null;
    };
    /**
     * Returns a list of all survey's panels.
     */
    SurveyModel.prototype.getAllPanels = function (visibleOnly, includingDesignTime) {
        if (visibleOnly === void 0) { visibleOnly = false; }
        if (includingDesignTime === void 0) { includingDesignTime = false; }
        var result = new Array();
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].addPanelsIntoList(result, visibleOnly, includingDesignTime);
        }
        return result;
    };
    /**
     * Creates and returns a new page, but do not add it into the survey.
     * You can use addPage(page) function to add it into survey later.
     * @see addPage
     * @see addNewPage
     */
    SurveyModel.prototype.createNewPage = function (name) {
        var page = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass("page");
        page.name = name;
        return page;
    };
    SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue) {
        if (!!this.editingObj) {
            var prop = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty(this.editingObj.getType(), valueName);
            if (!!prop)
                newValue = prop.settingValue(this.editingObj, newValue);
        }
        if (this.onValueChanging.isEmpty)
            return newValue;
        var options = {
            name: valueName,
            question: this.getQuestionByValueName(valueName),
            value: this.getUnbindValue(newValue),
            oldValue: this.getValue(valueName),
        };
        this.onValueChanging.fire(this, options);
        return options.value;
    };
    SurveyModel.prototype.updateQuestionValue = function (valueName, newValue) {
        if (this.isLoadingFromJson)
            return;
        var questions = this.getQuestionsByValueName(valueName);
        if (!!questions) {
            for (var i = 0; i < questions.length; i++) {
                var qValue = questions[i].value;
                if ((qValue === newValue && Array.isArray(qValue) && !!this.editingObj) ||
                    !this.isTwoValueEquals(qValue, newValue)) {
                    questions[i].updateValueFromSurvey(newValue);
                }
            }
        }
    };
    SurveyModel.prototype.checkQuestionErrorOnValueChanged = function (question) {
        if (!this.isNavigationButtonPressed &&
            (this.checkErrorsMode === "onValueChanged" ||
                question.getAllErrors().length > 0)) {
            this.checkQuestionErrorOnValueChangedCore(question);
        }
    };
    SurveyModel.prototype.checkQuestionErrorOnValueChangedCore = function (question) {
        var oldErrorCount = question.getAllErrors().length;
        var res = question.hasErrors(true, {
            isOnValueChanged: !this.isValidateOnValueChanging,
        });
        var isCheckErrorOnChanged = this.checkErrorsMode.indexOf("Value") > -1;
        if (!!question.page && isCheckErrorOnChanged &&
            (oldErrorCount > 0 || question.getAllErrors().length > 0)) {
            this.fireValidatedErrorsOnPage(question.page);
        }
        return res;
    };
    SurveyModel.prototype.checkErrorsOnValueChanging = function (valueName, newValue) {
        if (this.isLoadingFromJson)
            return false;
        var questions = this.getQuestionsByValueName(valueName);
        if (!questions)
            return false;
        var res = false;
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            if (!this.isTwoValueEquals(q.valueForSurvey, newValue)) {
                q.value = newValue;
            }
            if (this.checkQuestionErrorOnValueChangedCore(q))
                res = true;
            res = res || q.errors.length > 0;
        }
        return res;
    };
    SurveyModel.prototype.notifyQuestionOnValueChanged = function (valueName, newValue) {
        if (this.isLoadingFromJson)
            return;
        var questions = this.getQuestionsByValueName(valueName);
        if (!!questions) {
            for (var i = 0; i < questions.length; i++) {
                var question = questions[i];
                this.checkQuestionErrorOnValueChanged(question);
                question.onSurveyValueChanged(newValue);
                this.onValueChanged.fire(this, {
                    name: valueName,
                    question: question,
                    value: newValue,
                });
            }
        }
        else {
            this.onValueChanged.fire(this, {
                name: valueName,
                question: null,
                value: newValue,
            });
        }
        if (this.isDisposed)
            return;
        this.checkElementsBindings(valueName, newValue);
        this.notifyElementsOnAnyValueOrVariableChanged(valueName);
    };
    SurveyModel.prototype.checkElementsBindings = function (valueName, newValue) {
        this.isRunningElementsBindings = true;
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].checkBindings(valueName, newValue);
        }
        this.isRunningElementsBindings = false;
        if (this.updateVisibleIndexAfterBindings) {
            this.updateVisibleIndexes();
            this.updateVisibleIndexAfterBindings = false;
        }
    };
    SurveyModel.prototype.notifyElementsOnAnyValueOrVariableChanged = function (name) {
        if (this.isEndLoadingFromJson === "processing")
            return;
        if (this.isRunningConditions) {
            this.conditionNotifyElementsOnAnyValueOrVariableChanged = true;
            return;
        }
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].onAnyValueChanged(name);
        }
        if (!this.isEndLoadingFromJson) {
            this.locStrsChanged();
        }
    };
    SurveyModel.prototype.updateAllQuestionsValue = function () {
        var questions = this.getAllQuestions();
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            var valName = q.getValueName();
            q.updateValueFromSurvey(this.getValue(valName));
            if (q.requireUpdateCommentValue) {
                q.updateCommentFromSurvey(this.getComment(valName));
            }
        }
    };
    SurveyModel.prototype.notifyAllQuestionsOnValueChanged = function () {
        var questions = this.getAllQuestions();
        for (var i = 0; i < questions.length; i++) {
            questions[i].onSurveyValueChanged(this.getValue(questions[i].getValueName()));
        }
    };
    SurveyModel.prototype.checkOnPageTriggers = function () {
        var questions = this.getCurrentPageQuestions(true);
        var values = {};
        for (var i = 0; i < questions.length; i++) {
            var question = questions[i];
            var name = question.getValueName();
            values[name] = this.getValue(name);
        }
        this.addCalculatedValuesIntoFilteredValues(values);
        this.checkTriggers(values, true);
    };
    SurveyModel.prototype.getCurrentPageQuestions = function (includeInvsible) {
        if (includeInvsible === void 0) { includeInvsible = false; }
        var result = [];
        var page = this.currentPage;
        if (!page)
            return result;
        for (var i = 0; i < page.questions.length; i++) {
            var question = page.questions[i];
            if ((!includeInvsible && !question.visible) || !question.name)
                continue;
            result.push(question);
        }
        return result;
    };
    SurveyModel.prototype.checkTriggers = function (key, isOnNextPage) {
        if (this.isCompleted || this.triggers.length == 0 || this.isDisplayMode)
            return;
        if (this.isTriggerIsRunning) {
            this.triggerValues = this.getFilteredValues();
            for (var k in key) {
                this.triggerKeys[k] = key[k];
            }
            return;
        }
        this.isTriggerIsRunning = true;
        this.triggerKeys = key;
        this.triggerValues = this.getFilteredValues();
        var properties = this.getFilteredProperties();
        var prevCanBeCompleted = this.canBeCompletedByTrigger;
        this.canBeCompletedByTrigger = false;
        for (var i = 0; i < this.triggers.length; i++) {
            this.triggers[i].checkExpression(isOnNextPage, this.triggerKeys, this.triggerValues, properties);
        }
        if (prevCanBeCompleted !== this.canBeCompletedByTrigger) {
            this.updateButtonsVisibility();
        }
        this.isTriggerIsRunning = false;
    };
    SurveyModel.prototype.doElementsOnLoad = function () {
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].onSurveyLoad();
        }
    };
    Object.defineProperty(SurveyModel.prototype, "isRunningConditions", {
        get: function () {
            return !!this.conditionValues;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.runConditions = function () {
        if (this.isCompleted ||
            this.isEndLoadingFromJson === "processing" ||
            this.isRunningConditions)
            return;
        this.conditionValues = this.getFilteredValues();
        var properties = this.getFilteredProperties();
        var oldCurrentPageIndex = this.pages.indexOf(this.currentPage);
        this.runConditionsCore(properties);
        this.checkIfNewPagesBecomeVisible(oldCurrentPageIndex);
        this.conditionValues = null;
        if (this.isValueChangedOnRunningCondition &&
            this.conditionRunnerCounter <
                _settings__WEBPACK_IMPORTED_MODULE_14__["settings"].maximumConditionRunCountOnValueChanged) {
            this.isValueChangedOnRunningCondition = false;
            this.conditionRunnerCounter++;
            this.runConditions();
        }
        else {
            this.isValueChangedOnRunningCondition = false;
            this.conditionRunnerCounter = 0;
            if (this.conditionUpdateVisibleIndexes) {
                this.conditionUpdateVisibleIndexes = false;
                this.updateVisibleIndexes();
            }
            if (this.conditionNotifyElementsOnAnyValueOrVariableChanged) {
                this.conditionNotifyElementsOnAnyValueOrVariableChanged = false;
                this.notifyElementsOnAnyValueOrVariableChanged("");
            }
        }
    };
    SurveyModel.prototype.runConditionOnValueChanged = function (name, value) {
        if (this.isRunningConditions) {
            this.conditionValues[name] = value;
            this.isValueChangedOnRunningCondition = true;
        }
        else {
            this.runConditions();
        }
    };
    SurveyModel.prototype.runConditionsCore = function (properties) {
        var pages = this.pages;
        for (var i = 0; i < this.calculatedValues.length; i++) {
            this.calculatedValues[i].resetCalculation();
        }
        for (var i = 0; i < this.calculatedValues.length; i++) {
            this.calculatedValues[i].doCalculation(this.calculatedValues, this.conditionValues, properties);
        }
        _super.prototype.runConditionCore.call(this, this.conditionValues, properties);
        for (var i = 0; i < pages.length; i++) {
            pages[i].runCondition(this.conditionValues, properties);
        }
    };
    SurveyModel.prototype.checkIfNewPagesBecomeVisible = function (oldCurrentPageIndex) {
        var newCurrentPageIndex = this.pages.indexOf(this.currentPage);
        if (newCurrentPageIndex <= oldCurrentPageIndex + 1)
            return;
        for (var i = oldCurrentPageIndex + 1; i < newCurrentPageIndex; i++) {
            if (this.pages[i].isVisible) {
                this.currentPage = this.pages[i];
                break;
            }
        }
    };
    /**
     * Sends a survey result to the [api.surveyjs.io](https://api.surveyjs.io) service.
     * @param postId [api.surveyjs.io](https://api.surveyjs.io) service postId
     * @param clientId Typically a customer e-mail or an identifier
     * @param isPartialCompleted Set it to `true` if the survey is not completed yet and the results are intermediate
     * @see surveyPostId
     * @see clientId
     */
    SurveyModel.prototype.sendResult = function (postId, clientId, isPartialCompleted) {
        if (postId === void 0) { postId = null; }
        if (clientId === void 0) { clientId = null; }
        if (isPartialCompleted === void 0) { isPartialCompleted = false; }
        if (!this.isEditMode)
            return;
        if (isPartialCompleted && this.onPartialSend) {
            this.onPartialSend.fire(this, null);
        }
        if (!postId && this.surveyPostId) {
            postId = this.surveyPostId;
        }
        if (!postId)
            return;
        if (clientId) {
            this.clientId = clientId;
        }
        if (isPartialCompleted && !this.clientId)
            return;
        var self = this;
        if (this.surveyShowDataSaving) {
            this.setCompletedState("saving", "");
        }
        this.createSurveyService().sendResult(postId, this.data, function (success, response, request) {
            if (self.surveyShowDataSaving) {
                if (success) {
                    self.setCompletedState("success", "");
                }
                else {
                    self.setCompletedState("error", response);
                }
            }
            self.onSendResult.fire(self, {
                success: success,
                response: response,
                request: request,
            });
        }, this.clientId, isPartialCompleted);
    };
    /**
     * Calls the [api.surveyjs.io](https://api.surveyjs.io) service and, on callback, fires the `onGetResult` event with all answers that your users made for a question.
     * @param resultId [api.surveyjs.io](https://api.surveyjs.io) service resultId
     * @param name The question name
     * @see onGetResult
     */
    SurveyModel.prototype.getResult = function (resultId, name) {
        var self = this;
        this.createSurveyService().getResult(resultId, name, function (success, data, dataList, response) {
            self.onGetResult.fire(self, {
                success: success,
                data: data,
                dataList: dataList,
                response: response,
            });
        });
    };
    /**
     * Loads the survey JSON from the [api.surveyjs.io](https://api.surveyjs.io) service.
     * If `clientId` is not `null` and a user had completed a survey before, the survey switches to `completedbefore` state.
     * @param surveyId [api.surveyjs.io](https://api.surveyjs.io) service surveyId
     * @param clientId users' indentifier, for example an e-mail or a unique customer id in your web application.
     * @see state
     * @see onLoadedSurveyFromService
     */
    SurveyModel.prototype.loadSurveyFromService = function (surveyId, cliendId) {
        if (surveyId === void 0) { surveyId = null; }
        if (cliendId === void 0) { cliendId = null; }
        if (surveyId) {
            this.surveyId = surveyId;
        }
        if (cliendId) {
            this.clientId = cliendId;
        }
        var self = this;
        this.isLoading = true;
        this.onLoadingSurveyFromService();
        if (cliendId) {
            this.createSurveyService().getSurveyJsonAndIsCompleted(this.surveyId, this.clientId, function (success, json, isCompleted, response) {
                self.isLoading = false;
                if (success) {
                    self.isCompletedBefore = isCompleted == "completed";
                    self.loadSurveyFromServiceJson(json);
                }
            });
        }
        else {
            this.createSurveyService().loadSurvey(this.surveyId, function (success, result, response) {
                self.isLoading = false;
                if (success) {
                    self.loadSurveyFromServiceJson(result);
                }
            });
        }
    };
    SurveyModel.prototype.loadSurveyFromServiceJson = function (json) {
        if (!json)
            return;
        this.fromJSON(json);
        this.notifyAllQuestionsOnValueChanged();
        this.onLoadSurveyFromService();
        this.onLoadedSurveyFromService.fire(this, {});
    };
    SurveyModel.prototype.onLoadingSurveyFromService = function () { };
    SurveyModel.prototype.onLoadSurveyFromService = function () { };
    SurveyModel.prototype.resetVisibleIndexes = function () {
        var questions = this.getAllQuestions(true);
        for (var i = 0; i < questions.length; i++) {
            questions[i].setVisibleIndex(-1);
        }
        this.updateVisibleIndexes();
    };
    SurveyModel.prototype.updateVisibleIndexes = function () {
        if (this.isLoadingFromJson || !!this.isEndLoadingFromJson)
            return;
        if (this.isRunningConditions &&
            this.onVisibleChanged.isEmpty &&
            this.onPageVisibleChanged.isEmpty) {
            //Run update visible index only one time on finishing running conditions
            this.conditionUpdateVisibleIndexes = true;
            return;
        }
        if (this.isRunningElementsBindings) {
            this.updateVisibleIndexAfterBindings = true;
            return;
        }
        this.updatePageVisibleIndexes(this.showPageNumbers);
        if (this.showQuestionNumbers == "onPage") {
            var visPages = this.visiblePages;
            for (var i = 0; i < visPages.length; i++) {
                visPages[i].setVisibleIndex(0);
            }
        }
        else {
            var index = this.showQuestionNumbers == "on" ? 0 : -1;
            for (var i = 0; i < this.pages.length; i++) {
                index += this.pages[i].setVisibleIndex(index);
            }
        }
        this.updateProgressText(true);
    };
    SurveyModel.prototype.updatePageVisibleIndexes = function (showIndex) {
        this.updateButtonsVisibility();
        var index = 0;
        for (var i = 0; i < this.pages.length; i++) {
            var page = this.pages[i];
            var isPageVisible = page.isVisible && (i > 0 || !page.isStarted);
            page.visibleIndex = isPageVisible ? index++ : -1;
            page.num = isPageVisible ? page.visibleIndex + 1 : -1;
        }
    };
    SurveyModel.prototype.fromJSON = function (json) {
        if (!json)
            return;
        this.questionHashesClear();
        this.jsonErrors = null;
        var jsonConverter = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]();
        jsonConverter.toObject(json, this);
        if (jsonConverter.errors.length > 0) {
            this.jsonErrors = jsonConverter.errors;
        }
        this.onStateAndCurrentPageChanged();
        this.updateState();
    };
    SurveyModel.prototype.setJsonObject = function (jsonObj) {
        this.fromJSON(jsonObj);
    };
    SurveyModel.prototype.endLoadingFromJson = function () {
        this.isEndLoadingFromJson = "processing";
        this.onFirstPageIsStartedChanged();
        this.onQuestionsOnPageModeChanged("standard");
        _super.prototype.endLoadingFromJson.call(this);
        if (this.hasCookie) {
            this.doComplete();
        }
        this.doElementsOnLoad();
        this.isEndLoadingFromJson = "conditions";
        this.runConditions();
        this.notifyElementsOnAnyValueOrVariableChanged("");
        this.isEndLoadingFromJson = null;
        this.updateVisibleIndexes();
        this.updateHasLogo();
        this.updateCurrentPage();
        this.hasDescription = !!this.description;
        this.setCalculatedWidthModeUpdater();
    };
    SurveyModel.prototype.updateNavigationCss = function () {
        if (!!this.navigationBar) {
            this.updateNavigationBarCss();
            !!this.updateNavigationItemCssCallback && this.updateNavigationItemCssCallback();
        }
    };
    SurveyModel.prototype.updateNavigationBarCss = function () {
        var val = this.navigationBar;
        val.cssClasses = this.css.actionBar;
        val.containerCss = this.css.footer;
    };
    SurveyModel.prototype.createNavigationBar = function () {
        var res = new _actions_container__WEBPACK_IMPORTED_MODULE_17__["ActionContainer"]();
        res.setItems(this.createNavigationActions());
        return res;
    };
    SurveyModel.prototype.createNavigationActions = function () {
        var _this = this;
        var defaultComponent = "sv-nav-btn";
        var navStart = new _actions_action__WEBPACK_IMPORTED_MODULE_16__["Action"]({
            id: "sv-nav-start",
            visible: new _base__WEBPACK_IMPORTED_MODULE_2__["ComputedUpdater"](function () { return _this.isShowStartingPage; }),
            visibleIndex: 10,
            locTitle: this.locStartSurveyText,
            action: function () { return _this.start(); },
            component: defaultComponent
        });
        var navPrev = new _actions_action__WEBPACK_IMPORTED_MODULE_16__["Action"]({
            id: "sv-nav-prev",
            visible: new _base__WEBPACK_IMPORTED_MODULE_2__["ComputedUpdater"](function () { return _this.isShowPrevButton; }),
            visibleIndex: 20,
            data: {
                mouseDown: function () { return _this.navigationMouseDown(); },
            },
            locTitle: this.locPagePrevText,
            action: function () { return _this.prevPage(); },
            component: defaultComponent
        });
        var navNext = new _actions_action__WEBPACK_IMPORTED_MODULE_16__["Action"]({
            id: "sv-nav-next",
            visible: new _base__WEBPACK_IMPORTED_MODULE_2__["ComputedUpdater"](function () { return _this.isShowNextButton; }),
            visibleIndex: 30,
            data: {
                mouseDown: function () { return _this.nextPageMouseDown(); },
            },
            locTitle: this.locPageNextText,
            action: function () { return _this.nextPageUIClick(); },
            component: defaultComponent
        });
        var navPreview = new _actions_action__WEBPACK_IMPORTED_MODULE_16__["Action"]({
            id: "sv-nav-preview",
            visible: new _base__WEBPACK_IMPORTED_MODULE_2__["ComputedUpdater"](function () { return _this.isPreviewButtonVisible; }),
            visibleIndex: 40,
            data: {
                mouseDown: function () { return _this.navigationMouseDown(); },
            },
            locTitle: this.locPreviewText,
            action: function () { return _this.showPreview(); },
            component: defaultComponent
        });
        var navComplete = new _actions_action__WEBPACK_IMPORTED_MODULE_16__["Action"]({
            id: "sv-nav-complete",
            visible: new _base__WEBPACK_IMPORTED_MODULE_2__["ComputedUpdater"](function () { return _this.isCompleteButtonVisible; }),
            visibleIndex: 50,
            data: {
                mouseDown: function () { return _this.navigationMouseDown(); },
            },
            locTitle: this.locCompleteText,
            action: function () { return _this.completeLastPage(); },
            component: defaultComponent
        });
        this.updateNavigationItemCssCallback = function () {
            navStart.innerCss = _this.cssNavigationStart;
            navPrev.innerCss = _this.cssNavigationPrev;
            navNext.innerCss = _this.cssNavigationNext;
            navPreview.innerCss = _this.cssNavigationPreview;
            navComplete.innerCss = _this.cssNavigationComplete;
        };
        return [navStart, navPrev, navNext, navPreview, navComplete];
    };
    SurveyModel.prototype.onBeforeCreating = function () { };
    SurveyModel.prototype.onCreating = function () { };
    SurveyModel.prototype.getProcessedTextValue = function (textValue) {
        this.getProcessedTextValueCore(textValue);
        if (!this.onProcessTextValue.isEmpty) {
            var wasEmpty = this.isValueEmpty(textValue.value);
            this.onProcessTextValue.fire(this, textValue);
            textValue.isExists =
                textValue.isExists || (wasEmpty && !this.isValueEmpty(textValue.value));
        }
    };
    SurveyModel.prototype.getBuiltInVariableValue = function (name) {
        if (name === "pageno") {
            var page = this.currentPage;
            return page != null ? this.visiblePages.indexOf(page) + 1 : 0;
        }
        if (name === "pagecount") {
            return this.visiblePageCount;
        }
        if (name === "correctedanswers" || name === "correctanswers" || name === "correctedanswercount") {
            return this.getCorrectedAnswerCount();
        }
        if (name === "incorrectedanswers" || name === "incorrectanswers" || name === "incorrectedanswercount") {
            return this.getInCorrectedAnswerCount();
        }
        if (name === "questioncount") {
            return this.getQuizQuestionCount();
        }
        return undefined;
    };
    SurveyModel.prototype.getProcessedTextValueCore = function (textValue) {
        var name = textValue.name.toLocaleLowerCase();
        if (["no", "require", "title"].indexOf(name) !== -1) {
            return;
        }
        var builtInVar = this.getBuiltInVariableValue(name);
        if (builtInVar !== undefined) {
            textValue.isExists = true;
            textValue.value = builtInVar;
            return;
        }
        if (name === "locale") {
            textValue.isExists = true;
            textValue.value = !!this.locale
                ? this.locale
                : _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale;
            return;
        }
        var variable = this.getVariable(name);
        if (variable !== undefined) {
            textValue.isExists = true;
            textValue.value = variable;
            return;
        }
        var question = this.getFirstName(name);
        if (question) {
            textValue.isExists = true;
            var firstName = question.getValueName().toLowerCase();
            name = firstName + name.substring(firstName.length);
            name = name.toLocaleLowerCase();
            var values = {};
            values[firstName] = textValue.returnDisplayValue
                ? question.getDisplayValue(false, undefined)
                : question.value;
            textValue.value = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__["ProcessValue"]().getValue(name, values);
            return;
        }
        this.getProcessedValuesWithoutQuestion(textValue);
    };
    SurveyModel.prototype.getProcessedValuesWithoutQuestion = function (textValue) {
        var value = this.getValue(textValue.name);
        if (value !== undefined) {
            textValue.isExists = true;
            textValue.value = value;
            return;
        }
        var processor = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__["ProcessValue"]();
        var firstName = processor.getFirstName(textValue.name);
        if (firstName === textValue.name)
            return;
        var data = {};
        var val = this.getValue(firstName);
        if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(val)) {
            val = this.getVariable(firstName);
        }
        if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(val))
            return;
        data[firstName] = val;
        textValue.value = processor.getValue(textValue.name, data);
        textValue.isExists = processor.hasValue(textValue.name, data);
    };
    SurveyModel.prototype.getFirstName = function (name) {
        name = name.toLowerCase();
        var question;
        do {
            question = this.getQuestionByValueName(name, true);
            name = this.reduceFirstName(name);
        } while (!question && !!name);
        return question;
    };
    SurveyModel.prototype.reduceFirstName = function (name) {
        var pos1 = name.lastIndexOf(".");
        var pos2 = name.lastIndexOf("[");
        if (pos1 < 0 && pos2 < 0)
            return "";
        var pos = Math.max(pos1, pos2);
        return name.substring(0, pos);
    };
    SurveyModel.prototype.clearUnusedValues = function () {
        var questions = this.getAllQuestions();
        for (var i = 0; i < questions.length; i++) {
            questions[i].clearUnusedValues();
        }
        this.clearInvisibleQuestionValues();
    };
    SurveyModel.prototype.hasVisibleQuestionByValueName = function (valueName) {
        var questions = this.getQuestionsByValueName(valueName);
        if (!questions)
            return false;
        for (var i = 0; i < questions.length; i++) {
            if (questions[i].isVisible && questions[i].isParentVisible)
                return true;
        }
        return false;
    };
    SurveyModel.prototype.questionCountByValueName = function (valueName) {
        var questions = this.getQuestionsByValueName(valueName);
        return !!questions ? questions.length : 0;
    };
    SurveyModel.prototype.clearInvisibleQuestionValues = function () {
        var reason = this.clearInvisibleValues === "none" ? "none" : "onComplete";
        var questions = this.getAllQuestions();
        for (var i = 0; i < questions.length; i++) {
            questions[i].clearValueIfInvisible(reason);
        }
    };
    /**
     * Returns a variable value. Variable, unlike values, are not stored in the survey results.
     * @param name A variable name
     * @see SetVariable
     */
    SurveyModel.prototype.getVariable = function (name) {
        if (!name)
            return null;
        name = name.toLowerCase();
        var res = this.variablesHash[name];
        if (!this.isValueEmpty(res))
            return res;
        if (name.indexOf(".") > -1 || name.indexOf("[") > -1) {
            if (new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__["ProcessValue"]().hasValue(name, this.variablesHash))
                return new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__["ProcessValue"]().getValue(name, this.variablesHash);
        }
        return res;
    };
    /**
     * Sets a variable value. Variable, unlike values, are not stored in the survey results.
     * @param name A variable name
     * @param newValue A variable new value
     * @see GetVariable
     */
    SurveyModel.prototype.setVariable = function (name, newValue) {
        if (!name)
            return;
        name = name.toLowerCase();
        this.variablesHash[name] = newValue;
        this.notifyElementsOnAnyValueOrVariableChanged(name);
        this.runConditionOnValueChanged(name, newValue);
        this.onVariableChanged.fire(this, { name: name, value: newValue });
    };
    /**
     * Returns all variables in the survey. Use setVariable function to create a new variable.
     * @see getVariable
     * @see setVariable
     */
    SurveyModel.prototype.getVariableNames = function () {
        var res = [];
        for (var key in this.variablesHash) {
            res.push(key);
        }
        return res;
    };
    //ISurvey data
    SurveyModel.prototype.getUnbindValue = function (value) {
        if (!!this.editingObj)
            return value;
        return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getUnbindValue(value);
    };
    /**
     * Returns a question value (answer) by a question's name.
     * @param name A question name
     * @see data
     * @see setValue
     */
    SurveyModel.prototype.getValue = function (name) {
        if (!name || name.length == 0)
            return null;
        var value = this.getDataValueCore(this.valuesHash, name);
        return this.getUnbindValue(value);
    };
    /**
     * Sets a question value (answer). It runs all triggers and conditions (`visibleIf` properties).
     *
     * Goes to the next page if `goNextPageAutomatic` is `true` and all questions on the current page are answered correctly.
     * @param name A question name
     * @param newValue A new question value
     * @see data
     * @see getValue
     * @see PageModel.visibleIf
     * @see Question.visibleIf
     * @see goNextPageAutomatic
     */
    SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged) {
        if (locNotification === void 0) { locNotification = false; }
        if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
        var newValue = newQuestionValue;
        if (allowNotifyValueChanged) {
            newValue = this.questionOnValueChanging(name, newQuestionValue);
        }
        if (this.isValidateOnValueChanging &&
            this.checkErrorsOnValueChanging(name, newValue))
            return;
        if (!this.editingObj &&
            this.isValueEqual(name, newValue) &&
            this.isTwoValueEquals(newValue, newQuestionValue))
            return;
        var oldValue = this.getValue(name);
        if (this.isValueEmpty(newValue)) {
            this.deleteDataValueCore(this.valuesHash, name);
        }
        else {
            newValue = this.getUnbindValue(newValue);
            this.setDataValueCore(this.valuesHash, name, newValue);
        }
        this.updateOnSetValue(name, newValue, oldValue, locNotification, allowNotifyValueChanged);
    };
    SurveyModel.prototype.updateOnSetValue = function (name, newValue, oldValue, locNotification, allowNotifyValueChanged) {
        if (locNotification === void 0) { locNotification = false; }
        if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
        this.updateQuestionValue(name, newValue);
        if (locNotification === true || this.isDisposed || this.isRunningElementsBindings)
            return;
        var triggerKeys = {};
        triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
        this.runConditionOnValueChanged(name, newValue);
        this.checkTriggers(triggerKeys, false);
        if (allowNotifyValueChanged)
            this.notifyQuestionOnValueChanged(name, newValue);
        if (locNotification !== "text") {
            this.tryGoNextPageAutomatic(name);
        }
    };
    SurveyModel.prototype.isValueEqual = function (name, newValue) {
        if (newValue === "" || newValue === undefined)
            newValue = null;
        var oldValue = this.getValue(name);
        if (oldValue === "" || oldValue === undefined)
            oldValue = null;
        if (newValue === null || oldValue === null)
            return newValue === oldValue;
        return this.isTwoValueEquals(newValue, oldValue);
    };
    SurveyModel.prototype.doOnPageAdded = function (page) {
        page.setSurveyImpl(this);
        if (!page.name)
            page.name = this.generateNewName(this.pages, "page");
        this.questionHashesPanelAdded(page);
        this.updateVisibleIndexes();
        if (!this.isLoadingFromJson) {
            this.updateProgressText();
            this.updateCurrentPage();
        }
        var options = { page: page };
        this.onPageAdded.fire(this, options);
    };
    SurveyModel.prototype.doOnPageRemoved = function (page) {
        page.setSurveyImpl(null);
        if (page === this.currentPage) {
            this.updateCurrentPage();
        }
        this.updateVisibleIndexes();
        this.updateProgressText();
        this.updateLazyRenderingRowsOnRemovingElements();
    };
    SurveyModel.prototype.generateNewName = function (elements, baseName) {
        var keys = {};
        for (var i = 0; i < elements.length; i++)
            keys[elements[i]["name"]] = true;
        var index = 1;
        while (keys[baseName + index])
            index++;
        return baseName + index;
    };
    SurveyModel.prototype.tryGoNextPageAutomatic = function (name) {
        if (!!this.isEndLoadingFromJson ||
            !this.goNextPageAutomatic ||
            !this.currentPage)
            return;
        var question = this.getQuestionByValueName(name);
        if (!question ||
            (!!question &&
                (!question.visible || !question.supportGoNextPageAutomatic())))
            return;
        if (question.hasErrors(false) && !question.supportGoNextPageError())
            return;
        var questions = this.getCurrentPageQuestions();
        if (questions.indexOf(question) < 0)
            return;
        for (var i = 0; i < questions.length; i++) {
            if (questions[i].hasInput && questions[i].isEmpty())
                return;
        }
        if (!this.checkIsCurrentPageHasErrors(false)) {
            if (!this.isLastPage) {
                this.nextPage();
            }
            else {
                if (this.goNextPageAutomatic === true &&
                    this.allowCompleteSurveyAutomatic) {
                    if (this.isShowPreviewBeforeComplete) {
                        this.showPreview();
                    }
                    else {
                        this.completeLastPage();
                    }
                }
            }
        }
    };
    /**
     * Returns the comment value.
     * @param name A comment's name.
     * @see setComment
     */
    SurveyModel.prototype.getComment = function (name) {
        var res = this.getValue(name + this.commentPrefix);
        return res || "";
    };
    /**
     * Sets a comment value.
     * @param name A comment name.
     * @param newValue A new comment value.
     * @see getComment
     */
    SurveyModel.prototype.setComment = function (name, newValue, locNotification) {
        if (locNotification === void 0) { locNotification = false; }
        if (!newValue)
            newValue = "";
        if (this.isTwoValueEquals(newValue, this.getComment(name)))
            return;
        var commentName = name + this.commentPrefix;
        if (this.isValueEmpty(newValue)) {
            this.deleteDataValueCore(this.valuesHash, commentName);
        }
        else {
            this.setDataValueCore(this.valuesHash, commentName, newValue);
        }
        var questions = this.getQuestionsByValueName(name);
        if (!!questions) {
            for (var i = 0; i < questions.length; i++) {
                questions[i].updateCommentFromSurvey(newValue);
                this.checkQuestionErrorOnValueChanged(questions[i]);
            }
        }
        if (!locNotification) {
            this.runConditionOnValueChanged(name, this.getValue(name));
        }
        if (locNotification !== "text") {
            this.tryGoNextPageAutomatic(name);
        }
        var question = this.getQuestionByName(name);
        if (question) {
            this.onValueChanged.fire(this, {
                name: commentName,
                question: question,
                value: newValue,
            });
        }
    };
    /**
     * Removes a value from the survey results.
     * @param {string} name The name of the value. Typically it is a question name.
     */
    SurveyModel.prototype.clearValue = function (name) {
        this.setValue(name, null);
        this.setComment(name, null);
    };
    Object.defineProperty(SurveyModel.prototype, "clearValueOnDisableItems", {
        /**
         * Gets or sets whether to clear value on disable items in checkbox, dropdown and radiogroup questions.
         * By default, values are not cleared on disabled the corresponded items. This property is not persisted in survey JSON and you have to set it in code.
         */
        get: function () {
            return this.getPropertyValue("clearValueOnDisableItems", false);
        },
        set: function (val) {
            this.setPropertyValue("clearValueOnDisableItems", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isClearValueOnHidden", {
        get: function () {
            return (this.clearInvisibleValues == "onHidden" ||
                this.isClearValueOnHiddenContainer);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isClearValueOnHiddenContainer", {
        get: function () {
            return (this.clearInvisibleValues == "onHiddenContainer" &&
                !this.isShowingPreview &&
                !this.runningPages);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.questionVisibilityChanged = function (question, newValue) {
        this.updateVisibleIndexes();
        this.onVisibleChanged.fire(this, {
            question: question,
            name: question.name,
            visible: newValue,
        });
    };
    SurveyModel.prototype.pageVisibilityChanged = function (page, newValue) {
        if (this.isLoadingFromJson)
            return;
        if (newValue && !this.currentPage || page === this.currentPage) {
            this.updateCurrentPage();
        }
        this.updateVisibleIndexes();
        this.onPageVisibleChanged.fire(this, {
            page: page,
            visible: newValue,
        });
    };
    SurveyModel.prototype.panelVisibilityChanged = function (panel, newValue) {
        this.updateVisibleIndexes();
        this.onPanelVisibleChanged.fire(this, {
            panel: panel,
            visible: newValue,
        });
    };
    SurveyModel.prototype.questionCreated = function (question) {
        this.onQuestionCreated.fire(this, { question: question });
    };
    SurveyModel.prototype.questionAdded = function (question, index, parentPanel, rootPanel) {
        if (!question.name) {
            question.name = this.generateNewName(this.getAllQuestions(false, true), "question");
        }
        if (!!question.page) {
            this.questionHashesAdded(question);
        }
        if (!this.currentPage) {
            this.updateCurrentPage();
        }
        this.updateVisibleIndexes();
        this.setCalculatedWidthModeUpdater();
        if (!this.isMovingQuestion || this.isDesignMode && !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].supportCreatorV2) {
            this.onQuestionAdded.fire(this, {
                question: question,
                name: question.name,
                index: index,
                parentPanel: parentPanel,
                rootPanel: rootPanel,
            });
        }
    };
    SurveyModel.prototype.questionRemoved = function (question) {
        this.questionHashesRemoved(question, question.name, question.getValueName());
        this.updateVisibleIndexes();
        this.onQuestionRemoved.fire(this, {
            question: question,
            name: question.name,
        });
        this.updateLazyRenderingRowsOnRemovingElements();
    };
    SurveyModel.prototype.questionRenamed = function (question, oldName, oldValueName) {
        this.questionHashesRemoved(question, oldName, oldValueName);
        this.questionHashesAdded(question);
    };
    SurveyModel.prototype.questionHashesClear = function () {
        this.questionHashes.names = {};
        this.questionHashes.namesInsensitive = {};
        this.questionHashes.valueNames = {};
        this.questionHashes.valueNamesInsensitive = {};
    };
    SurveyModel.prototype.questionHashesPanelAdded = function (panel) {
        if (this.isLoadingFromJson)
            return;
        var questions = panel.questions;
        for (var i = 0; i < questions.length; i++) {
            this.questionHashesAdded(questions[i]);
        }
    };
    SurveyModel.prototype.questionHashesAdded = function (question) {
        this.questionHashAddedCore(this.questionHashes.names, question, question.name);
        this.questionHashAddedCore(this.questionHashes.namesInsensitive, question, question.name.toLowerCase());
        this.questionHashAddedCore(this.questionHashes.valueNames, question, question.getValueName());
        this.questionHashAddedCore(this.questionHashes.valueNamesInsensitive, question, question.getValueName().toLowerCase());
    };
    SurveyModel.prototype.questionHashesRemoved = function (question, name, valueName) {
        if (!!name) {
            this.questionHashRemovedCore(this.questionHashes.names, question, name);
            this.questionHashRemovedCore(this.questionHashes.namesInsensitive, question, name.toLowerCase());
        }
        if (!!valueName) {
            this.questionHashRemovedCore(this.questionHashes.valueNames, question, valueName);
            this.questionHashRemovedCore(this.questionHashes.valueNamesInsensitive, question, valueName.toLowerCase());
        }
    };
    SurveyModel.prototype.questionHashAddedCore = function (hash, question, name) {
        var res = hash[name];
        if (!!res) {
            var res = hash[name];
            if (res.indexOf(question) < 0) {
                res.push(question);
            }
        }
        else {
            hash[name] = [question];
        }
    };
    SurveyModel.prototype.questionHashRemovedCore = function (hash, question, name) {
        var res = hash[name];
        if (!res)
            return;
        var index = res.indexOf(question);
        if (index > -1) {
            res.splice(index, 1);
        }
        if (res.length == 0) {
            delete hash[name];
        }
    };
    SurveyModel.prototype.panelAdded = function (panel, index, parentPanel, rootPanel) {
        if (!panel.name) {
            panel.name = this.generateNewName(this.getAllPanels(false, true), "panel");
        }
        this.questionHashesPanelAdded(panel);
        this.updateVisibleIndexes();
        this.onPanelAdded.fire(this, {
            panel: panel,
            name: panel.name,
            index: index,
            parentPanel: parentPanel,
            rootPanel: rootPanel,
        });
    };
    SurveyModel.prototype.panelRemoved = function (panel) {
        this.updateVisibleIndexes();
        this.onPanelRemoved.fire(this, { panel: panel, name: panel.name });
        this.updateLazyRenderingRowsOnRemovingElements();
    };
    SurveyModel.prototype.validateQuestion = function (question) {
        if (this.onValidateQuestion.isEmpty)
            return null;
        var options = {
            name: question.name,
            question: question,
            value: question.value,
            error: null,
        };
        this.onValidateQuestion.fire(this, options);
        return options.error ? new _error__WEBPACK_IMPORTED_MODULE_9__["CustomError"](options.error, this) : null;
    };
    SurveyModel.prototype.validatePanel = function (panel) {
        if (this.onValidatePanel.isEmpty)
            return null;
        var options = {
            name: panel.name,
            panel: panel,
            error: null,
        };
        this.onValidatePanel.fire(this, options);
        return options.error ? new _error__WEBPACK_IMPORTED_MODULE_9__["CustomError"](options.error, this) : null;
    };
    SurveyModel.prototype.processHtml = function (html) {
        var options = { html: html };
        this.onProcessHtml.fire(this, options);
        return this.processText(options.html, true);
    };
    SurveyModel.prototype.processText = function (text, returnDisplayValue) {
        return this.processTextEx(text, returnDisplayValue, false).text;
    };
    SurveyModel.prototype.processTextEx = function (text, returnDisplayValue, doEncoding) {
        var res = {
            text: this.processTextCore(text, returnDisplayValue, doEncoding),
            hasAllValuesOnLastRun: true,
        };
        res.hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
        return res;
    };
    SurveyModel.prototype.processTextCore = function (text, returnDisplayValue, doEncoding) {
        if (doEncoding === void 0) { doEncoding = false; }
        if (this.isDesignMode)
            return text;
        return this.textPreProcessor.process(text, returnDisplayValue, doEncoding);
    };
    SurveyModel.prototype.getSurveyMarkdownHtml = function (element, text, name) {
        var options = {
            element: element,
            text: text,
            name: name,
            html: null,
        };
        this.onTextMarkdown.fire(this, options);
        return options.html;
    };
    /**
     * Deprecated. Use the getCorrectAnswerCount method instead.
     */
    SurveyModel.prototype.getCorrectedAnswerCount = function () {
        return this.getCorrectedAnswerCountCore(true);
    };
    /**
     * Returns an amount of corrected quiz answers.
     */
    SurveyModel.prototype.getCorrectAnswerCount = function () {
        return this.getCorrectedAnswerCountCore(true);
    };
    /**
     * Returns quiz question number. It may be different from `getQuizQuestions.length` because some widgets like matrix may have several questions.
     * @see getQuizQuestions
     */
    SurveyModel.prototype.getQuizQuestionCount = function () {
        var questions = this.getQuizQuestions();
        var res = 0;
        for (var i = 0; i < questions.length; i++) {
            res += questions[i].quizQuestionCount;
        }
        return res;
    };
    /**
     * Deprecated. Use the getInCorrectAnswerCount method instead.
     */
    SurveyModel.prototype.getInCorrectedAnswerCount = function () {
        return this.getCorrectedAnswerCountCore(false);
    };
    /**
     * Returns an amount of incorrect quiz answers.
     */
    SurveyModel.prototype.getInCorrectAnswerCount = function () {
        return this.getCorrectedAnswerCountCore(false);
    };
    SurveyModel.prototype.getCorrectedAnswerCountCore = function (isCorrect) {
        var questions = this.getQuizQuestions();
        var counter = 0;
        var options = {
            question: null,
            result: false,
            correctAnswers: 0,
            incorrectAnswers: 0,
        };
        for (var i = 0; i < questions.length; i++) {
            var q = questions[i];
            var quizQuestionCount = q.quizQuestionCount;
            options.question = q;
            options.correctAnswers = q.correctAnswerCount;
            options.incorrectAnswers = quizQuestionCount - options.correctAnswers;
            options.result = options.question.isAnswerCorrect();
            this.onIsAnswerCorrect.fire(this, options);
            if (isCorrect) {
                if (options.result || options.correctAnswers < quizQuestionCount) {
                    var addCount = options.correctAnswers;
                    if (addCount == 0 && options.result)
                        addCount = 1;
                    counter += addCount;
                }
            }
            else {
                if (!options.result || options.incorrectAnswers < quizQuestionCount) {
                    counter += options.incorrectAnswers;
                }
            }
        }
        return counter;
    };
    SurveyModel.prototype.getCorrectedAnswers = function () {
        return this.getCorrectedAnswerCount();
    };
    SurveyModel.prototype.getInCorrectedAnswers = function () {
        return this.getInCorrectedAnswerCount();
    };
    Object.defineProperty(SurveyModel.prototype, "showTimerPanel", {
        /**
         * Gets or sets a timer panel position. The timer panel displays information about how much time an end user spends on a survey/page.
         *
         * The available options:
         * - `top` - display timer panel in the top.
         * - `bottom` - display timer panel in the bottom.
         * - `none` - do not display a timer panel.
         *
         * If the value is not equal to 'none', the survey calls the `startTimer()` method on survey rendering.
         * @see showTimerPanelMode
         * @see startTimer
         * @see stopTimer
         */
        get: function () {
            return this.getPropertyValue("showTimerPanel");
        },
        set: function (val) {
            this.setPropertyValue("showTimerPanel", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isTimerPanelShowingOnTop", {
        get: function () {
            return this.timerModel.isRunning && this.showTimerPanel == "top";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "isTimerPanelShowingOnBottom", {
        get: function () {
            return this.timerModel.isRunning && this.showTimerPanel == "bottom";
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "showTimerPanelMode", {
        /**
         * Gets or set a value that specifies whether the timer displays information for the page or for the entire survey.
         *
         * The available options:
         *
         * - `page` - show timer information for page
         * - `survey` - show timer information for survey
         *
         * Use the `onTimerPanelInfoText` event to change the default text.
         * @see showTimerPanel
         * @see onTimerPanelInfoText
         */
        get: function () {
            return this.getPropertyValue("showTimerPanelMode");
        },
        set: function (val) {
            this.setPropertyValue("showTimerPanelMode", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "widthMode", {
        /**
          * Gets or sets a value that specifies how the survey width is calculated.
          *
          * The available options:
          *
          * - `static` - A survey has a fixed width that mostly depends upon the applied theme. Resizing a browser window does not affect the survey width.
          * - `responsive` - A survey takes all available horizontal space. A survey stretches or shrinks horizonally according to the screen size.
          * - `auto` - Depends on the question type and corresponds to the static or responsive mode.
        */
        // `custom/precise` - The survey width is specified by the width property. // in-future
        get: function () {
            return this.getPropertyValue("widthMode");
        },
        set: function (val) {
            this.setPropertyValue("widthMode", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.setCalculatedWidthModeUpdater = function () {
        var _this = this;
        if (this.calculatedWidthModeUpdater)
            this.calculatedWidthModeUpdater.dispose();
        this.calculatedWidthModeUpdater = new _base__WEBPACK_IMPORTED_MODULE_2__["ComputedUpdater"](function () { return _this.calculateWidthMode(); });
        this.calculatedWidthMode = this.calculatedWidthModeUpdater;
    };
    SurveyModel.prototype.calculateWidthMode = function () {
        if (this.widthMode == "auto") {
            var isResponsive_1 = false;
            this.pages.forEach(function (page) {
                if (page.needResponsiveWidth())
                    isResponsive_1 = true;
            });
            return isResponsive_1 ? "responsive" : "static";
        }
        return this.widthMode;
    };
    Object.defineProperty(SurveyModel.prototype, "width", {
        /**
         * A survey width in CSS values.
         *
         * Default value: `undefined` (the survey inherits the width from its container)
         */
        get: function () {
            return this.getPropertyValue("width");
        },
        set: function (val) {
            this.setPropertyValue("width", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "renderedWidth", {
        get: function () {
            var width = this.getPropertyValue("width");
            if (width && !isNaN(width))
                width = width + "px";
            return this.getPropertyValue("calculatedWidthMode") == "static" && width || undefined;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "timerInfo", {
        get: function () {
            return this.getTimerInfo();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "timerClock", {
        get: function () {
            var major;
            var minor;
            if (!!this.currentPage) {
                var _a = this.getTimerInfo(), spent = _a.spent, limit = _a.limit, minorSpent = _a.minorSpent, minorLimit = _a.minorLimit;
                major = this.getDisplayClockTime(limit - spent);
                if (minorLimit > 0) {
                    minor = this.getDisplayClockTime(minorLimit - minorSpent);
                }
            }
            return { majorText: major, minorText: minor };
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "timerInfoText", {
        get: function () {
            var options = { text: this.getTimerInfoText() };
            this.onTimerPanelInfoText.fire(this, options);
            var loc = new _localizablestring__WEBPACK_IMPORTED_MODULE_10__["LocalizableString"](this, true);
            loc.text = options.text;
            return loc.textOrHtml;
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getTimerInfo = function () {
        var page = this.currentPage;
        if (!page)
            return { spent: 0, limit: 0 };
        var pageSpent = page.timeSpent;
        var surveySpent = this.timeSpent;
        var pageLimitSec = this.getPageMaxTimeToFinish(page);
        var surveyLimit = this.maxTimeToFinish;
        if (this.showTimerPanelMode == "page") {
            return { spent: pageSpent, limit: pageLimitSec };
        }
        if (this.showTimerPanelMode == "survey") {
            return { spent: surveySpent, limit: surveyLimit };
        }
        else {
            if (pageLimitSec > 0 && surveyLimit > 0) {
                return { spent: pageSpent, limit: pageLimitSec, minorSpent: surveySpent, minorLimit: surveyLimit };
            }
            else if (pageLimitSec > 0)
                return { spent: pageSpent, limit: pageLimitSec };
            else {
                return { spent: surveySpent, limit: surveyLimit };
            }
        }
    };
    SurveyModel.prototype.getTimerInfoText = function () {
        var page = this.currentPage;
        if (!page)
            return "";
        var pageSpent = this.getDisplayTime(page.timeSpent);
        var surveySpent = this.getDisplayTime(this.timeSpent);
        var pageLimitSec = this.getPageMaxTimeToFinish(page);
        var pageLimit = this.getDisplayTime(pageLimitSec);
        var surveyLimit = this.getDisplayTime(this.maxTimeToFinish);
        if (this.showTimerPanelMode == "page")
            return this.getTimerInfoPageText(page, pageSpent, pageLimit);
        if (this.showTimerPanelMode == "survey")
            return this.getTimerInfoSurveyText(surveySpent, surveyLimit);
        if (this.showTimerPanelMode == "all") {
            if (pageLimitSec <= 0 && this.maxTimeToFinish <= 0) {
                return this.getLocalizationFormatString("timerSpentAll", pageSpent, surveySpent);
            }
            if (pageLimitSec > 0 && this.maxTimeToFinish > 0) {
                return this.getLocalizationFormatString("timerLimitAll", pageSpent, pageLimit, surveySpent, surveyLimit);
            }
            var pageText = this.getTimerInfoPageText(page, pageSpent, pageLimit);
            var surveyText = this.getTimerInfoSurveyText(surveySpent, surveyLimit);
            return pageText + " " + surveyText;
        }
        return "";
    };
    SurveyModel.prototype.getTimerInfoPageText = function (page, pageSpent, pageLimit) {
        return this.getPageMaxTimeToFinish(page) > 0
            ? this.getLocalizationFormatString("timerLimitPage", pageSpent, pageLimit)
            : this.getLocalizationFormatString("timerSpentPage", pageSpent, pageLimit);
    };
    SurveyModel.prototype.getTimerInfoSurveyText = function (surveySpent, surveyLimit) {
        var strName = this.maxTimeToFinish > 0 ? "timerLimitSurvey" : "timerSpentSurvey";
        return this.getLocalizationFormatString(strName, surveySpent, surveyLimit);
    };
    SurveyModel.prototype.getDisplayClockTime = function (val) {
        var min = Math.floor(val / 60);
        var sec = val % 60;
        var secStr = sec.toString();
        if (sec < 10) {
            secStr = "0" + secStr;
        }
        return "".concat(min, ":").concat(secStr);
    };
    SurveyModel.prototype.getDisplayTime = function (val) {
        var min = Math.floor(val / 60);
        var sec = val % 60;
        var res = "";
        if (min > 0) {
            res += min + " " + this.getLocalizationString("timerMin");
        }
        if (res && sec == 0)
            return res;
        if (res)
            res += " ";
        return res + sec + " " + this.getLocalizationString("timerSec");
    };
    Object.defineProperty(SurveyModel.prototype, "timerModel", {
        get: function () { return this.timerModelValue; },
        enumerable: false,
        configurable: true
    });
    /**
     * Starts a timer that will calculate how much time end-user spends on the survey or on pages.
     * @see stopTimer
     * @see timeSpent
     */
    SurveyModel.prototype.startTimer = function () {
        this.timerModel.start();
    };
    SurveyModel.prototype.startTimerFromUI = function () {
        if (this.showTimerPanel != "none" && this.state === "running") {
            this.startTimer();
        }
    };
    /**
     * Stops the timer.
     * @see startTimer
     * @see timeSpent
     */
    SurveyModel.prototype.stopTimer = function () {
        this.timerModel.stop();
    };
    Object.defineProperty(SurveyModel.prototype, "timeSpent", {
        /**
         * Returns the time in seconds an end user spends on the survey
         * @see startTimer
         * @see PageModel.timeSpent
         */
        get: function () { return this.timerModel.spent; },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "maxTimeToFinish", {
        /**
         * Gets or sets the maximum time in seconds that end user has to complete a survey. If the value is 0 or less, an end user has no time limit to finish a survey.
         * @see startTimer
         * @see maxTimeToFinishPage
         */
        get: function () {
            return this.getPropertyValue("maxTimeToFinish", 0);
        },
        set: function (val) {
            this.setPropertyValue("maxTimeToFinish", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyModel.prototype, "maxTimeToFinishPage", {
        /**
         * Gets or sets the maximum time in seconds that end user has to complete a page in the survey. If the value is 0 or less, an end user has no time limit.
         *
         * You may override this value for every page.
         * @see startTimer
         * @see maxTimeToFinish
         * @see PageModel.maxTimeToFinish
         */
        get: function () {
            return this.getPropertyValue("maxTimeToFinishPage", 0);
        },
        set: function (val) {
            this.setPropertyValue("maxTimeToFinishPage", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyModel.prototype.getPageMaxTimeToFinish = function (page) {
        if (!page || page.maxTimeToFinish < 0)
            return 0;
        return page.maxTimeToFinish > 0
            ? page.maxTimeToFinish
            : this.maxTimeToFinishPage;
    };
    SurveyModel.prototype.doTimer = function (page) {
        this.onTimer.fire(this, {});
        if (this.maxTimeToFinish > 0 && this.maxTimeToFinish == this.timeSpent) {
            this.completeLastPage();
        }
        if (page) {
            var pageLimit = this.getPageMaxTimeToFinish(page);
            if (pageLimit > 0 && pageLimit == page.timeSpent) {
                if (this.isLastPage) {
                    this.completeLastPage();
                }
                else {
                    this.nextPage();
                }
            }
        }
    };
    Object.defineProperty(SurveyModel.prototype, "inSurvey", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    //ISurveyImplementor
    SurveyModel.prototype.getSurveyData = function () {
        return this;
    };
    SurveyModel.prototype.getSurvey = function () {
        return this;
    };
    SurveyModel.prototype.getTextProcessor = function () {
        return this;
    };
    //ISurveyTriggerOwner
    SurveyModel.prototype.getObjects = function (pages, questions) {
        var result = [];
        Array.prototype.push.apply(result, this.getPagesByNames(pages));
        Array.prototype.push.apply(result, this.getQuestionsByNames(questions));
        return result;
    };
    SurveyModel.prototype.setTriggerValue = function (name, value, isVariable) {
        if (!name)
            return;
        if (isVariable) {
            this.setVariable(name, value);
        }
        else {
            var question = this.getQuestionByName(name);
            if (!!question) {
                question.value = value;
            }
            else {
                var processor = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__["ProcessValue"]();
                var firstName = processor.getFirstName(name);
                if (firstName == name) {
                    this.setValue(name, value);
                }
                else {
                    if (!this.getQuestionByName(firstName))
                        return;
                    var data = this.getUnbindValue(this.getFilteredValues());
                    processor.setValue(data, name, value);
                    this.setValue(firstName, data[firstName]);
                }
            }
        }
    };
    SurveyModel.prototype.copyTriggerValue = function (name, fromName) {
        if (!name || !fromName)
            return;
        var processor = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__["ProcessValue"]();
        var value = processor.getValue(fromName, this.getFilteredValues());
        this.setTriggerValue(name, value, false);
    };
    SurveyModel.prototype.triggerExecuted = function (trigger) {
        this.onTriggerExecuted.fire(this, { trigger: trigger });
    };
    SurveyModel.prototype.startMovingQuestion = function () {
        this.isMovingQuestion = true;
    };
    SurveyModel.prototype.stopMovingQuestion = function () {
        this.isMovingQuestion = false;
    };
    /**
     * Focus question by its name. If needed change the current page on the page where question is located.
     * Function returns false if there is no question with this name or question is invisible, otherwise it returns true.
     * @param name question name
     */
    SurveyModel.prototype.focusQuestion = function (name) {
        var question = this.getQuestionByName(name, true);
        if (!question || !question.isVisible || !question.page)
            return false;
        this.isFocusingQuestion = true;
        this.currentPage = question.page;
        question.focus();
        this.isFocusingQuestion = false;
        this.isCurrentPageRendering = false;
        return true;
    };
    SurveyModel.prototype.getElementWrapperComponentName = function (element, reason) {
        if (reason === "logo-image") {
            return "sv-logo-image";
        }
        return SurveyModel.TemplateRendererComponentName;
    };
    SurveyModel.prototype.getQuestionContentWrapperComponentName = function (element) {
        return SurveyModel.TemplateRendererComponentName;
    };
    SurveyModel.prototype.getRowWrapperComponentName = function (row) {
        return SurveyModel.TemplateRendererComponentName;
    };
    SurveyModel.prototype.getElementWrapperComponentData = function (element, reason) {
        return element;
    };
    SurveyModel.prototype.getRowWrapperComponentData = function (row) {
        return row;
    };
    SurveyModel.prototype.getItemValueWrapperComponentName = function (item, question) {
        return SurveyModel.TemplateRendererComponentName;
    };
    SurveyModel.prototype.getItemValueWrapperComponentData = function (item, question) {
        return item;
    };
    SurveyModel.prototype.getMatrixCellTemplateData = function (cell) {
        return cell.question;
    };
    SurveyModel.prototype.searchText = function (text) {
        if (!!text)
            text = text.toLowerCase();
        var res = [];
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].searchText(text, res);
        }
        return res;
    };
    SurveyModel.prototype.getSkeletonComponentName = function (element) {
        return this.skeletonComponentName;
    };
    /**
     * Use this method to dispose survey model properly.
     */
    SurveyModel.prototype.dispose = function () {
        this.currentPage = null;
        this.destroyResizeObserver();
        _super.prototype.dispose.call(this);
        this.editingObj = null;
        if (!this.pages)
            return;
        for (var i = 0; i < this.pages.length; i++) {
            this.pages[i].setSurveyImpl(undefined);
            this.pages[i].dispose();
        }
        this.pages.splice(0, this.pages.length);
        if (this.disposeCallback) {
            this.disposeCallback();
        }
    };
    SurveyModel.TemplateRendererComponentName = "sv-template-renderer";
    SurveyModel.stylesManager = null;
    SurveyModel.platform = "unknown";
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], SurveyModel.prototype, "completedCss", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], SurveyModel.prototype, "containerCss", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
    ], SurveyModel.prototype, "showBrandInfo", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], SurveyModel.prototype, "_isMobile", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], SurveyModel.prototype, "rootCss", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
    ], SurveyModel.prototype, "calculatedWidthMode", void 0);
    return SurveyModel;
}(_survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementCore"]));

_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
    {
        name: "locale",
        choices: function () {
            return _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].getLocales(true);
        },
        onGetValue: function (obj) {
            return obj.locale == _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale ? null : obj.locale;
        },
    },
    { name: "title", serializationProperty: "locTitle", dependsOn: "locale" },
    {
        name: "description:text",
        serializationProperty: "locDescription",
        dependsOn: "locale",
    },
    { name: "logo", serializationProperty: "locLogo" },
    { name: "logoWidth", default: "300px", minValue: 0 },
    { name: "logoHeight", default: "200px", minValue: 0 },
    {
        name: "logoFit",
        default: "contain",
        choices: ["none", "contain", "cover", "fill"],
    },
    {
        name: "logoPosition",
        default: "left",
        choices: ["none", "left", "right", "top", "bottom"],
    },
    { name: "focusFirstQuestionAutomatic:boolean", default: true },
    { name: "focusOnFirstError:boolean", default: true },
    { name: "completedHtml:html", serializationProperty: "locCompletedHtml" },
    {
        name: "completedBeforeHtml:html",
        serializationProperty: "locCompletedBeforeHtml",
    },
    {
        name: "completedHtmlOnCondition:htmlconditions",
        className: "htmlconditionitem",
    },
    { name: "loadingHtml:html", serializationProperty: "locLoadingHtml" },
    { name: "pages:surveypages", className: "page" },
    {
        name: "questions",
        alternativeName: "elements",
        baseClassName: "question",
        visible: false,
        isLightSerializable: false,
        onGetValue: function (obj) {
            return null;
        },
        onSetValue: function (obj, value, jsonConverter) {
            obj.pages.splice(0, obj.pages.length);
            var page = obj.addNewPage("");
            jsonConverter.toObject({ questions: value }, page);
        },
    },
    {
        name: "triggers:triggers",
        baseClassName: "surveytrigger",
        classNamePart: "trigger",
    },
    {
        name: "calculatedValues:calculatedvalues",
        className: "calculatedvalue",
    },
    { name: "surveyId", visible: false },
    { name: "surveyPostId", visible: false },
    { name: "surveyShowDataSaving:boolean", visible: false },
    "cookieName",
    "sendResultOnPageNext:boolean",
    {
        name: "showNavigationButtons",
        default: "bottom",
        choices: ["none", "top", "bottom", "both"],
    },
    { name: "showPrevButton:boolean", default: true },
    { name: "showTitle:boolean", default: true },
    { name: "showPageTitles:boolean", default: true },
    { name: "showCompletedPage:boolean", default: true },
    "navigateToUrl",
    {
        name: "navigateToUrlOnCondition:urlconditions",
        className: "urlconditionitem",
    },
    {
        name: "questionsOrder",
        default: "initial",
        choices: ["initial", "random"],
    },
    "showPageNumbers:boolean",
    {
        name: "showQuestionNumbers",
        default: "on",
        choices: ["on", "onPage", "off"],
    },
    {
        name: "questionTitleLocation",
        default: "top",
        choices: ["top", "bottom", "left"],
    },
    {
        name: "questionDescriptionLocation",
        default: "underTitle",
        choices: ["underInput", "underTitle"],
    },
    { name: "questionErrorLocation", default: "top", choices: ["top", "bottom"] },
    {
        name: "showProgressBar",
        default: "off",
        choices: ["off", "top", "bottom", "both"],
    },
    {
        name: "progressBarType",
        default: "pages",
        choices: [
            "pages",
            "questions",
            "requiredQuestions",
            "correctQuestions",
            "buttons",
        ],
    },
    { name: "mode", default: "edit", choices: ["edit", "display"] },
    { name: "storeOthersAsComment:boolean", default: true },
    { name: "maxTextLength:number", default: 0, minValue: 0 },
    { name: "maxOthersLength:number", default: 0, minValue: 0 },
    {
        name: "goNextPageAutomatic:boolean",
        onSetValue: function (obj, value) {
            if (value !== "autogonext") {
                value = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(value, true);
            }
            obj.setPropertyValue("goNextPageAutomatic", value);
        }
    },
    {
        name: "clearInvisibleValues",
        default: "onComplete",
        choices: ["none", "onComplete", "onHidden", "onHiddenContainer"],
    },
    {
        name: "checkErrorsMode",
        default: "onNextPage",
        choices: ["onNextPage", "onValueChanged", "onValueChanging", "onComplete"],
    },
    {
        name: "textUpdateMode",
        default: "onBlur",
        choices: ["onBlur", "onTyping"],
    },
    { name: "autoGrowComment:boolean", default: false },
    { name: "startSurveyText", serializationProperty: "locStartSurveyText" },
    { name: "pagePrevText", serializationProperty: "locPagePrevText" },
    { name: "pageNextText", serializationProperty: "locPageNextText" },
    { name: "completeText", serializationProperty: "locCompleteText" },
    { name: "previewText", serializationProperty: "locPreviewText" },
    { name: "editText", serializationProperty: "locEditText" },
    { name: "requiredText", default: "*" },
    {
        name: "questionStartIndex",
        dependsOn: ["showQuestionNumbers"],
        visibleIf: function (survey) {
            return !survey || survey.showQuestionNumbers !== "off";
        },
    },
    {
        name: "questionTitlePattern",
        default: "numTitleRequire",
        dependsOn: ["questionStartIndex", "requiredText"],
        choices: function (obj) {
            if (!obj)
                return [];
            return obj.getQuestionTitlePatternOptions();
        },
    },
    {
        name: "questionTitleTemplate",
        visible: false,
        isSerializable: false,
        serializationProperty: "locQuestionTitleTemplate",
    },
    { name: "firstPageIsStarted:boolean", default: false },
    {
        name: "isSinglePage:boolean",
        default: false,
        visible: false,
        isSerializable: false,
    },
    {
        name: "questionsOnPageMode",
        default: "standard",
        choices: ["singlePage", "standard", "questionPerPage"],
    },
    {
        name: "showPreviewBeforeComplete",
        default: "noPreview",
        choices: ["noPreview", "showAllQuestions", "showAnsweredQuestions"],
    },
    { name: "maxTimeToFinish:number", default: 0, minValue: 0 },
    { name: "maxTimeToFinishPage:number", default: 0, minValue: 0 },
    {
        name: "showTimerPanel",
        default: "none",
        choices: ["none", "top", "bottom"],
    },
    {
        name: "showTimerPanelMode",
        default: "all",
        choices: ["all", "page", "survey"],
    },
    {
        name: "widthMode",
        default: "auto",
        choices: ["auto", "static", "responsive"],
    },
    "width",
    { name: "showBrandInfo:boolean", default: false, visible: false }
]);


/***/ }),

/***/ "./src/surveyProgress.ts":
/*!*******************************!*\
  !*** ./src/surveyProgress.ts ***!
  \*******************************/
/*! exports provided: SurveyProgressModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return SurveyProgressModel; });
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");

var SurveyProgressModel = /** @class */ (function () {
    function SurveyProgressModel() {
    }
    SurveyProgressModel.getProgressTextInBarCss = function (css) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]()
            .append(css.progressText)
            .append(css.progressTextInBar)
            .toString();
    };
    SurveyProgressModel.getProgressTextUnderBarCss = function (css) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]()
            .append(css.progressText)
            .append(css.progressTextUnderBar)
            .toString();
    };
    return SurveyProgressModel;
}());



/***/ }),

/***/ "./src/surveyProgressButtons.ts":
/*!**************************************!*\
  !*** ./src/surveyProgressButtons.ts ***!
  \**************************************/
/*! exports provided: SurveyProgressButtonsModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return SurveyProgressButtonsModel; });
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");

var SurveyProgressButtonsModel = /** @class */ (function () {
    function SurveyProgressButtonsModel(survey) {
        this.survey = survey;
    }
    SurveyProgressButtonsModel.prototype.isListElementClickable = function (index) {
        if (!this.survey.onServerValidateQuestions ||
            this.survey.onServerValidateQuestions.isEmpty ||
            this.survey.checkErrorsMode === "onComplete") {
            return true;
        }
        return index <= this.survey.currentPageNo + 1;
    };
    SurveyProgressButtonsModel.prototype.getListElementCss = function (index) {
        if (index >= this.survey.visiblePages.length)
            return;
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]()
            .append(this.survey.css.progressButtonsListElementPassed, this.survey.visiblePages[index].passed)
            .append(this.survey.css.progressButtonsListElementCurrent, this.survey.currentPageNo === index)
            .append(this.survey.css.progressButtonsListElementNonClickable, !this.isListElementClickable(index))
            .toString();
    };
    SurveyProgressButtonsModel.prototype.getScrollButtonCss = function (hasScroller, isLeftScroll) {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]()
            .append(this.survey.css.progressButtonsImageButtonLeft, isLeftScroll)
            .append(this.survey.css.progressButtonsImageButtonRight, !isLeftScroll)
            .append(this.survey.css.progressButtonsImageButtonHidden, !hasScroller)
            .toString();
    };
    SurveyProgressButtonsModel.prototype.clickListElement = function (index) {
        if (this.survey.isDesignMode)
            return;
        if (index < this.survey.currentPageNo) {
            this.survey.currentPageNo = index;
        }
        else if (index > this.survey.currentPageNo) {
            for (var i = this.survey.currentPageNo; i < index; i++) {
                if (!this.survey.nextPage())
                    break;
            }
        }
    };
    return SurveyProgressButtonsModel;
}());



/***/ }),

/***/ "./src/surveyStrings.ts":
/*!******************************!*\
  !*** ./src/surveyStrings.ts ***!
  \******************************/
/*! exports provided: surveyLocalization, surveyStrings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return surveyLocalization; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return surveyStrings; });
/* harmony import */ var _localization_english__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localization/english */ "./src/localization/english.ts");

var surveyLocalization = {
    currentLocaleValue: "",
    defaultLocaleValue: "en",
    locales: {},
    localeNames: {},
    supportedLocales: [],
    get currentLocale() {
        return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
    },
    set currentLocale(val) {
        if (val === "cz")
            val = "cs";
        this.currentLocaleValue = val;
    },
    get defaultLocale() {
        return this.defaultLocaleValue;
    },
    set defaultLocale(val) {
        if (val === "cz")
            val = "cs";
        this.defaultLocaleValue = val;
    },
    getLocaleStrings: function (loc) {
        return this.locales[loc];
    },
    getCurrentStrings: function (locale) {
        var loc = locale && this.locales[locale];
        if (!loc)
            loc = this.currentLocale ? this.locales[this.currentLocale] : this.locales[this.defaultLocale];
        if (!loc)
            loc = this.locales[this.defaultLocale];
        if (!loc)
            loc = this.locales["en"];
        return loc;
    },
    getString: function (strName, locale) {
        if (locale === void 0) { locale = null; }
        var originalLocale = locale;
        locale = locale || this.currentLocale || this.defaultLocale;
        var loc = this.getCurrentStrings(locale);
        if (!!loc[strName])
            return loc[strName];
        var index = !!locale ? locale.indexOf("-") : -1;
        if (index > -1)
            return this.getString(strName, locale.substring(0, index));
        loc = this.locales[this.defaultLocale];
        var result = loc[strName];
        if (result === undefined) {
            result = this.locales["en"][strName];
        }
        if (result === undefined)
            return this.onGetExternalString(strName, originalLocale);
        return result;
    },
    getLocales: function (removeDefaultLoc) {
        if (removeDefaultLoc === void 0) { removeDefaultLoc = false; }
        var res = [];
        res.push("");
        var locs = this.locales;
        if (this.supportedLocales && this.supportedLocales.length > 0) {
            locs = {};
            for (var i = 0; i < this.supportedLocales.length; i++) {
                locs[this.supportedLocales[i]] = true;
            }
        }
        for (var key in locs) {
            if (removeDefaultLoc && key == this.defaultLocale)
                continue;
            res.push(key);
        }
        var locName = function (loc) {
            if (!loc)
                return "";
            var res = surveyLocalization.localeNames[loc];
            if (!res)
                res = loc;
            return res.toLowerCase();
        };
        res.sort(function (a, b) {
            var str1 = locName(a);
            var str2 = locName(b);
            if (str1 === str2)
                return 0;
            return str1 < str2 ? -1 : 1;
        });
        return res;
    },
    onGetExternalString: function (name, locale) { return undefined; }
};
var surveyStrings = _localization_english__WEBPACK_IMPORTED_MODULE_0__["englishStrings"];
surveyLocalization.locales["en"] = _localization_english__WEBPACK_IMPORTED_MODULE_0__["englishStrings"];
surveyLocalization.localeNames["en"] = "english";


/***/ }),

/***/ "./src/surveyTimerModel.ts":
/*!*********************************!*\
  !*** ./src/surveyTimerModel.ts ***!
  \*********************************/
/*! exports provided: SurveyTimerModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTimerModel", function() { return SurveyTimerModel; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _surveytimer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./surveytimer */ "./src/surveytimer.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




var SurveyTimerModel = /** @class */ (function (_super) {
    __extends(SurveyTimerModel, _super);
    function SurveyTimerModel(survey) {
        var _this = _super.call(this) || this;
        _this.timerFunc = null;
        _this.surveyValue = survey;
        _this.onCreating();
        return _this;
    }
    Object.defineProperty(SurveyTimerModel.prototype, "survey", {
        get: function () { return this.surveyValue; },
        enumerable: false,
        configurable: true
    });
    SurveyTimerModel.prototype.onCreating = function () { };
    SurveyTimerModel.prototype.start = function () {
        var _this = this;
        if (!this.survey)
            return;
        if (this.isRunning || this.isDesignMode)
            return;
        this.survey.onCurrentPageChanged.add(function () {
            _this.update();
        });
        this.timerFunc = function () { _this.doTimer(); };
        this.setIsRunning(true);
        this.update();
        _surveytimer__WEBPACK_IMPORTED_MODULE_1__["SurveyTimer"].instance.start(this.timerFunc);
    };
    SurveyTimerModel.prototype.stop = function () {
        if (!this.isRunning)
            return;
        this.setIsRunning(false);
        _surveytimer__WEBPACK_IMPORTED_MODULE_1__["SurveyTimer"].instance.stop(this.timerFunc);
    };
    Object.defineProperty(SurveyTimerModel.prototype, "isRunning", {
        get: function () {
            return this.getPropertyValue("isRunning", false);
        },
        enumerable: false,
        configurable: true
    });
    SurveyTimerModel.prototype.setIsRunning = function (val) {
        this.setPropertyValue("isRunning", val);
    };
    SurveyTimerModel.prototype.update = function () {
        this.updateText();
        this.updateProgress();
    };
    SurveyTimerModel.prototype.doTimer = function () {
        var page = this.survey.currentPage;
        if (page) {
            page.timeSpent = page.timeSpent + 1;
        }
        this.spent = this.spent + 1;
        this.update();
        if (this.onTimer) {
            this.onTimer(page);
        }
    };
    SurveyTimerModel.prototype.updateProgress = function () {
        var _this = this;
        var _a = this.survey.timerInfo, spent = _a.spent, limit = _a.limit;
        if (spent == 0) {
            this.progress = 0;
            setTimeout(function () {
                _this.progress = Math.floor((spent + 1) / limit * 100) / 100;
            }, 0);
        }
        else if (spent !== limit) {
            this.progress = Math.floor((spent + 1) / limit * 100) / 100;
        }
    };
    SurveyTimerModel.prototype.updateText = function () {
        var timerClock = this.survey.timerClock;
        this.clockMajorText = timerClock.majorText;
        this.clockMinorText = timerClock.minorText;
        this.text = this.survey.timerInfoText;
    };
    Object.defineProperty(SurveyTimerModel.prototype, "showTimerAsClock", {
        get: function () {
            return !!this.survey.getCss().clockTimerRoot;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyTimerModel.prototype, "rootCss", {
        get: function () {
            return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
                .append(this.survey.getCss().clockTimerRoot)
                .append(this.survey.getCss().clockTimerRootTop, this.survey.isTimerPanelShowingOnTop)
                .append(this.survey.getCss().clockTimerRootBottom, this.survey.isTimerPanelShowingOnBottom)
                .toString();
        },
        enumerable: false,
        configurable: true
    });
    SurveyTimerModel.prototype.getProgressCss = function () {
        return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
            .append(this.survey.getCss().clockTimerProgress)
            .append(this.survey.getCss().clockTimerProgressAnimation, this.progress > 0)
            .toString();
    };
    Object.defineProperty(SurveyTimerModel.prototype, "textContainerCss", {
        get: function () {
            return this.survey.getCss().clockTimerTextContainer;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyTimerModel.prototype, "minorTextCss", {
        get: function () {
            return this.survey.getCss().clockTimerMinorText;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyTimerModel.prototype, "majorTextCss", {
        get: function () {
            return this.survey.getCss().clockTimerMajorText;
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], SurveyTimerModel.prototype, "text", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], SurveyTimerModel.prototype, "progress", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], SurveyTimerModel.prototype, "clockMajorText", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
    ], SurveyTimerModel.prototype, "clockMinorText", void 0);
    __decorate([
        Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 0 })
    ], SurveyTimerModel.prototype, "spent", void 0);
    return SurveyTimerModel;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));



/***/ }),

/***/ "./src/surveytimer.ts":
/*!****************************!*\
  !*** ./src/surveytimer.ts ***!
  \****************************/
/*! exports provided: surveyTimerFunctions, SurveyTimer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "surveyTimerFunctions", function() { return surveyTimerFunctions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTimer", function() { return SurveyTimer; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");

var surveyTimerFunctions = {
    setTimeout: function (func) {
        if (typeof window === "undefined")
            return 0;
        return window.setTimeout(func, 1000);
    },
    clearTimeout: function (timerId) {
        if (typeof window === "undefined")
            return;
        window.clearTimeout(timerId);
    },
};
var SurveyTimer = /** @class */ (function () {
    function SurveyTimer() {
        this.listenerCounter = 0;
        this.timerId = -1;
        this.onTimer = new _base__WEBPACK_IMPORTED_MODULE_0__["Event"]();
    }
    Object.defineProperty(SurveyTimer, "instance", {
        get: function () {
            if (!SurveyTimer.instanceValue) {
                SurveyTimer.instanceValue = new SurveyTimer();
            }
            return SurveyTimer.instanceValue;
        },
        enumerable: false,
        configurable: true
    });
    SurveyTimer.prototype.start = function (func) {
        var _this = this;
        if (func === void 0) { func = null; }
        if (func) {
            this.onTimer.add(func);
        }
        if (this.timerId < 0) {
            this.timerId = surveyTimerFunctions.setTimeout(function () {
                _this.doTimer();
            });
        }
        this.listenerCounter++;
    };
    SurveyTimer.prototype.stop = function (func) {
        if (func === void 0) { func = null; }
        if (func) {
            this.onTimer.remove(func);
        }
        this.listenerCounter--;
        if (this.listenerCounter == 0 && this.timerId > -1) {
            surveyTimerFunctions.clearTimeout(this.timerId);
            this.timerId = -1;
        }
    };
    SurveyTimer.prototype.doTimer = function () {
        var _this = this;
        if (this.onTimer.isEmpty || this.listenerCounter == 0) {
            this.timerId = -1;
        }
        if (this.timerId < 0)
            return;
        var prevItem = this.timerId;
        this.onTimer.fire(this, {});
        //We have to check that we have the same timerId
        //It could be changed during events execution and it will lead to double timer events
        if (prevItem !== this.timerId)
            return;
        this.timerId = surveyTimerFunctions.setTimeout(function () {
            _this.doTimer();
        });
    };
    SurveyTimer.instanceValue = null;
    return SurveyTimer;
}());



/***/ }),

/***/ "./src/svgbundle.ts":
/*!**************************!*\
  !*** ./src/svgbundle.ts ***!
  \**************************/
/*! exports provided: SvgIconRegistry, SvgRegistry, SvgBundleViewModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgIconRegistry", function() { return SvgIconRegistry; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgRegistry", function() { return SvgRegistry; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgBundleViewModel", function() { return SvgBundleViewModel; });
var SvgIconData = /** @class */ (function () {
    function SvgIconData() {
    }
    return SvgIconData;
}());
var SvgIconRegistry = /** @class */ (function () {
    function SvgIconRegistry() {
        this.icons = {};
        this.iconPrefix = "icon-";
    }
    SvgIconRegistry.prototype.registerIconFromSymbol = function (iconId, iconSymbolSvg) {
        this.icons[iconId] = iconSymbolSvg;
    };
    SvgIconRegistry.prototype.registerIconFromSvgViaElement = function (iconId, iconSvg, iconPrefix) {
        if (iconPrefix === void 0) { iconPrefix = this.iconPrefix; }
        var divSvg = document.createElement("div");
        divSvg.innerHTML = iconSvg;
        var symbol = document.createElement("symbol");
        var svg = divSvg.querySelector("svg");
        symbol.innerHTML = svg.innerHTML;
        for (var i = 0; i < svg.attributes.length; i++) {
            symbol.setAttributeNS("http://www.w3.org/2000/svg", svg.attributes[i].name, svg.attributes[i].value);
        }
        symbol.id = iconPrefix + iconId;
        this.registerIconFromSymbol(iconId, symbol.outerHTML);
    };
    SvgIconRegistry.prototype.registerIconFromSvg = function (iconId, iconSvg, iconPrefix) {
        if (iconPrefix === void 0) { iconPrefix = this.iconPrefix; }
        var startStr = "<svg ";
        var endStr = "</svg>";
        iconSvg = iconSvg.trim();
        var str = iconSvg.toLowerCase();
        if (str.substring(0, startStr.length) === startStr &&
            str.substring(str.length - endStr.length, str.length) === endStr) {
            this.registerIconFromSymbol(iconId, "<symbol " +
                "id=\"" + iconPrefix + iconId + "\" " +
                iconSvg.substring(startStr.length, str.length - endStr.length) +
                "</symbol>");
            return true;
        }
        else {
            return false;
        }
    };
    SvgIconRegistry.prototype.registerIconsFromFolder = function (r) {
        var _this = this;
        r.keys().forEach(function (key) {
            _this.registerIconFromSvg(key.substring(2, key.length - 4).toLowerCase(), r(key));
        });
    };
    SvgIconRegistry.prototype.iconsRenderedHtml = function () {
        var _this = this;
        return Object.keys(this.icons).map(function (icon) { return _this.icons[icon]; }).join("");
    };
    SvgIconRegistry.prototype.renderIcons = function () {
        var containerId = "sv-icon-holder-global-container";
        if (!document.getElementById(containerId)) {
            var iconsDiv = document.createElement("div");
            iconsDiv.id = containerId;
            iconsDiv.innerHTML = "<svg>" + this.iconsRenderedHtml() + "</svg>";
            iconsDiv.style.display = "none";
            document.head.insertBefore(iconsDiv, document.head.firstChild);
        }
    };
    return SvgIconRegistry;
}());

var SvgRegistry = new SvgIconRegistry();
var SvgBundleViewModel;
var path = __webpack_require__("./src/images sync \\.svg$");
SvgRegistry.registerIconsFromFolder(path);


/***/ }),

/***/ "./src/template-renderer.ts":
/*!**********************************!*\
  !*** ./src/template-renderer.ts ***!
  \**********************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);



/***/ }),

/***/ "./src/textPreProcessor.ts":
/*!*********************************!*\
  !*** ./src/textPreProcessor.ts ***!
  \*********************************/
/*! exports provided: TextPreProcessorItem, TextPreProcessorValue, TextPreProcessor, QuestionTextProcessor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextPreProcessorItem", function() { return TextPreProcessorItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextPreProcessorValue", function() { return TextPreProcessorValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextPreProcessor", function() { return TextPreProcessor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionTextProcessor", function() { return QuestionTextProcessor; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _conditionProcessValue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conditionProcessValue */ "./src/conditionProcessValue.ts");


var TextPreProcessorItem = /** @class */ (function () {
    function TextPreProcessorItem() {
    }
    return TextPreProcessorItem;
}());

var TextPreProcessorValue = /** @class */ (function () {
    function TextPreProcessorValue(name, returnDisplayValue) {
        this.name = name;
        this.returnDisplayValue = returnDisplayValue;
        this.isExists = false;
        this.canProcess = true;
    }
    return TextPreProcessorValue;
}());

var TextPreProcessor = /** @class */ (function () {
    function TextPreProcessor() {
        this._unObservableValues = [undefined];
    }
    Object.defineProperty(TextPreProcessor.prototype, "hasAllValuesOnLastRunValue", {
        get: function () {
            return this._unObservableValues[0];
        },
        set: function (val) {
            this._unObservableValues[0] = val;
        },
        enumerable: false,
        configurable: true
    });
    TextPreProcessor.prototype.process = function (text, returnDisplayValue, doEncoding) {
        if (returnDisplayValue === void 0) { returnDisplayValue = false; }
        if (doEncoding === void 0) { doEncoding = false; }
        this.hasAllValuesOnLastRunValue = true;
        if (!text)
            return text;
        if (!this.onProcess)
            return text;
        var items = this.getItems(text);
        for (var i = items.length - 1; i >= 0; i--) {
            var item = items[i];
            var name = this.getName(text.substring(item.start + 1, item.end));
            if (!name)
                continue;
            var textValue = new TextPreProcessorValue(name, returnDisplayValue);
            this.onProcess(textValue);
            if (!textValue.isExists) {
                if (textValue.canProcess) {
                    this.hasAllValuesOnLastRunValue = false;
                }
                continue;
            }
            if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(textValue.value)) {
                this.hasAllValuesOnLastRunValue = false;
            }
            var replacedValue = !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(textValue.value)
                ? textValue.value
                : "";
            if (doEncoding) {
                replacedValue = encodeURIComponent(replacedValue);
            }
            text =
                text.substring(0, item.start) + replacedValue + text.substring(item.end + 1);
        }
        return text;
    };
    TextPreProcessor.prototype.processValue = function (name, returnDisplayValue) {
        var textValue = new TextPreProcessorValue(name, returnDisplayValue);
        if (!!this.onProcess) {
            this.onProcess(textValue);
        }
        return textValue;
    };
    Object.defineProperty(TextPreProcessor.prototype, "hasAllValuesOnLastRun", {
        get: function () {
            return !!this.hasAllValuesOnLastRunValue;
        },
        enumerable: false,
        configurable: true
    });
    TextPreProcessor.prototype.getItems = function (text) {
        var items = [];
        var length = text.length;
        var start = -1;
        var ch = "";
        for (var i = 0; i < length; i++) {
            ch = text[i];
            if (ch == "{")
                start = i;
            if (ch == "}") {
                if (start > -1) {
                    var item = new TextPreProcessorItem();
                    item.start = start;
                    item.end = i;
                    items.push(item);
                }
                start = -1;
            }
        }
        return items;
    };
    TextPreProcessor.prototype.getName = function (name) {
        if (!name)
            return;
        return name.trim();
    };
    return TextPreProcessor;
}());

var QuestionTextProcessor = /** @class */ (function () {
    function QuestionTextProcessor(variableName) {
        var _this = this;
        this.variableName = variableName;
        this.textPreProcessor = new TextPreProcessor();
        this.textPreProcessor.onProcess = function (textValue) {
            _this.getProcessedTextValue(textValue);
        };
    }
    QuestionTextProcessor.prototype.processValue = function (name, returnDisplayValue) {
        return this.textPreProcessor.processValue(name, returnDisplayValue);
    };
    Object.defineProperty(QuestionTextProcessor.prototype, "survey", {
        get: function () {
            return null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(QuestionTextProcessor.prototype, "panel", {
        get: function () {
            return null;
        },
        enumerable: false,
        configurable: true
    });
    QuestionTextProcessor.prototype.getValues = function () {
        return !!this.panel ? this.panel.getValue() : null;
    };
    QuestionTextProcessor.prototype.getQuestionByName = function (name) {
        return !!this.panel
            ? this.panel.getQuestionByValueName(name)
            : null;
    };
    QuestionTextProcessor.prototype.getParentTextProcessor = function () { return null; };
    QuestionTextProcessor.prototype.onCustomProcessText = function (textValue) {
        return false;
    };
    QuestionTextProcessor.prototype.getQuestionDisplayText = function (question) {
        return question.displayValue;
    };
    //ITextProcessor
    QuestionTextProcessor.prototype.getProcessedTextValue = function (textValue) {
        if (!textValue)
            return;
        if (this.onCustomProcessText(textValue))
            return;
        var firstName = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_1__["ProcessValue"]().getFirstName(textValue.name);
        textValue.isExists = firstName == this.variableName;
        textValue.canProcess = textValue.isExists;
        if (!textValue.canProcess)
            return;
        //name should start with the variable name
        textValue.name = textValue.name.replace(this.variableName + ".", "");
        var firstName = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_1__["ProcessValue"]().getFirstName(textValue.name);
        var question = this.getQuestionByName(firstName);
        var values = {};
        if (question) {
            values[firstName] = textValue.returnDisplayValue
                ? this.getQuestionDisplayText(question)
                : question.value;
        }
        else {
            var allValues = !!this.panel ? this.getValues() : null;
            if (allValues) {
                values[firstName] = allValues[firstName];
            }
        }
        textValue.value = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_1__["ProcessValue"]().getValue(textValue.name, values);
    };
    QuestionTextProcessor.prototype.processText = function (text, returnDisplayValue) {
        if (this.survey && this.survey.isDesignMode)
            return text;
        text = this.textPreProcessor.process(text, returnDisplayValue);
        text = this.processTextCore(this.getParentTextProcessor(), text, returnDisplayValue);
        return this.processTextCore(this.survey, text, returnDisplayValue);
    };
    QuestionTextProcessor.prototype.processTextEx = function (text, returnDisplayValue) {
        text = this.processText(text, returnDisplayValue);
        var hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
        var res = { hasAllValuesOnLastRun: true, text: text };
        if (this.survey) {
            res = this.survey.processTextEx(text, returnDisplayValue, false);
        }
        res.hasAllValuesOnLastRun =
            res.hasAllValuesOnLastRun && hasAllValuesOnLastRun;
        return res;
    };
    QuestionTextProcessor.prototype.processTextCore = function (textProcessor, text, returnDisplayValue) {
        if (!textProcessor)
            return text;
        return textProcessor.processText(text, returnDisplayValue);
    };
    return QuestionTextProcessor;
}());



/***/ }),

/***/ "./src/trigger.ts":
/*!************************!*\
  !*** ./src/trigger.ts ***!
  \************************/
/*! exports provided: Trigger, SurveyTrigger, SurveyTriggerVisible, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerSkip, SurveyTriggerRunExpression, SurveyTriggerCopyValue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return Trigger; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTrigger", function() { return SurveyTrigger; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerVisible", function() { return SurveyTriggerVisible; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerComplete", function() { return SurveyTriggerComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerSetValue", function() { return SurveyTriggerSetValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerSkip", function() { return SurveyTriggerSkip; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerRunExpression", function() { return SurveyTriggerRunExpression; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTriggerCopyValue", function() { return SurveyTriggerCopyValue; });
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _expressions_expressions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./expressions/expressions */ "./src/expressions/expressions.ts");
/* harmony import */ var _conditionProcessValue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./conditionProcessValue */ "./src/conditionProcessValue.ts");
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * A base class for all triggers.
 * A trigger calls a method when the expression change the result: from false to true or from true to false.
 * Please note, it runs only one changing the expression result.
 */
var Trigger = /** @class */ (function (_super) {
    __extends(Trigger, _super);
    function Trigger() {
        var _this = _super.call(this) || this;
        _this.usedNames = [];
        _this.registerPropertyChangedHandlers(["operator", "value", "name"], function () {
            _this.oldPropertiesChanged();
        });
        _this.registerPropertyChangedHandlers(["expression"], function () { _this.onExpressionChanged(); });
        return _this;
    }
    Object.defineProperty(Trigger, "operators", {
        get: function () {
            if (Trigger.operatorsValue != null)
                return Trigger.operatorsValue;
            Trigger.operatorsValue = {
                empty: function (value, expectedValue) {
                    return !value;
                },
                notempty: function (value, expectedValue) {
                    return !!value;
                },
                equal: function (value, expectedValue) {
                    return value == expectedValue;
                },
                notequal: function (value, expectedValue) {
                    return value != expectedValue;
                },
                contains: function (value, expectedValue) {
                    return value && value["indexOf"] && value.indexOf(expectedValue) > -1;
                },
                notcontains: function (value, expectedValue) {
                    return (!value || !value["indexOf"] || value.indexOf(expectedValue) == -1);
                },
                greater: function (value, expectedValue) {
                    return value > expectedValue;
                },
                less: function (value, expectedValue) {
                    return value < expectedValue;
                },
                greaterorequal: function (value, expectedValue) {
                    return value >= expectedValue;
                },
                lessorequal: function (value, expectedValue) {
                    return value <= expectedValue;
                },
            };
            return Trigger.operatorsValue;
        },
        enumerable: false,
        configurable: true
    });
    Trigger.prototype.getType = function () {
        return "triggerbase";
    };
    Trigger.prototype.toString = function () {
        var res = this.getType().replace("trigger", "");
        var exp = !!this.expression ? this.expression : this.buildExpression();
        if (exp) {
            res += ", " + exp;
        }
        return res;
    };
    Object.defineProperty(Trigger.prototype, "operator", {
        get: function () {
            return this.getPropertyValue("operator", "equal");
        },
        set: function (value) {
            if (!value)
                return;
            value = value.toLowerCase();
            if (!Trigger.operators[value])
                return;
            this.setPropertyValue("operator", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Trigger.prototype, "value", {
        get: function () {
            return this.getPropertyValue("value", null);
        },
        set: function (val) {
            this.setPropertyValue("value", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Trigger.prototype, "name", {
        get: function () {
            return this.getPropertyValue("name", "");
        },
        set: function (val) {
            this.setPropertyValue("name", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Trigger.prototype, "expression", {
        get: function () {
            return this.getPropertyValue("expression", "");
        },
        set: function (val) {
            this.setPropertyValue("expression", val);
        },
        enumerable: false,
        configurable: true
    });
    Trigger.prototype.canBeExecuted = function (isOnNextPage) {
        return true;
    };
    Trigger.prototype.checkExpression = function (isOnNextPage, keys, values, properties) {
        if (properties === void 0) { properties = null; }
        this.isExecutingOnNextPage = isOnNextPage;
        if (!this.canBeExecuted(isOnNextPage))
            return;
        if (!this.isCheckRequired(keys))
            return;
        if (!!this.conditionRunner) {
            this.perform(values, properties);
        }
    };
    Trigger.prototype.check = function (value) {
        var triggerResult = Trigger.operators[this.operator](value, this.value);
        if (triggerResult) {
            this.onSuccess({}, null);
        }
        else {
            this.onFailure();
        }
    };
    Trigger.prototype.perform = function (values, properties) {
        var _this = this;
        this.conditionRunner.onRunComplete = function (res) {
            _this.triggerResult(res, values, properties);
        };
        this.conditionRunner.run(values, properties);
    };
    Trigger.prototype.triggerResult = function (res, values, properties) {
        if (res) {
            this.onSuccess(values, properties);
            this.onSuccessExecuted();
        }
        else {
            this.onFailure();
        }
    };
    Trigger.prototype.onSuccess = function (values, properties) { };
    Trigger.prototype.onFailure = function () { };
    Trigger.prototype.onSuccessExecuted = function () { };
    Trigger.prototype.endLoadingFromJson = function () {
        _super.prototype.endLoadingFromJson.call(this);
        this.oldPropertiesChanged();
    };
    Trigger.prototype.oldPropertiesChanged = function () {
        this.onExpressionChanged();
    };
    Trigger.prototype.onExpressionChanged = function () {
        this.usedNames = [];
        this.hasFunction = false;
        this.conditionRunner = null;
    };
    Trigger.prototype.buildExpression = function () {
        if (!this.name)
            return "";
        if (this.isValueEmpty(this.value) && this.isRequireValue)
            return "";
        return ("{" +
            this.name +
            "} " +
            this.operator +
            " " +
            _expressions_expressions__WEBPACK_IMPORTED_MODULE_4__["OperandMaker"].toOperandString(this.value));
    };
    Trigger.prototype.isCheckRequired = function (keys) {
        if (!keys)
            return false;
        this.buildUsedNames();
        if (this.hasFunction === true)
            return true;
        var processValue = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_5__["ProcessValue"]();
        for (var i = 0; i < this.usedNames.length; i++) {
            var name = this.usedNames[i];
            if (keys.hasOwnProperty(name))
                return true;
            var firstName = processValue.getFirstName(name);
            if (!keys.hasOwnProperty(firstName))
                continue;
            if (name == firstName)
                return true;
            var keyValue = keys[firstName];
            if (keyValue == undefined)
                continue;
            if (!keyValue.hasOwnProperty("oldValue") ||
                !keyValue.hasOwnProperty("newValue"))
                return true;
            var v = {};
            v[firstName] = keyValue["oldValue"];
            var oldValue = processValue.getValue(name, v);
            v[firstName] = keyValue["newValue"];
            var newValue = processValue.getValue(name, v);
            return !this.isTwoValueEquals(oldValue, newValue);
        }
        return false;
    };
    Trigger.prototype.buildUsedNames = function () {
        if (!!this.conditionRunner)
            return;
        var expression = this.expression;
        if (!expression) {
            expression = this.buildExpression();
        }
        if (!expression)
            return;
        this.conditionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](expression);
        this.hasFunction = this.conditionRunner.hasFunction();
        this.usedNames = this.conditionRunner.getVariables();
    };
    Object.defineProperty(Trigger.prototype, "isRequireValue", {
        get: function () {
            return this.operator !== "empty" && this.operator != "notempty";
        },
        enumerable: false,
        configurable: true
    });
    Trigger.operatorsValue = null;
    return Trigger;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));

/**
 * It extends the Trigger base class and add properties required for SurveyJS classes.
 */
var SurveyTrigger = /** @class */ (function (_super) {
    __extends(SurveyTrigger, _super);
    function SurveyTrigger() {
        var _this = _super.call(this) || this;
        _this.ownerValue = null;
        return _this;
    }
    Object.defineProperty(SurveyTrigger.prototype, "owner", {
        get: function () {
            return this.ownerValue;
        },
        enumerable: false,
        configurable: true
    });
    SurveyTrigger.prototype.setOwner = function (owner) {
        this.ownerValue = owner;
    };
    SurveyTrigger.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        return !!this.owner && !!this.owner["getSurvey"]
            ? this.owner.getSurvey()
            : null;
    };
    SurveyTrigger.prototype.isRealExecution = function () {
        return true;
    };
    SurveyTrigger.prototype.onSuccessExecuted = function () {
        if (!!this.owner && this.isRealExecution()) {
            this.owner.triggerExecuted(this);
        }
    };
    return SurveyTrigger;
}(Trigger));

/**
 * If expression returns true, it makes questions/pages visible.
 * Ohterwise it makes them invisible.
 */
var SurveyTriggerVisible = /** @class */ (function (_super) {
    __extends(SurveyTriggerVisible, _super);
    function SurveyTriggerVisible() {
        var _this = _super.call(this) || this;
        _this.pages = [];
        _this.questions = [];
        return _this;
    }
    SurveyTriggerVisible.prototype.getType = function () {
        return "visibletrigger";
    };
    SurveyTriggerVisible.prototype.onSuccess = function (values, properties) {
        this.onTrigger(this.onItemSuccess);
    };
    SurveyTriggerVisible.prototype.onFailure = function () {
        this.onTrigger(this.onItemFailure);
    };
    SurveyTriggerVisible.prototype.onTrigger = function (func) {
        if (!this.owner)
            return;
        var objects = this.owner.getObjects(this.pages, this.questions);
        for (var i = 0; i < objects.length; i++) {
            func(objects[i]);
        }
    };
    SurveyTriggerVisible.prototype.onItemSuccess = function (item) {
        item.visible = true;
    };
    SurveyTriggerVisible.prototype.onItemFailure = function (item) {
        item.visible = false;
    };
    return SurveyTriggerVisible;
}(SurveyTrigger));

/**
 * If expression returns true, it completes the survey.
 */
var SurveyTriggerComplete = /** @class */ (function (_super) {
    __extends(SurveyTriggerComplete, _super);
    function SurveyTriggerComplete() {
        return _super.call(this) || this;
    }
    SurveyTriggerComplete.prototype.getType = function () {
        return "completetrigger";
    };
    SurveyTriggerComplete.prototype.isRealExecution = function () {
        return !_settings__WEBPACK_IMPORTED_MODULE_6__["settings"].executeCompleteTriggerOnValueChanged === this.isExecutingOnNextPage;
    };
    SurveyTriggerComplete.prototype.onSuccess = function (values, properties) {
        if (!this.owner)
            return;
        if (this.isRealExecution()) {
            this.owner.setCompleted();
        }
        else {
            this.owner.canBeCompleted();
        }
    };
    return SurveyTriggerComplete;
}(SurveyTrigger));

/**
 * If expression returns true, the value from property **setValue** will be set to **setToName**
 */
var SurveyTriggerSetValue = /** @class */ (function (_super) {
    __extends(SurveyTriggerSetValue, _super);
    function SurveyTriggerSetValue() {
        return _super.call(this) || this;
    }
    SurveyTriggerSetValue.prototype.getType = function () {
        return "setvaluetrigger";
    };
    SurveyTriggerSetValue.prototype.canBeExecuted = function (isOnNextPage) {
        return !isOnNextPage && !!this.setToName;
    };
    SurveyTriggerSetValue.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
        _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
        if (name !== "setToName")
            return;
        var survey = this.getSurvey();
        if (survey && !survey.isLoadingFromJson && survey.isDesignMode) {
            this.setValue = undefined;
        }
    };
    Object.defineProperty(SurveyTriggerSetValue.prototype, "setToName", {
        get: function () {
            return this.getPropertyValue("setToName", "");
        },
        set: function (val) {
            this.setPropertyValue("setToName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyTriggerSetValue.prototype, "setValue", {
        get: function () {
            return this.getPropertyValue("setValue");
        },
        set: function (val) {
            this.setPropertyValue("setValue", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyTriggerSetValue.prototype, "isVariable", {
        get: function () {
            return this.getPropertyValue("isVariable", false);
        },
        set: function (val) {
            this.setPropertyValue("isVariable", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyTriggerSetValue.prototype.onSuccess = function (values, properties) {
        if (!this.setToName || !this.owner)
            return;
        this.owner.setTriggerValue(this.setToName, this.setValue, this.isVariable);
    };
    return SurveyTriggerSetValue;
}(SurveyTrigger));

/**
 * If expression returns true, the survey go to question **gotoName** and focus it.
 */
var SurveyTriggerSkip = /** @class */ (function (_super) {
    __extends(SurveyTriggerSkip, _super);
    function SurveyTriggerSkip() {
        return _super.call(this) || this;
    }
    SurveyTriggerSkip.prototype.getType = function () {
        return "skiptrigger";
    };
    Object.defineProperty(SurveyTriggerSkip.prototype, "gotoName", {
        get: function () {
            return this.getPropertyValue("gotoName", "");
        },
        set: function (val) {
            this.setPropertyValue("gotoName", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyTriggerSkip.prototype.canBeExecuted = function (isOnNextPage) {
        return isOnNextPage === !_settings__WEBPACK_IMPORTED_MODULE_6__["settings"].executeSkipTriggerOnValueChanged;
    };
    SurveyTriggerSkip.prototype.onSuccess = function (values, properties) {
        if (!this.gotoName || !this.owner)
            return;
        this.owner.focusQuestion(this.gotoName);
    };
    return SurveyTriggerSkip;
}(SurveyTrigger));

/**
 * If expression returns true, the **runExpression** will be run. If **setToName** property is not empty then the result of **runExpression** will be set to it.
 */
var SurveyTriggerRunExpression = /** @class */ (function (_super) {
    __extends(SurveyTriggerRunExpression, _super);
    function SurveyTriggerRunExpression() {
        return _super.call(this) || this;
    }
    SurveyTriggerRunExpression.prototype.getType = function () {
        return "runexpressiontrigger";
    };
    Object.defineProperty(SurveyTriggerRunExpression.prototype, "setToName", {
        get: function () {
            return this.getPropertyValue("setToName", "");
        },
        set: function (val) {
            this.setPropertyValue("setToName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyTriggerRunExpression.prototype, "runExpression", {
        get: function () {
            return this.getPropertyValue("runExpression", "");
        },
        set: function (val) {
            this.setPropertyValue("runExpression", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyTriggerRunExpression.prototype.onSuccess = function (values, properties) {
        var _this = this;
        if (!this.owner || !this.runExpression)
            return;
        var expression = new _conditions__WEBPACK_IMPORTED_MODULE_3__["ExpressionRunner"](this.runExpression);
        if (expression.canRun) {
            expression.onRunComplete = function (res) {
                _this.onCompleteRunExpression(res);
            };
            expression.run(values, properties);
        }
    };
    SurveyTriggerRunExpression.prototype.onCompleteRunExpression = function (newValue) {
        if (!!this.setToName && newValue !== undefined) {
            this.owner.setTriggerValue(this.setToName, _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(newValue), false);
        }
    };
    return SurveyTriggerRunExpression;
}(SurveyTrigger));

/**
 * If expression returns true, the value from question **fromName** will be set into **setToName**.
 */
var SurveyTriggerCopyValue = /** @class */ (function (_super) {
    __extends(SurveyTriggerCopyValue, _super);
    function SurveyTriggerCopyValue() {
        return _super.call(this) || this;
    }
    SurveyTriggerCopyValue.prototype.canBeExecuted = function (isOnNextPage) {
        return !isOnNextPage && !!this.setToName && !!this.fromName;
    };
    Object.defineProperty(SurveyTriggerCopyValue.prototype, "setToName", {
        get: function () {
            return this.getPropertyValue("setToName", "");
        },
        set: function (val) {
            this.setPropertyValue("setToName", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyTriggerCopyValue.prototype, "fromName", {
        get: function () {
            return this.getPropertyValue("fromName", "");
        },
        set: function (val) {
            this.setPropertyValue("fromName", val);
        },
        enumerable: false,
        configurable: true
    });
    SurveyTriggerCopyValue.prototype.getType = function () {
        return "copyvaluetrigger";
    };
    SurveyTriggerCopyValue.prototype.onSuccess = function (values, properties) {
        if (!this.setToName || !this.owner)
            return;
        this.owner.copyTriggerValue(this.setToName, this.fromName);
    };
    return SurveyTriggerCopyValue;
}(SurveyTrigger));

_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("trigger", [
    { name: "operator", default: "equal", visible: false },
    { name: "value", visible: false },
    "expression:condition",
]);
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("surveytrigger", [{ name: "name", visible: false }], null, "trigger");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("visibletrigger", ["pages:pages", "questions:questions"], function () {
    return new SurveyTriggerVisible();
}, "surveytrigger");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("completetrigger", [], function () {
    return new SurveyTriggerComplete();
}, "surveytrigger");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("setvaluetrigger", [
    { name: "!setToName:questionvalue" },
    {
        name: "setValue:triggervalue",
        dependsOn: "setToName",
        visibleIf: function (obj) {
            return !!obj && !!obj["setToName"];
        },
    },
    { name: "isVariable:boolean", visible: false },
], function () {
    return new SurveyTriggerSetValue();
}, "surveytrigger");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("copyvaluetrigger", [{ name: "!fromName:questionvalue" }, { name: "!setToName:questionvalue" }], function () {
    return new SurveyTriggerCopyValue();
}, "surveytrigger");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("skiptrigger", [{ name: "!gotoName:question" }], function () {
    return new SurveyTriggerSkip();
}, "surveytrigger");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("runexpressiontrigger", [{ name: "setToName:questionvalue" }, "runExpression:expression"], function () {
    return new SurveyTriggerRunExpression();
}, "surveytrigger");


/***/ }),

/***/ "./src/utils/cssClassBuilder.ts":
/*!**************************************!*\
  !*** ./src/utils/cssClassBuilder.ts ***!
  \**************************************/
/*! exports provided: CssClassBuilder */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return CssClassBuilder; });
var CssClassBuilder = /** @class */ (function () {
    function CssClassBuilder() {
        this.classes = [];
    }
    CssClassBuilder.prototype.isEmpty = function () {
        return this.toString() === "";
    };
    CssClassBuilder.prototype.append = function (value, condition) {
        if (condition === void 0) { condition = true; }
        if (!!value && condition) {
            if (typeof value === "string") {
                value = value.trim();
            }
            this.classes.push(value);
        }
        return this;
    };
    CssClassBuilder.prototype.toString = function () {
        return this.classes.join(" ");
    };
    return CssClassBuilder;
}());



/***/ }),

/***/ "./src/utils/devices.ts":
/*!******************************!*\
  !*** ./src/utils/devices.ts ***!
  \******************************/
/*! exports provided: IsMobile, IsTouch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return IsMobile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
// isMobile
var _isMobile = false;
var vendor = null;
if (typeof navigator !== "undefined" &&
    typeof window !== "undefined" &&
    navigator &&
    window) {
    vendor = navigator.userAgent || navigator.vendor || window.opera;
}
(function (a) {
    if (!a)
        return;
    if ((navigator.platform === "MacIntel" && navigator.maxTouchPoints > 0) || navigator.platform === "iPad") {
        _isMobile = true;
    }
    else if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
        /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substring(0, 4)))
        _isMobile = true;
})(vendor);
var _IPad = false;
var IsMobile = _isMobile || _IPad;
// isTouch
var _isTouch = false;
if (typeof window !== "undefined") {
    _isTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
}
var IsTouch = IsMobile && _isTouch;


/***/ }),

/***/ "./src/utils/dragOrClickHelper.ts":
/*!****************************************!*\
  !*** ./src/utils/dragOrClickHelper.ts ***!
  \****************************************/
/*! exports provided: DragOrClickHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return DragOrClickHelper; });
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");

var DragOrClickHelper = /** @class */ (function () {
    function DragOrClickHelper(dragHandler) {
        var _this = this;
        this.dragHandler = dragHandler;
        this.onPointerUp = function (pointerUpEvent) {
            _this.clearListeners();
        };
        this.tryToStartDrag = function (pointerMoveEvent) {
            _this.currentX = pointerMoveEvent.pageX;
            _this.currentY = pointerMoveEvent.pageY;
            if (_this.isMicroMovement)
                return;
            _this.clearListeners();
            _this.dragHandler(_this.pointerDownEvent, _this.currentTarget, _this.itemModel);
            return true;
        };
    }
    DragOrClickHelper.prototype.onPointerDown = function (pointerDownEvent, itemModel) {
        if (survey_core__WEBPACK_IMPORTED_MODULE_0__["IsTouch"]) {
            this.dragHandler(pointerDownEvent, pointerDownEvent.currentTarget, itemModel); //TODO handle inside in the library's drag drop core, need refactoring
            return;
        }
        this.pointerDownEvent = pointerDownEvent;
        this.currentTarget = pointerDownEvent.currentTarget;
        this.startX = pointerDownEvent.pageX;
        this.startY = pointerDownEvent.pageY;
        document.addEventListener("pointermove", this.tryToStartDrag);
        this.currentTarget.addEventListener("pointerup", this.onPointerUp);
        this.itemModel = itemModel;
    };
    Object.defineProperty(DragOrClickHelper.prototype, "isMicroMovement", {
        // see https://stackoverflow.com/questions/6042202/how-to-distinguish-mouse-click-and-drag
        get: function () {
            var delta = 10;
            var diffX = Math.abs(this.currentX - this.startX);
            var diffY = Math.abs(this.currentY - this.startY);
            return diffX < delta && diffY < delta;
        },
        enumerable: false,
        configurable: true
    });
    DragOrClickHelper.prototype.clearListeners = function () {
        if (!this.pointerDownEvent)
            return;
        document.removeEventListener("pointermove", this.tryToStartDrag);
        this.currentTarget.removeEventListener("pointerup", this.onPointerUp);
    };
    return DragOrClickHelper;
}());



/***/ }),

/***/ "./src/utils/popup.ts":
/*!****************************!*\
  !*** ./src/utils/popup.ts ***!
  \****************************/
/*! exports provided: PopupUtils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupUtils", function() { return PopupUtils; });
var PopupUtils = /** @class */ (function () {
    function PopupUtils() {
    }
    PopupUtils.calculatePosition = function (targetRect, height, width, verticalPosition, horizontalPosition, showPointer, positionMode) {
        if (positionMode === void 0) { positionMode = "flex"; }
        var currentLeft = targetRect.left;
        var currentTop = targetRect.top;
        if (positionMode === "flex") {
            if (horizontalPosition == "center")
                currentLeft = (targetRect.left + targetRect.right - width) / 2;
            else if (horizontalPosition == "left")
                currentLeft = targetRect.left - width;
            else
                currentLeft = targetRect.right;
        }
        if (verticalPosition == "middle")
            currentTop = (targetRect.top + targetRect.bottom - height) / 2;
        else if (verticalPosition == "top")
            currentTop = targetRect.top - height;
        else
            currentTop = targetRect.bottom;
        if (showPointer) {
            if (horizontalPosition != "center" && verticalPosition != "middle") {
                if (verticalPosition == "top") {
                    currentTop = currentTop + targetRect.height;
                }
                else {
                    currentTop = currentTop - targetRect.height;
                }
            }
        }
        return { left: Math.round(currentLeft), top: Math.round(currentTop) };
    };
    PopupUtils.updateVerticalDimensions = function (top, height, windowHeight) {
        var result;
        if (top < 0) {
            result = { height: height + top, top: 0 };
        }
        else if (height + top > windowHeight) {
            var newHeight = Math.min(height, windowHeight - top - PopupUtils.bottomIndent);
            result = { height: newHeight, top: top };
        }
        return result;
    };
    PopupUtils.updateHorizontalDimensions = function (left, width, windowWidth, horizontalPosition, positionMode, margins) {
        if (positionMode === void 0) { positionMode = "flex"; }
        if (margins === void 0) { margins = { left: 0, right: 0 }; }
        width += (margins.left + margins.right);
        var newWidth = undefined, newLeft = left;
        if (horizontalPosition === "center") {
            if (positionMode === "fixed") {
                if (left + width > windowWidth) {
                    newWidth = windowWidth - left;
                }
                newLeft -= margins.left;
            }
            else {
                if (left < 0) {
                    newLeft = margins.left;
                    newWidth = Math.min(width, windowWidth);
                }
                else if (width + left > windowWidth) {
                    newLeft = windowWidth - width;
                    newLeft = Math.max(newLeft, margins.left);
                    newWidth = Math.min(width, windowWidth);
                }
            }
        }
        if (horizontalPosition === "left") {
            if (left < 0) {
                newLeft = margins.left;
                newWidth = Math.min(width, windowWidth);
            }
        }
        if (horizontalPosition === "right") {
            if (width + left > windowWidth) {
                newWidth = windowWidth - left;
            }
        }
        return { width: newWidth - margins.left - margins.right, left: newLeft };
    };
    PopupUtils.updateVerticalPosition = function (targetRect, height, verticalPosition, showPointer, windowHeight) {
        var deltaTop = height - (targetRect.top + (showPointer ? targetRect.height : 0));
        var deltaBottom = height +
            targetRect.bottom -
            (showPointer ? targetRect.height : 0) -
            windowHeight;
        if (deltaTop > 0 && deltaBottom <= 0 && verticalPosition == "top") {
            verticalPosition = "bottom";
        }
        else if (deltaBottom > 0 &&
            deltaTop <= 0 &&
            verticalPosition == "bottom") {
            verticalPosition = "top";
        }
        else if (deltaBottom > 0 && deltaTop > 0) {
            verticalPosition = deltaTop < deltaBottom ? "top" : "bottom";
        }
        return verticalPosition;
    };
    PopupUtils.calculatePopupDirection = function (verticalPosition, horizontalPosition) {
        var popupDirection;
        if (horizontalPosition == "center" && verticalPosition != "middle") {
            popupDirection = verticalPosition;
        }
        else if (horizontalPosition != "center") {
            popupDirection = horizontalPosition;
        }
        return popupDirection;
    };
    //called when showPointer  is true
    PopupUtils.calculatePointerTarget = function (targetRect, top, left, verticalPosition, horizontalPosition, marginLeft, marginRight) {
        if (marginLeft === void 0) { marginLeft = 0; }
        if (marginRight === void 0) { marginRight = 0; }
        var targetPos = {};
        if (horizontalPosition != "center") {
            targetPos.top = targetRect.top + targetRect.height / 2;
            targetPos.left = targetRect[horizontalPosition];
        }
        else if (verticalPosition != "middle") {
            targetPos.top = targetRect[verticalPosition];
            targetPos.left = targetRect.left + targetRect.width / 2;
        }
        targetPos.left = Math.round(targetPos.left - left);
        targetPos.top = Math.round(targetPos.top - top);
        if (horizontalPosition == "left") {
            targetPos.left -= marginLeft + marginRight;
        }
        if (horizontalPosition === "center") {
            targetPos.left -= marginLeft;
        }
        return targetPos;
    };
    PopupUtils.bottomIndent = 16;
    return PopupUtils;
}());



/***/ }),

/***/ "./src/utils/responsivity-manager.ts":
/*!*******************************************!*\
  !*** ./src/utils/responsivity-manager.ts ***!
  \*******************************************/
/*! exports provided: ResponsivityManager, VerticalResponsivityManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsivityManager", function() { return ResponsivityManager; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VerticalResponsivityManager", function() { return VerticalResponsivityManager; });
/* harmony import */ var timers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! timers */ "./node_modules/timers-browserify/main.js");
/* harmony import */ var timers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(timers__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/utils/utils.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var ResponsivityManager = /** @class */ (function () {
    function ResponsivityManager(container, model, itemsSelector, dotsItemSize) {
        if (dotsItemSize === void 0) { dotsItemSize = null; }
        var _this = this;
        this.container = container;
        this.model = model;
        this.itemsSelector = itemsSelector;
        this.dotsItemSize = dotsItemSize;
        this.resizeObserver = undefined;
        this.isInitialized = false;
        this.minDimensionConst = 56;
        this.separatorSize = 17;
        this.separatorAddConst = 1;
        this.paddingSizeConst = 8;
        this.dotsSizeConst = 48;
        this.recalcMinDimensionConst = true;
        this.getComputedStyle = window.getComputedStyle.bind(window);
        this.model.updateCallback = function (isResetInitialized) {
            if (isResetInitialized)
                _this.isInitialized = false;
            else
                Object(timers__WEBPACK_IMPORTED_MODULE_0__["setTimeout"])(function () { _this.process(); }, 1);
        };
        if (typeof ResizeObserver !== "undefined") {
            this.resizeObserver = new ResizeObserver(function (_) { return _this.process(); });
            this.resizeObserver.observe(this.container.parentElement);
        }
    }
    ResponsivityManager.prototype.getDimensions = function (element) {
        return {
            scroll: element.scrollWidth,
            offset: element.offsetWidth,
        };
    };
    ResponsivityManager.prototype.getAvailableSpace = function () {
        var style = this.getComputedStyle(this.container);
        var space = this.container.offsetWidth;
        if (style.boxSizing === "border-box") {
            space -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
        }
        return space;
    };
    ResponsivityManager.prototype.calcItemSize = function (item) {
        return item.offsetWidth;
    };
    ResponsivityManager.prototype.calcMinDimension = function (currentAction) {
        var minDimensionConst = this.minDimensionConst;
        if (currentAction.iconSize && this.recalcMinDimensionConst) {
            minDimensionConst = 2 * currentAction.iconSize + this.paddingSizeConst;
        }
        return currentAction.canShrink
            ? minDimensionConst +
                (currentAction.needSeparator ? this.separatorSize : 0)
            : currentAction.maxDimension;
    };
    ResponsivityManager.prototype.calcItemsSizes = function () {
        var _this = this;
        var actions = this.model.actions;
        this.container
            .querySelectorAll(this.itemsSelector)
            .forEach(function (item, index) {
            var currentAction = actions[index];
            _this.calcActionDimensions(currentAction, item);
        });
    };
    ResponsivityManager.prototype.calcActionDimensions = function (currentAction, item) {
        currentAction.maxDimension = this.calcItemSize(item);
        currentAction.minDimension = this.calcMinDimension(currentAction);
    };
    Object.defineProperty(ResponsivityManager.prototype, "isContainerVisible", {
        get: function () {
            return Object(_utils__WEBPACK_IMPORTED_MODULE_1__["isContainerVisible"])(this.container);
        },
        enumerable: false,
        configurable: true
    });
    ResponsivityManager.prototype.process = function () {
        var _a;
        if (this.isContainerVisible && !this.model.isResponsivenessDisabled) {
            if (!this.isInitialized) {
                this.model.setActionsMode("large");
                this.calcItemsSizes();
                this.isInitialized = true;
            }
            var dotsItemSize = this.dotsItemSize;
            if (!this.dotsItemSize) {
                var dotsItemElement = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(".sv-dots");
                dotsItemSize = dotsItemElement && this.calcItemSize(dotsItemElement) || this.dotsSizeConst;
            }
            this.model.fit(this.getAvailableSpace(), dotsItemSize);
        }
    };
    ResponsivityManager.prototype.dispose = function () {
        this.model.updateCallback = undefined;
        if (!!this.resizeObserver) {
            this.resizeObserver.disconnect();
        }
    };
    return ResponsivityManager;
}());

var VerticalResponsivityManager = /** @class */ (function (_super) {
    __extends(VerticalResponsivityManager, _super);
    function VerticalResponsivityManager(container, model, itemsSelector, dotsItemSize, minDimension) {
        if (minDimension === void 0) { minDimension = 40; }
        var _this = _super.call(this, container, model, itemsSelector, dotsItemSize) || this;
        _this.minDimensionConst = minDimension;
        _this.recalcMinDimensionConst = false;
        return _this;
    }
    VerticalResponsivityManager.prototype.getDimensions = function () {
        return {
            scroll: this.container.scrollHeight,
            offset: this.container.offsetHeight,
        };
    };
    VerticalResponsivityManager.prototype.getAvailableSpace = function () {
        var style = this.getComputedStyle(this.container);
        var space = this.container.offsetHeight;
        if (style.boxSizing === "border-box") {
            space -= parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
        }
        return space;
    };
    VerticalResponsivityManager.prototype.calcItemSize = function (item) {
        return item.offsetHeight;
    };
    VerticalResponsivityManager.prototype.calcActionDimensions = function (currentAction, item) {
        currentAction.maxDimension = this.calcItemSize(item);
        currentAction.minDimension = this.calcItemSize(item);
    };
    return VerticalResponsivityManager;
}(ResponsivityManager));



/***/ }),

/***/ "./src/utils/tooltip.ts":
/*!******************************!*\
  !*** ./src/utils/tooltip.ts ***!
  \******************************/
/*! exports provided: TooltipManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipManager", function() { return TooltipManager; });
var TooltipManager = /** @class */ (function () {
    function TooltipManager(tooltipElement) {
        var _this = this;
        this.tooltipElement = tooltipElement;
        this.onMouseMoveCallback = function (e) {
            _this.tooltipElement.style.left = e.clientX + 12 + "px";
            _this.tooltipElement.style.top = e.clientY + 12 + "px";
        };
        this.targetElement = tooltipElement.parentElement;
        this.targetElement.addEventListener("mousemove", this.onMouseMoveCallback);
    }
    TooltipManager.prototype.dispose = function () {
        this.targetElement.removeEventListener("mousemove", this.onMouseMoveCallback);
    };
    return TooltipManager;
}());



/***/ }),

/***/ "./src/utils/utils.ts":
/*!****************************!*\
  !*** ./src/utils/utils.ts ***!
  \****************************/
/*! exports provided: unwrap, getSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isElementVisible, findScrollableParent, scrollElementByChildId, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unwrap", function() { return unwrap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSize", function() { return getSize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickBlur", function() { return doKey2ClickBlur; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickUp", function() { return doKey2ClickUp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickDown", function() { return doKey2ClickDown; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return sanitizeEditableContent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classesToSelector", function() { return classesToSelector; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareVersions", function() { return compareVersions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "confirmAction", function() { return confirmAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectIEOrEdge", function() { return detectIEOrEdge; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectIEBrowser", function() { return detectIEBrowser; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return loadFileFromBase64; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElementVisible", function() { return isElementVisible; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findScrollableParent", function() { return findScrollableParent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollElementByChildId", function() { return scrollElementByChildId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return createSvg; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIconNameFromProxy", function() { return getIconNameFromProxy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "increaseHeightByContent", function() { return increaseHeightByContent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOriginalEvent", function() { return getOriginalEvent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "preventDefaults", function() { return preventDefaults; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findParentByClassNames", function() { return findParentByClassNames; });
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../settings */ "./src/settings.ts");

function compareVersions(a, b) {
    var regExStrip0 = /(\.0+)+$/;
    var segmentsA = a.replace(regExStrip0, "").split(".");
    var segmentsB = b.replace(regExStrip0, "").split(".");
    var len = Math.min(segmentsA.length, segmentsB.length);
    for (var i = 0; i < len; i++) {
        var diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10);
        if (diff) {
            return diff;
        }
    }
    return segmentsA.length - segmentsB.length;
}
function confirmAction(message) {
    if (!!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].confirmActionFunc)
        return _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].confirmActionFunc(message);
    return confirm(message);
}
function detectIEBrowser() {
    if (typeof window === "undefined")
        return false;
    var ua = window.navigator.userAgent;
    var oldIe = ua.indexOf("MSIE ");
    var elevenIe = ua.indexOf("Trident/");
    return oldIe > -1 || elevenIe > -1;
}
function detectIEOrEdge() {
    if (typeof window === "undefined")
        return false;
    if (typeof detectIEOrEdge.isIEOrEdge === "undefined") {
        var ua = window.navigator.userAgent;
        var msie = ua.indexOf("MSIE ");
        var trident = ua.indexOf("Trident/");
        var edge = ua.indexOf("Edge/");
        detectIEOrEdge.isIEOrEdge = edge > 0 || trident > 0 || msie > 0;
    }
    return detectIEOrEdge.isIEOrEdge;
}
function loadFileFromBase64(b64Data, fileName) {
    try {
        var byteString = atob(b64Data.split(",")[1]);
        // separate out the mime component
        var mimeString = b64Data
            .split(",")[0]
            .split(":")[1]
            .split(";")[0];
        // write the bytes of the string to an ArrayBuffer
        var ab = new ArrayBuffer(byteString.length);
        var ia = new Uint8Array(ab);
        for (var i = 0; i < byteString.length; i++) {
            ia[i] = byteString.charCodeAt(i);
        }
        // write the ArrayBuffer to a blob, and you're done
        var bb = new Blob([ab], { type: mimeString });
        if (typeof window !== "undefined" &&
            window.navigator &&
            window.navigator["msSaveBlob"]) {
            window.navigator["msSaveOrOpenBlob"](bb, fileName);
        }
    }
    catch (err) { }
}
function isMobile() {
    return (typeof window !== "undefined" && typeof window.orientation !== "undefined");
}
function isElementVisible(element, threshold) {
    if (threshold === void 0) { threshold = 0; }
    if (typeof document === "undefined") {
        return false;
    }
    var elementRect = element.getBoundingClientRect();
    var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
    var topWin = -threshold;
    var bottomWin = viewHeight + threshold;
    var topEl = elementRect.top;
    var bottomEl = elementRect.bottom;
    var maxTop = Math.max(topWin, topEl);
    var minBottom = Math.min(bottomWin, bottomEl);
    return maxTop <= minBottom;
}
function findScrollableParent(element) {
    if (!element) {
        return document.documentElement;
    }
    if (element.scrollHeight > element.clientHeight &&
        (getComputedStyle(element).overflowY === "scroll" ||
            getComputedStyle(element).overflowY === "auto")) {
        return element;
    }
    if (element.scrollWidth > element.clientWidth &&
        (getComputedStyle(element).overflowX === "scroll" ||
            getComputedStyle(element).overflowX === "auto")) {
        return element;
    }
    return findScrollableParent(element.parentElement);
}
function scrollElementByChildId(id) {
    if (!document)
        return;
    var el = document.getElementById(id);
    if (!el)
        return;
    var scrollableEl = findScrollableParent(el);
    if (!!scrollableEl) {
        scrollableEl.dispatchEvent(new CustomEvent("scroll"));
    }
}
function getIconNameFromProxy(iconName) {
    if (!iconName)
        return iconName;
    var proxyName = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].customIcons[iconName];
    return !!proxyName ? proxyName : iconName;
}
function createSvg(size, width, height, iconName, svgElem, title) {
    if (!svgElem)
        return;
    if (size !== "auto") {
        svgElem.style.width = (size || width || 16) + "px";
        svgElem.style.height = (size || height || 16) + "px";
    }
    var node = svgElem.childNodes[0];
    var realIconName = getIconNameFromProxy(iconName);
    node.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "#" + realIconName);
    var titleElement = svgElem.getElementsByTagName("title")[0];
    if (!title) {
        if (!!titleElement) {
            svgElem.removeChild(titleElement);
        }
        return;
    }
    else {
        if (!titleElement) {
            titleElement = document.createElementNS("http://www.w3.org/2000/svg", "title");
            svgElem.appendChild(titleElement);
        }
    }
    titleElement.textContent = title;
}
function unwrap(value) {
    if (typeof value !== "function") {
        return value;
    }
    else {
        return value();
    }
}
function getSize(value) {
    if (typeof value === "number") {
        return "" + value + "px";
    }
    if (!!value && typeof value === "string" && value.length > 0) {
        var lastSymbol = value[value.length - 1];
        if ((lastSymbol >= "0" && lastSymbol <= "9") || lastSymbol == ".") {
            try {
                var num = parseFloat(value);
                return "" + num + "px";
            }
            catch (_a) { }
        }
    }
    return value;
}
var keyFocusedClassName = "sv-focused--by-key";
function doKey2ClickBlur(evt) {
    var element = evt.target;
    if (!element || !element.classList)
        return;
    element.classList.remove(keyFocusedClassName);
}
function doKey2ClickUp(evt, options) {
    if (!!evt.target && evt.target["contentEditable"] === "true") {
        return;
    }
    var element = evt.target;
    if (!element)
        return;
    var char = evt.which || evt.keyCode;
    if (char === 9) {
        if (!!element.classList && !element.classList.contains(keyFocusedClassName)) {
            element.classList.add(keyFocusedClassName);
        }
    }
    else if (char === 13 || char === 32) {
        if (element.click)
            element.click();
    }
    else if ((!options || options.processEsc) && char === 27) {
        if (element.blur)
            element.blur();
    }
}
function doKey2ClickDown(evt, options) {
    if (options === void 0) { options = { processEsc: true }; }
    if (!!evt.target && evt.target["contentEditable"] === "true") {
        return;
    }
    var char = evt.which || evt.keyCode;
    var supportedCodes = [13, 32];
    if (options.processEsc) {
        supportedCodes.push(27);
    }
    if (supportedCodes.indexOf(char) !== -1) {
        evt.preventDefault();
    }
}
function increaseHeightByContent(element, getComputedStyle) {
    if (!element)
        return;
    if (!getComputedStyle)
        getComputedStyle = function (elt) { return window.getComputedStyle(elt); };
    var style = getComputedStyle(element);
    element.style.height = "auto";
    element.style.height = (element.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth)) + "px";
}
function getOriginalEvent(event) {
    return event.originalEvent || event;
}
function preventDefaults(event) {
    event.preventDefault();
    event.stopPropagation();
}
function classesToSelector(str) {
    var re = /\s*?([\w-]+)\s*?/g;
    return str.replace(re, ".$1");
}
function getElementWidth(el) {
    return !!getComputedStyle ? Number.parseFloat(getComputedStyle(el).width) : el.offsetWidth;
}
function isContainerVisible(el) {
    return !!(el.offsetWidth ||
        el.offsetHeight ||
        el.getClientRects().length);
}
function findParentByClassNames(element, classNames) {
    if (!!element) {
        if (classNames.every(function (className) { return !className || element.classList.contains(className); })) {
            return element;
        }
        else {
            return findParentByClassNames(element.parentElement, classNames);
        }
    }
}
function sanitizeEditableContent(element) {
    if (window.getSelection && document.createRange && element.childNodes.length > 0) {
        var selection = document.getSelection();
        var range = selection.getRangeAt(0);
        range.setStart(range.endContainer, range.endOffset);
        range.setEndAfter(element.lastChild);
        selection.removeAllRanges();
        selection.addRange(range);
        var tail_len = selection.toString().replace(/\n/g, "").length;
        element.innerText = element.innerText.replace(/\n/g, "");
        range = document.createRange();
        range.setStart(element.childNodes[0], element.innerText.length - tail_len);
        range.collapse(true);
        selection.removeAllRanges();
        selection.addRange(range);
    }
}
function mergeValues(src, dest) {
    if (!dest || !src)
        return;
    if (typeof dest !== "object")
        return;
    for (var key in src) {
        var value = src[key];
        if (value && typeof value === "object") {
            if (!dest[key] || typeof dest[key] !== "object")
                dest[key] = {};
            mergeValues(value, dest[key]);
        }
        else {
            dest[key] = value;
        }
    }
}



/***/ }),

/***/ "./src/validator.ts":
/*!**************************!*\
  !*** ./src/validator.ts ***!
  \**************************/
/*! exports provided: ValidatorResult, SurveyValidator, ValidatorRunner, NumericValidator, TextValidator, AnswerCountValidator, RegexValidator, EmailValidator, ExpressionValidator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValidatorResult", function() { return ValidatorResult; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyValidator", function() { return SurveyValidator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValidatorRunner", function() { return ValidatorRunner; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumericValidator", function() { return NumericValidator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextValidator", function() { return TextValidator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnswerCountValidator", function() { return AnswerCountValidator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegexValidator", function() { return RegexValidator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailValidator", function() { return EmailValidator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionValidator", function() { return ExpressionValidator; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./error */ "./src/error.ts");
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





var ValidatorResult = /** @class */ (function () {
    function ValidatorResult(value, error) {
        if (error === void 0) { error = null; }
        this.value = value;
        this.error = error;
    }
    return ValidatorResult;
}());

/**
 * Base SurveyJS validator class.
 */
var SurveyValidator = /** @class */ (function (_super) {
    __extends(SurveyValidator, _super);
    function SurveyValidator() {
        var _this = _super.call(this) || this;
        _this.createLocalizableString("text", _this, true);
        return _this;
    }
    SurveyValidator.prototype.getSurvey = function (live) {
        if (live === void 0) { live = false; }
        return !!this.errorOwner && !!this.errorOwner["getSurvey"]
            ? this.errorOwner.getSurvey()
            : null;
    };
    Object.defineProperty(SurveyValidator.prototype, "text", {
        get: function () {
            return this.getLocalizableStringText("text");
        },
        set: function (value) {
            this.setLocalizableStringText("text", value);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyValidator.prototype, "isValidateAllValues", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyValidator.prototype, "locText", {
        get: function () {
            return this.getLocalizableString("text");
        },
        enumerable: false,
        configurable: true
    });
    SurveyValidator.prototype.getErrorText = function (name) {
        if (this.text)
            return this.text;
        return this.getDefaultErrorText(name);
    };
    SurveyValidator.prototype.getDefaultErrorText = function (name) {
        return "";
    };
    SurveyValidator.prototype.validate = function (value, name, values, properties) {
        if (name === void 0) { name = null; }
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        return null;
    };
    Object.defineProperty(SurveyValidator.prototype, "isRunning", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SurveyValidator.prototype, "isAsync", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    SurveyValidator.prototype.getLocale = function () {
        return !!this.errorOwner ? this.errorOwner.getLocale() : "";
    };
    SurveyValidator.prototype.getMarkdownHtml = function (text, name) {
        return !!this.errorOwner
            ? this.errorOwner.getMarkdownHtml(text, name)
            : undefined;
    };
    SurveyValidator.prototype.getRenderer = function (name) {
        return !!this.errorOwner ? this.errorOwner.getRenderer(name) : null;
    };
    SurveyValidator.prototype.getRendererContext = function (locStr) {
        return !!this.errorOwner ? this.errorOwner.getRendererContext(locStr) : locStr;
    };
    SurveyValidator.prototype.getProcessedText = function (text) {
        return !!this.errorOwner ? this.errorOwner.getProcessedText(text) : text;
    };
    SurveyValidator.prototype.createCustomError = function (name) {
        var _this = this;
        var err = new _error__WEBPACK_IMPORTED_MODULE_1__["CustomError"](this.getErrorText(name), this.errorOwner);
        err.onUpdateErrorTextCallback = (function (err) { return err.text = _this.getErrorText(name); });
        return err;
    };
    SurveyValidator.prototype.toString = function () {
        var res = this.getType().replace("validator", "");
        if (!!this.text) {
            res += ", " + this.text;
        }
        return res;
    };
    return SurveyValidator;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));

var ValidatorRunner = /** @class */ (function () {
    function ValidatorRunner() {
    }
    ValidatorRunner.prototype.run = function (owner) {
        var _this = this;
        var res = [];
        var values = null;
        var properties = null;
        this.prepareAsyncValidators();
        var asyncResults = [];
        var validators = owner.getValidators();
        for (var i = 0; i < validators.length; i++) {
            var validator = validators[i];
            if (!values && validator.isValidateAllValues) {
                values = owner.getDataFilteredValues();
                properties = owner.getDataFilteredProperties();
            }
            if (validator.isAsync) {
                this.asyncValidators.push(validator);
                validator.onAsyncCompleted = function (result) {
                    if (!!result && !!result.error)
                        asyncResults.push(result.error);
                    if (!_this.onAsyncCompleted)
                        return;
                    for (var i = 0; i < _this.asyncValidators.length; i++) {
                        if (_this.asyncValidators[i].isRunning)
                            return;
                    }
                    _this.onAsyncCompleted(asyncResults);
                };
            }
        }
        validators = owner.getValidators();
        for (var i = 0; i < validators.length; i++) {
            var validator = validators[i];
            var validatorResult = validator.validate(owner.validatedValue, owner.getValidatorTitle(), values, properties);
            if (!!validatorResult && !!validatorResult.error) {
                res.push(validatorResult.error);
            }
        }
        if (this.asyncValidators.length == 0 && !!this.onAsyncCompleted)
            this.onAsyncCompleted([]);
        return res;
    };
    ValidatorRunner.prototype.prepareAsyncValidators = function () {
        if (!!this.asyncValidators) {
            for (var i = 0; i < this.asyncValidators.length; i++) {
                this.asyncValidators[i].onAsyncCompleted = null;
            }
        }
        this.asyncValidators = [];
    };
    return ValidatorRunner;
}());

/**
 * Validate numeric values.
 */
var NumericValidator = /** @class */ (function (_super) {
    __extends(NumericValidator, _super);
    function NumericValidator(minValue, maxValue) {
        if (minValue === void 0) { minValue = null; }
        if (maxValue === void 0) { maxValue = null; }
        var _this = _super.call(this) || this;
        _this.minValue = minValue;
        _this.maxValue = maxValue;
        return _this;
    }
    NumericValidator.prototype.getType = function () {
        return "numericvalidator";
    };
    NumericValidator.prototype.validate = function (value, name, values, properties) {
        if (name === void 0) { name = null; }
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        if (this.isValueEmpty(value))
            return null;
        if (!_helpers__WEBPACK_IMPORTED_MODULE_4__["Helpers"].isNumber(value)) {
            return new ValidatorResult(null, new _error__WEBPACK_IMPORTED_MODULE_1__["RequreNumericError"](null, this.errorOwner));
        }
        var result = new ValidatorResult(parseFloat(value));
        if (this.minValue !== null && this.minValue > result.value) {
            result.error = this.createCustomError(name);
            return result;
        }
        if (this.maxValue !== null && this.maxValue < result.value) {
            result.error = this.createCustomError(name);
            return result;
        }
        return typeof value === "number" ? null : result;
    };
    NumericValidator.prototype.getDefaultErrorText = function (name) {
        var vName = name ? name : this.getLocalizationString("value");
        if (this.minValue !== null && this.maxValue !== null) {
            return this.getLocalizationFormatString("numericMinMax", vName, this.minValue, this.maxValue);
        }
        else {
            if (this.minValue !== null) {
                return this.getLocalizationFormatString("numericMin", vName, this.minValue);
            }
            return this.getLocalizationFormatString("numericMax", vName, this.maxValue);
        }
    };
    Object.defineProperty(NumericValidator.prototype, "minValue", {
        /**
         * The minValue property.
         */
        get: function () {
            return this.getPropertyValue("minValue");
        },
        set: function (val) {
            this.setPropertyValue("minValue", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumericValidator.prototype, "maxValue", {
        /**
         * The maxValue property.
         */
        get: function () {
            return this.getPropertyValue("maxValue");
        },
        set: function (val) {
            this.setPropertyValue("maxValue", val);
        },
        enumerable: false,
        configurable: true
    });
    return NumericValidator;
}(SurveyValidator));

/**
 * Validate text values.
 */
var TextValidator = /** @class */ (function (_super) {
    __extends(TextValidator, _super);
    function TextValidator() {
        return _super.call(this) || this;
    }
    TextValidator.prototype.getType = function () {
        return "textvalidator";
    };
    TextValidator.prototype.validate = function (value, name, values, properties) {
        if (name === void 0) { name = null; }
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        if (this.isValueEmpty(value))
            return null;
        if (!this.allowDigits) {
            var reg = /^[A-Za-z\s]*$/;
            if (!reg.test(value)) {
                return new ValidatorResult(null, this.createCustomError(name));
            }
        }
        if (this.minLength > 0 && value.length < this.minLength) {
            return new ValidatorResult(null, this.createCustomError(name));
        }
        if (this.maxLength > 0 && value.length > this.maxLength) {
            return new ValidatorResult(null, this.createCustomError(name));
        }
        return null;
    };
    TextValidator.prototype.getDefaultErrorText = function (name) {
        if (this.minLength > 0 && this.maxLength > 0)
            return this.getLocalizationFormatString("textMinMaxLength", this.minLength, this.maxLength);
        if (this.minLength > 0)
            return this.getLocalizationFormatString("textMinLength", this.minLength);
        return this.getLocalizationFormatString("textMaxLength", this.maxLength);
    };
    Object.defineProperty(TextValidator.prototype, "minLength", {
        /**
         * The minLength property.
         */
        get: function () {
            return this.getPropertyValue("minLength");
        },
        set: function (val) {
            this.setPropertyValue("minLength", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(TextValidator.prototype, "maxLength", {
        /**
         * The maxLength property.
         */
        get: function () {
            return this.getPropertyValue("maxLength");
        },
        set: function (val) {
            this.setPropertyValue("maxLength", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(TextValidator.prototype, "allowDigits", {
        /**
         * The allowDigits property.
         */
        get: function () {
            return this.getPropertyValue("allowDigits");
        },
        set: function (val) {
            this.setPropertyValue("allowDigits", val);
        },
        enumerable: false,
        configurable: true
    });
    return TextValidator;
}(SurveyValidator));

/**
 * Validates the number of answers.
 */
var AnswerCountValidator = /** @class */ (function (_super) {
    __extends(AnswerCountValidator, _super);
    function AnswerCountValidator(minCount, maxCount) {
        if (minCount === void 0) { minCount = null; }
        if (maxCount === void 0) { maxCount = null; }
        var _this = _super.call(this) || this;
        _this.minCount = minCount;
        _this.maxCount = maxCount;
        return _this;
    }
    AnswerCountValidator.prototype.getType = function () {
        return "answercountvalidator";
    };
    AnswerCountValidator.prototype.validate = function (value, name, values, properties) {
        if (name === void 0) { name = null; }
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        if (value == null || value.constructor != Array)
            return null;
        var count = value.length;
        if (count == 0)
            return null;
        if (this.minCount && count < this.minCount) {
            return new ValidatorResult(null, this.createCustomError(this.getLocalizationFormatString("minSelectError", this.minCount)));
        }
        if (this.maxCount && count > this.maxCount) {
            return new ValidatorResult(null, this.createCustomError(this.getLocalizationFormatString("maxSelectError", this.maxCount)));
        }
        return null;
    };
    AnswerCountValidator.prototype.getDefaultErrorText = function (name) {
        return name;
    };
    Object.defineProperty(AnswerCountValidator.prototype, "minCount", {
        /**
         * The minCount property.
         */
        get: function () {
            return this.getPropertyValue("minCount");
        },
        set: function (val) {
            this.setPropertyValue("minCount", val);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(AnswerCountValidator.prototype, "maxCount", {
        /**
         * The maxCount property.
         */
        get: function () {
            return this.getPropertyValue("maxCount");
        },
        set: function (val) {
            this.setPropertyValue("maxCount", val);
        },
        enumerable: false,
        configurable: true
    });
    return AnswerCountValidator;
}(SurveyValidator));

/**
 * Use it to validate the text by regular expressions.
 */
var RegexValidator = /** @class */ (function (_super) {
    __extends(RegexValidator, _super);
    function RegexValidator(regex) {
        if (regex === void 0) { regex = null; }
        var _this = _super.call(this) || this;
        _this.regex = regex;
        return _this;
    }
    RegexValidator.prototype.getType = function () {
        return "regexvalidator";
    };
    RegexValidator.prototype.validate = function (value, name, values, properties) {
        if (name === void 0) { name = null; }
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        if (!this.regex || this.isValueEmpty(value))
            return null;
        var re = new RegExp(this.regex);
        if (Array.isArray(value)) {
            for (var i = 0; i < value.length; i++) {
                var res = this.hasError(re, value[i], name);
                if (res)
                    return res;
            }
        }
        return this.hasError(re, value, name);
    };
    RegexValidator.prototype.hasError = function (re, value, name) {
        if (re.test(value))
            return null;
        return new ValidatorResult(value, this.createCustomError(name));
    };
    Object.defineProperty(RegexValidator.prototype, "regex", {
        /**
         * The regex property.
         */
        get: function () {
            return this.getPropertyValue("regex");
        },
        set: function (val) {
            this.setPropertyValue("regex", val);
        },
        enumerable: false,
        configurable: true
    });
    return RegexValidator;
}(SurveyValidator));

/**
 * Validate e-mail address in the text input
 */
var EmailValidator = /** @class */ (function (_super) {
    __extends(EmailValidator, _super);
    function EmailValidator() {
        var _this = _super.call(this) || this;
        _this.re = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()=[\]\.,;:\s@\"]+\.)+[^<>()=[\]\.,;:\s@\"]{2,})$/i;
        return _this;
    }
    EmailValidator.prototype.getType = function () {
        return "emailvalidator";
    };
    EmailValidator.prototype.validate = function (value, name, values, properties) {
        if (name === void 0) { name = null; }
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        if (!value)
            return null;
        if (this.re.test(value))
            return null;
        return new ValidatorResult(value, this.createCustomError(name));
    };
    EmailValidator.prototype.getDefaultErrorText = function (name) {
        return this.getLocalizationString("invalidEmail");
    };
    return EmailValidator;
}(SurveyValidator));

/**
 * Show error if expression returns false
 */
var ExpressionValidator = /** @class */ (function (_super) {
    __extends(ExpressionValidator, _super);
    function ExpressionValidator(expression) {
        if (expression === void 0) { expression = null; }
        var _this = _super.call(this) || this;
        _this.conditionRunner = null;
        _this.isRunningValue = false;
        _this.expression = expression;
        return _this;
    }
    ExpressionValidator.prototype.getType = function () {
        return "expressionvalidator";
    };
    Object.defineProperty(ExpressionValidator.prototype, "isValidateAllValues", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ExpressionValidator.prototype, "isAsync", {
        get: function () {
            if (!this.ensureConditionRunner())
                return false;
            return this.conditionRunner.isAsync;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ExpressionValidator.prototype, "isRunning", {
        get: function () {
            return this.isRunningValue;
        },
        enumerable: false,
        configurable: true
    });
    ExpressionValidator.prototype.validate = function (value, name, values, properties) {
        var _this = this;
        if (name === void 0) { name = null; }
        if (values === void 0) { values = null; }
        if (properties === void 0) { properties = null; }
        if (!this.ensureConditionRunner())
            return null;
        this.conditionRunner.onRunComplete = function (res) {
            _this.isRunningValue = false;
            if (!!_this.onAsyncCompleted) {
                _this.onAsyncCompleted(_this.generateError(res, value, name));
            }
        };
        this.isRunningValue = true;
        var res = this.conditionRunner.run(values, properties);
        if (this.conditionRunner.isAsync)
            return null;
        this.isRunningValue = false;
        return this.generateError(res, value, name);
    };
    ExpressionValidator.prototype.generateError = function (res, value, name) {
        if (!res) {
            return new ValidatorResult(value, this.createCustomError(name));
        }
        return null;
    };
    ExpressionValidator.prototype.getDefaultErrorText = function (name) {
        return this.getLocalizationFormatString("invalidExpression", this.expression);
    };
    ExpressionValidator.prototype.ensureConditionRunner = function () {
        if (!!this.conditionRunner) {
            this.conditionRunner.expression = this.expression;
            return true;
        }
        if (!this.expression)
            return false;
        this.conditionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](this.expression);
        return true;
    };
    Object.defineProperty(ExpressionValidator.prototype, "expression", {
        /**
         * The expression property.
         */
        get: function () {
            return this.getPropertyValue("expression");
        },
        set: function (val) {
            this.setPropertyValue("expression", val);
        },
        enumerable: false,
        configurable: true
    });
    return ExpressionValidator;
}(SurveyValidator));

_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("surveyvalidator", [
    { name: "text", serializationProperty: "locText" },
]);
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("numericvalidator", ["minValue:number", "maxValue:number"], function () {
    return new NumericValidator();
}, "surveyvalidator");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("textvalidator", [{ name: "minLength:number", default: 0 },
    { name: "maxLength:number", default: 0 },
    { name: "allowDigits:boolean", default: true }], function () {
    return new TextValidator();
}, "surveyvalidator");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
    return new AnswerCountValidator();
}, "surveyvalidator");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex"], function () {
    return new RegexValidator();
}, "surveyvalidator");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("emailvalidator", [], function () {
    return new EmailValidator();
}, "surveyvalidator");
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("expressionvalidator", ["expression:condition"], function () {
    return new ExpressionValidator();
}, "surveyvalidator");


/***/ }),

/***/ "jquery":
/*!******************************************************************************************!*\
  !*** external {"root":"jQuery","commonjs2":"jquery","commonjs":"jquery","amd":"jquery"} ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;

/***/ })

/******/ });
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 5143192 characters]