survey-creator-js 2.5.18 → 2.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.5.
|
|
2
|
+
* SurveyJS Creator v2.5.19
|
|
3
3
|
* (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -2960,8 +2960,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2960
2960
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2961
2961
|
|
|
2962
2962
|
let Version;
|
|
2963
|
-
Version = `${"2.5.
|
|
2964
|
-
checkLibraryVersion(`${"2.5.
|
|
2963
|
+
Version = `${"2.5.19"}`;
|
|
2964
|
+
checkLibraryVersion(`${"2.5.19"}`, "survey-creator-react");
|
|
2965
2965
|
|
|
2966
2966
|
function renderSurveyCreator(creator, element, props = {}) {
|
|
2967
2967
|
let node = element;
|
package/index.html
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<body>
|
|
44
44
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
45
45
|
<div id="root" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0;"></div>
|
|
46
|
-
<script defer src="survey-creator-js.js"></script>
|
|
46
|
+
<script defer src="./build/survey-creator-js.js"></script>
|
|
47
47
|
</body>
|
|
48
48
|
<script defer src="./build/ui-preset-editor.js"></script>
|
|
49
49
|
<script src="index.js" type="text/babel"></script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-js",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.19",
|
|
4
4
|
"description": "A white-label drag-and-drop form builder for HTML, CSS, and JavaScript apps. It generates JSON schemas for rendering dynamic forms with SurveyJS Form Library. Design complex, interactive forms and surveys without writing code.",
|
|
5
5
|
"author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
|
|
6
6
|
"homepage": "https://surveyjs.io/",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"typings": "./typings/survey-creator-js/entries/index.d.ts",
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"ace-builds": "^1.4.12",
|
|
49
|
-
"survey-core": "2.5.
|
|
50
|
-
"survey-js-ui": "2.5.
|
|
51
|
-
"survey-creator-core": "2.5.
|
|
49
|
+
"survey-core": "2.5.19",
|
|
50
|
+
"survey-js-ui": "2.5.19",
|
|
51
|
+
"survey-creator-core": "2.5.19",
|
|
52
52
|
"@types/react-dom": "*",
|
|
53
53
|
"@types/react": "*"
|
|
54
54
|
},
|
package/survey-creator-js.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.5.
|
|
2
|
+
* SurveyJS Creator v2.5.19
|
|
3
3
|
* (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -3732,8 +3732,8 @@
|
|
|
3732
3732
|
surveyCore.RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
3733
3733
|
|
|
3734
3734
|
exports.Version = void 0;
|
|
3735
|
-
exports.Version = "".concat("2.5.
|
|
3736
|
-
surveyCore.checkLibraryVersion("".concat("2.5.
|
|
3735
|
+
exports.Version = "".concat("2.5.19");
|
|
3736
|
+
surveyCore.checkLibraryVersion("".concat("2.5.19"), "survey-creator-react");
|
|
3737
3737
|
|
|
3738
3738
|
function renderSurveyCreator(creator, element, props) {
|
|
3739
3739
|
if (props === void 0) { props = {}; }
|
package/survey-creator-js.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.5.
|
|
2
|
+
* SurveyJS Creator v2.5.19
|
|
3
3
|
* (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
6
6
|
*/
|
|
7
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("survey-react-ui"),require("survey-creator-core"),require("react-dom"),require("survey-core"),require("survey-js-ui")):"function"==typeof define&&define.amd?define(["exports","react","survey-react-ui","survey-creator-core","react-dom","survey-core","survey-js-ui"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SurveyCreator={},e.SurveyUI,e.SurveyUI,e.SurveyCreatorCore,e.SurveyUI,e.Survey,e.SurveyUI)}(this,function(e,t,n,o,r,i,a){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var l=s(t),c=s(r),u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},u(e,t)};function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var d=function(){return d=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var p=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.model.renderedActions.map(function(e){return l.createElement(h,{item:e,key:e.renderedId})});return l.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu",role:"tablist",style:this.model.getRootStyle()},e)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var o=this.rootRef.current;o&&this.model.initResponsivityManager(o)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&this.model.initResponsivityManager(t)},t.prototype.componentWillUnmount=function(){this.model.resetResponsivityManager(),e.prototype.componentWillUnmount.call(this)},t}(n.SurveyElementBase),h=function(e){function t(t){var n=e.call(this,t)||this;return n.ref=l.createRef(),n.state={changed:0},n}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e="svc-tabbed-menu-item-container";this.item.css&&(e+=" "+this.item.css),e+=this.item.isVisible?"":" sv-action--hidden";var t=n.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return l.createElement("span",{key:this.item.id,className:e,ref:this.ref},l.createElement("div",{className:"sv-action__content"},t))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.item.updateModeCallback=function(e,n){var o=function(){t.item.mode==e?t.setState({changed:t.state.changed+1}):t.item.mode=e};queueMicrotask(function(){c.flushSync?c.flushSync(function(){o()}):o(),queueMicrotask(function(){n(e,t.ref.current)})})},this.item.afterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.updateModeCallback=void 0},t}(n.SurveyElementBase),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this.item;return n.attachKey2click(l.createElement("div",{role:"tab",id:"tab-"+e.id,"aria-selected":e.active,"aria-controls":"scrollableDiv-"+e.id,className:e.getRootCss(),onClick:function(){return e.doAction()}},e.hasTitle?l.createElement("span",{className:e.getTitleCss()},e.title):null,e.hasIcon?l.createElement(n.SvgIcon,{iconName:e.iconName,className:e.getIconCss(),size:"auto",title:e.tooltip||e.title}):null))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",function(e){return l.createElement(v,e)});var f=function(e){function t(t){var n=e.call(this,t)||this;return n.rootNode=l.createRef(),n}return m(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.creator},Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.creator!==t.creator&&(t.creator&&t.creator.unsubscribeRootElement(),this.creator&&this.rootNode.current&&this.creator.setRootElement(this.rootNode.current))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.creator.setRootElement(this.rootNode.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.creator.unsubscribeRootElement()},t.prototype.renderElement=function(){var e=this.props.creator;if(e.isCreatorDisposed)return null;var t="svc-full-container svc-creator__area svc-flex-column"+(this.props.creator.haveCommercialLicense?"":" svc-creator__area--with-banner"),r="svc-creator__content-wrapper svc-flex-row"+(this.props.creator.isMobileView?" svc-creator__content-wrapper--footer-toolbar":""),i="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sidebarLocation,a={};o.assign(a,this.style,this.props.creator.themeVariables);var s=null;if(!this.props.creator.haveCommercialLicense){var c={__html:this.props.creator.licenseText};s=l.createElement("div",{className:"svc-creator__banner"},l.createElement("span",{className:"svc-creator__non-commercial-text",dangerouslySetInnerHTML:c}))}return l.createElement("div",{className:this.creator.getRootCss(),ref:this.rootNode,style:a},l.createElement(n.SvgBundleComponent,null),l.createElement(n.PopupModal,null),l.createElement("div",{className:t},l.createElement("div",{className:i},l.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},l.createElement("div",{className:"svc-top-bar"},e.showTabs?l.createElement("div",{className:"svc-tabbed-menu-wrapper"},l.createElement(p,{model:e.tabbedMenu})):null,e.showToolbar?l.createElement("div",{className:"svc-toolbar-wrapper"},l.createElement(n.SurveyActionBar,{model:e.toolbar})):null),l.createElement("div",{className:r},l.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),l.createElement("div",{className:"svc-footer-bar"},e.isMobileView?l.createElement("div",{className:"svc-toolbar-wrapper"},l.createElement(n.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSidebar()),s,l.createElement(n.NotifierComponent,{notifier:e.notifier})))},t.prototype.renderActiveTab=function(){var e=this.props.creator;return this.renderCreatorTab(e.activeTabMenuItem)},t.prototype.renderCreatorTab=function(e){if(!e)return null;var t=this.props.creator,o=e.renderTab?e.renderTab():n.ReactElementFactory.Instance.createElement(e.componentContent,{creator:t,survey:t.survey,data:e.data.model}),r="svc-creator-tab"+("right"==t.toolboxLocation?" svc-creator__toolbox--right":"");return l.createElement("div",{role:"tabpanel",key:e.id,id:"scrollableDiv-"+e.id,"aria-labelledby":"tab-"+e.id,className:r},o)},t.prototype.renderSidebar=function(){return this.creator.isSidebarVisible?n.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sidebar}):null},t}(n.SurveyElementBase),y=function(e){function t(t,n){return void 0===t&&(t={}),e.call(this,t,n)||this}return m(t,e),t.prototype.render=function(e){console.error("The render method is deprecated. Use SurveyCreatorComponent instead.")},t.prototype.createQuestionElement=function(e){return n.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})},t.prototype.renderError=function(e,t,o){return l.createElement("div",{key:e},l.createElement("span",{className:o.error.icon,"aria-hidden":"true"}),l.createElement("span",{className:o.error.item},l.createElement(n.SurveyLocStringViewer,{model:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(o.SurveyCreatorModel);n.ReactElementFactory.Instance.registerElement("survey-widget",function(e){return l.createElement(n.Survey,e)});var g=function(e){function t(t){var n=e.call(this,t)||this;return n.createModel(t),n}return m(t,e),t.prototype.shouldComponentUpdate=function(t,n){var o=e.prototype.shouldComponentUpdate.call(this,t,n);return o&&this.needUpdateModel(t)&&this.createModel(t),o},t.prototype.createModel=function(e){},t.prototype.needUpdateModel=function(e){var t=this.getUpdatedModelProps();if(!Array.isArray(t))return!0;for(var n=function(){var n=t[r];if("object"==typeof n){var i=o.props[n.name],a=e[n.name];if(n.deepEqual){if(o.props[n.name]===e[n.name])return{value:!1};var s=Object.keys(i||{});return s.length!==Object.keys(a||{}).length?{value:!0}:{value:s.some(function(e){return i[e]!=a[e]})}}return{value:i!==a}}if(o.props[n]!==e[n])return{value:!0}},o=this,r=0;r<t.length;r++){var i=n();if("object"==typeof i)return i.value}return!1},t.prototype.getUpdatedModelProps=function(){},t}(n.SurveyElementBase),E=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.createModel=function(e){this.model&&this.model.dispose(),this.model=new o.RowViewModel(e.componentData.creator,e.row,null)},t.prototype.getUpdatedModelProps=function(){return["row",{name:"componentData",deepEqual:!0}]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.subscribeElementChanges()},t.prototype.componentWillUnmount=function(){this.model.unsubscribeElementChanges(),e.prototype.componentWillUnmount.call(this)},t.prototype.render=function(){return l.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},l.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--top"}),l.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--bottom"}),this.props.element)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-row",function(e){return l.createElement(E,e)});var b=function(){function e(e){this.event=e}return e.prototype.stopPropagation=function(){this.event.stopPropagation()},e.prototype.preventDefault=function(){this.event.preventDefault()},Object.defineProperty(e.prototype,"cancelBubble",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this.event.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this.event.currentTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.event.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.event.clientY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.event.nativeEvent.offsetX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.event.nativeEvent.offsetY},enumerable:!1,configurable:!0}),e}(),_=function(e){function t(t){var n=e.call(this,t)||this;return n.event=t,n}return m(t,e),Object.defineProperty(t.prototype,"dataTransfer",{get:function(){return this.event.dataTransfer},enumerable:!1,configurable:!0}),t}(b);var C=l.memo(function(e){return e.element});C.displayName="QuestionElementContent";var N=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model?this.model.attachToUI(e.question,this.rootRef.current):this.modelValue=this.createQuestionViewModel(e)},t.prototype.createQuestionViewModel=function(e){return new o.QuestionAdornerViewModel(e.componentData,e.question,null)},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t=this.model.element.isInteractiveDesignElement,n=this.renderQuestionTitle(),o=this.renderContent(t);return l.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.element.name||null,className:this.model.rootCss(),onDoubleClick:function(n){t&&e.model.dblclick(n.nativeEvent),n.stopPropagation()},onMouseLeave:function(n){return t&&e.model.hover(n.nativeEvent,n.currentTarget)},onMouseOver:function(n){return t&&e.model.hover(n.nativeEvent,n.currentTarget)}},n,o)},t.prototype.disableTabStop=function(){return!0},t.prototype.renderContent=function(e){var t=this,o=this.model.needToRenderContent?this.renderElementContent():null;return n.attachKey2click(l.createElement("div",{className:this.model.css(),onClick:function(e){return t.model.select(t.model,new b(e))}},l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--left"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--right"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),e?this.renderHeader():null,o,this.model.needToRenderContent?this.renderFooter():null),void 0,{disableTabStop:this.disableTabStop()})},t.prototype.renderHeader=function(){return n.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})},t.prototype.renderFooter=function(){return this.model.element.isInteractiveDesignElement?n.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model}):null},t.prototype.renderCarryForwardBanner=function(){return this.model.isBannerShowing?n.ReactElementFactory.Instance.createElement("svc-question-banner",this.model.createBannerParams()):null},t.prototype.renderQuestionTitle=function(){var e=this;if(!this.model.showHiddenTitle)return null;var t=this.model.element;return l.createElement("div",{ref:function(t){return t&&(e.model.renderedCollapsed?t.removeAttribute("inert"):t.setAttribute("inert",""))},className:this.model.cssCollapsedHiddenHeader},t.hasTitle?l.createElement(n.TitleElement,{element:t,renderActions:!1}):l.createElement("div",{className:this.model.cssCollapsedHiddenTitle},l.createElement("span",{className:"svc-fake-title"},t.name)))},t.prototype.renderElementContent=function(){return l.createElement(l.Fragment,null,l.createElement(C,{element:this.props.element}),this.renderElementPlaceholder(),this.renderCarryForwardBanner())},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.attachToUI(this.props.question,this.rootRef.current)},t.prototype.renderElementPlaceholder=function(){return this.model.isEmptyElement?l.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},l.createElement("div",{className:"svc-panel__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.detachFromUI()},t}(g);n.ReactElementFactory.Instance.registerElement("svc-question",function(e){return l.createElement(N,e)});var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this;return this.props.model.allowDragging?l.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.props.model.onPointerDown(t)}},l.createElement(n.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),l.createElement("div",{className:"svc-question__top-actions"},l.createElement(n.SurveyActionBar,{model:this.props.model.topActionContainer,handleClick:!1}))):null},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-header",function(e){return l.createElement(S,e)});var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:this.props.className,onFocus:function(t){return e.props.model.select(e.props.model,new b(t))}},l.createElement(n.SurveyActionBar,{model:this.props.model.actionContainer,handleClick:!1}))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-footer",function(e){return l.createElement(w,e)});var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.renderElement=function(){var e=(new i.CssClassBuilder).append(this.props.classes).append("svc-action-button").append("svc-action-button--selected",!!this.props.selected).append("svc-action-button--disabled",!!this.props.disabled).toString();return this.props.iconName?this.renderIcon(e):this.renderButtonText(e)},t.prototype.renderButtonText=function(e){var t=this;return this.props.disabled?l.createElement("span",{className:e},this.props.text):l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("span",{role:"button",className:e,onClick:function(e){t.props.allowBubble||e.stopPropagation(),t.props.click()},title:this.props.title},this.props.text)))},t.prototype.renderIcon=function(e){var t=this;return e+=" svc-action-button--icon",this.props.disabled?l.createElement("span",{className:e},l.createElement(n.SvgIcon,{size:"auto",iconName:this.props.iconName})):l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("span",{className:e,onClick:function(e){t.props.allowBubble||e.stopPropagation(),t.props.click()},title:this.props.title},l.createElement(n.SvgIcon,{size:"auto",iconName:this.props.iconName}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-action-button",function(e){return l.createElement(q,e)});var I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"svc-carry-forward-panel-wrapper"},l.createElement("div",{className:"svc-carry-forward-panel"},l.createElement("span",null,this.props.text," "),l.createElement("span",{className:"svc-carry-forward-panel__link"},l.createElement(q,{click:function(){return e.props.onClick()},text:this.props.actionText}))))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-banner",function(e){return l.createElement(I,e)});var R=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.createQuestionViewModel=function(e){return new o.QuestionDropdownAdornerViewModel(e.componentData,e.question,null)},Object.defineProperty(t.prototype,"dropdownModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.dropdownModel.question},enumerable:!1,configurable:!0}),t.prototype.renderElementPlaceholder=function(){var e=this,t=this.question.textStyle;return l.createElement("div",{className:"svc-question__dropdown-choices--wrapper"},l.createElement("div",null,l.createElement("div",{className:"svc-question__dropdown-choices"},(this.dropdownModel.getRenderedItems()||[]).map(function(o,r){return l.createElement("div",{className:e.dropdownModel.getChoiceCss(),key:"editable_choice_".concat(r)},n.ReactSurveyElementsWrapper.wrapItemValue(e.question.survey,n.ReactElementFactory.Instance.createElement(e.dropdownModel.itemComponent,{key:o.value,question:e.question,cssClasses:e.question.cssClasses,isDisplayMode:!0,item:o,textStyle:t,index:r,isChecked:e.question.value===o.value}),e.question,o))})),this.dropdownModel.needToCollapse?l.createElement(q,{click:this.dropdownModel.switchCollapse,text:this.dropdownModel.getButtonText(),allowBubble:!0}):null))},t}(N);n.ReactElementFactory.Instance.registerElement("svc-dropdown-question",function(e){return l.createElement(R,e)});var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createQuestionViewModel=function(e){return new o.QuestionImageAdornerViewModel(e.componentData,e.question,null)},Object.defineProperty(t.prototype,"imageModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderHeader=function(){return l.createElement(l.Fragment,null,l.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.imageModel.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),e.prototype.renderHeader.call(this))},t.prototype.renderLoadingPlaceholder=function(){return l.createElement("div",{className:"svc-image-question__loading-placeholder"},l.createElement("div",{className:"svc-image-question__loading"},l.createElement(n.LoadingIndicatorComponent,null)))},t.prototype.renderChooseButton=function(){var e=this;return l.createElement("div",{className:"svc-image-question-controls"},this.model.allowEdit?n.attachKey2click(l.createElement("span",{className:"svc-context-button",onClick:function(){return e.imageModel.chooseFile(e.imageModel)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-choosefile"}))):null)},t.prototype.renderElementPlaceholder=function(){return this.imageModel.isUploading?this.renderLoadingPlaceholder():this.renderChooseButton()},t.prototype.getStateElements=function(){return[this.model,this.imageModel.filePresentationModel]},t.prototype.renderElementContent=function(){if(this.imageModel.isEmptyElement){var e=n.ReactQuestionFactory.Instance.createQuestion("file",{creator:this.imageModel.question.survey,isDisplayMode:!1,question:this.imageModel.filePresentationModel});return l.createElement(l.Fragment,null,e)}return l.createElement(l.Fragment,null,this.props.element,this.renderElementPlaceholder())},t}(N);n.ReactElementFactory.Instance.registerElement("svc-image-question",function(e){return l.createElement(x,e)});var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.modelValue=this.createQuestionViewModel(e)},t.prototype.createQuestionViewModel=function(e){return new o.QuestionRatingAdornerViewModel(e.componentData,e.question,null)},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},Object.defineProperty(t.prototype,"ratingModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.ratingModel;return l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-rating-question-content"},l.createElement("div",{className:e.controlsClassNames},e.allowRemove?n.attachKey2click(l.createElement("span",{role:"button",className:e.removeClassNames,"aria-label":e.removeTooltip,onClick:function(){return e.removeItem(e)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-remove_16x16",title:e.removeTooltip}))):null,e.allowAdd?n.attachKey2click(l.createElement("span",{role:"button",className:e.addClassNames,"aria-label":e.addTooltip,onClick:function(){return e.addItem(e)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-add_16x16",title:e.addTooltip}))):null),this.props.element))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-rating-question",function(e){return l.createElement(M,e)}),n.ReactElementFactory.Instance.registerElement("svc-rating-question-content",function(e){return l.createElement(M,e)});var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createQuestionViewModel=function(e){return new o.QuestionAdornerViewModel(e.componentData,e.question,null)},Object.defineProperty(t.prototype,"widgetModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderElementContent=function(){return l.createElement("div",{className:"svc-widget__content"},this.props.element)},t}(N);n.ReactElementFactory.Instance.registerElement("svc-widget-question",function(e){return l.createElement(P,e)});var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.model=new o.QuestionAdornerViewModel(e.componentData,e.question,null)},t.prototype.getStateElement=function(){return this.model},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},t.prototype.render=function(){return l.createElement(l.Fragment,null,l.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},l.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element)))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-cell-question",function(e){return l.createElement(T,e)});var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.model=new o.QuestionAdornerViewModel(e.componentData,e.question,null)},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this.props.question,t=this.props.question.textStyle;return l.createElement(l.Fragment,null,l.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},l.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element,l.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map(function(o,r){return l.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(r)},n.ReactSurveyElementsWrapper.wrapItemValue(e.survey,n.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:o,textStyle:t,index:r,isChecked:e.value===o.value}),e,o))})))))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",function(e){return l.createElement(D,e)});var F=l.memo(function(e){var t=e.page,o=e.survey,r=e.creator;return l.createElement(n.SurveyPage,{page:t,survey:o,creator:r})});F.displayName="PageElementContent";var k=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model&&this.model.attachToUI(e.page,this.rootRef.current),this.model=this.createPageAdorner(e.creator,e.page),this.model.isGhost=this.props.isGhost},t.prototype.createPageAdorner=function(e,t){return new o.PageAdorner(e,t)},t.prototype.shouldComponentUpdate=function(t,n){var o=e.prototype.shouldComponentUpdate.call(this,t,n);return this.model&&(this.model.isGhost=this.props.isGhost),o},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n)},t.prototype.getUpdatedModelProps=function(){return["creator","page"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.attachToUI(this.props.page,this.rootRef.current),this.model.isGhost=this.props.isGhost},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.detachFromUI()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)},t.prototype.renderElement=function(){var e=this;return this.props.page?n.attachKey2click(l.createElement("div",{ref:this.rootRef,id:this.props.page.id,"data-sv-drop-target-survey-page":this.model.dropTargetName,className:"svc-page__content "+this.model.css,onClick:function(t){return e.model.select(e.model,new b(t))},onDoubleClick:function(t){return e.model.dblclick(t.nativeEvent)},onMouseLeave:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),this.renderContent(),this.renderPlaceholder(),this.renderHeader(),this.renderFooter())):null},t.prototype.renderPlaceholder=function(){return this.model.showPlaceholder?l.createElement("div",{className:"svc-page__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null},t.prototype.renderContent=function(){return this.model.needRenderContent?l.createElement(F,{page:this.props.page,survey:this.props.survey,creator:this.props.creator}):l.createElement("div",{className:"svc-page__loading-content"},l.createElement(n.LoadingIndicatorComponent,null))},t.prototype.renderHeader=function(){var e=this,t=l.createElement("div",{className:"svc-page__content-actions"},l.createElement(n.SurveyActionBar,{model:this.model.actionContainer}),this.model.topActionContainer.hasActions?l.createElement(n.SurveyActionBar,{model:this.model.topActionContainer}):null);return this.model.isGhost||!this.model.allowDragging?t:l.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.model.onPointerDown(t)}},l.createElement(n.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),t)},t.prototype.renderFooter=function(){return l.createElement(n.SurveyActionBar,{model:this.model.footerActionsBar})},t}(g);n.ReactElementFactory.Instance.registerElement("svc-page",function(e){return l.createElement(k,e)});var B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.item.data},enumerable:!1,configurable:!0}),t.prototype.renderTypeSelector=function(){var e=this.model.questionTypeSelectorModel;return n.attachKey2click(l.createElement("button",{type:"button",onClick:function(t){t.stopPropagation(),e.action()},className:"svc-element__question-type-selector",title:this.model.addNewQuestionText,role:"button"},l.createElement("span",{className:"svc-element__question-type-selector-icon"},l.createElement(n.SvgIcon,{iconName:e.iconName,size:"auto",title:this.model.addNewQuestionText})),void 0===this.props.renderPopup||this.props.renderPopup?l.createElement(n.Popup,{model:e.popupModel}):null))},t.prototype.renderElement=function(){var e=this,t=this.props.buttonClass||"svc-btn";return l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("div",{className:"svc-element__add-new-question "+t,onClick:function(t){t.stopPropagation(),e.model.addNewQuestion(e.model,new b(t))},onMouseOver:function(t){return e.model.hoverStopper&&e.model.hoverStopper(t.nativeEvent,t.currentTarget)}},l.createElement(n.SvgIcon,{className:"svc-panel__add-new-question-icon",iconName:"icon-add_24x24",size:"auto"}),l.createElement("span",{className:"svc-add-new-item-button__text"},this.model.addNewQuestionText),!1!==this.props.renderPopup?this.renderTypeSelector():null)),!1===this.props.renderPopup?this.renderTypeSelector():null)},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-add-new-question-btn",function(e){return l.createElement(B,e)});var O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.renderElementPlaceholder=function(){var e=this;return this.model.isEmptyElement?l.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},l.createElement("div",{className:"svc-panel__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.showAddQuestionButton?n.attachKey2click(l.createElement("div",{className:"svc-panel__add-new-question svc-action-button",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion()}},l.createElement(n.SvgIcon,{className:"svc-panel__add-new-question-icon",iconName:"icon-add_24x24",size:"auto"}),l.createElement("span",{className:"svc-add-new-item-button__text"},this.model.addNewQuestionText))):null)):null},t.prototype.disableTabStop=function(){return!0},t.prototype.renderFooter=function(){return l.createElement(l.Fragment,null,!this.model.isEmptyElement&&this.model.element.isPanel&&this.model.showAddQuestionButton?l.createElement("div",{className:"svc-panel__add-new-question-container"},l.createElement("div",{className:"svc-panel__question-type-selector-popup"},l.createElement(n.Popup,{model:this.model.questionTypeSelectorModel.popupModel})),l.createElement("div",{className:"svc-panel__add-new-question-wrapper"},l.createElement(B,{item:{data:this.model},buttonClass:"svc-action-button",renderPopup:!1}))):null,e.prototype.renderFooter.call(this))},t}(N);n.ReactElementFactory.Instance.registerElement("svc-panel",function(e){return l.createElement(O,e)});var j=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){var t=null;this.model&&(t=this.model.root),this.model=new o.LogoImageViewModel(e.data,t)},t.prototype.getUpdatedModelProps=function(){return["data"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.root=this.rootRef.current},t.prototype.renderChooseButton=function(){var e=this;return n.attachKey2click(l.createElement("span",{className:"svc-context-button",onClick:function(){return e.model.chooseFile(e.model)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-choosefile"})))},t.prototype.renderClearButton=function(){var e=this;return n.attachKey2click(l.createElement("span",{className:"svc-context-button svc-context-button--danger",onClick:function(){return e.model.remove(e.model)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-clear"})))},t.prototype.renderButtons=function(){return l.createElement("div",{className:"svc-context-container svc-logo-image-controls"},this.renderChooseButton(),this.renderClearButton())},t.prototype.renderImage=function(){return l.createElement("div",{className:this.model.containerCss},this.renderButtons(),l.createElement(n.LogoImage,{data:this.props.data.survey}))},t.prototype.renderPlaceHolder=function(){var e=this;return this.model.allowEdit&&!this.model.isUploading?n.attachKey2click(l.createElement("div",{className:"svc-logo-image-placeholder",onClick:function(){return e.model.chooseFile(e.model)}},l.createElement("svg",null,l.createElement("use",{xlinkHref:"#icon-image-48x48"})))):null},t.prototype.renderInput=function(){return l.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input"})},t.prototype.renderLoadingIndicator=function(){return l.createElement("div",{className:"svc-logo-image__loading"},l.createElement(n.LoadingIndicatorComponent,null))},t.prototype.render=function(){var e=null;return e=this.model.survey.locLogo.renderedHtml&&!this.model.isUploading?this.renderImage():this.model.isUploading?this.renderLoadingIndicator():this.renderPlaceHolder(),l.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},this.renderInput(),e)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-logo-image",function(e){return l.createElement(j,e)});var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderClear=function(){var e=this,t=this.questionBase.showClear;return!this.questionBase.isReadOnly&&t?l.createElement(q,{classes:this.question.linkClearButtonCssClasses,click:function(){return e.question.doClearClick()},text:o.editorLocalization.getString("pe.clear")}):null},t.prototype.renderElement=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement(q,{classes:this.question.linkSetButtonCssClasses,click:function(){return e.question.doLinkClick()},selected:this.question.isSelected,disabled:!this.question.isClickable,text:this.question.linkValueText,title:this.question.tooltip,iconName:this.question.iconName}),this.renderClear())},t}(n.SurveyQuestionElementBase);n.ReactQuestionFactory.Instance.registerQuestion("linkvalue",function(e){return l.createElement(U,e)});var A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootRef=l.createRef(),t}return m(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){var e=this.props.element||this.props.question;if(!e)return null;var t=e.embeddedSurvey;return t&&t.currentPage?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.embeddedSurvey&&(this.embeddedSurvey.rootElement=this.rootRef.current)},t.prototype.render=function(){var e=this.embeddedSurvey;return e?l.createElement("div",{style:{display:"contents"},ref:this.rootRef},l.createElement(n.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator})):null},t}(n.SurveyQuestionElementBase);n.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",function(e){return l.createElement(A,e)});var Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.createQuestionElement=function(e){return n.ReactQuestionFactory.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t.prototype.renderError=function(e,t,n){return null},t.prototype.render=function(){var e=this.survey.getAllQuestions()[0];return l.createElement("div",{style:this.props.style},l.createElement(n.SurveyQuestion,{creator:this,element:e}))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-editor-content",function(e){return l.createElement(Q,e)});var L=function(e){function t(t){var n=e.call(this,t)||this;return n.onBlur=function(e){n.model.onFocusOut(e.nativeEvent)},n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model=new o.ItemValueWrapperViewModel(e.componentData.creator,e.question,e.item)},t.prototype.getUpdatedModelProps=function(){return["question","item"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.props.item.setRootElement(this.rootRef.current),t.item!==this.props.item&&t.item&&t.item.setRootElement(void 0)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.props.item.setRootElement(this.rootRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.props.item.setRootElement(void 0)},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=this.model.allowAdd?n.attachKey2click(l.createElement("span",{role:"button",className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":this.model.tooltip,onClick:function(){e.model.add(e.model),e.model.isNew=!1}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-add_16x16",title:this.model.tooltip}))):l.createElement(l.Fragment,null," ",this.model.isDraggable?l.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__drag"},l.createElement(n.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:"auto",iconName:"icon-drag-24x24",title:this.model.dragTooltip})):null,this.model.allowRemove?n.attachKey2click(l.createElement("span",{role:"button",className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":this.model.tooltip,onClick:function(){return e.model.remove(e.model)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-remove_16x16",title:this.model.tooltip}))):null),o=this.props.element.key+(this.model.allowAdd?"_new":"");return l.createElement(l.Fragment,null,l.createElement("div",{ref:this.rootRef,className:"svc-item-value-wrapper"+(this.model.allowAdd?" svc-item-value--new":"")+(this.model.isDragging?" svc-item-value--dragging":"")+(this.model.isDragDropGhost?" svc-item-value--ghost":"")+(this.model.isDragDropMoveDown?" svc-item-value--movedown":"")+(this.model.isDragDropMoveUp?" svc-item-value--moveup":""),key:o,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)}},l.createElement("div",{className:"svc-item-value__ghost"}),l.createElement("div",{className:"svc-item-value-controls",onBlur:this.onBlur},t),l.createElement("div",{className:"svc-item-value__item",onClick:function(t){return e.model.select(e.model,t.nativeEvent)}},this.props.element),this.renderPanelAction()),this.renderPanel())},t.prototype.renderPanelAction=function(){var e=this;if(!this.model.canShowPanel())return null;var t=this.model.showPanel?"icon-collapsepanel-16x16":"icon-expandpanel-16x16",o=n.attachKey2click(l.createElement("span",{role:"button",className:"svc-item-value-controls__button svc-item-value-controls__add svc-choice-elements-button",onClick:function(){e.model.togglePanel()}},l.createElement(n.SvgIcon,{size:"auto",iconName:t})));return l.createElement("div",{className:"svc-item-value-controls svc-choice-elements-button-container"},o)},t.prototype.renderPanel=function(){if(!this.model.showPanel)return null;var e=this.model.creator,t=e.survey;return l.createElement(V,{element:this.model.item.panel,survey:t,creator:e,css:t.getCss()})},t}(g),V=l.memo(function(e){var t=e.element,o=e.survey,r=e.creator,i=e.css;return l.createElement(n.SurveyPanel,{element:t,survey:o,creator:r,cssClasses:i})});V.displayName="ChoiceItemPanel",n.ReactElementFactory.Instance.registerElement("svc-item-value",function(e){return l.createElement(L,e)});var K=function(e){function t(t){var n=e.call(this,t)||this;return n.preventDragHandler=function(e){e.preventDefault()},n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model=new o.ImageItemValueWrapperViewModel(e.componentData.creator,e.question,e.item,null,null)},t.prototype.getUpdatedModelProps=function(){return["question","item"]},t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.itemsRoot=this.rootRef.current},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.model.itemsRoot=this.rootRef.current},t.prototype.renderLoadingIndicator=function(){return l.createElement("div",{className:"svc-image-item-value__loading"},l.createElement(n.LoadingIndicatorComponent,null))},t.prototype.renderNewItemControls=function(){var e=this,t=n.attachKey2click(l.createElement("span",{className:this.model.addButtonCss,onClick:function(){return e.model.chooseNewFile(e.model)}},this.model.showChooseButtonAsIcon?l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-add-lg",title:this.model.addFileTitle}):l.createElement("span",null,this.model.chooseImageText))),o=this.model.showPlaceholder?l.createElement("span",{className:"svc-image-item-value__placeholder"},this.model.placeholderText):null;return l.createElement(l.Fragment,null,o,t)},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=!this.props.question.isItemInList(this.props.item);this.model.isNew=t;var o=this.model.getIsNewItemSingle()?null:{width:this.question.renderedImageWidth,height:this.question.renderedImageHeight},r=null;return r=t||this.model.isUploading?l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-image-item-value__item"},l.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},l.createElement("label",{className:"sd-imagepicker__label"},l.createElement("div",{style:o,className:"sd-imagepicker__image"},this.model.isUploading?this.renderLoadingIndicator():null)))),this.model.allowAdd&&!this.model.isUploading?l.createElement("div",{className:"svc-image-item-value-controls"},this.renderNewItemControls()):null):l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-image-item-value__item"},this.props.element),this.model.isDraggable&&this.model.canRenderControls?l.createElement("span",{className:"svc-context-button svc-image-item-value-controls__drag-area-indicator",onPointerDown:function(t){return e.model.onPointerDown(t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-drag-24x24"})):null,this.model.canRenderControls?l.createElement("div",{className:"svc-context-container svc-image-item-value-controls"},this.model.allowRemove&&!this.model.isUploading?n.attachKey2click(l.createElement("span",{className:"svc-context-button",onClick:function(){return e.model.chooseFile(e.model)}},l.createElement(n.SvgIcon,{role:"button",size:"auto",iconName:"icon-choosefile",title:this.model.selectFileTitle}))):null,this.model.allowRemove&&!this.model.isUploading?n.attachKey2click(l.createElement("span",{className:"svc-context-button svc-context-button--danger",onClick:function(){return e.model.remove(e.model)}},l.createElement(n.SvgIcon,{role:"button",size:"auto",iconName:"icon-delete",title:this.model.removeFileTitle}))):null):null),l.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)},onDragStart:this.preventDragHandler,onDrop:this.model.onDrop,onDragEnter:this.model.onDragEnter,onDragOver:this.model.onDragOver,onDragLeave:this.model.onDragLeave},l.createElement("div",{className:"svc-image-item-value-wrapper__ghost",style:o}),l.createElement("div",{className:"svc-image-item-value-wrapper__content"},l.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),r))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-image-item-value",function(e){return l.createElement(K,e)});var H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){var t,n=e.componentData,r=!1;this.model&&(r=this.model.isSelected),this.model=new o.MatrixCellWrapperViewModel(n.creator,n.element,n.question,n.row,n.column||(null===(t=n.element.cell)||void 0===t?void 0:t.column)),this.model.isSelected=r},t.prototype.getUpdatedModelProps=function(){return["componentData"]},t.prototype.componentDidUpdate=function(t,n){var o,r;e.prototype.componentDidUpdate.call(this,t,n);var i=this.props.componentData;this.model.templateData=i.element,this.model.row=i.row,this.model.column=i.column||(null===(r=null===(o=i.element)||void 0===o?void 0:o.cell)||void 0===r?void 0:r.column),this.model.question=i.question},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=null;return this.model.isSupportCellEditor&&(t=l.createElement("div",{className:"svc-matrix-cell__question-controls"},n.attachKey2click(l.createElement("span",{className:"svc-matrix-cell__question-controls-button svc-context-button",onClick:function(t){return e.model.editQuestion(e.model,t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-edit"}))))),l.createElement("div",{className:"svc-matrix-cell",tabIndex:-1,key:this.props.element.key,onClick:function(t){return!e.props.question&&e.model.selectContext(e.model,t)},onMouseOut:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},l.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,t)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-matrix-cell",function(e){return l.createElement(H,e)});var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.props.survey&&(this.model=new o.SurveyResultsModel(e.survey))},t.prototype.getUpdatedModelProps=function(){return["survey"]},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return this.model?l.createElement("div",{className:"svd-test-results"},l.createElement("div",{className:"svd-test-results__content"},l.createElement("div",{className:"svd-test-results__header"},l.createElement("div",{className:"svd-test-results__header-text"},this.model.surveyResultsText),l.createElement("div",{className:"svd-test-results__header-types"},l.createElement(q,{click:function(){return e.model.selectTableClick()},text:this.model.surveyResultsTableText,selected:this.model.isTableSelected,disabled:!1}),l.createElement(q,{click:function(){return e.model.selectJsonClick()},text:this.model.surveyResultsJsonText,selected:this.model.isJsonSelected,disabled:!1}))),this.renderResultAsText(),this.renderResultAsTable())):null},t.prototype.renderResultAsText=function(){return"text"!==this.model.resultViewType?null:l.createElement("div",{className:"svd-test-results__text svd-light-bg-color"},l.createElement("div",null,this.model.resultText))},t.prototype.renderResultAsTable=function(){return"table"!==this.model.resultViewType?null:l.createElement("div",{className:"svd-test-results__table svd-light-bg-color"},l.createElement("table",null,l.createElement("thead",null,l.createElement("tr",{className:"svd-light-background-color"},l.createElement("th",{key:1,className:"svd-dark-border-color"},this.model.resultsTitle),l.createElement("th",{key:2,className:"svd-dark-border-color"},this.model.resultsDisplayValue))),l.createElement("tbody",null,t.renderRows(this.model.resultData))))},t.renderRows=function(e){for(var t=[],n=0;n<e.length;n++)t.push(l.createElement(W,{key:n+1,row:e[n]}));return t},t}(g),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.row},t.prototype.render=function(){var e=this;return l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("tr",{onClick:function(){return e.row.toggle()}},l.createElement("td",{key:1,style:{paddingLeft:this.row.textMargin},className:"svd-dark-border-color"},this.row.isNode?l.createElement("span",{style:{left:this.row.markerMargin},className:"svd-test-results__marker "+(this.row.collapsed?"":"svd-test-results__marker--expanded")},l.createElement(n.SvgIcon,{iconName:"icon-expand_16x16",size:16})):null,this.row.question?l.createElement(n.SurveyLocStringViewer,{model:this.row.question.locTitle}):l.createElement("span",null,this.row.title)),l.createElement("td",{key:2,className:this.row.isNode?"svd-test-results__node-value":"svd-dark-border-color"},this.row.getString(this.row.displayValue)))),this.row.isNode&&!this.row.collapsed?z.renderRows(this.row.data):null)},t}(g),G=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model=new o.ToolboxToolViewModel(e.item,e.creator,e.parentModel)},t.prototype.getUpdatedModelProps=function(){return["creator","item"]},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.props.isCompact},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this,t=this.item,o=n.ReactElementFactory.Instance.createElement(this.model.itemComponent,{item:t,creator:this.creator,parentModel:this.creator.toolbox,model:this.model,isCompact:this.isCompact});return l.createElement("div",{className:t.css,key:t.id,ref:this.rootRef},t.needSeparator&&!this.creator.toolbox.showCategoryTitles?l.createElement("div",{className:"svc-toolbox__category-separator"}):null,l.createElement("div",{className:"svc-toolbox__tool-content sv-action__content",onPointerDown:function(t){t.persist(),e.model.onPointerDown(t)}},o))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.updateModeCallback=void 0},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.item.updateModeCallback=function(e,n){queueMicrotask(function(){c.flushSync?c.flushSync(function(){t.item.mode=e}):t.item.mode=e,queueMicrotask(function(){n(e,t.rootRef.current)})})},this.item.afterRender()},t}(g),J=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getUpdatedModelProps=function(){return["creator","item"]},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=this.props.isCompact?l.createElement("span",{className:"svc-toolbox__item-banner",onClick:function(t){t.persist(),e.model.click(t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon",title:this.item.getTooltip()}),l.createElement("span",null,this.item.title)):null,o=n.attachKey2click(l.createElement("div",{className:this.item.renderedCss,tabIndex:0,role:"button","aria-label":this.item.getTooltip(),onClick:function(t){t.persist(),e.model.click(t)}},l.createElement("span",{className:"svc-toolbox__item-container"},this.item.iconName?l.createElement(n.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon"}):null),this.props.isCompact?null:l.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)),void 0,{disableTabStop:!this.model.toolboxItem.enabled});return l.createElement(l.Fragment,null,o,t)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-toolbox-item",function(e){return t.createElement(J,e)});var X=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getUpdatedModelProps=function(){return["creator","item"]},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.props.isCompact},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentModel",{get:function(){return this.props.parentModel},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement(J,{item:this.item,creator:this.creator,model:this.model,parentModel:this.parentModel,isCompact:this.isCompact}),l.createElement("div",{className:"svc-toolbox__item-submenu-button",onMouseOver:function(t){return e.model.onMouseOver(e.item,t)},onMouseLeave:function(t){return e.model.onMouseLeave(e.item,t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:this.item.subitemsButtonIcon}),l.createElement(n.Popup,{model:this.item.popupModel})))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-toolbox-item-group",function(e){return l.createElement(X,e)});var Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"category",{get:function(){return this.props.category},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbox",{get:function(){return this.props.toolbox},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return"svc-toolbox__category"+(this.category.collapsed?" svc-toolbox__category--collapsed":"")+(this.category.empty?" svc-toolbox__category--empty":"")},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.category},t.prototype.render=function(){var e=this.renderCategoryHeader(),t=this.renderCategoryContent();return l.createElement("div",{className:this.class,key:this.category.name},l.createElement("div",{className:"svc-toolbox__category-header-wrapper"},e),t)},t.prototype.renderCategoryHeader=function(){var e=this,t="svc-toolbox__category-header";this.toolbox.canCollapseCategories&&(t+=" svc-toolbox__category-header--collapsed");var o=this.renderLocString(this.category.locTitle);return n.attachKey2click(l.createElement("div",{className:t,onClick:function(t){return e.category.toggleState()}},l.createElement("span",{className:"svc-toolbox__category-title"},o),this.renderButton()))},t.prototype.renderButton=function(){if(!this.toolbox.canCollapseCategories)return null;var e=this.category.iconName;return l.createElement("div",{className:"svc-toolbox__category-header__controls"},l.createElement(n.SvgIcon,{className:this.category.iconClassName,iconName:e,size:"auto"}))},t.prototype.renderCategoryContent=function(){return this.renderItems(this.category.items)},t.prototype.renderItems=function(e,t){var n=this;return void 0===t&&(t=!1),e.map(function(e,o){return l.createElement(G,{item:e,creator:n.toolbox.creator,parentModel:n.toolbox,isCompact:t,key:"item"+o})})},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-toolbox-category",function(e){return l.createElement(Y,e)});var Z=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){if(!this.model||!this.model.renderElements)return null;var e=this.renderItems();return l.createElement("div",{className:this.model.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.model.renderedActions.map(function(t,n){return l.createElement(G,{item:t,creator:e.creator,parentModel:e.model,isCompact:!1,key:"item"+n})})},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-toolbox-list",function(e){return l.createElement(Z,e)});var $=function(e){function t(t){var n=e.call(this,t)||this;return n.state={filterString:n.model.filterString||""},n}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this;if(!this.model.isVisible)return null;return l.createElement("div",{className:"svc-search"},l.createElement("div",{className:"svc-search__search-icon"},l.createElement(n.SvgIcon,{iconName:"icon-search",size:"auto"})),l.createElement("input",{type:"text",className:"svc-search__input","aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onChange:function(t){var n=t.target,o=(null==n?void 0:n.getRootNode())||i.settings.environment.root;(o instanceof Document||o instanceof ShadowRoot)&&n===o.activeElement&&(e.model.filterString=n.value)},tabIndex:this.model.getTabIndex()}),l.createElement("div",{className:"svc-search__toolbar"},l.createElement("div",{className:"svc-search__toolbar-counter"},this.model.matchCounterText),l.createElement(n.SurveyActionBar,{model:this.model.searchActionBar})))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-search",function(e){return l.createElement($,e)});var ee=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var o=this.rootRef.current;o&&this.toolbox.afterRender(o)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&this.toolbox.afterRender(t)},t.prototype.componentWillUnmount=function(){this.toolbox.beforeDestroy(),e.prototype.componentWillUnmount.call(this)},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbox",{get:function(){return this.creator.toolbox},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.toolbox},t.prototype.renderItems=function(e,t){var n=this;return void 0===t&&(t=!1),e.map(function(e,o){return l.createElement(G,{item:e,creator:n.creator,parentModel:n.toolbox,isCompact:t,key:e.renderedId})})},t.prototype.renderCategories=function(){var e=this;return this.toolbox.categories.map(function(t,o){return n.ReactElementFactory.Instance.createElement("svc-toolbox-category",{category:t,toolbox:e.toolbox,key:"category"+o})})},t.prototype.renderSearch=function(){var e=this.toolbox.isCompactRendered?l.createElement(l.Fragment,null,l.createElement(G,{item:this.toolbox.searchItem,creator:this.creator,parentModel:this.toolbox,isCompact:this.toolbox.isCompactRendered,key:"searchitem"})):null;return l.createElement("div",{className:"svc-toolbox__search-container"},e,l.createElement($,{model:this.toolbox.searchManager}),l.createElement("div",{className:"svc-toolbox__category-separator svc-toolbox__category-separator--search"}))},t.prototype.render=function(){var e=this,t=this.toolbox.showSearch?this.renderSearch():null,o=this.toolbox.showPlaceholder?l.createElement("div",{className:"svc-toolbox__placeholder"},this.toolbox.toolboxNoResultsFound):null;return l.createElement("div",{ref:this.rootRef,className:this.toolbox.classNames,style:this.toolbox.getRootStyle()},l.createElement("div",{onBlur:function(t){return e.toolbox.focusOut(t)},className:"svc-toolbox__panel"},t,o,l.createElement(n.Scroll,null,this.toolbox.showInSingleCategory?l.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompactRendered)):this.renderCategories())))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-toolbox",function(e){return l.createElement(ee,e)});var te=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPropChangedHandler=function(e,n){if(!t.isRendering){var o=["showProgressBar","progressBarType","currentPageValue"];if(!(o.indexOf(n.name)<0)){for(var r={},i=0;i<o.length;i++){var a=o[i];r[a]=t.survey[a]}t.setState(r)}}},t}return m(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setHandler()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setHandler()},t.prototype.setHandler=function(){this.survey&&!this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler)&&this.survey.onPropertyChanged.add(this.onPropChangedHandler)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.survey&&this.survey.onPropertyChanged.remove(this.onPropChangedHandler)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTop",{get:function(){return"top"==this.location},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.isTop?this.survey.isShowProgressBarOnTop:this.survey.isShowProgressBarOnBottom},t.prototype.renderElement=function(){return n.ReactElementFactory.Instance.createElement(this.survey.getProgressTypeComponent(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})},t}(n.SurveyElementBase),ne=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.model},t.prototype.renderElement=function(){var e=this.props.model;if(!e.visible)return null;var t=n.attachKey2click(l.createElement("div",{className:e.buttonClassName,title:e.tooltip,onClick:function(){e.action()}},l.createElement("div",{className:"svc-menu-action__icon"},l.createElement("div",{className:"svc-menu-action__icon-container"},l.createElement(n.SvgIcon,{iconName:e.iconName,size:"auto"})))),e);return l.createElement("div",{className:"svc-menu-action"},t)},t}(n.SurveyElementBase),oe=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.model},t.prototype.canRender=function(){return!!this.props.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){return l.createElement("div",{className:this.props.model.sideBarClassName},l.createElement("div",{className:"svc-sidebar-tabs__top-container"},l.createElement("div",{className:"svc-sidebar-tabs__collapse-button"},l.createElement(ne,{model:this.props.model.expandCollapseAction})),l.createElement("div",{className:"svc-sidebar-tabs__separator"},l.createElement("div",null)),l.createElement(n.Scroll,null,l.createElement("div",{className:"svc-sidebar-tabs__items"},l.createElement(re,{model:this.props.model.topToolbar})))),l.createElement("div",{className:"svc-sidebar-tabs__bottom-container"},l.createElement("div",{className:"svc-sidebar-tabs__items"},l.createElement(n.SurveyActionBar,{model:this.props.model.bottomToolbar}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-control",function(e){return l.createElement(oe,e)});var re=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.model},t.prototype.renderElement=function(){return l.createElement(l.Fragment,null,this.props.model.actions.map(function(e,t){return l.createElement(ne,{model:e,key:"item"+t})}))},t}(n.SurveyElementBase),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.model.title?l.createElement("div",{className:"svc-side-bar__container-title"},this.model.title):null;return l.createElement("div",{className:"svc-side-bar__container-header"},l.createElement("div",{className:"svc-side-bar__container-actions"},l.createElement(n.SurveyActionBar,{model:this.model.toolbar})),e)},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-side-bar-default-header",function(e){return l.createElement(ie,e)});var ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"objectSelectionAction",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.objectSelectionAction},t.prototype.renderElement=function(){var e=this,t=n.attachKey2click(l.createElement("div",{className:this.objectSelectionAction.buttonClassName,onClick:function(){return e.objectSelectionAction.action()}},l.createElement("div",{className:"svc-sidebar__header-caption"},l.createElement("span",{className:"svc-sidebar__header-title"},this.objectSelectionAction.title),l.createElement("span",{className:"svc-sidebar__header-subtitle"},this.objectSelectionAction.tooltip))),this.props.model);return l.createElement("div",{className:"svc-sidebar__header svc-sidebar__header--tabbed"},l.createElement("div",{className:"svc-sidebar__header-container svc-sidebar__header-container--with-subtitle"},l.createElement("div",{className:"svc-sidebar__header-content"},t,l.createElement(n.Popup,{model:this.objectSelectionAction.popupModel}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-side-bar-property-grid-header",function(e){return l.createElement(ae,e)});var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return l.createElement("div",{className:"svc-side-bar__container-header svc-sidebar__header-container"},this.model.subTitle?l.createElement("div",{className:"svc-sidebar__header-caption"},l.createElement("span",{className:"svc-sidebar__header-title"},this.model.title),l.createElement("span",{className:"svc-sidebar__header-subtitle"},this.model.subTitle)):l.createElement("div",{className:"svc-side-bar__container-title"},this.model.title))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-side-bar-header",function(e){return l.createElement(se,e)});var le=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=l.createRef(),n}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.initResizeManager(this.containerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.resetResizeManager()},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){var e=this,t={display:this.model.renderRoot?"":"none"},o={display:this.model.renderContainer?"":"none"},r=this.model.pages.map(function(e){return l.createElement(ce,{page:e,key:e.id})}),i=n.ReactElementFactory.Instance.createElement(this.model.header.component,{model:this.model.header.componentModel}),a=null;return this.model.sideAreaComponentName&&(a=n.ReactElementFactory.Instance.createElement(this.model.sideAreaComponentName,{model:this.model.sideAreaComponentData})),l.createElement("div",{className:this.model.rootCss,style:t},l.createElement("div",{className:"svc-side-bar__shadow",onClick:function(){return e.model.collapseSidebar()},style:o}),l.createElement("div",{className:"svc-flex-row svc-side-bar__wrapper"},l.createElement("div",{className:"svc-side-bar__container-wrapper",style:o},l.createElement("div",{ref:this.containerRef,className:"svc-side-bar__container"},i,l.createElement("div",{className:"svc-side-bar__container-content"},r))),a))},t}(n.SurveyElementBase),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"page",{get:function(){return this.props.page},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.page},t.prototype.renderElement=function(){return this.page.visible?n.ReactElementFactory.Instance.createElement(this.page.componentName,{model:this.page.componentData}):null},t}(n.SurveyElementBase);n.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-page",function(e){return l.createElement(ce,e)}),n.ReactElementFactory.Instance.registerElement("svc-side-bar",function(e){return l.createElement(le,e)});var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:"sd-translation-line-skeleton"})},t}(l.Component);n.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",function(e){return l.createElement(ue,e)});var me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item;return l.createElement("div",{className:e.data.containerCss},l.createElement("span",{className:e.data.additionalTitleCss},e.data.additionalTitle),n.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.item}))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-translate-from-action",function(e){return l.createElement(me,e)});var de=function(e){function t(t){var n,o=e.call(this,t)||this;return o.onChangedHandler=function(e,t){o.setState({changed:o.state&&o.state.changed?o.state.changed+1:1})},o.onBlur=function(e){return o.svStringEditorRef.current&&(o.svStringEditorRef.current.spellcheck=!1),o.locString.__isEditing=!1,o.justFocused=!1,o.baseModel.onBlur(e.nativeEvent),o.baseModel.errorText},o.onCompositionStart=function(e){o.baseModel.onCompositionStart(e.nativeEvent)},o.onCompositionEnd=function(e){o.baseModel.onCompositionEnd(e.nativeEvent)},o.onBeforeInput=function(e){o.baseModel.onBeforeInput(e)},o.onInput=function(e){o.baseModel.onInput(e.nativeEvent)},o.onPaste=function(e){o.baseModel.onPaste(e.nativeEvent)},o.justFocused=!1,o.onFocus=function(e){o.baseModel.onFocus(e.nativeEvent),o.justFocused=!0},o.onKeyDown=function(e){return o.baseModel.onKeyDown(e.nativeEvent)},o.onKeyUp=function(e){return o.baseModel.onKeyUp(e.nativeEvent)},o.onMouseUp=function(e){return o.baseModel.onMouseUp(e.nativeEvent)},o.done=function(e){o.baseModel.done(e),o.locString.__isEditing=!1},o.edit=function(e){o.svStringEditorRef.current.focus(),o.locString.__isEditing=!0,o.baseModel.onClick(e)},o.htmlValue={__html:null===(n=o.locString)||void 0===n?void 0:n.renderedHtml},o.state={changed:0},o.svStringEditorRef=l.createRef(),o}return m(t,e),t.prototype.createModel=function(e){this.baseModel&&this.baseModel.dispose(),this.baseModel=new o.StringEditorViewModelBase(this.locString,this.creator)},t.prototype.getUpdatedModelProps=function(){return["creator","locString"]},Object.defineProperty(t.prototype,"locString",{get:function(){return this.props.model.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.model.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.baseModel},Object.defineProperty(t.prototype,"errorText",{get:function(){return this.baseModel.errorText},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.locString&&(this.baseModel.setLocString(this.locString),this.baseModel.getEditorElement=function(){return t.svStringEditorRef.current},this.baseModel.blurEditor=function(){t.svStringEditorRef.current.blur(),t.svStringEditorRef.current.spellcheck=!1},this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler),this.locString.__isEditing&&this.svStringEditorRef.current.focus())},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.baseModel.setLocString(this.locString),this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.baseModel.detachFromUI(),this.locString&&this.locString.onStringChanged.remove(this.onChangedHandler)},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.baseModel.placeholder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return this.baseModel.contentEditable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this.baseModel.className(this.locString.renderedHtml)},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.locString)return null;var e=null;this.locString.hasHtml?(this.htmlValue.__html!==this.locString.renderedHtml&&(this.htmlValue={__html:this.locString.renderedHtml}),e=l.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor sv-string-editor--html",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,tabIndex:this.baseModel.tabIndex,dangerouslySetInnerHTML:this.htmlValue,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit})):e=l.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,tabIndex:this.baseModel.tabIndex,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,key:this.locString.renderedHtml,onBlur:this.onBlur,onBeforeInput:this.onBeforeInput,onInput:this.onInput,onPaste:this.onPaste,onCompositionStart:this.onCompositionStart,onCompositionEnd:this.onCompositionEnd,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseUp:this.onMouseUp,onClick:this.edit},this.locString.renderedHtml);var t=this.baseModel.showCharacterCounter?l.createElement(n.CharacterCounterComponent,{counter:this.baseModel.characterCounter,remainingCharacterCounter:this.baseModel.getCharacterCounterClass}):null;return l.createElement("span",{className:this.className},l.createElement("span",{className:"svc-string-editor__content"},l.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--hover",onClick:this.edit}),l.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--focus",onClick:this.edit}),l.createElement("span",{className:"svc-string-editor__input"},e,l.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit}),t)),this.errorText?l.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")},t}(g);n.ReactElementFactory.Instance.registerElement(o.editableStringRendererName,function(e){return l.createElement(de,e)});var pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",null,l.createElement(n.SvgIcon,{"aria-hidden":"true",iconName:"icon-alert_24x24",size:"24",className:this.props.cssClasses.error.icon}),l.createElement("span",{className:this.props.cssClasses.error.item||void 0},l.createElement(n.SurveyLocStringViewer,{model:this.props.error.locText})))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-error",function(e){return l.createElement(pe,e)});var he=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.renderInput=function(){var e=this.question;o.initLogicOperator(e);var t=e.locReadOnlyText?this.renderLocString(e.locReadOnlyText):"",n=this.question.dropdownListModel;return l.createElement("div",{id:this.question.inputId,className:e.getControlClass(),tabIndex:this.question.isInputReadOnly?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onKeyUp:this.keyhandler,role:n.ariaQuestionRole,"aria-required":n.ariaQuestionRequired,"aria-invalid":n.ariaQuestionInvalid,"aria-errormessage":n.ariaQuestionErrorMessage,"aria-expanded":n.ariaQuestionExpanded,"aria-label":n.ariaQuestionLabel,"aria-labelledby":n.ariaQuestionLabelledby,"aria-controls":n.ariaQuestionControls},l.createElement("div",{className:this.question.cssClasses.controlValue},t))},t.prototype.renderEditorButtons=function(){return null},t}(n.SurveyQuestionDropdown);n.ReactQuestionFactory.Instance.registerQuestion("sv-logic-operator",function(e){return l.createElement(he,e)}),i.RendererFactory.Instance.registerRenderer("dropdown","logicoperator","sv-logic-operator");var ve=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model&&this.model.dispose(),this.model=new o.PageNavigatorViewModel(e.pagesController,e.pageEditMode)},t.prototype.getUpdatedModelProps=function(){return["pagesController","pageEditMode"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),"bypage"!==this.props.pageEditMode){var t=this.containerRef.current;this.model.attachToUI(t)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.stopItemsContainerHeightObserver(),this.model.setScrollableContainer(void 0)},t.prototype.renderElement=function(){var e=this,t="svc-page-navigator__selector svc-page-navigator__button";return this.model.isPopupOpened&&(t+=" svc-page-navigator__button--pressed"),l.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},l.createElement("div",null,n.attachKey2click(l.createElement("div",{role:"button",className:t,onClick:function(){return e.model.togglePageSelector()},title:this.model.pageSelectorCaption},l.createElement(n.SvgIcon,{className:"svc-page-navigator__button-icon",iconName:this.model.icon,size:"auto",title:this.model.pageSelectorCaption}))),l.createElement(n.Popup,{model:this.model.popupModel})),l.createElement("div",null,this.model.visibleItems.map(function(e){return l.createElement(fe,{key:e.id,item:e})})))},t}(g),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.item},t.prototype.renderElement=function(){var e=this.props.item,t="svc-page-navigator-item-content";return i.unwrap(e.active)&&(t+=" svc-page-navigator-item--selected"),i.unwrap(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),l.createElement("div",{className:"svc-page-navigator-item"},n.attachKey2click(l.createElement("div",{role:"button",className:t,onClick:function(t){e.action(e),t.stopPropagation()}},l.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title},l.createElement("div",{className:"svc-page-navigator-item__dot-content"})),l.createElement("div",{className:"svc-page-navigator-item__banner"},l.createElement("span",{className:"svc-page-navigator-item__text"},e.title),l.createElement("span",{className:"svc-page-navigator-item__dot"},l.createElement("span",{className:"svc-page-navigator-item__dot-content"}))))))},t}(g),ye=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:"svc-surface-placeholder"},l.createElement("div",{className:"svc-surface-placeholder__image svc-surface-placeholder__image--"+this.props.name}),l.createElement("div",{className:"svc-surface-placeholder__text"},l.createElement("div",{className:"svc-surface-placeholder__title"},this.props.placeholderTitleText),l.createElement("div",{className:"svc-surface-placeholder__description"},this.props.placeholderDescriptionText)))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-surface-placeholder",function(e){return l.createElement(ye,e)});var ge=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.denyUpdate=function(){t.denyComponentUpdate()},t.allowUpdate=function(){t.allowComponentUpdate()},t.addDragDropEvents=function(){t.creator.onDragStart.add(t.denyUpdate),t.creator.onDragClear.add(t.allowUpdate)},t.clearDragDropEvents=function(){t.creator.onDragStart.remove(t.denyUpdate),t.creator.onDragClear.remove(t.allowUpdate)},t}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.model.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.addDragDropEvents()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.clearDragDropEvents(),e.prototype.componentWillUnmount.call(this)},t.prototype.getStateElements=function(){return[this.model,this.model.survey,this.model.pagesController]},t.prototype.getRenderedPages=function(){var e=this,t=[];if("bypage"!==this.creator.pageEditMode){this.model.pages.forEach(function(n){t.push(e.createRenderedPage(n,"svc-page",n==e.model.newPage))})}else{var n=this.model.pagesController.page2Display;n&&t.push(this.createRenderedPage(n,"svc-page",this.model.newPage===n))}return t},t.prototype.createRenderedPage=function(e,t,n){return l.createElement(Ee,{key:null==e?void 0:e.id,page:e,isGhost:n,creator:this.creator,className:t})},t.prototype.renderElement=function(){var e=this,t="svc-tab-designer "+this.model.getRootCss();return l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?n.ReactElementFactory.Instance.createElement("svc-toolbox",{model:this.creator}):null),l.createElement("div",{className:t,onClick:function(){return e.model.clickDesigner()}},l.createElement(n.Scroll,null,l.createElement("div",{className:"svc-tab-designer_content"},this.model.showPlaceholder?this.renderPlaceHolder():this.renderTabContent()))))},t.prototype.renderHeader=function(e){if(!e)return null;var t=this.creator.survey;return l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-designer-header"},l.createElement(n.SurveyHeader,{survey:t})))},t.prototype.renderPlaceHolder=function(){var e=this.renderHeader(this.creator.showSurveyHeader&&this.creator.showHeaderInEmptySurvey);return l.createElement(l.Fragment,null,e,l.createElement("div",{className:"svc-designer__placeholder-container","data-sv-drop-target-survey-element":"newGhostPage"},this.renderPlaceHolderContent(),this.createRenderedPage(this.model.newPage,"svc-designer-placeholder-page",!0)))},t.prototype.renderPlaceHolderContent=function(){return l.createElement(ye,{name:"designer",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})},t.prototype.renderTabContent=function(){var e=this.creator.survey,t=this.renderHeader(this.creator.showSurveyHeader),n=d({},this.model.surfaceCssVariables);n.maxWidth=e.renderedWidth;var o=this.renderTabTools();return l.createElement(l.Fragment,null,l.createElement("div",{className:this.model.designerCss,style:n},t,this.getRenderedPages()),o)},t.prototype.renderTabTools=function(){if(!this.model.showSurfaceTools)return null;var e=this.creator.showPageNavigator?l.createElement("div",{className:"svc-tab-designer__page-navigator"},l.createElement(ve,{pagesController:this.model.pagesController,pageEditMode:this.model.creator.pageEditMode})):null,t=this.model.showSurfaceToolbar?l.createElement(n.SurveyActionBar,{model:this.model.surfaceToolbar,handleClick:!1}):null;return l.createElement("div",{className:"svc-tab-designer__tools"},e,t)},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-designer",function(e){return l.createElement(ge,e)});var Ee=function(e){function t(n){var o=e.call(this,n)||this;return o.id="PageWrapperCallback_".concat(++t.ID),o.state={changed:0},o}return m(t,e),t.prototype.render=function(){var e,t,o=this.props.page?n.ReactElementFactory.Instance.createElement("svc-page",{survey:this.props.creator.survey,page:this.props.page,creator:this.props.creator,isGhost:this.props.isGhost}):null;return l.createElement("div",{className:this.props.className,"data-sv-drop-target-page":null===(e=this.props.page)||void 0===e?void 0:e.name,"data-sv-drop-target-survey-element":this.props.isGhost?"newGhostPage":null===(t=this.props.page)||void 0===t?void 0:t.name},o)},t.prototype.setupCallback=function(e){var t=this;e&&e.registerFunctionOnPropertyValueChanged("name",function(){t.setState({changed:t.state&&t.state.changed?t.state.changed+1:1})},this.id)},t.prototype.clearCallback=function(e){e&&e.unRegisterFunctionOnPropertyValueChanged("name")},t.prototype.componentDidUpdate=function(e,t){e.page!==this.props.page&&(this.clearCallback(e.page),this.setupCallback(this.props.page))},t.prototype.componentDidMount=function(){this.setupCallback(this.props.page)},t.prototype.componentWillUnmount=function(){this.clearCallback(this.props.page)},t.ID=0,t}(l.Component),be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return l.createElement("div",{className:"svc-json-editor-tab__errros_list",style:{display:this.model.hasErrors?"block":"none"}},l.createElement(n.List,{model:this.model.errorList}))},t}(n.SurveyElementBase),_e=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=l.createElement(be,{data:this.model});return l.createElement("div",{className:"svc-creator-tab__content"},l.createElement("div",{className:"svc-json-editor-tab__content"},l.createElement("textarea",{ref:function(t){return n=t,void(e.model.textElement=n);var n},className:"svc-json-editor-tab__content-area",value:this.model.text,onChange:function(t){return e.model.text=t.target.value},onKeyDown:function(t){return e.model.checkKey(t,t)},disabled:this.model.readOnly,"aria-label":this.model.ariaLabel}),t))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",function(e){return l.createElement(_e,e)});var Ce=function(e){function t(t){var n=e.call(this,t)||this;return n.aceEditorrRef=l.createRef(),n}return m(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.model.init(ace.edit(this.aceEditorrRef.current))},t.prototype.renderElement=function(){var e=l.createElement(be,{data:this.model});return l.createElement("div",{className:"svc-creator-tab__content"},l.createElement("div",{className:"svc-json-editor-tab__content"},l.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef}),e))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",function(e){return l.createElement(Ce,e)});var Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.button},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t="svc-logic-tab__content-action svc-btn"+(void 0===this.model.enabled||this.model.enabled?"":" svc-logic-tab__content-action--disabled");return n.attachKey2click(l.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:t,title:this.model.title},l.createElement("span",{className:"svc-btn__text"},this.model.title)))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button",function(e){return l.createElement(Ne,e)});var Se=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return m(o,e),Object.defineProperty(o.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),o.prototype.getStateElement=function(){return this.model},o.prototype.renderElement=function(){this.model;var e=this.renderViewContent();return l.createElement("div",{className:"svc-creator-tab__content svc-logic-tab"},e)},o.prototype.renderViewContent=function(){var e="svc-plugin-tab__content svc-logic-tab svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab--empty"),o=this.model.readOnly?void 0:l.createElement(Ne,{button:this.model.addNewButton});return l.createElement(t.Fragment,null,l.createElement("div",{className:e},this.model.hasItems?l.createElement(l.Fragment,null,l.createElement(n.Survey,{model:this.model.itemsSurvey}),o):l.createElement("div",{className:"svc-logic-tab__content-empty"},l.createElement(ye,{name:"logic",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}),o)))},o}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-logic",function(e){return l.createElement(Se,e)});var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t=this.model.getRootCss();return this.model.survey?this.model.hasFrame?l.createElement("div",{className:t,onKeyDown:function(t){return e.model.tryToZoom(t,t)},onMouseEnter:"desktop"===this.model.device?null:this.model.activateZoom,onMouseLeave:"desktop"===this.model.device?null:this.model.deactivateZoom},l.createElement("div",{className:"svd-simulator-wrapper",id:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},l.createElement("div",{className:"svd-simulator",style:{width:this.model.simulatorFrame.deviceWidth+"px",height:this.model.simulatorFrame.deviceHeight+"px",transform:"scale("+this.model.simulatorFrame.scale+") translate(-50%, -50%)"}},l.createElement("div",{className:"svd-simulator-content"},l.createElement(n.Survey,{model:this.model.survey}))))):l.createElement("div",{className:t},l.createElement("div",{className:"svd-simulator-content"},l.createElement(n.Survey,{model:this.model.survey}))):l.createElement("div",{className:t})},t}(n.SurveyElementBase),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model.testAgainAction},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this;return n.attachKey2click(l.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:"svc-preview__test-again svc-btn",title:this.model.title},l.createElement("span",{className:"svc-btn__text"},this.model.title)))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-complete-page",function(e){return l.createElement(qe,e)});var Ie=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderPlaceholder=function(){return l.createElement(ye,{name:"preview",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})},t.prototype.renderSimulator=function(){return l.createElement("div",{className:"svc-plugin-tab__content"},l.createElement(we,{model:this.model.simulator}),this.model.showResults?l.createElement(z,{survey:this.model.simulator.survey}):null)},t.prototype.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return l.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?l.createElement("div",{className:"svc-test-tab__content-actions"},l.createElement(n.SurveyActionBar,{model:this.model.pages})):null},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-preview",function(e){return l.createElement(Ie,e)});var Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:"svc-property-grid-placeholder"},l.createElement("div",{className:"svc-property-grid-placeholder__header"},l.createElement("span",{className:"svc-property-grid-placeholder__title"},o.editorLocalization.getString("ed.propertyGridPlaceholderTitle")),l.createElement("span",{className:"svc-property-grid-placeholder__description"},o.editorLocalization.getString("ed.propertyGridPlaceholderDescription"))),l.createElement("div",{className:"svc-property-grid-placeholder__content"},l.createElement("div",{className:"svc-property-grid-placeholder__gap"}),l.createElement("div",{className:"svc-property-grid-placeholder__image"})))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-property-grid-placeholder",function(e){return l.createElement(Re,e)});var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderPlaceholder=function(){return l.createElement(ye,{name:"theme",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})},t.prototype.renderSimulator=function(){return l.createElement("div",{className:"svc-plugin-tab__content"},l.createElement(we,{model:this.model.simulator}),this.model.showResults?l.createElement(z,{survey:this.model.simulator.survey}):null)},t.prototype.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return l.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?l.createElement("div",{className:"svc-test-tab__content-actions"},l.createElement(n.SurveyActionBar,{model:this.model.pages})):null},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-theme",function(e){return l.createElement(xe,e)});var Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data||this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model?l.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"+(this.model.isEmpty?" svc-translation-tab--empty":"")},this.renderElementContent()):null},t.prototype.renderElementContent=function(){return this.model.isEmpty?l.createElement(ye,{name:"translation",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}):l.createElement("div",{className:"st-content"},l.createElement("div",{className:"svc-flex-column st-strings-wrapper"},l.createElement("div",{className:"svc-flex-row st-strings-header"},l.createElement(n.Survey,{model:this.model.stringsHeaderSurvey})),l.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},l.createElement(n.Survey,{model:this.model.stringsSurvey}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-translation",function(e){return l.createElement(Me,e)});var Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model.isVisible?l.createElement(n.List,{model:this.model.list}):null},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-object-selector",function(e){return l.createElement(Pe,e)});var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){return l.createElement("div",{className:this.model.rootCss},l.createElement($,{model:this.model.searchManager}),l.createElement(n.Survey,{model:this.model.survey}))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-property-grid",function(e){return l.createElement(Te,e)});var De=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:this.props.model.cssClass},this.props.model.elements.map(function(e,t){return n.ReactElementFactory.Instance.createElement(e.componentName,d(d({},e.componentData),{key:t}))}))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-component-container",function(e){return l.createElement(De,e)});var Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this,t=this.item.tooltip||this.item.title,o=this.item.hasTitle?l.createElement("span",{className:"svc-switcher__title"},this.item.title):null;return n.attachKey2click(l.createElement("button",{className:this.item.getActionBarItemCss(),type:"button",disabled:this.item.disabled,onClick:function(t){return e.item.action(e.item,e.item.getIsTrusted(t))},title:t,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},l.createElement("div",{className:this.item.getSwitcherIconCss()},l.createElement("div",{className:"svc-switcher__icon-thumb"})),o),this.item,{processEsc:!1})},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-switcher",function(e){return l.createElement(Fe,e)});var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this.props.item;return l.createElement(l.Fragment,null,l.createElement(n.SvgIcon,{iconName:e.iconName,size:e.iconSize,className:"svc-json-error__icon"}),l.createElement("div",{className:"svc-json-error__container"},l.createElement("div",{className:"svc-json-error__title"},l.createElement("span",{key:2},this.renderLocString(e.locTitle,void 0,"locString"))),this.renderFixButton()))},t.prototype.renderFixButton=function(){if(!this.props.item.data.showFixButton)return null;var e=this.props.item;return n.attachKey2click(l.createElement("button",{type:"button",onClick:function(t){t.stopPropagation(),e.data.fixError()},title:e.data.fixButtonTitle,className:"svc-json-error__fix-button"},l.createElement(n.SvgIcon,{iconName:e.data.fixButtonIcon,size:"auto"})))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("json-error-item",function(e){return l.createElement(ke,e)});var Be=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderInput=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement("input",{role:"spinbutton",id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:function(t){return e.setControl(t)},placeholder:this.question.renderedPlaceholder,autoComplete:"off",onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onFocus:function(t){return e.question.onFocus(t.nativeEvent)},onChange:this.question.onChange,onBeforeInput:function(t){return e.question.onBeforeInput(t.nativeEvent)},onKeyUp:function(t){return e.question.onKeyUp(t.nativeEvent)},onKeyDown:function(t){return e.question.onInputKeyDown(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}))},t.prototype.renderElement=function(){var e=this;return l.createElement("div",{className:this.question.cssClasses.root,onKeyDown:function(t){return e.question.onKeyDown(t.nativeEvent)}},this.renderInput(),this.renderButtons())},t.prototype.getValueCore=function(){return this.question.renderedValue},t.prototype.renderButtons=function(){var e=this;return l.createElement("span",{className:this.question.cssClasses.buttonsContainer},l.createElement("button",{tabIndex:-1,"aria-hidden":"true",className:this.question.cssClasses.arrowButton,disabled:this.isDisplayMode,onClick:this.question.onDownButtonClick,onMouseDown:this.question.onDownButtonMouseDown,onMouseUp:this.question.onButtonMouseUp,onMouseLeave:this.question.onButtonMouseLeave,onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onFocus:function(t){return e.question.onFocus(t.nativeEvent)}},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.decreaseButtonIcon,size:"auto"})),l.createElement("button",{tabIndex:-1,"aria-hidden":"true",className:this.question.cssClasses.arrowButton,disabled:this.isDisplayMode,onClick:this.question.onUpButtonClick,onMouseDown:this.question.onUpButtonMouseDown,onMouseUp:this.question.onButtonMouseUp,onMouseLeave:this.question.onButtonMouseLeave,onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onFocus:function(t){return e.question.onFocus(t.nativeEvent)}},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.increaseButtonIcon,size:"auto"})))},t}(n.SurveyQuestionText);n.ReactQuestionFactory.Instance.registerQuestion("spinedit",function(e){return l.createElement(Be,e)});var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this.props.item;return l.createElement(l.Fragment,null,l.createElement("span",{className:"spg-color-editor__color-swatch",style:{backgroundColor:e.value}}),l.createElement("span",{key:2},this.renderLocString(e.locTitle,void 0,"locString")))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("color-item",function(e){return l.createElement(Oe,e)});var je=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderInput=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:function(t){return e.setControl(t)},placeholder:this.question.renderedPlaceholder,autoComplete:"off",onKeyUp:function(t){return e.question.onKeyUp(t.nativeEvent)},onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onChange:this.question.onChange,onBeforeInput:function(t){return e.question.onBeforeInput(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-label":this.question.a11y_input_ariaLabel,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}))},t.prototype.renderElement=function(){var e=this;return l.createElement("div",{className:this.question.cssClasses.root,onKeyDown:function(t){return e.question.onKeyDown(t.nativeEvent)}},this.renderColorSwatch(),this.renderInput(),this.question.showDropdownAction?this.renderDropdownAction():null)},t.prototype.getValueCore=function(){return this.question.renderedValue},t.prototype.renderColorSwatch=function(){var e=this;return l.createElement("label",{className:this.question.getSwatchCss(),style:this.question.getSwatchStyle()},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.swatchIcon,size:"auto"}),l.createElement("input",{type:"color",disabled:this.isDisplayMode,value:this.question.renderedColorValue,className:this.question.cssClasses.colorInput,onChange:function(t){return e.question.onColorInputChange(t.nativeEvent)},tabIndex:-1,"aria-required":this.question.a11y_input_ariaRequired,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-label":this.question.a11y_input_ariaLabel,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}))},t.prototype.renderDropdownAction=function(){return l.createElement(l.Fragment,null,l.createElement("div",{"aria-hidden":"true",className:this.question.cssClasses.choicesButtonWrapper},n.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.question.dropdownAction})),this.renderPopup())},t.prototype.renderPopup=function(){return l.createElement(n.Popup,{model:this.question.dropdownAction.popupModel})},t}(n.SurveyQuestionText);n.ReactQuestionFactory.Instance.registerQuestion("color",function(e){return l.createElement(je,e)});var Ue=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"questionFile",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getValueCore=function(){return this.question.renderedValue},t.prototype.renderInput=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement("input",{disabled:this.question.isTextInputReadOnly,className:this.questionFile.cssClasses.control,placeholder:this.questionFile.renderedPlaceholder,ref:function(t){return e.setControl(t)},autoComplete:"off",type:"text",onBlur:function(t){return e.questionFile.onInputBlur(t.nativeEvent)},onChange:function(t){return e.questionFile.onInputChange(t.nativeEvent)}}))},t.prototype.renderFileInput=function(){var e=this;return l.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.questionFile.cssClasses.fileInput,id:this.questionFile.inputId,"aria-required":this.questionFile.ariaRequired,"aria-label":this.questionFile.ariaLabel,"aria-invalid":this.questionFile.ariaInvalid,"aria-describedby":this.questionFile.ariaDescribedBy,multiple:!1,title:this.questionFile.inputTitle,accept:this.questionFile.acceptedTypes,tabIndex:-1,onChange:function(t){return e.questionFile.onFileInputChange(t.nativeEvent)}})},t.prototype.renderButtons=function(){return l.createElement("div",{className:this.questionFile.cssClasses.buttonsContainer},this.renderClearButton(),this.renderChooseButton())},t.prototype.renderClearButton=function(){return n.attachKey2click(l.createElement("button",{className:this.questionFile.cssClasses.clearButton,title:this.questionFile.clearButtonCaption,disabled:this.questionFile.getIsClearButtonDisabled(),onClick:this.questionFile.doClean},l.createElement(n.SvgIcon,{iconName:this.questionFile.cssClasses.clearButtonIcon,size:"auto"})))},t.prototype.renderChooseButton=function(){var e=this;return n.attachKey2click(l.createElement("label",{onClick:function(t){return e.questionFile.chooseFiles(t.nativeEvent)},className:this.questionFile.getChooseButtonCss(),htmlFor:this.questionFile.inputId,"aria-label":this.questionFile.chooseButtonCaption},l.createElement(n.SvgIcon,{iconName:this.questionFile.cssClasses.chooseButtonIcon,size:"auto",title:this.questionFile.chooseButtonCaption})))},t.prototype.renderElement=function(){var e=this;return l.createElement("div",{className:this.questionFile.cssClasses.root,ref:function(t){return e.setContent(t)},onDragEnter:this.questionFile.onDragEnter,onDragOver:this.questionFile.onDragOver,onDrop:this.questionFile.onDrop,onDragLeave:this.questionFile.onDragLeave,onKeyDown:function(t){return e.question.onKeyDown(t.nativeEvent)}},this.renderInput(),this.renderFileInput(),this.renderButtons())},t}(n.SurveyQuestionText);n.ReactQuestionFactory.Instance.registerQuestion("fileedit",function(e){return l.createElement(Ue,e)});var Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderInput(),t=this.renderResetButton();return l.createElement("div",{className:this.question.getRootClass()},e,t)},t.prototype.renderInput=function(){return n.ReactQuestionFactory.Instance.createQuestion(this.question.wrappedQuestionTemplate,{question:this.question,isDisplayMode:this.question.isInputReadOnly,creator:this})},t.prototype.renderResetButton=function(){var e=this;return l.createElement("button",{className:this.question.cssClasses.resetButton,disabled:this.question.resetValueAdorner.isDisabled,title:this.question.resetValueAdorner.caption,onClick:function(){return e.question.resetValueAdorner.resetValue()}},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.resetButtonIcon,size:"auto"}))},t}(n.SurveyQuestionElementBase);n.ReactQuestionFactory.Instance.registerQuestion("textwithreset",function(e){return l.createElement(Ae,e)}),n.ReactQuestionFactory.Instance.registerQuestion("commentwithreset",function(e){return l.createElement(Ae,e)});var Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.renderElement=function(){var e=this,t=n.attachKey2click(l.createElement("div",{className:"spg-boolean-switch__button"+(this.questionBase.booleanValue?" spg-boolean-switch__button--checked":""),tabIndex:0,role:"checkbox","aria-checked":this.questionBase.booleanValue||!1,"aria-required":this.questionBase.a11y_input_ariaRequired,"aria-label":this.questionBase.a11y_input_ariaLabel,"aria-labelledby":this.questionBase.a11y_input_ariaLabelledBy,"aria-invalid":this.questionBase.a11y_input_ariaInvalid,"aria-errormessage":this.questionBase.a11y_input_ariaErrormessage},l.createElement("div",{className:"spg-boolean-switch__thumb"},l.createElement("div",{className:"spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--left"})),l.createElement("div",{className:"spg-boolean-switch__thumb"},l.createElement("div",{className:"spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--right"}))),this.questionBase,{processEsc:!1});return l.createElement("div",{className:"spg-boolean-switch",onClick:function(){return e.questionBase.booleanValue=!e.questionBase.booleanValue}},t,l.createElement("div",{className:"spg-boolean-switch__caption"},l.createElement("div",{className:"spg-boolean-switch__title",id:this.questionBase.labelRenderedAriaID},n.SurveyElementBase.renderLocString(this.questionBase.locTitle))))},t}(n.SurveyQuestionElementBase);function Le(e,t,n){void 0===n&&(n={});var o=t,r=e.rootElement||document;"string"==typeof t&&(o=r.querySelector("#"+t));var i=a.preact.createElement(f,d({creator:e},n));a.preact.render(i,o)}n.ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch",function(e){return l.createElement(Qe,e)}),i.RendererFactory.Instance.registerRenderer("boolean","switch","sv-boolean-switch"),e.Version=void 0,e.Version="".concat("2.5.18"),i.checkLibraryVersion("".concat("2.5.18"),"survey-creator-react");var Ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(e){Le(this,e)},t}(y);if("undefined"!=typeof window){var Ke=window.jQuery||window.$;Ke&&Ke.fn.extend({SurveyCreator:function(e){return this.each(function(){Le(e.model,this,e)})}})}Object.defineProperty(e,"PropertyGridEditorCollection",{enumerable:!0,get:function(){return o.PropertyGridEditorCollection}}),Object.defineProperty(e,"SurveyLogic",{enumerable:!0,get:function(){return o.SurveyLogic}}),Object.defineProperty(e,"SurveyLogicUI",{enumerable:!0,get:function(){return o.SurveyLogicUI}}),Object.defineProperty(e,"SurveyQuestionEditorDefinition",{enumerable:!0,get:function(){return o.SurveyQuestionEditorDefinition}}),Object.defineProperty(e,"ToolboxToolViewModel",{enumerable:!0,get:function(){return o.ToolboxToolViewModel}}),Object.defineProperty(e,"editorLocalization",{enumerable:!0,get:function(){return o.editorLocalization}}),Object.defineProperty(e,"localization",{enumerable:!0,get:function(){return o.localization}}),Object.defineProperty(e,"settings",{enumerable:!0,get:function(){return o.settings}}),Object.defineProperty(e,"svgBundle",{enumerable:!0,get:function(){return o.svgBundle}}),e.ActionButton=q,e.AdaptiveToolbox=ee,e.CellQuestionAdornerComponent=T,e.CellQuestionDropdownAdornerComponent=D,e.ComponentContainer=De,e.CreatorSurveyPageComponent=k,e.ImageItemValueAdornerComponent=K,e.ItemValueAdornerComponent=L,e.LogoImageComponent=j,e.MatrixCellAdornerComponent=H,e.PanelAdornerComponent=O,e.PropertyGridComponent=Te,e.PropertyGridPlaceholderComponent=Re,e.QuestionAdornerComponent=N,e.QuestionBanner=I,e.QuestionDropdownAdornerComponent=R,e.QuestionEditorContentComponent=Q,e.QuestionErrorComponent=pe,e.QuestionImageAdornerComponent=x,e.QuestionRatingAdornerComponent=M,e.QuestionWidgetAdornerComponent=P,e.QuestionWrapperFooter=w,e.QuestionWrapperHeader=S,e.ReactDragEvent=_,e.ReactMouseEvent=b,e.RowWrapper=E,e.SearchComponent=$,e.SideBarDefaultHeader=ie,e.SidebarComponent=le,e.SurveyCreator=Ve,e.SurveyCreatorComponent=f,e.SurveyCreatorToolboxCategory=Y,e.SurveyCreatorToolboxItem=J,e.SurveyCreatorToolboxItemGroup=X,e.SurveyCreatorToolboxTool=G,e.SurveyElementEmbeddedSurvey=A,e.SurveyLocStringEditor=de,e.SurveyLogicOpertor=he,e.SurveyNavigation=te,e.SurveyQuestionBooleanSwitch=Qe,e.SurveyQuestionColor=je,e.SurveyQuestionFileEditor=Ue,e.SurveyQuestionLinkValue=U,e.SurveyQuestionSpinEditor=Be,e.SurveyQuestionTextWithReset=Ae,e.SurveyResults=z,e.SurveyResultsByRow=W,e.SurveySimulator=we,e.SwitcherComponent=Fe,e.TabButtonComponent=ne,e.TabDesignerComponent=ge,e.TabJsonEditorAceComponent=Ce,e.TabJsonEditorErrorsComponent=be,e.TabJsonEditorTextareaComponent=_e,e.TabLogicAddButtonComponent=Ne,e.TabLogicComponent=Se,e.TabPreviewSurveyComponent=Ie,e.TabPreviewTestSurveyAgainComponent=qe,e.TabThemeSurveyComponent=xe,e.TabTranslationComponent=Me,e.TabbedMenuComponent=p,e.TabbedMenuItemComponent=v,e.ToolboxList=Z,e.TranslateFromAction=me,e.TranslationLineSkeleton=ue,e.renderSurveyCreator=Le});
|
|
7
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("survey-react-ui"),require("survey-creator-core"),require("react-dom"),require("survey-core"),require("survey-js-ui")):"function"==typeof define&&define.amd?define(["exports","react","survey-react-ui","survey-creator-core","react-dom","survey-core","survey-js-ui"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SurveyCreator={},e.SurveyUI,e.SurveyUI,e.SurveyCreatorCore,e.SurveyUI,e.Survey,e.SurveyUI)}(this,function(e,t,n,o,r,i,a){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var l=s(t),c=s(r),u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},u(e,t)};function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var d=function(){return d=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var p=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.model.renderedActions.map(function(e){return l.createElement(h,{item:e,key:e.renderedId})});return l.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu",role:"tablist",style:this.model.getRootStyle()},e)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var o=this.rootRef.current;o&&this.model.initResponsivityManager(o)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&this.model.initResponsivityManager(t)},t.prototype.componentWillUnmount=function(){this.model.resetResponsivityManager(),e.prototype.componentWillUnmount.call(this)},t}(n.SurveyElementBase),h=function(e){function t(t){var n=e.call(this,t)||this;return n.ref=l.createRef(),n.state={changed:0},n}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e="svc-tabbed-menu-item-container";this.item.css&&(e+=" "+this.item.css),e+=this.item.isVisible?"":" sv-action--hidden";var t=n.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return l.createElement("span",{key:this.item.id,className:e,ref:this.ref},l.createElement("div",{className:"sv-action__content"},t))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.item.updateModeCallback=function(e,n){var o=function(){t.item.mode==e?t.setState({changed:t.state.changed+1}):t.item.mode=e};queueMicrotask(function(){c.flushSync?c.flushSync(function(){o()}):o(),queueMicrotask(function(){n(e,t.ref.current)})})},this.item.afterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.updateModeCallback=void 0},t}(n.SurveyElementBase),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this.item;return n.attachKey2click(l.createElement("div",{role:"tab",id:"tab-"+e.id,"aria-selected":e.active,"aria-controls":"scrollableDiv-"+e.id,className:e.getRootCss(),onClick:function(){return e.doAction()}},e.hasTitle?l.createElement("span",{className:e.getTitleCss()},e.title):null,e.hasIcon?l.createElement(n.SvgIcon,{iconName:e.iconName,className:e.getIconCss(),size:"auto",title:e.tooltip||e.title}):null))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",function(e){return l.createElement(v,e)});var f=function(e){function t(t){var n=e.call(this,t)||this;return n.rootNode=l.createRef(),n}return m(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.creator},Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.creator!==t.creator&&(t.creator&&t.creator.unsubscribeRootElement(),this.creator&&this.rootNode.current&&this.creator.setRootElement(this.rootNode.current))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.creator.setRootElement(this.rootNode.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.creator.unsubscribeRootElement()},t.prototype.renderElement=function(){var e=this.props.creator;if(e.isCreatorDisposed)return null;var t="svc-full-container svc-creator__area svc-flex-column"+(this.props.creator.haveCommercialLicense?"":" svc-creator__area--with-banner"),r="svc-creator__content-wrapper svc-flex-row"+(this.props.creator.isMobileView?" svc-creator__content-wrapper--footer-toolbar":""),i="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sidebarLocation,a={};o.assign(a,this.style,this.props.creator.themeVariables);var s=null;if(!this.props.creator.haveCommercialLicense){var c={__html:this.props.creator.licenseText};s=l.createElement("div",{className:"svc-creator__banner"},l.createElement("span",{className:"svc-creator__non-commercial-text",dangerouslySetInnerHTML:c}))}return l.createElement("div",{className:this.creator.getRootCss(),ref:this.rootNode,style:a},l.createElement(n.SvgBundleComponent,null),l.createElement(n.PopupModal,null),l.createElement("div",{className:t},l.createElement("div",{className:i},l.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},l.createElement("div",{className:"svc-top-bar"},e.showTabs?l.createElement("div",{className:"svc-tabbed-menu-wrapper"},l.createElement(p,{model:e.tabbedMenu})):null,e.showToolbar?l.createElement("div",{className:"svc-toolbar-wrapper"},l.createElement(n.SurveyActionBar,{model:e.toolbar})):null),l.createElement("div",{className:r},l.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),l.createElement("div",{className:"svc-footer-bar"},e.isMobileView?l.createElement("div",{className:"svc-toolbar-wrapper"},l.createElement(n.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSidebar()),s,l.createElement(n.NotifierComponent,{notifier:e.notifier})))},t.prototype.renderActiveTab=function(){var e=this.props.creator;return this.renderCreatorTab(e.activeTabMenuItem)},t.prototype.renderCreatorTab=function(e){if(!e)return null;var t=this.props.creator,o=e.renderTab?e.renderTab():n.ReactElementFactory.Instance.createElement(e.componentContent,{creator:t,survey:t.survey,data:e.data.model}),r="svc-creator-tab"+("right"==t.toolboxLocation?" svc-creator__toolbox--right":"");return l.createElement("div",{role:"tabpanel",key:e.id,id:"scrollableDiv-"+e.id,"aria-labelledby":"tab-"+e.id,className:r},o)},t.prototype.renderSidebar=function(){return this.creator.isSidebarVisible?n.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sidebar}):null},t}(n.SurveyElementBase),y=function(e){function t(t,n){return void 0===t&&(t={}),e.call(this,t,n)||this}return m(t,e),t.prototype.render=function(e){console.error("The render method is deprecated. Use SurveyCreatorComponent instead.")},t.prototype.createQuestionElement=function(e){return n.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})},t.prototype.renderError=function(e,t,o){return l.createElement("div",{key:e},l.createElement("span",{className:o.error.icon,"aria-hidden":"true"}),l.createElement("span",{className:o.error.item},l.createElement(n.SurveyLocStringViewer,{model:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(o.SurveyCreatorModel);n.ReactElementFactory.Instance.registerElement("survey-widget",function(e){return l.createElement(n.Survey,e)});var g=function(e){function t(t){var n=e.call(this,t)||this;return n.createModel(t),n}return m(t,e),t.prototype.shouldComponentUpdate=function(t,n){var o=e.prototype.shouldComponentUpdate.call(this,t,n);return o&&this.needUpdateModel(t)&&this.createModel(t),o},t.prototype.createModel=function(e){},t.prototype.needUpdateModel=function(e){var t=this.getUpdatedModelProps();if(!Array.isArray(t))return!0;for(var n=function(){var n=t[r];if("object"==typeof n){var i=o.props[n.name],a=e[n.name];if(n.deepEqual){if(o.props[n.name]===e[n.name])return{value:!1};var s=Object.keys(i||{});return s.length!==Object.keys(a||{}).length?{value:!0}:{value:s.some(function(e){return i[e]!=a[e]})}}return{value:i!==a}}if(o.props[n]!==e[n])return{value:!0}},o=this,r=0;r<t.length;r++){var i=n();if("object"==typeof i)return i.value}return!1},t.prototype.getUpdatedModelProps=function(){},t}(n.SurveyElementBase),E=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.createModel=function(e){this.model&&this.model.dispose(),this.model=new o.RowViewModel(e.componentData.creator,e.row,null)},t.prototype.getUpdatedModelProps=function(){return["row",{name:"componentData",deepEqual:!0}]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.subscribeElementChanges()},t.prototype.componentWillUnmount=function(){this.model.unsubscribeElementChanges(),e.prototype.componentWillUnmount.call(this)},t.prototype.render=function(){return l.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},l.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--top"}),l.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--bottom"}),this.props.element)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-row",function(e){return l.createElement(E,e)});var b=function(){function e(e){this.event=e}return e.prototype.stopPropagation=function(){this.event.stopPropagation()},e.prototype.preventDefault=function(){this.event.preventDefault()},Object.defineProperty(e.prototype,"cancelBubble",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this.event.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this.event.currentTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.event.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.event.clientY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.event.nativeEvent.offsetX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.event.nativeEvent.offsetY},enumerable:!1,configurable:!0}),e}(),_=function(e){function t(t){var n=e.call(this,t)||this;return n.event=t,n}return m(t,e),Object.defineProperty(t.prototype,"dataTransfer",{get:function(){return this.event.dataTransfer},enumerable:!1,configurable:!0}),t}(b);var C=l.memo(function(e){return e.element});C.displayName="QuestionElementContent";var N=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model?this.model.attachToUI(e.question,this.rootRef.current):this.modelValue=this.createQuestionViewModel(e)},t.prototype.createQuestionViewModel=function(e){return new o.QuestionAdornerViewModel(e.componentData,e.question,null)},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t=this.model.element.isInteractiveDesignElement,n=this.renderQuestionTitle(),o=this.renderContent(t);return l.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.element.name||null,className:this.model.rootCss(),onDoubleClick:function(n){t&&e.model.dblclick(n.nativeEvent),n.stopPropagation()},onMouseLeave:function(n){return t&&e.model.hover(n.nativeEvent,n.currentTarget)},onMouseOver:function(n){return t&&e.model.hover(n.nativeEvent,n.currentTarget)}},n,o)},t.prototype.disableTabStop=function(){return!0},t.prototype.renderContent=function(e){var t=this,o=this.model.needToRenderContent?this.renderElementContent():null;return n.attachKey2click(l.createElement("div",{className:this.model.css(),onClick:function(e){return t.model.select(t.model,new b(e))}},l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--left"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--right"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),e?this.renderHeader():null,o,this.model.needToRenderContent?this.renderFooter():null),void 0,{disableTabStop:this.disableTabStop()})},t.prototype.renderHeader=function(){return n.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})},t.prototype.renderFooter=function(){return this.model.element.isInteractiveDesignElement?n.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model}):null},t.prototype.renderCarryForwardBanner=function(){return this.model.isBannerShowing?n.ReactElementFactory.Instance.createElement("svc-question-banner",this.model.createBannerParams()):null},t.prototype.renderQuestionTitle=function(){var e=this;if(!this.model.showHiddenTitle)return null;var t=this.model.element;return l.createElement("div",{ref:function(t){return t&&(e.model.renderedCollapsed?t.removeAttribute("inert"):t.setAttribute("inert",""))},className:this.model.cssCollapsedHiddenHeader},t.hasTitle?l.createElement(n.TitleElement,{element:t,renderActions:!1}):l.createElement("div",{className:this.model.cssCollapsedHiddenTitle},l.createElement("span",{className:"svc-fake-title"},t.name)))},t.prototype.renderElementContent=function(){return l.createElement(l.Fragment,null,l.createElement(C,{element:this.props.element}),this.renderElementPlaceholder(),this.renderCarryForwardBanner())},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.attachToUI(this.props.question,this.rootRef.current)},t.prototype.renderElementPlaceholder=function(){return this.model.isEmptyElement?l.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},l.createElement("div",{className:"svc-panel__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.detachFromUI()},t}(g);n.ReactElementFactory.Instance.registerElement("svc-question",function(e){return l.createElement(N,e)});var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this;return this.props.model.allowDragging?l.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.props.model.onPointerDown(t)}},l.createElement(n.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),l.createElement("div",{className:"svc-question__top-actions"},l.createElement(n.SurveyActionBar,{model:this.props.model.topActionContainer,handleClick:!1}))):null},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-header",function(e){return l.createElement(S,e)});var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:this.props.className,onFocus:function(t){return e.props.model.select(e.props.model,new b(t))}},l.createElement(n.SurveyActionBar,{model:this.props.model.actionContainer,handleClick:!1}))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-footer",function(e){return l.createElement(w,e)});var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.renderElement=function(){var e=(new i.CssClassBuilder).append(this.props.classes).append("svc-action-button").append("svc-action-button--selected",!!this.props.selected).append("svc-action-button--disabled",!!this.props.disabled).toString();return this.props.iconName?this.renderIcon(e):this.renderButtonText(e)},t.prototype.renderButtonText=function(e){var t=this;return this.props.disabled?l.createElement("span",{className:e},this.props.text):l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("span",{role:"button",className:e,onClick:function(e){t.props.allowBubble||e.stopPropagation(),t.props.click()},title:this.props.title},this.props.text)))},t.prototype.renderIcon=function(e){var t=this;return e+=" svc-action-button--icon",this.props.disabled?l.createElement("span",{className:e},l.createElement(n.SvgIcon,{size:"auto",iconName:this.props.iconName})):l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("span",{className:e,onClick:function(e){t.props.allowBubble||e.stopPropagation(),t.props.click()},title:this.props.title},l.createElement(n.SvgIcon,{size:"auto",iconName:this.props.iconName}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-action-button",function(e){return l.createElement(q,e)});var I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"svc-carry-forward-panel-wrapper"},l.createElement("div",{className:"svc-carry-forward-panel"},l.createElement("span",null,this.props.text," "),l.createElement("span",{className:"svc-carry-forward-panel__link"},l.createElement(q,{click:function(){return e.props.onClick()},text:this.props.actionText}))))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-banner",function(e){return l.createElement(I,e)});var R=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.createQuestionViewModel=function(e){return new o.QuestionDropdownAdornerViewModel(e.componentData,e.question,null)},Object.defineProperty(t.prototype,"dropdownModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.dropdownModel.question},enumerable:!1,configurable:!0}),t.prototype.renderElementPlaceholder=function(){var e=this,t=this.question.textStyle;return l.createElement("div",{className:"svc-question__dropdown-choices--wrapper"},l.createElement("div",null,l.createElement("div",{className:"svc-question__dropdown-choices"},(this.dropdownModel.getRenderedItems()||[]).map(function(o,r){return l.createElement("div",{className:e.dropdownModel.getChoiceCss(),key:"editable_choice_".concat(r)},n.ReactSurveyElementsWrapper.wrapItemValue(e.question.survey,n.ReactElementFactory.Instance.createElement(e.dropdownModel.itemComponent,{key:o.value,question:e.question,cssClasses:e.question.cssClasses,isDisplayMode:!0,item:o,textStyle:t,index:r,isChecked:e.question.value===o.value}),e.question,o))})),this.dropdownModel.needToCollapse?l.createElement(q,{click:this.dropdownModel.switchCollapse,text:this.dropdownModel.getButtonText(),allowBubble:!0}):null))},t}(N);n.ReactElementFactory.Instance.registerElement("svc-dropdown-question",function(e){return l.createElement(R,e)});var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createQuestionViewModel=function(e){return new o.QuestionImageAdornerViewModel(e.componentData,e.question,null)},Object.defineProperty(t.prototype,"imageModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderHeader=function(){return l.createElement(l.Fragment,null,l.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.imageModel.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),e.prototype.renderHeader.call(this))},t.prototype.renderLoadingPlaceholder=function(){return l.createElement("div",{className:"svc-image-question__loading-placeholder"},l.createElement("div",{className:"svc-image-question__loading"},l.createElement(n.LoadingIndicatorComponent,null)))},t.prototype.renderChooseButton=function(){var e=this;return l.createElement("div",{className:"svc-image-question-controls"},this.model.allowEdit?n.attachKey2click(l.createElement("span",{className:"svc-context-button",onClick:function(){return e.imageModel.chooseFile(e.imageModel)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-choosefile"}))):null)},t.prototype.renderElementPlaceholder=function(){return this.imageModel.isUploading?this.renderLoadingPlaceholder():this.renderChooseButton()},t.prototype.getStateElements=function(){return[this.model,this.imageModel.filePresentationModel]},t.prototype.renderElementContent=function(){if(this.imageModel.isEmptyElement){var e=n.ReactQuestionFactory.Instance.createQuestion("file",{creator:this.imageModel.question.survey,isDisplayMode:!1,question:this.imageModel.filePresentationModel});return l.createElement(l.Fragment,null,e)}return l.createElement(l.Fragment,null,this.props.element,this.renderElementPlaceholder())},t}(N);n.ReactElementFactory.Instance.registerElement("svc-image-question",function(e){return l.createElement(x,e)});var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.modelValue=this.createQuestionViewModel(e)},t.prototype.createQuestionViewModel=function(e){return new o.QuestionRatingAdornerViewModel(e.componentData,e.question,null)},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},Object.defineProperty(t.prototype,"ratingModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.ratingModel;return l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-rating-question-content"},l.createElement("div",{className:e.controlsClassNames},e.allowRemove?n.attachKey2click(l.createElement("span",{role:"button",className:e.removeClassNames,"aria-label":e.removeTooltip,onClick:function(){return e.removeItem(e)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-remove_16x16",title:e.removeTooltip}))):null,e.allowAdd?n.attachKey2click(l.createElement("span",{role:"button",className:e.addClassNames,"aria-label":e.addTooltip,onClick:function(){return e.addItem(e)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-add_16x16",title:e.addTooltip}))):null),this.props.element))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-rating-question",function(e){return l.createElement(M,e)}),n.ReactElementFactory.Instance.registerElement("svc-rating-question-content",function(e){return l.createElement(M,e)});var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createQuestionViewModel=function(e){return new o.QuestionAdornerViewModel(e.componentData,e.question,null)},Object.defineProperty(t.prototype,"widgetModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderElementContent=function(){return l.createElement("div",{className:"svc-widget__content"},this.props.element)},t}(N);n.ReactElementFactory.Instance.registerElement("svc-widget-question",function(e){return l.createElement(P,e)});var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.model=new o.QuestionAdornerViewModel(e.componentData,e.question,null)},t.prototype.getStateElement=function(){return this.model},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},t.prototype.render=function(){return l.createElement(l.Fragment,null,l.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},l.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element)))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-cell-question",function(e){return l.createElement(T,e)});var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.model=new o.QuestionAdornerViewModel(e.componentData,e.question,null)},t.prototype.getUpdatedModelProps=function(){return["question","componentData"]},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this.props.question,t=this.props.question.textStyle;return l.createElement(l.Fragment,null,l.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},l.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element,l.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map(function(o,r){return l.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(r)},n.ReactSurveyElementsWrapper.wrapItemValue(e.survey,n.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:o,textStyle:t,index:r,isChecked:e.value===o.value}),e,o))})))))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",function(e){return l.createElement(D,e)});var F=l.memo(function(e){var t=e.page,o=e.survey,r=e.creator;return l.createElement(n.SurveyPage,{page:t,survey:o,creator:r})});F.displayName="PageElementContent";var k=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model&&this.model.attachToUI(e.page,this.rootRef.current),this.model=this.createPageAdorner(e.creator,e.page),this.model.isGhost=this.props.isGhost},t.prototype.createPageAdorner=function(e,t){return new o.PageAdorner(e,t)},t.prototype.shouldComponentUpdate=function(t,n){var o=e.prototype.shouldComponentUpdate.call(this,t,n);return this.model&&(this.model.isGhost=this.props.isGhost),o},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n)},t.prototype.getUpdatedModelProps=function(){return["creator","page"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.attachToUI(this.props.page,this.rootRef.current),this.model.isGhost=this.props.isGhost},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.detachFromUI()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)},t.prototype.renderElement=function(){var e=this;return this.props.page?n.attachKey2click(l.createElement("div",{ref:this.rootRef,id:this.props.page.id,"data-sv-drop-target-survey-page":this.model.dropTargetName,className:"svc-page__content "+this.model.css,onClick:function(t){return e.model.select(e.model,new b(t))},onDoubleClick:function(t){return e.model.dblclick(t.nativeEvent)},onMouseLeave:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),l.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),this.renderContent(),this.renderPlaceholder(),this.renderHeader(),this.renderFooter())):null},t.prototype.renderPlaceholder=function(){return this.model.showPlaceholder?l.createElement("div",{className:"svc-page__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null},t.prototype.renderContent=function(){return this.model.needRenderContent?l.createElement(F,{page:this.props.page,survey:this.props.survey,creator:this.props.creator}):l.createElement("div",{className:"svc-page__loading-content"},l.createElement(n.LoadingIndicatorComponent,null))},t.prototype.renderHeader=function(){var e=this,t=l.createElement("div",{className:"svc-page__content-actions"},l.createElement(n.SurveyActionBar,{model:this.model.actionContainer}),this.model.topActionContainer.hasActions?l.createElement(n.SurveyActionBar,{model:this.model.topActionContainer}):null);return this.model.isGhost||!this.model.allowDragging?t:l.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.model.onPointerDown(t)}},l.createElement(n.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),t)},t.prototype.renderFooter=function(){return l.createElement(n.SurveyActionBar,{model:this.model.footerActionsBar})},t}(g);n.ReactElementFactory.Instance.registerElement("svc-page",function(e){return l.createElement(k,e)});var B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.item.data},enumerable:!1,configurable:!0}),t.prototype.renderTypeSelector=function(){var e=this.model.questionTypeSelectorModel;return n.attachKey2click(l.createElement("button",{type:"button",onClick:function(t){t.stopPropagation(),e.action()},className:"svc-element__question-type-selector",title:this.model.addNewQuestionText,role:"button"},l.createElement("span",{className:"svc-element__question-type-selector-icon"},l.createElement(n.SvgIcon,{iconName:e.iconName,size:"auto",title:this.model.addNewQuestionText})),void 0===this.props.renderPopup||this.props.renderPopup?l.createElement(n.Popup,{model:e.popupModel}):null))},t.prototype.renderElement=function(){var e=this,t=this.props.buttonClass||"svc-btn";return l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("div",{className:"svc-element__add-new-question "+t,onClick:function(t){t.stopPropagation(),e.model.addNewQuestion(e.model,new b(t))},onMouseOver:function(t){return e.model.hoverStopper&&e.model.hoverStopper(t.nativeEvent,t.currentTarget)}},l.createElement(n.SvgIcon,{className:"svc-panel__add-new-question-icon",iconName:"icon-add_24x24",size:"auto"}),l.createElement("span",{className:"svc-add-new-item-button__text"},this.model.addNewQuestionText),!1!==this.props.renderPopup?this.renderTypeSelector():null)),!1===this.props.renderPopup?this.renderTypeSelector():null)},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-add-new-question-btn",function(e){return l.createElement(B,e)});var O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.renderElementPlaceholder=function(){var e=this;return this.model.isEmptyElement?l.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},l.createElement("div",{className:"svc-panel__placeholder_frame"},l.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.showAddQuestionButton?n.attachKey2click(l.createElement("div",{className:"svc-panel__add-new-question svc-action-button",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion()}},l.createElement(n.SvgIcon,{className:"svc-panel__add-new-question-icon",iconName:"icon-add_24x24",size:"auto"}),l.createElement("span",{className:"svc-add-new-item-button__text"},this.model.addNewQuestionText))):null)):null},t.prototype.disableTabStop=function(){return!0},t.prototype.renderFooter=function(){return l.createElement(l.Fragment,null,!this.model.isEmptyElement&&this.model.element.isPanel&&this.model.showAddQuestionButton?l.createElement("div",{className:"svc-panel__add-new-question-container"},l.createElement("div",{className:"svc-panel__question-type-selector-popup"},l.createElement(n.Popup,{model:this.model.questionTypeSelectorModel.popupModel})),l.createElement("div",{className:"svc-panel__add-new-question-wrapper"},l.createElement(B,{item:{data:this.model},buttonClass:"svc-action-button",renderPopup:!1}))):null,e.prototype.renderFooter.call(this))},t}(N);n.ReactElementFactory.Instance.registerElement("svc-panel",function(e){return l.createElement(O,e)});var j=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){var t=null;this.model&&(t=this.model.root),this.model=new o.LogoImageViewModel(e.data,t)},t.prototype.getUpdatedModelProps=function(){return["data"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.root=this.rootRef.current},t.prototype.renderChooseButton=function(){var e=this;return n.attachKey2click(l.createElement("span",{className:"svc-context-button",onClick:function(){return e.model.chooseFile(e.model)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-choosefile"})))},t.prototype.renderClearButton=function(){var e=this;return n.attachKey2click(l.createElement("span",{className:"svc-context-button svc-context-button--danger",onClick:function(){return e.model.remove(e.model)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-clear"})))},t.prototype.renderButtons=function(){return l.createElement("div",{className:"svc-context-container svc-logo-image-controls"},this.renderChooseButton(),this.renderClearButton())},t.prototype.renderImage=function(){return l.createElement("div",{className:this.model.containerCss},this.renderButtons(),l.createElement(n.LogoImage,{data:this.props.data.survey}))},t.prototype.renderPlaceHolder=function(){var e=this;return this.model.allowEdit&&!this.model.isUploading?n.attachKey2click(l.createElement("div",{className:"svc-logo-image-placeholder",onClick:function(){return e.model.chooseFile(e.model)}},l.createElement("svg",null,l.createElement("use",{xlinkHref:"#icon-image-48x48"})))):null},t.prototype.renderInput=function(){return l.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input"})},t.prototype.renderLoadingIndicator=function(){return l.createElement("div",{className:"svc-logo-image__loading"},l.createElement(n.LoadingIndicatorComponent,null))},t.prototype.render=function(){var e=null;return e=this.model.survey.locLogo.renderedHtml&&!this.model.isUploading?this.renderImage():this.model.isUploading?this.renderLoadingIndicator():this.renderPlaceHolder(),l.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},this.renderInput(),e)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-logo-image",function(e){return l.createElement(j,e)});var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderClear=function(){var e=this,t=this.questionBase.showClear;return!this.questionBase.isReadOnly&&t?l.createElement(q,{classes:this.question.linkClearButtonCssClasses,click:function(){return e.question.doClearClick()},text:o.editorLocalization.getString("pe.clear")}):null},t.prototype.renderElement=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement(q,{classes:this.question.linkSetButtonCssClasses,click:function(){return e.question.doLinkClick()},selected:this.question.isSelected,disabled:!this.question.isClickable,text:this.question.linkValueText,title:this.question.tooltip,iconName:this.question.iconName}),this.renderClear())},t}(n.SurveyQuestionElementBase);n.ReactQuestionFactory.Instance.registerQuestion("linkvalue",function(e){return l.createElement(U,e)});var A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootRef=l.createRef(),t}return m(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){var e=this.props.element||this.props.question;if(!e)return null;var t=e.embeddedSurvey;return t&&t.currentPage?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.embeddedSurvey&&(this.embeddedSurvey.rootElement=this.rootRef.current)},t.prototype.render=function(){var e=this.embeddedSurvey;return e?l.createElement("div",{style:{display:"contents"},ref:this.rootRef},l.createElement(n.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator})):null},t}(n.SurveyQuestionElementBase);n.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",function(e){return l.createElement(A,e)});var Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.createQuestionElement=function(e){return n.ReactQuestionFactory.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t.prototype.renderError=function(e,t,n){return null},t.prototype.render=function(){var e=this.survey.getAllQuestions()[0];return l.createElement("div",{style:this.props.style},l.createElement(n.SurveyQuestion,{creator:this,element:e}))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-editor-content",function(e){return l.createElement(Q,e)});var L=function(e){function t(t){var n=e.call(this,t)||this;return n.onBlur=function(e){n.model.onFocusOut(e.nativeEvent)},n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model=new o.ItemValueWrapperViewModel(e.componentData.creator,e.question,e.item)},t.prototype.getUpdatedModelProps=function(){return["question","item"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.props.item.setRootElement(this.rootRef.current),t.item!==this.props.item&&t.item&&t.item.setRootElement(void 0)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.props.item.setRootElement(this.rootRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.props.item.setRootElement(void 0)},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=this.model.allowAdd?n.attachKey2click(l.createElement("span",{role:"button",className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":this.model.tooltip,onClick:function(){e.model.add(e.model),e.model.isNew=!1}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-add_16x16",title:this.model.tooltip}))):l.createElement(l.Fragment,null," ",this.model.isDraggable?l.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__drag"},l.createElement(n.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:"auto",iconName:"icon-drag-24x24",title:this.model.dragTooltip})):null,this.model.allowRemove?n.attachKey2click(l.createElement("span",{role:"button",className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":this.model.tooltip,onClick:function(){return e.model.remove(e.model)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-remove_16x16",title:this.model.tooltip}))):null),o=this.props.element.key+(this.model.allowAdd?"_new":"");return l.createElement(l.Fragment,null,l.createElement("div",{ref:this.rootRef,className:"svc-item-value-wrapper"+(this.model.allowAdd?" svc-item-value--new":"")+(this.model.isDragging?" svc-item-value--dragging":"")+(this.model.isDragDropGhost?" svc-item-value--ghost":"")+(this.model.isDragDropMoveDown?" svc-item-value--movedown":"")+(this.model.isDragDropMoveUp?" svc-item-value--moveup":""),key:o,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)}},l.createElement("div",{className:"svc-item-value__ghost"}),l.createElement("div",{className:"svc-item-value-controls",onBlur:this.onBlur},t),l.createElement("div",{className:"svc-item-value__item",onClick:function(t){return e.model.select(e.model,t.nativeEvent)}},this.props.element),this.renderPanelAction()),this.renderPanel())},t.prototype.renderPanelAction=function(){var e=this;if(!this.model.canShowPanel())return null;var t=this.model.showPanel?"icon-collapsepanel-16x16":"icon-expandpanel-16x16",o=n.attachKey2click(l.createElement("span",{role:"button",className:"svc-item-value-controls__button svc-item-value-controls__add svc-choice-elements-button",onClick:function(){e.model.togglePanel()}},l.createElement(n.SvgIcon,{size:"auto",iconName:t})));return l.createElement("div",{className:"svc-item-value-controls svc-choice-elements-button-container"},o)},t.prototype.renderPanel=function(){if(!this.model.showPanel)return null;var e=this.model.creator,t=e.survey;return l.createElement(V,{element:this.model.item.panel,survey:t,creator:e,css:t.getCss()})},t}(g),V=l.memo(function(e){var t=e.element,o=e.survey,r=e.creator,i=e.css;return l.createElement(n.SurveyPanel,{element:t,survey:o,creator:r,cssClasses:i})});V.displayName="ChoiceItemPanel",n.ReactElementFactory.Instance.registerElement("svc-item-value",function(e){return l.createElement(L,e)});var K=function(e){function t(t){var n=e.call(this,t)||this;return n.preventDragHandler=function(e){e.preventDefault()},n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model=new o.ImageItemValueWrapperViewModel(e.componentData.creator,e.question,e.item,null,null)},t.prototype.getUpdatedModelProps=function(){return["question","item"]},t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.itemsRoot=this.rootRef.current},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.model.itemsRoot=this.rootRef.current},t.prototype.renderLoadingIndicator=function(){return l.createElement("div",{className:"svc-image-item-value__loading"},l.createElement(n.LoadingIndicatorComponent,null))},t.prototype.renderNewItemControls=function(){var e=this,t=n.attachKey2click(l.createElement("span",{className:this.model.addButtonCss,onClick:function(){return e.model.chooseNewFile(e.model)}},this.model.showChooseButtonAsIcon?l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-add-lg",title:this.model.addFileTitle}):l.createElement("span",null,this.model.chooseImageText))),o=this.model.showPlaceholder?l.createElement("span",{className:"svc-image-item-value__placeholder"},this.model.placeholderText):null;return l.createElement(l.Fragment,null,o,t)},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=!this.props.question.isItemInList(this.props.item);this.model.isNew=t;var o=this.model.getIsNewItemSingle()?null:{width:this.question.renderedImageWidth,height:this.question.renderedImageHeight},r=null;return r=t||this.model.isUploading?l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-image-item-value__item"},l.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},l.createElement("label",{className:"sd-imagepicker__label"},l.createElement("div",{style:o,className:"sd-imagepicker__image"},this.model.isUploading?this.renderLoadingIndicator():null)))),this.model.allowAdd&&!this.model.isUploading?l.createElement("div",{className:"svc-image-item-value-controls"},this.renderNewItemControls()):null):l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-image-item-value__item"},this.props.element),this.model.isDraggable&&this.model.canRenderControls?l.createElement("span",{className:"svc-context-button svc-image-item-value-controls__drag-area-indicator",onPointerDown:function(t){return e.model.onPointerDown(t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-drag-24x24"})):null,this.model.canRenderControls?l.createElement("div",{className:"svc-context-container svc-image-item-value-controls"},this.model.allowRemove&&!this.model.isUploading?n.attachKey2click(l.createElement("span",{className:"svc-context-button",onClick:function(){return e.model.chooseFile(e.model)}},l.createElement(n.SvgIcon,{role:"button",size:"auto",iconName:"icon-choosefile",title:this.model.selectFileTitle}))):null,this.model.allowRemove&&!this.model.isUploading?n.attachKey2click(l.createElement("span",{className:"svc-context-button svc-context-button--danger",onClick:function(){return e.model.remove(e.model)}},l.createElement(n.SvgIcon,{role:"button",size:"auto",iconName:"icon-delete",title:this.model.removeFileTitle}))):null):null),l.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)},onDragStart:this.preventDragHandler,onDrop:this.model.onDrop,onDragEnter:this.model.onDragEnter,onDragOver:this.model.onDragOver,onDragLeave:this.model.onDragLeave},l.createElement("div",{className:"svc-image-item-value-wrapper__ghost",style:o}),l.createElement("div",{className:"svc-image-item-value-wrapper__content"},l.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),r))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-image-item-value",function(e){return l.createElement(K,e)});var H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){var t,n=e.componentData,r=!1;this.model&&(r=this.model.isSelected),this.model=new o.MatrixCellWrapperViewModel(n.creator,n.element,n.question,n.row,n.column||(null===(t=n.element.cell)||void 0===t?void 0:t.column)),this.model.isSelected=r},t.prototype.getUpdatedModelProps=function(){return["componentData"]},t.prototype.componentDidUpdate=function(t,n){var o,r;e.prototype.componentDidUpdate.call(this,t,n);var i=this.props.componentData;this.model.templateData=i.element,this.model.row=i.row,this.model.column=i.column||(null===(r=null===(o=i.element)||void 0===o?void 0:o.cell)||void 0===r?void 0:r.column),this.model.question=i.question},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=null;return this.model.isSupportCellEditor&&(t=l.createElement("div",{className:"svc-matrix-cell__question-controls"},n.attachKey2click(l.createElement("span",{className:"svc-matrix-cell__question-controls-button svc-context-button",onClick:function(t){return e.model.editQuestion(e.model,t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:"icon-edit"}))))),l.createElement("div",{className:"svc-matrix-cell",tabIndex:-1,key:this.props.element.key,onClick:function(t){return!e.props.question&&e.model.selectContext(e.model,t)},onMouseOut:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},l.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,t)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-matrix-cell",function(e){return l.createElement(H,e)});var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.createModel=function(e){this.props.survey&&(this.model=new o.SurveyResultsModel(e.survey))},t.prototype.getUpdatedModelProps=function(){return["survey"]},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return this.model?l.createElement("div",{className:"svd-test-results"},l.createElement("div",{className:"svd-test-results__content"},l.createElement("div",{className:"svd-test-results__header"},l.createElement("div",{className:"svd-test-results__header-text"},this.model.surveyResultsText),l.createElement("div",{className:"svd-test-results__header-types"},l.createElement(q,{click:function(){return e.model.selectTableClick()},text:this.model.surveyResultsTableText,selected:this.model.isTableSelected,disabled:!1}),l.createElement(q,{click:function(){return e.model.selectJsonClick()},text:this.model.surveyResultsJsonText,selected:this.model.isJsonSelected,disabled:!1}))),this.renderResultAsText(),this.renderResultAsTable())):null},t.prototype.renderResultAsText=function(){return"text"!==this.model.resultViewType?null:l.createElement("div",{className:"svd-test-results__text svd-light-bg-color"},l.createElement("div",null,this.model.resultText))},t.prototype.renderResultAsTable=function(){return"table"!==this.model.resultViewType?null:l.createElement("div",{className:"svd-test-results__table svd-light-bg-color"},l.createElement("table",null,l.createElement("thead",null,l.createElement("tr",{className:"svd-light-background-color"},l.createElement("th",{key:1,className:"svd-dark-border-color"},this.model.resultsTitle),l.createElement("th",{key:2,className:"svd-dark-border-color"},this.model.resultsDisplayValue))),l.createElement("tbody",null,t.renderRows(this.model.resultData))))},t.renderRows=function(e){for(var t=[],n=0;n<e.length;n++)t.push(l.createElement(W,{key:n+1,row:e[n]}));return t},t}(g),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.row},t.prototype.render=function(){var e=this;return l.createElement(l.Fragment,null,n.attachKey2click(l.createElement("tr",{onClick:function(){return e.row.toggle()}},l.createElement("td",{key:1,style:{paddingLeft:this.row.textMargin},className:"svd-dark-border-color"},this.row.isNode?l.createElement("span",{style:{left:this.row.markerMargin},className:"svd-test-results__marker "+(this.row.collapsed?"":"svd-test-results__marker--expanded")},l.createElement(n.SvgIcon,{iconName:"icon-expand_16x16",size:16})):null,this.row.question?l.createElement(n.SurveyLocStringViewer,{model:this.row.question.locTitle}):l.createElement("span",null,this.row.title)),l.createElement("td",{key:2,className:this.row.isNode?"svd-test-results__node-value":"svd-dark-border-color"},this.row.getString(this.row.displayValue)))),this.row.isNode&&!this.row.collapsed?z.renderRows(this.row.data):null)},t}(g),G=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model=new o.ToolboxToolViewModel(e.item,e.creator,e.parentModel)},t.prototype.getUpdatedModelProps=function(){return["creator","item"]},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.props.isCompact},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this,t=this.item,o=n.ReactElementFactory.Instance.createElement(this.model.itemComponent,{item:t,creator:this.creator,parentModel:this.creator.toolbox,model:this.model,isCompact:this.isCompact});return l.createElement("div",{className:t.css,key:t.id,ref:this.rootRef},t.needSeparator&&!this.creator.toolbox.showCategoryTitles?l.createElement("div",{className:"svc-toolbox__category-separator"}):null,l.createElement("div",{className:"svc-toolbox__tool-content sv-action__content",onPointerDown:function(t){t.persist(),e.model.onPointerDown(t)}},o))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.updateModeCallback=void 0},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.item.updateModeCallback=function(e,n){queueMicrotask(function(){c.flushSync?c.flushSync(function(){t.item.mode=e}):t.item.mode=e,queueMicrotask(function(){n(e,t.rootRef.current)})})},this.item.afterRender()},t}(g),J=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getUpdatedModelProps=function(){return["creator","item"]},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=this.props.isCompact?l.createElement("span",{className:"svc-toolbox__item-banner",onClick:function(t){t.persist(),e.model.click(t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon",title:this.item.getTooltip()}),l.createElement("span",null,this.item.title)):null,o=n.attachKey2click(l.createElement("div",{className:this.item.renderedCss,tabIndex:0,role:"button","aria-label":this.item.getTooltip(),onClick:function(t){t.persist(),e.model.click(t)}},l.createElement("span",{className:"svc-toolbox__item-container"},this.item.iconName?l.createElement(n.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon"}):null),this.props.isCompact?null:l.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)),void 0,{disableTabStop:!this.model.toolboxItem.enabled});return l.createElement(l.Fragment,null,o,t)},t}(g);n.ReactElementFactory.Instance.registerElement("svc-toolbox-item",function(e){return t.createElement(J,e)});var X=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getUpdatedModelProps=function(){return["creator","item"]},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.props.isCompact},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentModel",{get:function(){return this.props.parentModel},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement(J,{item:this.item,creator:this.creator,model:this.model,parentModel:this.parentModel,isCompact:this.isCompact}),l.createElement("div",{className:"svc-toolbox__item-submenu-button",onMouseOver:function(t){return e.model.onMouseOver(e.item,t)},onMouseLeave:function(t){return e.model.onMouseLeave(e.item,t)}},l.createElement(n.SvgIcon,{size:"auto",iconName:this.item.subitemsButtonIcon}),l.createElement(n.Popup,{model:this.item.popupModel})))},t}(g);n.ReactElementFactory.Instance.registerElement("svc-toolbox-item-group",function(e){return l.createElement(X,e)});var Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"category",{get:function(){return this.props.category},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbox",{get:function(){return this.props.toolbox},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return"svc-toolbox__category"+(this.category.collapsed?" svc-toolbox__category--collapsed":"")+(this.category.empty?" svc-toolbox__category--empty":"")},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.category},t.prototype.render=function(){var e=this.renderCategoryHeader(),t=this.renderCategoryContent();return l.createElement("div",{className:this.class,key:this.category.name},l.createElement("div",{className:"svc-toolbox__category-header-wrapper"},e),t)},t.prototype.renderCategoryHeader=function(){var e=this,t="svc-toolbox__category-header";this.toolbox.canCollapseCategories&&(t+=" svc-toolbox__category-header--collapsed");var o=this.renderLocString(this.category.locTitle);return n.attachKey2click(l.createElement("div",{className:t,onClick:function(t){return e.category.toggleState()}},l.createElement("span",{className:"svc-toolbox__category-title"},o),this.renderButton()))},t.prototype.renderButton=function(){if(!this.toolbox.canCollapseCategories)return null;var e=this.category.iconName;return l.createElement("div",{className:"svc-toolbox__category-header__controls"},l.createElement(n.SvgIcon,{className:this.category.iconClassName,iconName:e,size:"auto"}))},t.prototype.renderCategoryContent=function(){return this.renderItems(this.category.items)},t.prototype.renderItems=function(e,t){var n=this;return void 0===t&&(t=!1),e.map(function(e,o){return l.createElement(G,{item:e,creator:n.toolbox.creator,parentModel:n.toolbox,isCompact:t,key:"item"+o})})},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-toolbox-category",function(e){return l.createElement(Y,e)});var Z=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){if(!this.model||!this.model.renderElements)return null;var e=this.renderItems();return l.createElement("div",{className:this.model.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.model.renderedActions.map(function(t,n){return l.createElement(G,{item:t,creator:e.creator,parentModel:e.model,isCompact:!1,key:"item"+n})})},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-toolbox-list",function(e){return l.createElement(Z,e)});var $=function(e){function t(t){var n=e.call(this,t)||this;return n.state={filterString:n.model.filterString||""},n}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this;if(!this.model.isVisible)return null;return l.createElement("div",{className:"svc-search"},l.createElement("div",{className:"svc-search__search-icon"},l.createElement(n.SvgIcon,{iconName:"icon-search",size:"auto"})),l.createElement("input",{type:"text",className:"svc-search__input","aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onChange:function(t){var n=t.target,o=(null==n?void 0:n.getRootNode())||i.settings.environment.root;(o instanceof Document||o instanceof ShadowRoot)&&n===o.activeElement&&(e.model.filterString=n.value)},tabIndex:this.model.getTabIndex()}),l.createElement("div",{className:"svc-search__toolbar"},l.createElement("div",{className:"svc-search__toolbar-counter"},this.model.matchCounterText),l.createElement(n.SurveyActionBar,{model:this.model.searchActionBar})))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-search",function(e){return l.createElement($,e)});var ee=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=l.createRef(),n}return m(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var o=this.rootRef.current;o&&this.toolbox.afterRender(o)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&this.toolbox.afterRender(t)},t.prototype.componentWillUnmount=function(){this.toolbox.beforeDestroy(),e.prototype.componentWillUnmount.call(this)},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbox",{get:function(){return this.creator.toolbox},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.toolbox},t.prototype.renderItems=function(e,t){var n=this;return void 0===t&&(t=!1),e.map(function(e,o){return l.createElement(G,{item:e,creator:n.creator,parentModel:n.toolbox,isCompact:t,key:e.renderedId})})},t.prototype.renderCategories=function(){var e=this;return this.toolbox.categories.map(function(t,o){return n.ReactElementFactory.Instance.createElement("svc-toolbox-category",{category:t,toolbox:e.toolbox,key:"category"+o})})},t.prototype.renderSearch=function(){var e=this.toolbox.isCompactRendered?l.createElement(l.Fragment,null,l.createElement(G,{item:this.toolbox.searchItem,creator:this.creator,parentModel:this.toolbox,isCompact:this.toolbox.isCompactRendered,key:"searchitem"})):null;return l.createElement("div",{className:"svc-toolbox__search-container"},e,l.createElement($,{model:this.toolbox.searchManager}),l.createElement("div",{className:"svc-toolbox__category-separator svc-toolbox__category-separator--search"}))},t.prototype.render=function(){var e=this,t=this.toolbox.showSearch?this.renderSearch():null,o=this.toolbox.showPlaceholder?l.createElement("div",{className:"svc-toolbox__placeholder"},this.toolbox.toolboxNoResultsFound):null;return l.createElement("div",{ref:this.rootRef,className:this.toolbox.classNames,style:this.toolbox.getRootStyle()},l.createElement("div",{onBlur:function(t){return e.toolbox.focusOut(t)},className:"svc-toolbox__panel"},t,o,l.createElement(n.Scroll,null,this.toolbox.showInSingleCategory?l.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompactRendered)):this.renderCategories())))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-toolbox",function(e){return l.createElement(ee,e)});var te=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPropChangedHandler=function(e,n){if(!t.isRendering){var o=["showProgressBar","progressBarType","currentPageValue"];if(!(o.indexOf(n.name)<0)){for(var r={},i=0;i<o.length;i++){var a=o[i];r[a]=t.survey[a]}t.setState(r)}}},t}return m(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setHandler()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setHandler()},t.prototype.setHandler=function(){this.survey&&!this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler)&&this.survey.onPropertyChanged.add(this.onPropChangedHandler)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.survey&&this.survey.onPropertyChanged.remove(this.onPropChangedHandler)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTop",{get:function(){return"top"==this.location},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.isTop?this.survey.isShowProgressBarOnTop:this.survey.isShowProgressBarOnBottom},t.prototype.renderElement=function(){return n.ReactElementFactory.Instance.createElement(this.survey.getProgressTypeComponent(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})},t}(n.SurveyElementBase),ne=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.model},t.prototype.renderElement=function(){var e=this.props.model;if(!e.visible)return null;var t=n.attachKey2click(l.createElement("div",{className:e.buttonClassName,title:e.tooltip,onClick:function(){e.action()}},l.createElement("div",{className:"svc-menu-action__icon"},l.createElement("div",{className:"svc-menu-action__icon-container"},l.createElement(n.SvgIcon,{iconName:e.iconName,size:"auto"})))),e);return l.createElement("div",{className:"svc-menu-action"},t)},t}(n.SurveyElementBase),oe=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.model},t.prototype.canRender=function(){return!!this.props.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){return l.createElement("div",{className:this.props.model.sideBarClassName},l.createElement("div",{className:"svc-sidebar-tabs__top-container"},l.createElement("div",{className:"svc-sidebar-tabs__collapse-button"},l.createElement(ne,{model:this.props.model.expandCollapseAction})),l.createElement("div",{className:"svc-sidebar-tabs__separator"},l.createElement("div",null)),l.createElement(n.Scroll,null,l.createElement("div",{className:"svc-sidebar-tabs__items"},l.createElement(re,{model:this.props.model.topToolbar})))),l.createElement("div",{className:"svc-sidebar-tabs__bottom-container"},l.createElement("div",{className:"svc-sidebar-tabs__items"},l.createElement(n.SurveyActionBar,{model:this.props.model.bottomToolbar}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-control",function(e){return l.createElement(oe,e)});var re=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.model},t.prototype.renderElement=function(){return l.createElement(l.Fragment,null,this.props.model.actions.map(function(e,t){return l.createElement(ne,{model:e,key:"item"+t})}))},t}(n.SurveyElementBase),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.model.title?l.createElement("div",{className:"svc-side-bar__container-title"},this.model.title):null;return l.createElement("div",{className:"svc-side-bar__container-header"},l.createElement("div",{className:"svc-side-bar__container-actions"},l.createElement(n.SurveyActionBar,{model:this.model.toolbar})),e)},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-side-bar-default-header",function(e){return l.createElement(ie,e)});var ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"objectSelectionAction",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.objectSelectionAction},t.prototype.renderElement=function(){var e=this,t=n.attachKey2click(l.createElement("div",{className:this.objectSelectionAction.buttonClassName,onClick:function(){return e.objectSelectionAction.action()}},l.createElement("div",{className:"svc-sidebar__header-caption"},l.createElement("span",{className:"svc-sidebar__header-title"},this.objectSelectionAction.title),l.createElement("span",{className:"svc-sidebar__header-subtitle"},this.objectSelectionAction.tooltip))),this.props.model);return l.createElement("div",{className:"svc-sidebar__header svc-sidebar__header--tabbed"},l.createElement("div",{className:"svc-sidebar__header-container svc-sidebar__header-container--with-subtitle"},l.createElement("div",{className:"svc-sidebar__header-content"},t,l.createElement(n.Popup,{model:this.objectSelectionAction.popupModel}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-side-bar-property-grid-header",function(e){return l.createElement(ae,e)});var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return l.createElement("div",{className:"svc-side-bar__container-header svc-sidebar__header-container"},this.model.subTitle?l.createElement("div",{className:"svc-sidebar__header-caption"},l.createElement("span",{className:"svc-sidebar__header-title"},this.model.title),l.createElement("span",{className:"svc-sidebar__header-subtitle"},this.model.subTitle)):l.createElement("div",{className:"svc-side-bar__container-title"},this.model.title))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-side-bar-header",function(e){return l.createElement(se,e)});var le=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=l.createRef(),n}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.initResizeManager(this.containerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.resetResizeManager()},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){var e=this,t={display:this.model.renderRoot?"":"none"},o={display:this.model.renderContainer?"":"none"},r=this.model.pages.map(function(e){return l.createElement(ce,{page:e,key:e.id})}),i=n.ReactElementFactory.Instance.createElement(this.model.header.component,{model:this.model.header.componentModel}),a=null;return this.model.sideAreaComponentName&&(a=n.ReactElementFactory.Instance.createElement(this.model.sideAreaComponentName,{model:this.model.sideAreaComponentData})),l.createElement("div",{className:this.model.rootCss,style:t},l.createElement("div",{className:"svc-side-bar__shadow",onClick:function(){return e.model.collapseSidebar()},style:o}),l.createElement("div",{className:"svc-flex-row svc-side-bar__wrapper"},l.createElement("div",{className:"svc-side-bar__container-wrapper",style:o},l.createElement("div",{ref:this.containerRef,className:"svc-side-bar__container"},i,l.createElement("div",{className:"svc-side-bar__container-content"},r))),a))},t}(n.SurveyElementBase),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"page",{get:function(){return this.props.page},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.page},t.prototype.renderElement=function(){return this.page.visible?n.ReactElementFactory.Instance.createElement(this.page.componentName,{model:this.page.componentData}):null},t}(n.SurveyElementBase);n.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-page",function(e){return l.createElement(ce,e)}),n.ReactElementFactory.Instance.registerElement("svc-side-bar",function(e){return l.createElement(le,e)});var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:"sd-translation-line-skeleton"})},t}(l.Component);n.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",function(e){return l.createElement(ue,e)});var me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item;return l.createElement("div",{className:e.data.containerCss},l.createElement("span",{className:e.data.additionalTitleCss},e.data.additionalTitle),n.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.item}))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-translate-from-action",function(e){return l.createElement(me,e)});var de=function(e){function t(t){var n,o=e.call(this,t)||this;return o.onChangedHandler=function(e,t){o.setState({changed:o.state&&o.state.changed?o.state.changed+1:1})},o.onBlur=function(e){return o.svStringEditorRef.current&&(o.svStringEditorRef.current.spellcheck=!1),o.locString.__isEditing=!1,o.justFocused=!1,o.baseModel.onBlur(e.nativeEvent),o.baseModel.errorText},o.onCompositionStart=function(e){o.baseModel.onCompositionStart(e.nativeEvent)},o.onCompositionEnd=function(e){o.baseModel.onCompositionEnd(e.nativeEvent)},o.onBeforeInput=function(e){o.baseModel.onBeforeInput(e)},o.onInput=function(e){o.baseModel.onInput(e.nativeEvent)},o.onPaste=function(e){o.baseModel.onPaste(e.nativeEvent)},o.justFocused=!1,o.onFocus=function(e){o.baseModel.onFocus(e.nativeEvent),o.justFocused=!0},o.onKeyDown=function(e){return o.baseModel.onKeyDown(e.nativeEvent)},o.onKeyUp=function(e){return o.baseModel.onKeyUp(e.nativeEvent)},o.onMouseUp=function(e){return o.baseModel.onMouseUp(e.nativeEvent)},o.done=function(e){o.baseModel.done(e),o.locString.__isEditing=!1},o.edit=function(e){o.svStringEditorRef.current.focus(),o.locString.__isEditing=!0,o.baseModel.onClick(e)},o.htmlValue={__html:null===(n=o.locString)||void 0===n?void 0:n.renderedHtml},o.state={changed:0},o.svStringEditorRef=l.createRef(),o}return m(t,e),t.prototype.createModel=function(e){this.baseModel&&this.baseModel.dispose(),this.baseModel=new o.StringEditorViewModelBase(this.locString,this.creator)},t.prototype.getUpdatedModelProps=function(){return["creator","locString"]},Object.defineProperty(t.prototype,"locString",{get:function(){return this.props.model.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.model.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.baseModel},Object.defineProperty(t.prototype,"errorText",{get:function(){return this.baseModel.errorText},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.locString&&(this.baseModel.setLocString(this.locString),this.baseModel.getEditorElement=function(){return t.svStringEditorRef.current},this.baseModel.blurEditor=function(){t.svStringEditorRef.current.blur(),t.svStringEditorRef.current.spellcheck=!1},this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler),this.locString.__isEditing&&this.svStringEditorRef.current.focus())},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.baseModel.setLocString(this.locString),this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.baseModel.detachFromUI(),this.locString&&this.locString.onStringChanged.remove(this.onChangedHandler)},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.baseModel.placeholder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return this.baseModel.contentEditable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this.baseModel.className(this.locString.renderedHtml)},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.locString)return null;var e=null;this.locString.hasHtml?(this.htmlValue.__html!==this.locString.renderedHtml&&(this.htmlValue={__html:this.locString.renderedHtml}),e=l.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor sv-string-editor--html",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,tabIndex:this.baseModel.tabIndex,dangerouslySetInnerHTML:this.htmlValue,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit})):e=l.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,tabIndex:this.baseModel.tabIndex,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,key:this.locString.renderedHtml,onBlur:this.onBlur,onBeforeInput:this.onBeforeInput,onInput:this.onInput,onPaste:this.onPaste,onCompositionStart:this.onCompositionStart,onCompositionEnd:this.onCompositionEnd,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseUp:this.onMouseUp,onClick:this.edit},this.locString.renderedHtml);var t=this.baseModel.showCharacterCounter?l.createElement(n.CharacterCounterComponent,{counter:this.baseModel.characterCounter,remainingCharacterCounter:this.baseModel.getCharacterCounterClass}):null;return l.createElement("span",{className:this.className},l.createElement("span",{className:"svc-string-editor__content"},l.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--hover",onClick:this.edit}),l.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--focus",onClick:this.edit}),l.createElement("span",{className:"svc-string-editor__input"},e,l.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit}),t)),this.errorText?l.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")},t}(g);n.ReactElementFactory.Instance.registerElement(o.editableStringRendererName,function(e){return l.createElement(de,e)});var pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",null,l.createElement(n.SvgIcon,{"aria-hidden":"true",iconName:"icon-alert_24x24",size:"24",className:this.props.cssClasses.error.icon}),l.createElement("span",{className:this.props.cssClasses.error.item||void 0},l.createElement(n.SurveyLocStringViewer,{model:this.props.error.locText})))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-question-error",function(e){return l.createElement(pe,e)});var he=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.renderInput=function(){var e=this.question;o.initLogicOperator(e);var t=e.locReadOnlyText?this.renderLocString(e.locReadOnlyText):"",n=this.question.dropdownListModel;return l.createElement("div",{id:this.question.inputId,className:e.getControlClass(),tabIndex:this.question.isInputReadOnly?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onKeyUp:this.keyhandler,role:n.ariaQuestionRole,"aria-required":n.ariaQuestionRequired,"aria-invalid":n.ariaQuestionInvalid,"aria-errormessage":n.ariaQuestionErrorMessage,"aria-expanded":n.ariaQuestionExpanded,"aria-label":n.ariaQuestionLabel,"aria-labelledby":n.ariaQuestionLabelledby,"aria-controls":n.ariaQuestionControls},l.createElement("div",{className:this.question.cssClasses.controlValue},t))},t.prototype.renderEditorButtons=function(){return null},t}(n.SurveyQuestionDropdown);n.ReactQuestionFactory.Instance.registerQuestion("sv-logic-operator",function(e){return l.createElement(he,e)}),i.RendererFactory.Instance.registerRenderer("dropdown","logicoperator","sv-logic-operator");var ve=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=l.createRef(),n}return m(t,e),t.prototype.createModel=function(e){this.model&&this.model.dispose(),this.model=new o.PageNavigatorViewModel(e.pagesController,e.pageEditMode)},t.prototype.getUpdatedModelProps=function(){return["pagesController","pageEditMode"]},t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),"bypage"!==this.props.pageEditMode){var t=this.containerRef.current;this.model.attachToUI(t)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.stopItemsContainerHeightObserver(),this.model.setScrollableContainer(void 0)},t.prototype.renderElement=function(){var e=this,t="svc-page-navigator__selector svc-page-navigator__button";return this.model.isPopupOpened&&(t+=" svc-page-navigator__button--pressed"),l.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},l.createElement("div",null,n.attachKey2click(l.createElement("div",{role:"button",className:t,onClick:function(){return e.model.togglePageSelector()},title:this.model.pageSelectorCaption},l.createElement(n.SvgIcon,{className:"svc-page-navigator__button-icon",iconName:this.model.icon,size:"auto",title:this.model.pageSelectorCaption}))),l.createElement(n.Popup,{model:this.model.popupModel})),l.createElement("div",null,this.model.visibleItems.map(function(e){return l.createElement(fe,{key:e.id,item:e})})))},t}(g),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getStateElement=function(){return this.props.item},t.prototype.renderElement=function(){var e=this.props.item,t="svc-page-navigator-item-content";return i.unwrap(e.active)&&(t+=" svc-page-navigator-item--selected"),i.unwrap(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),l.createElement("div",{className:"svc-page-navigator-item"},n.attachKey2click(l.createElement("div",{role:"button",className:t,onClick:function(t){e.action(e),t.stopPropagation()}},l.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title},l.createElement("div",{className:"svc-page-navigator-item__dot-content"})),l.createElement("div",{className:"svc-page-navigator-item__banner"},l.createElement("span",{className:"svc-page-navigator-item__text"},e.title),l.createElement("span",{className:"svc-page-navigator-item__dot"},l.createElement("span",{className:"svc-page-navigator-item__dot-content"}))))))},t}(g),ye=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:"svc-surface-placeholder"},l.createElement("div",{className:"svc-surface-placeholder__image svc-surface-placeholder__image--"+this.props.name}),l.createElement("div",{className:"svc-surface-placeholder__text"},l.createElement("div",{className:"svc-surface-placeholder__title"},this.props.placeholderTitleText),l.createElement("div",{className:"svc-surface-placeholder__description"},this.props.placeholderDescriptionText)))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-surface-placeholder",function(e){return l.createElement(ye,e)});var ge=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.denyUpdate=function(){t.denyComponentUpdate()},t.allowUpdate=function(){t.allowComponentUpdate()},t.addDragDropEvents=function(){t.creator.onDragStart.add(t.denyUpdate),t.creator.onDragClear.add(t.allowUpdate)},t.clearDragDropEvents=function(){t.creator.onDragStart.remove(t.denyUpdate),t.creator.onDragClear.remove(t.allowUpdate)},t}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.model.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.addDragDropEvents()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.clearDragDropEvents(),e.prototype.componentWillUnmount.call(this)},t.prototype.getStateElements=function(){return[this.model,this.model.survey,this.model.pagesController]},t.prototype.getRenderedPages=function(){var e=this,t=[];if("bypage"!==this.creator.pageEditMode){this.model.pages.forEach(function(n){t.push(e.createRenderedPage(n,"svc-page",n==e.model.newPage))})}else{var n=this.model.pagesController.page2Display;n&&t.push(this.createRenderedPage(n,"svc-page",this.model.newPage===n))}return t},t.prototype.createRenderedPage=function(e,t,n){return l.createElement(Ee,{key:null==e?void 0:e.id,page:e,isGhost:n,creator:this.creator,className:t})},t.prototype.renderElement=function(){var e=this,t="svc-tab-designer "+this.model.getRootCss();return l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?n.ReactElementFactory.Instance.createElement("svc-toolbox",{model:this.creator}):null),l.createElement("div",{className:t,onClick:function(){return e.model.clickDesigner()}},l.createElement(n.Scroll,null,l.createElement("div",{className:"svc-tab-designer_content"},this.model.showPlaceholder?this.renderPlaceHolder():this.renderTabContent()))))},t.prototype.renderHeader=function(e){if(!e)return null;var t=this.creator.survey;return l.createElement(l.Fragment,null,l.createElement("div",{className:"svc-designer-header"},l.createElement(n.SurveyHeader,{survey:t})))},t.prototype.renderPlaceHolder=function(){var e=this.renderHeader(this.creator.showSurveyHeader&&this.creator.showHeaderInEmptySurvey);return l.createElement(l.Fragment,null,e,l.createElement("div",{className:"svc-designer__placeholder-container","data-sv-drop-target-survey-element":"newGhostPage"},this.renderPlaceHolderContent(),this.createRenderedPage(this.model.newPage,"svc-designer-placeholder-page",!0)))},t.prototype.renderPlaceHolderContent=function(){return l.createElement(ye,{name:"designer",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})},t.prototype.renderTabContent=function(){var e=this.creator.survey,t=this.renderHeader(this.creator.showSurveyHeader),n=d({},this.model.surfaceCssVariables);n.maxWidth=e.renderedWidth;var o=this.renderTabTools();return l.createElement(l.Fragment,null,l.createElement("div",{className:this.model.designerCss,style:n},t,this.getRenderedPages()),o)},t.prototype.renderTabTools=function(){if(!this.model.showSurfaceTools)return null;var e=this.creator.showPageNavigator?l.createElement("div",{className:"svc-tab-designer__page-navigator"},l.createElement(ve,{pagesController:this.model.pagesController,pageEditMode:this.model.creator.pageEditMode})):null,t=this.model.showSurfaceToolbar?l.createElement(n.SurveyActionBar,{model:this.model.surfaceToolbar,handleClick:!1}):null;return l.createElement("div",{className:"svc-tab-designer__tools"},e,t)},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-designer",function(e){return l.createElement(ge,e)});var Ee=function(e){function t(n){var o=e.call(this,n)||this;return o.id="PageWrapperCallback_".concat(++t.ID),o.state={changed:0},o}return m(t,e),t.prototype.render=function(){var e,t,o=this.props.page?n.ReactElementFactory.Instance.createElement("svc-page",{survey:this.props.creator.survey,page:this.props.page,creator:this.props.creator,isGhost:this.props.isGhost}):null;return l.createElement("div",{className:this.props.className,"data-sv-drop-target-page":null===(e=this.props.page)||void 0===e?void 0:e.name,"data-sv-drop-target-survey-element":this.props.isGhost?"newGhostPage":null===(t=this.props.page)||void 0===t?void 0:t.name},o)},t.prototype.setupCallback=function(e){var t=this;e&&e.registerFunctionOnPropertyValueChanged("name",function(){t.setState({changed:t.state&&t.state.changed?t.state.changed+1:1})},this.id)},t.prototype.clearCallback=function(e){e&&e.unRegisterFunctionOnPropertyValueChanged("name")},t.prototype.componentDidUpdate=function(e,t){e.page!==this.props.page&&(this.clearCallback(e.page),this.setupCallback(this.props.page))},t.prototype.componentDidMount=function(){this.setupCallback(this.props.page)},t.prototype.componentWillUnmount=function(){this.clearCallback(this.props.page)},t.ID=0,t}(l.Component),be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return l.createElement("div",{className:"svc-json-editor-tab__errros_list",style:{display:this.model.hasErrors?"block":"none"}},l.createElement(n.List,{model:this.model.errorList}))},t}(n.SurveyElementBase),_e=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=l.createElement(be,{data:this.model});return l.createElement("div",{className:"svc-creator-tab__content"},l.createElement("div",{className:"svc-json-editor-tab__content"},l.createElement("textarea",{ref:function(t){return n=t,void(e.model.textElement=n);var n},className:"svc-json-editor-tab__content-area",value:this.model.text,onChange:function(t){return e.model.text=t.target.value},onKeyDown:function(t){return e.model.checkKey(t,t)},disabled:this.model.readOnly,"aria-label":this.model.ariaLabel}),t))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",function(e){return l.createElement(_e,e)});var Ce=function(e){function t(t){var n=e.call(this,t)||this;return n.aceEditorrRef=l.createRef(),n}return m(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.model.init(ace.edit(this.aceEditorrRef.current))},t.prototype.renderElement=function(){var e=l.createElement(be,{data:this.model});return l.createElement("div",{className:"svc-creator-tab__content"},l.createElement("div",{className:"svc-json-editor-tab__content"},l.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef}),e))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",function(e){return l.createElement(Ce,e)});var Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.button},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t="svc-logic-tab__content-action svc-btn"+(void 0===this.model.enabled||this.model.enabled?"":" svc-logic-tab__content-action--disabled");return n.attachKey2click(l.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:t,title:this.model.title},l.createElement("span",{className:"svc-btn__text"},this.model.title)))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button",function(e){return l.createElement(Ne,e)});var Se=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return m(o,e),Object.defineProperty(o.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),o.prototype.getStateElement=function(){return this.model},o.prototype.renderElement=function(){this.model;var e=this.renderViewContent();return l.createElement("div",{className:"svc-creator-tab__content svc-logic-tab"},e)},o.prototype.renderViewContent=function(){var e="svc-plugin-tab__content svc-logic-tab svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab--empty"),o=this.model.readOnly?void 0:l.createElement(Ne,{button:this.model.addNewButton});return l.createElement(t.Fragment,null,l.createElement("div",{className:e},this.model.hasItems?l.createElement(l.Fragment,null,l.createElement(n.Survey,{model:this.model.itemsSurvey}),o):l.createElement("div",{className:"svc-logic-tab__content-empty"},l.createElement(ye,{name:"logic",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}),o)))},o}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-logic",function(e){return l.createElement(Se,e)});var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t=this.model.getRootCss();return this.model.survey?this.model.hasFrame?l.createElement("div",{className:t,onKeyDown:function(t){return e.model.tryToZoom(t,t)},onMouseEnter:"desktop"===this.model.device?null:this.model.activateZoom,onMouseLeave:"desktop"===this.model.device?null:this.model.deactivateZoom},l.createElement("div",{className:"svd-simulator-wrapper",id:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},l.createElement("div",{className:"svd-simulator",style:{width:this.model.simulatorFrame.deviceWidth+"px",height:this.model.simulatorFrame.deviceHeight+"px",transform:"scale("+this.model.simulatorFrame.scale+") translate(-50%, -50%)"}},l.createElement("div",{className:"svd-simulator-content"},l.createElement(n.Survey,{model:this.model.survey}))))):l.createElement("div",{className:t},l.createElement("div",{className:"svd-simulator-content"},l.createElement(n.Survey,{model:this.model.survey}))):l.createElement("div",{className:t})},t}(n.SurveyElementBase),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model.testAgainAction},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this;return n.attachKey2click(l.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:"svc-preview__test-again svc-btn",title:this.model.title},l.createElement("span",{className:"svc-btn__text"},this.model.title)))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-complete-page",function(e){return l.createElement(qe,e)});var Ie=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderPlaceholder=function(){return l.createElement(ye,{name:"preview",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})},t.prototype.renderSimulator=function(){return l.createElement("div",{className:"svc-plugin-tab__content"},l.createElement(we,{model:this.model.simulator}),this.model.showResults?l.createElement(z,{survey:this.model.simulator.survey}):null)},t.prototype.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return l.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?l.createElement("div",{className:"svc-test-tab__content-actions"},l.createElement(n.SurveyActionBar,{model:this.model.pages})):null},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-preview",function(e){return l.createElement(Ie,e)});var Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:"svc-property-grid-placeholder"},l.createElement("div",{className:"svc-property-grid-placeholder__header"},l.createElement("span",{className:"svc-property-grid-placeholder__title"},o.editorLocalization.getString("ed.propertyGridPlaceholderTitle")),l.createElement("span",{className:"svc-property-grid-placeholder__description"},o.editorLocalization.getString("ed.propertyGridPlaceholderDescription"))),l.createElement("div",{className:"svc-property-grid-placeholder__content"},l.createElement("div",{className:"svc-property-grid-placeholder__gap"}),l.createElement("div",{className:"svc-property-grid-placeholder__image"})))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-property-grid-placeholder",function(e){return l.createElement(Re,e)});var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderPlaceholder=function(){return l.createElement(ye,{name:"theme",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})},t.prototype.renderSimulator=function(){return l.createElement("div",{className:"svc-plugin-tab__content"},l.createElement(we,{model:this.model.simulator}),this.model.showResults?l.createElement(z,{survey:this.model.simulator.survey}):null)},t.prototype.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return l.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?l.createElement("div",{className:"svc-test-tab__content-actions"},l.createElement(n.SurveyActionBar,{model:this.model.pages})):null},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-theme",function(e){return l.createElement(xe,e)});var Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data||this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model?l.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"+(this.model.isEmpty?" svc-translation-tab--empty":"")},this.renderElementContent()):null},t.prototype.renderElementContent=function(){return this.model.isEmpty?l.createElement(ye,{name:"translation",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}):l.createElement("div",{className:"st-content"},l.createElement("div",{className:"svc-flex-column st-strings-wrapper"},l.createElement("div",{className:"svc-flex-row st-strings-header"},l.createElement(n.Survey,{model:this.model.stringsHeaderSurvey})),l.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},l.createElement(n.Survey,{model:this.model.stringsSurvey}))))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-tab-translation",function(e){return l.createElement(Me,e)});var Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model.isVisible?l.createElement(n.List,{model:this.model.list}):null},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-object-selector",function(e){return l.createElement(Pe,e)});var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){return l.createElement("div",{className:this.model.rootCss},l.createElement($,{model:this.model.searchManager}),l.createElement(n.Survey,{model:this.model.survey}))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-property-grid",function(e){return l.createElement(Te,e)});var De=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.render=function(){return l.createElement("div",{className:this.props.model.cssClass},this.props.model.elements.map(function(e,t){return n.ReactElementFactory.Instance.createElement(e.componentName,d(d({},e.componentData),{key:t}))}))},t}(l.Component);n.ReactElementFactory.Instance.registerElement("svc-component-container",function(e){return l.createElement(De,e)});var Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this,t=this.item.tooltip||this.item.title,o=this.item.hasTitle?l.createElement("span",{className:"svc-switcher__title"},this.item.title):null;return n.attachKey2click(l.createElement("button",{className:this.item.getActionBarItemCss(),type:"button",disabled:this.item.disabled,onClick:function(t){return e.item.action(e.item,e.item.getIsTrusted(t))},title:t,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},l.createElement("div",{className:this.item.getSwitcherIconCss()},l.createElement("div",{className:"svc-switcher__icon-thumb"})),o),this.item,{processEsc:!1})},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("svc-switcher",function(e){return l.createElement(Fe,e)});var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this.props.item;return l.createElement(l.Fragment,null,l.createElement(n.SvgIcon,{iconName:e.iconName,size:e.iconSize,className:"svc-json-error__icon"}),l.createElement("div",{className:"svc-json-error__container"},l.createElement("div",{className:"svc-json-error__title"},l.createElement("span",{key:2},this.renderLocString(e.locTitle,void 0,"locString"))),this.renderFixButton()))},t.prototype.renderFixButton=function(){if(!this.props.item.data.showFixButton)return null;var e=this.props.item;return n.attachKey2click(l.createElement("button",{type:"button",onClick:function(t){t.stopPropagation(),e.data.fixError()},title:e.data.fixButtonTitle,className:"svc-json-error__fix-button"},l.createElement(n.SvgIcon,{iconName:e.data.fixButtonIcon,size:"auto"})))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("json-error-item",function(e){return l.createElement(ke,e)});var Be=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderInput=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement("input",{role:"spinbutton",id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:function(t){return e.setControl(t)},placeholder:this.question.renderedPlaceholder,autoComplete:"off",onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onFocus:function(t){return e.question.onFocus(t.nativeEvent)},onChange:this.question.onChange,onBeforeInput:function(t){return e.question.onBeforeInput(t.nativeEvent)},onKeyUp:function(t){return e.question.onKeyUp(t.nativeEvent)},onKeyDown:function(t){return e.question.onInputKeyDown(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}))},t.prototype.renderElement=function(){var e=this;return l.createElement("div",{className:this.question.cssClasses.root,onKeyDown:function(t){return e.question.onKeyDown(t.nativeEvent)}},this.renderInput(),this.renderButtons())},t.prototype.getValueCore=function(){return this.question.renderedValue},t.prototype.renderButtons=function(){var e=this;return l.createElement("span",{className:this.question.cssClasses.buttonsContainer},l.createElement("button",{tabIndex:-1,"aria-hidden":"true",className:this.question.cssClasses.arrowButton,disabled:this.isDisplayMode,onClick:this.question.onDownButtonClick,onMouseDown:this.question.onDownButtonMouseDown,onMouseUp:this.question.onButtonMouseUp,onMouseLeave:this.question.onButtonMouseLeave,onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onFocus:function(t){return e.question.onFocus(t.nativeEvent)}},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.decreaseButtonIcon,size:"auto"})),l.createElement("button",{tabIndex:-1,"aria-hidden":"true",className:this.question.cssClasses.arrowButton,disabled:this.isDisplayMode,onClick:this.question.onUpButtonClick,onMouseDown:this.question.onUpButtonMouseDown,onMouseUp:this.question.onButtonMouseUp,onMouseLeave:this.question.onButtonMouseLeave,onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onFocus:function(t){return e.question.onFocus(t.nativeEvent)}},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.increaseButtonIcon,size:"auto"})))},t}(n.SurveyQuestionText);n.ReactQuestionFactory.Instance.registerQuestion("spinedit",function(e){return l.createElement(Be,e)});var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){var e=this.props.item;return l.createElement(l.Fragment,null,l.createElement("span",{className:"spg-color-editor__color-swatch",style:{backgroundColor:e.value}}),l.createElement("span",{key:2},this.renderLocString(e.locTitle,void 0,"locString")))},t}(n.SurveyElementBase);n.ReactElementFactory.Instance.registerElement("color-item",function(e){return l.createElement(Oe,e)});var je=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderInput=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:function(t){return e.setControl(t)},placeholder:this.question.renderedPlaceholder,autoComplete:"off",onKeyUp:function(t){return e.question.onKeyUp(t.nativeEvent)},onBlur:function(t){return e.question.onBlur(t.nativeEvent)},onChange:this.question.onChange,onBeforeInput:function(t){return e.question.onBeforeInput(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-label":this.question.a11y_input_ariaLabel,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}))},t.prototype.renderElement=function(){var e=this;return l.createElement("div",{className:this.question.cssClasses.root,onKeyDown:function(t){return e.question.onKeyDown(t.nativeEvent)}},this.renderColorSwatch(),this.renderInput(),this.question.showDropdownAction?this.renderDropdownAction():null)},t.prototype.getValueCore=function(){return this.question.renderedValue},t.prototype.renderColorSwatch=function(){var e=this;return l.createElement("label",{className:this.question.getSwatchCss(),style:this.question.getSwatchStyle()},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.swatchIcon,size:"auto"}),l.createElement("input",{type:"color",disabled:this.isDisplayMode,value:this.question.renderedColorValue,className:this.question.cssClasses.colorInput,onChange:function(t){return e.question.onColorInputChange(t.nativeEvent)},tabIndex:-1,"aria-required":this.question.a11y_input_ariaRequired,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-label":this.question.a11y_input_ariaLabel,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}))},t.prototype.renderDropdownAction=function(){return l.createElement(l.Fragment,null,l.createElement("div",{"aria-hidden":"true",className:this.question.cssClasses.choicesButtonWrapper},n.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.question.dropdownAction})),this.renderPopup())},t.prototype.renderPopup=function(){return l.createElement(n.Popup,{model:this.question.dropdownAction.popupModel})},t}(n.SurveyQuestionText);n.ReactQuestionFactory.Instance.registerQuestion("color",function(e){return l.createElement(je,e)});var Ue=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"questionFile",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getValueCore=function(){return this.question.renderedValue},t.prototype.renderInput=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement("input",{disabled:this.question.isTextInputReadOnly,className:this.questionFile.cssClasses.control,placeholder:this.questionFile.renderedPlaceholder,ref:function(t){return e.setControl(t)},autoComplete:"off",type:"text",onBlur:function(t){return e.questionFile.onInputBlur(t.nativeEvent)},onChange:function(t){return e.questionFile.onInputChange(t.nativeEvent)}}))},t.prototype.renderFileInput=function(){var e=this;return l.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.questionFile.cssClasses.fileInput,id:this.questionFile.inputId,"aria-required":this.questionFile.ariaRequired,"aria-label":this.questionFile.ariaLabel,"aria-invalid":this.questionFile.ariaInvalid,"aria-describedby":this.questionFile.ariaDescribedBy,multiple:!1,title:this.questionFile.inputTitle,accept:this.questionFile.acceptedTypes,tabIndex:-1,onChange:function(t){return e.questionFile.onFileInputChange(t.nativeEvent)}})},t.prototype.renderButtons=function(){return l.createElement("div",{className:this.questionFile.cssClasses.buttonsContainer},this.renderClearButton(),this.renderChooseButton())},t.prototype.renderClearButton=function(){return n.attachKey2click(l.createElement("button",{className:this.questionFile.cssClasses.clearButton,title:this.questionFile.clearButtonCaption,disabled:this.questionFile.getIsClearButtonDisabled(),onClick:this.questionFile.doClean},l.createElement(n.SvgIcon,{iconName:this.questionFile.cssClasses.clearButtonIcon,size:"auto"})))},t.prototype.renderChooseButton=function(){var e=this;return n.attachKey2click(l.createElement("label",{onClick:function(t){return e.questionFile.chooseFiles(t.nativeEvent)},className:this.questionFile.getChooseButtonCss(),htmlFor:this.questionFile.inputId,"aria-label":this.questionFile.chooseButtonCaption},l.createElement(n.SvgIcon,{iconName:this.questionFile.cssClasses.chooseButtonIcon,size:"auto",title:this.questionFile.chooseButtonCaption})))},t.prototype.renderElement=function(){var e=this;return l.createElement("div",{className:this.questionFile.cssClasses.root,ref:function(t){return e.setContent(t)},onDragEnter:this.questionFile.onDragEnter,onDragOver:this.questionFile.onDragOver,onDrop:this.questionFile.onDrop,onDragLeave:this.questionFile.onDragLeave,onKeyDown:function(t){return e.question.onKeyDown(t.nativeEvent)}},this.renderInput(),this.renderFileInput(),this.renderButtons())},t}(n.SurveyQuestionText);n.ReactQuestionFactory.Instance.registerQuestion("fileedit",function(e){return l.createElement(Ue,e)});var Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderInput(),t=this.renderResetButton();return l.createElement("div",{className:this.question.getRootClass()},e,t)},t.prototype.renderInput=function(){return n.ReactQuestionFactory.Instance.createQuestion(this.question.wrappedQuestionTemplate,{question:this.question,isDisplayMode:this.question.isInputReadOnly,creator:this})},t.prototype.renderResetButton=function(){var e=this;return l.createElement("button",{className:this.question.cssClasses.resetButton,disabled:this.question.resetValueAdorner.isDisabled,title:this.question.resetValueAdorner.caption,onClick:function(){return e.question.resetValueAdorner.resetValue()}},l.createElement(n.SvgIcon,{iconName:this.question.cssClasses.resetButtonIcon,size:"auto"}))},t}(n.SurveyQuestionElementBase);n.ReactQuestionFactory.Instance.registerQuestion("textwithreset",function(e){return l.createElement(Ae,e)}),n.ReactQuestionFactory.Instance.registerQuestion("commentwithreset",function(e){return l.createElement(Ae,e)});var Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.renderElement=function(){var e=this,t=n.attachKey2click(l.createElement("div",{className:"spg-boolean-switch__button"+(this.questionBase.booleanValue?" spg-boolean-switch__button--checked":""),tabIndex:0,role:"checkbox","aria-checked":this.questionBase.booleanValue||!1,"aria-required":this.questionBase.a11y_input_ariaRequired,"aria-label":this.questionBase.a11y_input_ariaLabel,"aria-labelledby":this.questionBase.a11y_input_ariaLabelledBy,"aria-invalid":this.questionBase.a11y_input_ariaInvalid,"aria-errormessage":this.questionBase.a11y_input_ariaErrormessage},l.createElement("div",{className:"spg-boolean-switch__thumb"},l.createElement("div",{className:"spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--left"})),l.createElement("div",{className:"spg-boolean-switch__thumb"},l.createElement("div",{className:"spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--right"}))),this.questionBase,{processEsc:!1});return l.createElement("div",{className:"spg-boolean-switch",onClick:function(){return e.questionBase.booleanValue=!e.questionBase.booleanValue}},t,l.createElement("div",{className:"spg-boolean-switch__caption"},l.createElement("div",{className:"spg-boolean-switch__title",id:this.questionBase.labelRenderedAriaID},n.SurveyElementBase.renderLocString(this.questionBase.locTitle))))},t}(n.SurveyQuestionElementBase);function Le(e,t,n){void 0===n&&(n={});var o=t,r=e.rootElement||document;"string"==typeof t&&(o=r.querySelector("#"+t));var i=a.preact.createElement(f,d({creator:e},n));a.preact.render(i,o)}n.ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch",function(e){return l.createElement(Qe,e)}),i.RendererFactory.Instance.registerRenderer("boolean","switch","sv-boolean-switch"),e.Version=void 0,e.Version="".concat("2.5.19"),i.checkLibraryVersion("".concat("2.5.19"),"survey-creator-react");var Ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(e){Le(this,e)},t}(y);if("undefined"!=typeof window){var Ke=window.jQuery||window.$;Ke&&Ke.fn.extend({SurveyCreator:function(e){return this.each(function(){Le(e.model,this,e)})}})}Object.defineProperty(e,"PropertyGridEditorCollection",{enumerable:!0,get:function(){return o.PropertyGridEditorCollection}}),Object.defineProperty(e,"SurveyLogic",{enumerable:!0,get:function(){return o.SurveyLogic}}),Object.defineProperty(e,"SurveyLogicUI",{enumerable:!0,get:function(){return o.SurveyLogicUI}}),Object.defineProperty(e,"SurveyQuestionEditorDefinition",{enumerable:!0,get:function(){return o.SurveyQuestionEditorDefinition}}),Object.defineProperty(e,"ToolboxToolViewModel",{enumerable:!0,get:function(){return o.ToolboxToolViewModel}}),Object.defineProperty(e,"editorLocalization",{enumerable:!0,get:function(){return o.editorLocalization}}),Object.defineProperty(e,"localization",{enumerable:!0,get:function(){return o.localization}}),Object.defineProperty(e,"settings",{enumerable:!0,get:function(){return o.settings}}),Object.defineProperty(e,"svgBundle",{enumerable:!0,get:function(){return o.svgBundle}}),e.ActionButton=q,e.AdaptiveToolbox=ee,e.CellQuestionAdornerComponent=T,e.CellQuestionDropdownAdornerComponent=D,e.ComponentContainer=De,e.CreatorSurveyPageComponent=k,e.ImageItemValueAdornerComponent=K,e.ItemValueAdornerComponent=L,e.LogoImageComponent=j,e.MatrixCellAdornerComponent=H,e.PanelAdornerComponent=O,e.PropertyGridComponent=Te,e.PropertyGridPlaceholderComponent=Re,e.QuestionAdornerComponent=N,e.QuestionBanner=I,e.QuestionDropdownAdornerComponent=R,e.QuestionEditorContentComponent=Q,e.QuestionErrorComponent=pe,e.QuestionImageAdornerComponent=x,e.QuestionRatingAdornerComponent=M,e.QuestionWidgetAdornerComponent=P,e.QuestionWrapperFooter=w,e.QuestionWrapperHeader=S,e.ReactDragEvent=_,e.ReactMouseEvent=b,e.RowWrapper=E,e.SearchComponent=$,e.SideBarDefaultHeader=ie,e.SidebarComponent=le,e.SurveyCreator=Ve,e.SurveyCreatorComponent=f,e.SurveyCreatorToolboxCategory=Y,e.SurveyCreatorToolboxItem=J,e.SurveyCreatorToolboxItemGroup=X,e.SurveyCreatorToolboxTool=G,e.SurveyElementEmbeddedSurvey=A,e.SurveyLocStringEditor=de,e.SurveyLogicOpertor=he,e.SurveyNavigation=te,e.SurveyQuestionBooleanSwitch=Qe,e.SurveyQuestionColor=je,e.SurveyQuestionFileEditor=Ue,e.SurveyQuestionLinkValue=U,e.SurveyQuestionSpinEditor=Be,e.SurveyQuestionTextWithReset=Ae,e.SurveyResults=z,e.SurveyResultsByRow=W,e.SurveySimulator=we,e.SwitcherComponent=Fe,e.TabButtonComponent=ne,e.TabDesignerComponent=ge,e.TabJsonEditorAceComponent=Ce,e.TabJsonEditorErrorsComponent=be,e.TabJsonEditorTextareaComponent=_e,e.TabLogicAddButtonComponent=Ne,e.TabLogicComponent=Se,e.TabPreviewSurveyComponent=Ie,e.TabPreviewTestSurveyAgainComponent=qe,e.TabThemeSurveyComponent=xe,e.TabTranslationComponent=Me,e.TabbedMenuComponent=p,e.TabbedMenuItemComponent=v,e.ToolboxList=Z,e.TranslateFromAction=me,e.TranslationLineSkeleton=ue,e.renderSurveyCreator=Le});
|
package/ui-preset-editor.js
CHANGED
package/ui-preset-editor.min.js
CHANGED