survey-creator-react 1.9.24 → 1.9.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * SurveyJS Creator React v1.9.24
2
+ * SurveyJS Creator React v1.9.27
3
3
  * (c) 2015-2022 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&&"object"==typeof module?module.exports=t(require("react"),require("survey-react-ui"),require("survey-creator-core"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("SurveyCreator",["react","survey-react-ui","survey-creator-core","survey-core","react-dom"],t):"object"==typeof exports?exports.SurveyCreator=t(require("react"),require("survey-react-ui"),require("survey-creator-core"),require("survey-core"),require("react-dom")):e.SurveyCreator=t(e.React,e.SurveyReact,e.SurveyCreatorCore,e.Survey,e.ReactDOM)}(this,(function(e,t,n,r,o){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";n.r(t),n.d(t,"Version",(function(){return me})),n.d(t,"SurveyCreatorComponent",(function(){return f})),n.d(t,"SurveyCreator",(function(){return y})),n.d(t,"RowWrapper",(function(){return g})),n.d(t,"QuestionAdornerComponent",(function(){return _})),n.d(t,"QuestionWrapperHeader",(function(){return N})),n.d(t,"QuestionWrapperFooter",(function(){return S})),n.d(t,"QuestionDropdownAdornerComponent",(function(){return w})),n.d(t,"QuestionImageAdornerComponent",(function(){return C})),n.d(t,"QuestionRatingAdornerComponent",(function(){return x})),n.d(t,"QuestionWidgetAdornerComponent",(function(){return R})),n.d(t,"CellQuestionAdornerComponent",(function(){return P})),n.d(t,"CellQuestionDropdownAdornerComponent",(function(){return M})),n.d(t,"CreatorSurveyPageComponent",(function(){return k})),n.d(t,"PanelAdornerComponent",(function(){return I})),n.d(t,"LogoImageComponent",(function(){return D})),n.d(t,"SurveyQuestionLinkValue",(function(){return O})),n.d(t,"SurveyElementEmbeddedSurvey",(function(){return j})),n.d(t,"QuestionEditorContentComponent",(function(){return F})),n.d(t,"ItemValueAdornerComponent",(function(){return q})),n.d(t,"ImageItemValueAdornerComponent",(function(){return B})),n.d(t,"MatrixCellAdornerComponent",(function(){return V})),n.d(t,"SurveyResults",(function(){return Q})),n.d(t,"SurveyResultsByRow",(function(){return A})),n.d(t,"SurveyCreatorToolboxTool",(function(){return L})),n.d(t,"SurveyCreatorToolboxItem",(function(){return U})),n.d(t,"Toolbox",(function(){return H})),n.d(t,"AdaptiveToolbox",(function(){return K})),n.d(t,"TabbedMenuComponent",(function(){return m})),n.d(t,"TabbedMenuItemComponent",(function(){return p})),n.d(t,"NotifierComponent",(function(){return v})),n.d(t,"SurveyNavigation",(function(){return W})),n.d(t,"SidebarComponent",(function(){return z})),n.d(t,"TranslationLineSkeleton",(function(){return J})),n.d(t,"ActionButton",(function(){return T})),n.d(t,"SurveyLocStringEditor",(function(){return X})),n.d(t,"TabDesignerComponent",(function(){return $})),n.d(t,"TabEmbedComponent",(function(){return ee})),n.d(t,"TabJsonEditorAceComponent",(function(){return te})),n.d(t,"TabJsonEditorTextareaComponent",(function(){return ne})),n.d(t,"TabLogicAddButtonComponent",(function(){return re})),n.d(t,"TabLogicComponent",(function(){return oe})),n.d(t,"TabPreviewTestSurveyAgainComponent",(function(){return ie})),n.d(t,"TabPreviewSurveyComponent",(function(){return se})),n.d(t,"TabTranslationComponent",(function(){return ce})),n.d(t,"SurveySimulator",(function(){return ae})),n.d(t,"ReactMouseEvent",(function(){return E})),n.d(t,"ReactDragEvent",(function(){return b})),n.d(t,"PropertyGridComponent",(function(){return ue})),n.d(t,"editorLocalization",(function(){return l.editorLocalization})),n.d(t,"localization",(function(){return l.localization})),n.d(t,"settings",(function(){return l.settings})),n.d(t,"svgBundle",(function(){return l.svgBundle})),n.d(t,"SurveyLogic",(function(){return l.SurveyLogic})),n.d(t,"SurveyLogicUI",(function(){return l.SurveyLogicUI})),n.d(t,"SurveyQuestionEditorDefinition",(function(){return l.SurveyQuestionEditorDefinition})),n.d(t,"ToolboxToolViewModel",(function(){return l.ToolboxToolViewModel})),n.d(t,"PropertyGridEditorCollection",(function(){return l.PropertyGridEditorCollection})),n.d(t,"StylesManager",(function(){return l.StylesManager}));Object.assign;function r(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=n(0),a=n.n(o),i=n(4),s=n.n(i),c=n(1),l=n(2),u=n(3),m=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=a.a.createRef(),n}return r(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 a.a.createElement(d,{item:e,key:e.id})}));return a.a.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu"},e)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new u.ResponsivityManager(t,this.model,".svc-tabbed-menu-item-container:not(.sv-dots)>.sv-action__content"))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t}(c.SurveyElementBase),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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=c.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return a.a.createElement("span",{key:this.item.id,className:e},a.a.createElement("div",{className:"sv-action__content"},t))},t}(c.SurveyElementBase),p=function(e){function t(t){return e.call(this,t)||this}return r(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,t="svc-tabbed-menu-item";e.active&&(t+=" svc-tabbed-menu-item--selected"),void 0===e.enabled||e.enabled||(t+=" svc-tabbed-menu-item--disabled");var n="svc-text svc-tabbed-menu-item__text svc-text--normal";return e.active&&(n+=" svc-text--bold"),Object(c.attachKey2click)(a.a.createElement("div",{className:t,onClick:function(){return e.action(e)}},a.a.createElement("span",{className:n},e.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",(function(e){return a.a.createElement(p,e)}));var v=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){return this.notifier.active?a.a.createElement("div",{className:this.notifier.css},a.a.createElement("span",null,this.notifier.message)):null},t}(c.SurveyElementBase),h=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=a.a.createRef(),n}return r(t,e),t.prototype.componentDidMount=function(){this.containerRef.current&&(this.containerRef.current.innerHTML=u.SvgRegistry.iconsRenderedHtml())},t.prototype.componentWillUnmount=function(){},t.prototype.render=function(){return a.a.createElement("svg",{style:{display:"none"},ref:this.containerRef})},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-svg-bundle",(function(e){return a.a.createElement(h,e)}));var f=function(e){function t(t){var n=e.call(this,t)||this;return n.rootNode=a.a.createRef(),n}return r(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.props.creator},Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.creator.initKeyboardShortcuts(this.rootNode.current),this.creator.initResponsivityManager(this.rootNode.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.creator.removeKeyboardShortcuts(this.rootNode.current),this.creator.resetResponsivityManager()},t.prototype.renderElement=function(){var e=this.props.creator;if(e.isCreatorDisposed)return null;var t="svc-creator"+(this.props.creator.isMobileView?" svc-creator--mobile":""),n="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":""),o="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sidebarLocation,i=null;return this.props.creator.haveCommercialLicense||(i=a.a.createElement("div",{className:"svc-creator__banner"},a.a.createElement("span",{className:"svc-creator__non-commercial-text"},a.a.createElement("a",{href:"https://surveyjs.io/buy"},this.props.creator.licenseText)))),a.a.createElement("div",{className:t,ref:this.rootNode,style:this.style},a.a.createElement(h,null),a.a.createElement("div",{className:n},a.a.createElement("div",{className:o},a.a.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},a.a.createElement("div",{className:"svc-top-bar"},e.showTabs?a.a.createElement("div",{className:"svc-tabbed-menu-wrapper"},a.a.createElement(m,{model:e.tabbedMenu})):null,e.showToolbar?a.a.createElement("div",{className:"svc-toolbar-wrapper"},a.a.createElement(c.SurveyActionBar,{model:e.toolbar})):null),a.a.createElement("div",{className:r},a.a.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),a.a.createElement("div",{className:"svc-footer-bar"},e.isMobileView?a.a.createElement("div",{className:"svc-toolbar-wrapper"},a.a.createElement(c.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSidebar()),i,a.a.createElement(v,{creator:e,notifier:e.notifier})))},t.prototype.renderActiveTab=function(){for(var e=this.props.creator,t=0;t<e.tabs.length;t++)if(e.tabs[t].id===e.activeTab)return this.renderCreatorTab(e.tabs[t]);return null},t.prototype.renderCreatorTab=function(e){if(!1===e.visible)return null;var t=this.props.creator,n=e.renderTab?e.renderTab():c.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 a.a.createElement("div",{key:e.id,id:"scrollableDiv-"+e.id,className:r},n)},t.prototype.renderSidebar=function(){if(this.creator.sidebar){var e=this.creator.isMobileView?"sv-mobile-side-bar":"";return a.a.createElement("div",{className:e},c.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sidebar}))}return null},t}(c.SurveyElementBase),y=function(e){function t(t,n){return void 0===t&&(t={}),e.call(this,t,n)||this}return r(t,e),t.prototype.render=function(e){var t=e;"string"==typeof e&&(t=document.getElementById(e)),s.a.unmountComponentAtNode(t),s.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(f,{creator:this})),t)},t.prototype.createQuestionElement=function(e){return c.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return a.a.createElement("div",{key:e},a.a.createElement("span",{className:n.error.icon,"aria-hidden":"true"}),a.a.createElement("span",{className:n.error.item},a.a.createElement(c.SurveyLocStringViewer,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(l.CreatorBase);c.ReactElementFactory.Instance.registerElement("survey-widget",(function(e){return a.a.createElement(c.Survey,e)}));var g=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.RowViewModel(n.props.componentData.creator,n.props.row,null),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return a.a.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},this.props.element)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-row",(function(e){return a.a.createElement(g,e)}));var E=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}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.event=t,n}return r(t,e),Object.defineProperty(t.prototype,"dataTransfer",{get:function(){return this.event.dataTransfer},enumerable:!1,configurable:!0}),t}(E),_=function(e){function t(t){var n=e.call(this,t)||this;return n.modelValue=n.createQuestionViewModel(),n}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!this.model.isDragged},t.prototype.renderElement=function(){var e=this.model.element.isInteractiveDesignElement,t=this.renderContent(e);return a.a.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.element.name||null,className:"svc-question__adorner"+this.model.rootCss(),onMouseOut:function(t){return e&&Object(l.toggleHovered)(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e&&Object(l.toggleHovered)(t.nativeEvent,t.currentTarget)}},t)},t.prototype.renderContent=function(e){var t=this,n=this.renderElementContent();return e?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-question__content "+this.model.css(),onClick:function(e){return t.model.select(t.model,new E(e))}},this.renderHeader(),n,this.renderFooter())):a.a.createElement(a.a.Fragment,null,n,this.renderFooter())},t.prototype.renderHeader=function(){return c.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})},t.prototype.renderFooter=function(){return c.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model})},t.prototype.renderElementContent=function(){return a.a.createElement(a.a.Fragment,null,this.props.element,this.renderElementPlaceholder())},t.prototype.renderElementPlaceholder=function(){return this.model.isEmptyElement?a.a.createElement("div",{className:"svc-panel__placeholder_frame"},a.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText)):null},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-question",(function(e){return a.a.createElement(_,e)}));var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this;return this.props.model.allowDragging?a.a.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.props.model.onPointerDown(t)}},a.a.createElement("div",{className:"svc-question__drag-element"})):null},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-question-header",(function(e){return a.a.createElement(N,e)}));var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return a.a.createElement("div",{className:this.props.className},a.a.createElement(c.SurveyActionBar,{model:this.props.model.actionContainer}))},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-question-footer",(function(e){return a.a.createElement(S,e)}));var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.renderElementPlaceholder=function(){var e=this.props.question,t=this.props.question.textStyle;return a.a.createElement("div",{className:"svc-question__dropdown-choices"},(e.visibleChoices||[]).map((function(n,r){return a.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(r)},c.ReactSurveyElementsWrapper.wrapItemValue(e.survey,c.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:r,isChecked:e.value===n.value}),e,n))})))},t}(_);c.ReactElementFactory.Instance.registerElement("svc-dropdown-question",(function(e){return a.a.createElement(w,e)}));var C=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionImageAdornerViewModel(this.props.componentData,this.props.question,null,null)},Object.defineProperty(t.prototype,"imageModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.imageModel.questionRoot=this.rootRef.current},t.prototype.renderHeader=function(){return a.a.createElement(a.a.Fragment,null,a.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),e.prototype.renderHeader.call(this))},t.prototype.renderElementPlaceholder=function(){var e=this;return a.a.createElement("div",{className:"svc-image-question-controls"},this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-question-controls__button svc-image-question-controls__choose-file",onClick:function(){return e.imageModel.chooseFile(e.imageModel)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-file"}))):null)},t}(_);c.ReactElementFactory.Instance.registerElement("svc-image-question",(function(e){return a.a.createElement(C,e)}));var x=function(e){function t(t){var n=e.call(this,t)||this;return n.modelValue=n.createQuestionViewModel(),n}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionRatingAdornerViewModel(this.props.componentData,this.props.question,null)},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 a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-rating-question-content"},a.a.createElement("div",{className:"svc-rating-question-controls svc-item-value-controls"},e.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":e.removeTooltip,onClick:function(){return e.removeItem(e)}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null,e.allowAdd?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":e.addTooltip,onClick:function(){return e.addItem(e)}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):null),this.props.element))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-rating-question",(function(e){return a.a.createElement(x,e)})),c.ReactElementFactory.Instance.registerElement("svc-rating-question-content",(function(e){return a.a.createElement(x,e)}));var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"widgetModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderElementContent=function(){return a.a.createElement("div",{className:"svc-widget__content"},this.props.element)},t}(_);c.ReactElementFactory.Instance.registerElement("svc-widget-question",(function(e){return a.a.createElement(R,e)}));var P=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.QuestionAdornerViewModel(n.props.componentData,n.props.question,null),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return this.model.isDragged?null:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},a.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-cell-question",(function(e){return a.a.createElement(P,e)}));var M=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.QuestionAdornerViewModel(n.props.componentData,n.props.question,null),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){if(this.model.isDragged)return null;var e=this.props.question,t=this.props.question.textStyle;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},a.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element,a.a.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map((function(n,r){return a.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(r)},c.ReactSurveyElementsWrapper.wrapItemValue(e.survey,c.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:r,isChecked:e.value===n.value}),e,n))}))))))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",(function(e){return a.a.createElement(M,e)}));var k=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.PageAdorner(n.props.creator,n.props.page),n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.model.onPageSelectedCallback=function(){t.rootRef.current&&l.SurveyHelper.scrollIntoViewIfNeeded(t.rootRef.current)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.dispose()},t.prototype.canRender=function(){return!!this.model&&this.model.isPageLive&&!!this.model.page&&!!this.model.page.survey},t.prototype.renderElement=function(){var e=this;return this.props.page?Object(c.attachKey2click)(a.a.createElement("div",{ref:this.rootRef,className:"svc-page__content "+this.model.css,id:this.props.page.id,onClick:function(t){return e.model.select(e.model,new E(t))},onMouseLeave:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},this.renderHeader(),this.renderContent(),this.renderFooter())):null},t.prototype.renderContent=function(){return a.a.createElement(c.SurveyPage,{page:this.props.page,survey:this.props.survey,creator:this.props.creator,css:this.model.css})},t.prototype.renderHeader=function(){return a.a.createElement("div",{className:"svc-page__content-actions"},a.a.createElement(c.SurveyActionBar,{model:this.model.actionContainer}))},t.prototype.renderFooter=function(){var e=this;if(!this.model.allowEdit)return null;var t=this.model.questionTypeSelectorModel;return Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-page__add-new-question svc-btn",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion(e.model,new E(t))},onMouseOver:function(t){return e.model.hoverStopper(t.nativeEvent,t.currentTarget)}},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText),Object(c.attachKey2click)(a.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.action()},className:"svc-page__question-type-selector",title:this.model.addNewQuestionText},a.a.createElement("span",{className:"svc-page__question-type-selector-icon"},a.a.createElement(c.SvgIcon,{iconName:t.iconName,size:24})),a.a.createElement(c.Popup,{model:t.popupModel})))))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-page",(function(e){return a.a.createElement(k,e)}));var I=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.renderElementPlaceholder=function(){var e=this;return this.model.isEmptyElement?a.a.createElement("div",{className:"svc-panel__placeholder_frame"},a.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-panel__add-new-question svc-action-button",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion()}},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText))):null):null},t.prototype.renderFooter=function(){var t=this;return a.a.createElement(a.a.Fragment,null,!this.model.isEmptyElement&&this.model.element.isPanel&&this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-panel__add-new-question-container"},a.a.createElement("div",{className:"svc-panel__add-new-question svc-action-button",onClick:function(e){e.stopPropagation(),t.model.addNewQuestion()}},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText)),Object(c.attachKey2click)(a.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.model.questionTypeSelectorModel.action()},className:"svc-panel__question-type-selector",title:this.model.addNewQuestionText},a.a.createElement("span",{className:"svc-panel__question-type-selector-icon"},a.a.createElement(c.SvgIcon,{iconName:this.model.questionTypeSelectorModel.iconName,size:24})),a.a.createElement(c.Popup,{model:this.model.questionTypeSelectorModel.popupModel}))))):null,e.prototype.renderFooter.call(this))},t}(_);c.ReactElementFactory.Instance.registerElement("svc-panel",(function(e){return a.a.createElement(I,e)}));var D=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.LogoImageViewModel(t.data,null),n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.root=this.rootRef.current},t.prototype.render=function(){var e=this,t=null;return t=this.model.survey.locLogo.renderedHtml?a.a.createElement(a.a.Fragment,null,a.a.createElement(c.LogoImage,{data:this.props.data.survey}),this.model.allowEdit?a.a.createElement("div",{className:"svc-image-item-value-controls"},Object(c.attachKey2click)(a.a.createElement(c.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",size:24,iconName:"icon-file",onClick:function(){return e.model.chooseFile(e.model)}})),Object(c.attachKey2click)(a.a.createElement(c.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",size:24,iconName:"icon-delete",onClick:function(){return e.model.remove(e.model)}}))):null):this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-logo-image-placeholder",onClick:function(){return e.model.chooseFile(e.model)}},this.model.chooseLogoPlaceholder)):null,a.a.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},a.a.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input"}),t)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-logo-image",(function(e){return a.a.createElement(D,e)}));var T=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.renderElement=function(){var e=this,t=this.props.classes+" svc-action-button";return this.props.selected&&(t+=" svc-action-button--selected"),this.props.disabled?(t+=" svc-action-button--disabled",a.a.createElement("span",{className:t},this.props.text)):a.a.createElement(a.a.Fragment,null,Object(c.attachKey2click)(a.a.createElement("span",{role:"button",className:t,onClick:function(t){t.stopPropagation(),e.props.click()},title:this.props.title},this.props.text)))},t}(c.SurveyElementBase),O=function(e){function t(t){return e.call(this,t)||this}return r(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?a.a.createElement(T,{classes:this.question.linkClearButtonCssClasses,click:function(){return e.question.doClearClick()},selected:this.question.isSelected,text:l.editorLocalization.getString("pe.clear")}):null},t.prototype.renderElement=function(){var e=this;return a.a.createElement(a.a.Fragment,null,a.a.createElement(T,{classes:this.question.linkSetButtonCssClasses,click:function(){return e.question.doLinkClick()},selected:this.question.isSelected,disabled:this.question.isReadOnly,text:this.question.linkValueText,title:this.question.tooltip}),this.renderClear())},t}(c.SurveyQuestionElementBase);c.ReactQuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return a.a.createElement(O,e)}));var j=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.props.element||this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.embeddedSurvey)return null;var e=this.embeddedSurvey.embeddedSurvey;return e&&e.currentPage?a.a.createElement(c.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator}):null},t}(c.SurveyQuestionElementBase);c.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return a.a.createElement(j,e)}));var F=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.createQuestionElement=function(e){return c.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 a.a.createElement(a.a.Fragment,null,a.a.createElement(c.SurveyQuestion,{creator:this,element:e}))},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-question-editor-content",(function(e){return a.a.createElement(F,e)}));var q=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.ItemValueWrapperViewModel(n.props.componentData.creator,n.props.question,n.props.item),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=this.model.allowAdd?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":this.model.tooltip,onClick:function(){return e.model.add(e.model)}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):a.a.createElement(a.a.Fragment,null," ",this.model.isDraggable?a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__drag","aria-label":this.model.dragTooltip},a.a.createElement(c.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:24,iconName:"icon-drag-area-indicator"})):null,this.model.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":this.model.tooltip,onClick:function(){return e.model.remove(e.model)}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null);return a.a.createElement("div",{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: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)}},a.a.createElement("div",{className:"svc-item-value__ghost"}),a.a.createElement("div",{className:"svc-item-value-controls"},t),a.a.createElement("div",{className:"svc-item-value__item",onClick:function(t){return e.model.select(e.model,t)}},this.props.element))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-item-value",(function(e){return a.a.createElement(q,e)}));var B=function(e){function t(t){var n=e.call(this,t)||this;return n.preventDragHandler=function(e){e.preventDefault()},n.model=new l.ImageItemValueWrapperViewModel(n.props.componentData.creator,n.props.question,n.props.item,null,null),n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.itemsRoot=this.rootRef.current},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=!this.props.question.isItemInList(this.props.item),n=this.props.question.imageWidth,r=this.props.question.imageHeight,o=null;return o=t?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-image-item-value__item"},a.a.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},a.a.createElement("label",{className:"sd-imagepicker__label"},a.a.createElement("div",{style:{width:n?n+"px":void 0,height:r?r+"px":void 0},className:"sd-imagepicker__image"})))),a.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowAdd?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__add",onClick:function(){return e.model.chooseNewFile(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-add-lg"}))):null)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-image-item-value__item"},this.props.element),a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__drag-area-indicator",onPointerDown:function(t){return e.model.onPointerDown(t)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-drag-area-indicator"})),a.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",onClick:function(){return e.model.chooseFile(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-file"}))):null,this.model.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",onClick:function(){return e.model.remove(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-delete"}))):null)),a.a.createElement("div",{ref:this.rootRef,className:"svc-image-item-value-wrapper"+(t?" svc-image-item-value--new":"")+(this.model.isDragDropGhost?" svc-image-item-value-wrapper--ghost":""),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},a.a.createElement("div",{className:"svc-image-item-value-wrapper__ghost"}),a.a.createElement("div",{className:"svc-image-item-value-wrapper__content"},a.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),o))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-image-item-value",(function(e){return a.a.createElement(B,e)}));var V=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.componentData;return n.model=new l.MatrixCellWrapperViewModel(r.creator,r.element,r.question,r.row,r.column),n}return r(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=this.props.componentData;this.model.templateData=r.element,this.model.row=r.row,this.model.column=r.column,this.model.question=r.question},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=null;return this.model.question&&(t=a.a.createElement("div",{className:"svc-matrix-cell__question-controls"},Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-matrix-cell__question-controls-button",onClick:function(){return e.model.editQuestion(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-edit"}))))),a.a.createElement("div",{className:"svc-matrix-cell",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)}},a.a.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,t)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-matrix-cell",(function(e){return a.a.createElement(V,e)}));var Q=function(e){function t(t){var n=e.call(this,t)||this;return t.survey&&(n.model=new l.SurveyResultsModel(t.survey)),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return this.model?a.a.createElement("div",{className:"svd-test-results"},a.a.createElement("div",{className:"svd-test-results__header"},a.a.createElement("div",{className:"svd-test-results__header-text"},this.model.surveyResultsText),a.a.createElement("div",{className:"svd-test-results__header-types"},a.a.createElement(T,{click:function(){return e.model.selectTableClick()},text:this.model.getLocString("ed.surveyResultsTable"),selected:this.model.isTableSelected,disabled:!1}),a.a.createElement(T,{click:function(){return e.model.selectJsonClick()},text:this.model.getLocString("ed.surveyResultsJson"),selected:this.model.isJsonSelected,disabled:!1}))),this.renderResultAsText(),this.renderResultAsTable()):null},t.prototype.renderResultAsText=function(){return"text"!==this.model.resultViewType?null:a.a.createElement("div",{className:"svd-test-results__text svd-light-bg-color"},a.a.createElement("div",null,this.model.resultText))},t.prototype.renderResultAsTable=function(){return"table"!==this.model.resultViewType?null:a.a.createElement("div",{className:"svd-test-results__table svd-light-bg-color"},a.a.createElement("table",null,a.a.createElement("thead",null,a.a.createElement("tr",{className:"svd-light-background-color"},a.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsTitle),a.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsDisplayValue))),a.a.createElement("tbody",null,t.renderRows(this.model.resultData))))},t.renderRows=function(e){return e.map((function(e){return a.a.createElement(A,{key:e.id,row:e})}))},t}(c.SurveyElementBase),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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 a.a.createElement(a.a.Fragment,null,Object(c.attachKey2click)(a.a.createElement("tr",{onClick:function(){return e.row.toggle()}},a.a.createElement("td",{style:{paddingLeft:this.row.textMargin},className:"svd-dark-border-color"},this.row.isNode?a.a.createElement("span",{style:{left:this.row.markerMargin},className:"svd-test-results__marker "+(this.row.collapsed?"":"svd-test-results__marker--expanded")},a.a.createElement(c.SvgIcon,{iconName:"icon-expand_16x16",size:16})):null,a.a.createElement("span",null,this.row.title)),a.a.createElement("td",{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?Q.renderRows(this.row.data):null)},t}(c.SurveyElementBase),L=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.ToolboxToolViewModel(n.item,n.props.creator),n}return r(t,e),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,n="svc-toolbox__tool "+t.css+(t.isVisible?"":" sv-action--hidden"),r=c.ReactElementFactory.Instance.createElement(this.item.component||"svc-toolbox-item",{item:this.item,creator:this.creator,isCompact:this.isCompact});return a.a.createElement("div",{className:n,key:t.id,onPointerDown:function(t){t.persist(),e.model.onPointerDown(t)}},a.a.createElement("div",{className:"sv-action__content"},this.isCompact&&t.needSeparator?a.a.createElement("div",{className:"svc-toolbox__category-separator"}):null,r))},t}(c.SurveyElementBase),U=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.item;return n.model=new l.ToolboxToolViewModel(r,n.props.creator),n}return r(t,e),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}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t="svc-toolbox__item svc-toolbox__item--"+this.item.iconName;return Object(c.attachKey2click)(a.a.createElement("div",{className:t,tabIndex:0,role:"button","aria-label":this.item.tooltip+" "+l.editorLocalization.getString("toolbox")+" item",onClick:function(t){t.persist(),e.model.click(t)}},a.a.createElement("span",{className:"svc-toolbox__item-container"},a.a.createElement(c.SvgIcon,{size:24,iconName:this.item.iconName})),this.props.isCompact?a.a.createElement("span",{className:"svc-toolbox__item-banner svc-item__banner"},a.a.createElement(c.SvgIcon,{size:24,iconName:this.item.iconName,className:"svc-toolbox__item-icon"}),a.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)):a.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-toolbox-item",(function(e){return a.a.createElement(U,e)}));var H=function(e){function t(t){return e.call(this,t)||this}return r(t,e),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.render=function(){return this.toolbox.hasActions?a.a.createElement("div",{className:"svc-toolbox"},a.a.createElement("div",{className:"svc-toolbox__container"},1==this.toolbox.categories.length?a.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.visibleActions)):this.renderCategories())):null},t.prototype.renderItems=function(e){var t=this;return e.map((function(e,n){return a.a.createElement(L,{item:e,creator:t.creator,key:"item"+n,isCompact:!1})}))},t.prototype.renderCategories=function(){var e=this;return this.toolbox.categories.map((function(t){var n=e.renderCategoryHeader(t),r=e.renderCategoryContent(t);return a.a.createElement("div",{className:"svc-toolbox__category",key:t.name},n,r)}))},t.prototype.renderCategoryHeader=function(e){var t=e.collapsed?"arrow-down":"arrow-up",n="svc-toolbox__category-header__button svc-string-editor__button--"+(e.collapsed?"expand":"collapse");return Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-toolbox__category-header",onClick:function(t){return e.toggleState()}},a.a.createElement("span",{className:"svc-toolbox__category-title"},e.name),a.a.createElement("div",{className:"svc-toolbox__category-header__controls"},a.a.createElement(c.SvgIcon,{className:n,iconName:"icon-"+t,size:24}))))},t.prototype.renderCategoryContent=function(e){return e.collapsed?[]:this.renderItems(e.items)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-toolbox",(function(e){return a.a.createElement(H,e)}));var K=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new u.VerticalResponsivityManager(t,this.toolbox,".svc-toolbox__tool:not(.sv-dots)>.sv-action__content",44,44))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t.prototype.render=function(){if(!this.toolbox.hasActions)return null;var e="svc-toolbox"+(this.toolbox.isCompact?" svc-toolbox--compact":"");return a.a.createElement("div",{ref:this.rootRef,className:e},a.a.createElement("div",{className:"svc-toolbox__container"},this.toolbox.isCompact||1==this.toolbox.categories.length?a.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompact)):this.renderCategories()))},t.prototype.renderItems=function(e,t){var n=this;return e.map((function(e,r){return a.a.createElement(L,{item:e,creator:n.creator,isCompact:t,key:"item"+r})}))},t.prototype.renderCategoryContent=function(e){var t=[];return e.collapsed||(t=this.renderItems(e.items,!1)),t},t}(H);c.ReactElementFactory.Instance.registerElement("svc-adaptive-toolbox",(function(e){return a.a.createElement(K,e)}));var W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPropChangedHandler=function(e,n){if(!t.isRendering){var r=["showProgressBar","progressBarType","currentPageValue"];if(!(r.indexOf(n.name)<0)){for(var o={},a=0;a<r.length;a++){var i=r[a];o[i]=t.survey[i]}t.setState(o)}}},t}return r(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 c.ReactElementFactory.Instance.createElement("sv-progress-"+this.survey.progressBarType.toLowerCase(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})},t}(c.SurveyElementBase),z=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=a.a.createRef(),n}return r(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.visible?"":"none"},n="svc-side-bar"+(this.model.flyoutPanelMode?" svc-flyout-side-bar":""),r=this.model.tabs.map((function(e){return a.a.createElement(G,{item:e,key:e.id})}));return a.a.createElement("div",{className:n,style:{display:this.model.hasVisibleTabs?"":"none"}},a.a.createElement("div",{className:"svc-side-bar__shadow"}),a.a.createElement("div",{className:"svc-flex-column svc-side-bar__wrapper"},a.a.createElement("div",{ref:this.containerRef,style:t,className:"svc-side-bar__container"},a.a.createElement("div",{className:"svc-side-bar__container-header"},a.a.createElement("div",{className:"svc-side-bar__container-actions"},a.a.createElement(c.SurveyActionBar,{model:this.model.toolbar})),a.a.createElement("div",{className:"svc-side-bar__container-title"},this.model.headerText)),a.a.createElement("div",{className:"svc-side-bar__container-content"},r),a.a.createElement("div",{className:"svc-side-bar__container-close"},a.a.createElement("div",{className:"sd-btn sd-btn--action svc-side-bar__container-close-button",onClick:function(){return e.model.collapseSidebar()}}," ",this.model.closeText," ")))))},t}(c.SurveyElementBase),G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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(){return this.item.visible?c.ReactElementFactory.Instance.createElement(this.item.componentName,{model:this.item.model}):null},t}(c.SurveyElementBase);c.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-tab",(function(e){return a.a.createElement(G,e)}));c.ReactElementFactory.Instance.registerElement("svc-side-bar",(function(e){return a.a.createElement(z,e)}));var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return a.a.createElement("div",{className:"sd-translation-line-skeleton"})},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",(function(e){return a.a.createElement(J,e)}));var X=function(e){function t(t){var n=e.call(this,t)||this;return n.blurredByEscape=!1,n.onBlur=function(e){return n.svStringEditorRef.current.spellcheck=!1,n.locString.__isEditing=!1,n.justFocused=!1,n.baseModel.onInput(e.nativeEvent),n.baseModel.errorText},n.justFocused=!1,n.onFocus=function(e){n.baseModel.onFocus(e.nativeEvent),n.justFocused=!0},n.onKeyDown=function(e){return n.baseModel.onKeyDown(e.nativeEvent)},n.onMouseUp=function(e){return n.baseModel.onMouseUp(e.nativeEvent)},n.done=function(e){n.baseModel.done(e),n.locString.__isEditing=!1},n.edit=function(e){n.svStringEditorRef.current.focus(),n.locString.__isEditing=!0,n.baseModel.onClick(e)},n.state={changed:0},n.baseModel=new l.StringEditorViewModelBase(n.locString,n.creator),n.svStringEditorRef=a.a.createRef(),n.baseModel.blurEditor=function(){n.svStringEditorRef.current.blur(),n.svStringEditorRef.current.spellcheck=!1},n}return r(t,e),Object.defineProperty(t.prototype,"locString",{get:function(){return this.props.locStr.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.locStr.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(){if(e.prototype.componentDidMount.call(this),this.locString){var t=this;this.locString.onChanged=function(){t.setState({changed:t.state.changed+1})},this.locString.__isEditing&&this.svStringEditorRef.current.focus()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.locString&&(this.locString.onChanged=function(){})},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;this.baseModel.setLocString(this.locString);var e=null;if(this.locString.hasHtml){var t={__html:this.baseModel.focused&&this.locString.text||this.locString.renderedHtml};e=a.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:t,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit})}else e=a.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit},this.locString.renderedHtml);return a.a.createElement("span",{className:this.className},a.a.createElement("span",{className:"svc-string-editor__content"},a.a.createElement("div",{className:"svc-string-editor__border",onClick:this.edit},a.a.createElement(c.SvgIcon,{className:"svc-string-editor__button svc-string-editor__button--edit",size:16,iconName:"icon-edit"})),e,a.a.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit})),this.errorText?a.a.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement(l.editableStringRendererName,(function(e){return a.a.createElement(X,e)}));var Y=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=a.a.createRef(),n.model=new l.PageNavigatorViewModel(t.pagesController,t.pageEditMode),n}return r(t,e),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;if(t){var n=this;t.parentElement.parentElement.onscroll=function(e){return n.model.onContainerScroll(e.currentTarget)}}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.containerRef.current;t&&(t.parentElement.parentElement.onscroll=void 0),this.model.dispose()},t.prototype.renderElement=function(){var e=this,t="svc-page-navigator__selector";return this.model.isPopupOpened&&(t+=" svc-page-navigator__selector--opened"),a.a.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},Object(c.attachKey2click)(a.a.createElement("div",{className:t,onClick:function(){return e.model.togglePageSelector()},title:this.model.pageSelectorCaption},a.a.createElement(c.SvgIcon,{className:"svc-page-navigator__navigator-icon",iconName:this.model.icon,size:24}),a.a.createElement(c.Popup,{model:this.model.popupModel}))),this.model.items.map((function(e){return a.a.createElement(Z,{key:e.id,item:e})})))},t}(c.SurveyElementBase),Z=function(e){function t(t){return e.call(this,t)||this}return r(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 Object(u.unwrap)(e.active)&&(t+=" svc-page-navigator-item--selected"),Object(u.unwrap)(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),a.a.createElement("div",{className:"svc-page-navigator-item"},Object(c.attachKey2click)(a.a.createElement("div",{className:t,onClick:function(t){e.action(e),t.stopPropagation()}},a.a.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title}),a.a.createElement("div",{className:"svc-page-navigator-item__banner svc-item__banner"},a.a.createElement("span",{className:"svc-text svc-text--small svc-text--bold"},e.title),a.a.createElement("span",{className:"svc-page-navigator-item__dot"})))))},t}(c.SurveyElementBase),$=function(e){function t(t){var n=e.call(this,t)||this;return n.denyUpdate=function(){n.denyComponentUpdate()},n.allowUpdate=function(){n.allowComponentUpdate()},n.addDragDropEvents=function(){n.creator.onBeforeDrop.add(n.denyUpdate),n.creator.onAfterDrop.add(n.allowUpdate)},n.clearDragDropEvents=function(){n.creator.onBeforeDrop.remove(n.denyUpdate),n.creator.onAfterDrop.remove(n.allowUpdate)},n.renderedPagesCache={},n}return r(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;"pages"!==this.changedStatePropName&&(this.renderedPagesCache={});var t=[];if("bypage"!==this.creator.pageEditMode){this.creator.survey.pages.forEach((function(n,r){var o=e.renderedPagesCache[n.id];o||(o=e.createRenderedPage(n,r),e.renderedPagesCache[n.id]=o),t.push(o)})),this.model.showNewPage&&t.push(this.renderNewPage("svc-page",this.model.newPage.id+"-ghost-new-page"))}else{var n=this.model.pagesController.page2Display,r=this.renderedPagesCache[n.id];r||(r=this.createRenderedPage(n,0),this.renderedPagesCache[n.id]=r),t.push(r)}return t},t.prototype.createRenderedPage=function(e,t){return a.a.createElement("div",{className:"svc-page","data-sv-drop-target-page":e.name,"data-sv-drop-target-survey-element":e.name,key:e.id+"-"+t},this.renderPage(e))},t.prototype.renderNewPage=function(e,t){return void 0===t&&(t=""),a.a.createElement(a.a.Fragment,{key:t},a.a.createElement("div",{className:e,"data-sv-drop-target-survey-element":"newGhostPage"},this.model.newPage?this.renderPage(this.model.newPage):null))},t.prototype.renderPage=function(e){return c.ReactElementFactory.Instance.createElement("svc-page",{survey:this.creator.survey,page:e,creator:this.creator})},t.prototype.renderElement=function(){var e=this,t="svc-tab-designer "+this.model.getRootCss();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?c.ReactElementFactory.Instance.createElement("svc-adaptive-toolbox",{model:this.creator}):null),a.a.createElement("div",{className:t,onClick:function(){return e.model.clickDesigner()}},a.a.createElement("div",{className:"svc-tab-designer_content"},this.model.showPlaceholder?this.renderPlaceHolder():this.renderTabContent())))},t.prototype.renderPlaceHolder=function(){return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-designer__placeholder-container"},a.a.createElement("span",{className:"svc-designer-placeholder-text svc-text svc-text--normal"},this.model.placeholderText),this.renderNewPage("svc-designer-placeholder-page")))},t.prototype.renderTabContent=function(){var e=this.creator.survey;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:this.model.getDesignerCss()},this.creator.allowEditSurveyTitle?a.a.createElement("div",{className:"svc-designer-header"},a.a.createElement(c.SurveyHeader,{survey:e})):null,a.a.createElement(W,{survey:e,location:"top"}),this.getRenderedPages(),a.a.createElement(W,{survey:e,location:"bottom",css:e.css})),this.creator.showPageNavigator?a.a.createElement("div",{className:"svc-tab-designer__page-navigator"},a.a.createElement(Y,{pagesController:this.model.pagesController,pageEditMode:this.model.creator.pageEditMode})):null)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-designer",(function(e){return a.a.createElement($,e)}));var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){return a.a.createElement("div",{className:"svc-creator-tab__content svc-embed-tab__content"},this.model.survey?a.a.createElement(c.Survey,{model:this.model.survey}):null)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-embed",(function(e){return a.a.createElement(ee,e)}));var te=function(e){function t(t){var n=e.call(this,t)||this;return n.aceEditorrRef=a.a.createRef(),n}return r(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(){return a.a.createElement("div",{className:"svc-creator-tab__content"},a.a.createElement("div",{className:"svc-json-editor-tab__content"},a.a.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef})))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",(function(e){return a.a.createElement(te,e)}));var ne=function(e){function t(t){var n=e.call(this,t)||this;return n.model.canShowErrors=!1,n}return r(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(){for(var e=this,t=[],n=1,r=this.model.userFriendlyErrors,o=0;o<r.length;o++)t.push(a.a.createElement("span",{key:n},a.a.createElement("b",null,"Error: "))),n++,t.push(a.a.createElement("span",{key:n},r[o])),n++;return a.a.createElement("div",{className:"svc-creator-tab__content"},a.a.createElement("div",{className:"svc-json-editor-tab__content"},a.a.createElement("textarea",{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.length>0&&a.a.createElement("button",{type:"button",className:"svc-json-editor-tab__errros_button",onClick:function(){return e.model.toggleErrors()}},this.model.errorButtonText),this.model.canShowErrors&&a.a.createElement("div",{className:"svc-json-editor-tab__content-errors"},t)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",(function(e){return a.a.createElement(ne,e)}));var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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 Object(c.attachKey2click)(a.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:t,title:this.model.title},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button",(function(e){return a.a.createElement(re,e)}));var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){this.model;var e=this.renderViewContent();return a.a.createElement("div",{className:"svc-creator-tab__content"},e)},t.prototype.renderViewContent=function(){var e="svc-plugin-tab__content svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab__empty"),t=this.model.readOnly?void 0:a.a.createElement(re,{button:this.model.addNewButton});return a.a.createElement(o.Fragment,null,a.a.createElement("div",{className:e},a.a.createElement(c.Survey,{model:this.model.itemsSurvey}),this.model.hasItems?null:a.a.createElement("div",{className:"svc-logic-tab__content-empty"},a.a.createElement("span",{className:"svc-text"},this.model.emptyTabPlaceHolder)),t))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-logic",(function(e){return a.a.createElement(oe,e)}));var ae=function(e){function t(t){return e.call(this,t)||this}return r(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="svd-simulator-main"+("desktop"===this.model.device?" svd-simulator-main--desktop":"");return this.model.survey?this.model.hasFrame?a.a.createElement("div",{className:e+" "+this.model.simulatorMainCssClass},a.a.createElement("div",{className:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},a.a.createElement("div",{className:"svd-simulator-frame "+this.model.simulatorFrame.cssClass,style:{width:this.model.simulatorFrame.landscapedFrameWidth+"px",height:this.model.simulatorFrame.landscapedFrameHeight+"px"}}),a.a.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%)"}},a.a.createElement("div",{className:"svd-simulator-content"},a.a.createElement(c.Survey,{model:this.model.survey}))))):a.a.createElement("div",{className:e},a.a.createElement("div",{className:"svd-simulator-content"},a.a.createElement(c.Survey,{model:this.model.survey}))):a.a.createElement("div",{className:e})},t}(c.SurveyElementBase),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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;return Object(c.attachKey2click)(a.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:"svc-preview__test-again svc-btn",title:this.model.title},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-preview-test-again",(function(e){return a.a.createElement(ie,e)}));var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return a.a.createElement("div",{className:e},a.a.createElement("div",{className:"svc-plugin-tab__content"},a.a.createElement(ae,{model:this.model.simulator}),this.model.isRunning?null:a.a.createElement(ie,{button:this.model.testAgainAction}),this.model.isRunning?null:a.a.createElement(Q,{survey:this.model.simulator.survey})),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?a.a.createElement("div",{className:"svc-test-tab__content-actions"},a.a.createElement(c.SurveyActionBar,{model:this.model.pages})):null},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-test",(function(e){return a.a.createElement(se,e)}));var ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){return this.model?a.a.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"},this.renderElementContent()):null},t.prototype.renderElementContent=function(){return this.model.isEmpty?a.a.createElement("div",{className:"st-no-strings"},a.a.createElement("span",null,this.model.noStringsText)):a.a.createElement("div",{className:"st-content"},a.a.createElement("div",{className:"svc-flex-column st-strings-wrapper"},a.a.createElement("div",{className:"svc-flex-row st-strings-header"},a.a.createElement(c.Survey,{model:this.model.stringsHeaderSurvey})),a.a.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},a.a.createElement(c.Survey,{model:this.model.stringsSurvey}))))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-translation",(function(e){return a.a.createElement(ce,e)}));var le=function(e){function t(t){return e.call(this,t)||this}return r(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?a.a.createElement("div",{className:"svc-object-selector"},a.a.createElement(c.List,{model:this.model.list})):null},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-object-selector",(function(e){return a.a.createElement(le,e)}));var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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 a.a.createElement(c.Survey,{model:this.model.survey})},t}(c.SurveyElementBase);c.ReactQuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return a.a.createElement(c.SurveyQuestionButtonGroup,e)}));var me;c.ReactElementFactory.Instance.registerElement("svc-property-grid",(function(e){return a.a.createElement(ue,e)})),me="".concat("1.9.24")}])}));
7
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-react-ui"),require("survey-creator-core"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("SurveyCreator",["react","survey-react-ui","survey-creator-core","survey-core","react-dom"],t):"object"==typeof exports?exports.SurveyCreator=t(require("react"),require("survey-react-ui"),require("survey-creator-core"),require("survey-core"),require("react-dom")):e.SurveyCreator=t(e.React,e.SurveyReact,e.SurveyCreatorCore,e.Survey,e.ReactDOM)}(this,(function(e,t,n,r,o){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";n.r(t),n.d(t,"Version",(function(){return me})),n.d(t,"SurveyCreatorComponent",(function(){return f})),n.d(t,"SurveyCreator",(function(){return y})),n.d(t,"RowWrapper",(function(){return g})),n.d(t,"QuestionAdornerComponent",(function(){return _})),n.d(t,"QuestionWrapperHeader",(function(){return N})),n.d(t,"QuestionWrapperFooter",(function(){return S})),n.d(t,"QuestionDropdownAdornerComponent",(function(){return w})),n.d(t,"QuestionImageAdornerComponent",(function(){return C})),n.d(t,"QuestionRatingAdornerComponent",(function(){return x})),n.d(t,"QuestionWidgetAdornerComponent",(function(){return R})),n.d(t,"CellQuestionAdornerComponent",(function(){return P})),n.d(t,"CellQuestionDropdownAdornerComponent",(function(){return M})),n.d(t,"CreatorSurveyPageComponent",(function(){return k})),n.d(t,"PanelAdornerComponent",(function(){return I})),n.d(t,"LogoImageComponent",(function(){return T})),n.d(t,"SurveyQuestionLinkValue",(function(){return O})),n.d(t,"SurveyElementEmbeddedSurvey",(function(){return j})),n.d(t,"QuestionEditorContentComponent",(function(){return F})),n.d(t,"ItemValueAdornerComponent",(function(){return q})),n.d(t,"ImageItemValueAdornerComponent",(function(){return B})),n.d(t,"MatrixCellAdornerComponent",(function(){return V})),n.d(t,"SurveyResults",(function(){return Q})),n.d(t,"SurveyResultsByRow",(function(){return A})),n.d(t,"SurveyCreatorToolboxTool",(function(){return L})),n.d(t,"SurveyCreatorToolboxItem",(function(){return U})),n.d(t,"Toolbox",(function(){return K})),n.d(t,"AdaptiveToolbox",(function(){return H})),n.d(t,"TabbedMenuComponent",(function(){return m})),n.d(t,"TabbedMenuItemComponent",(function(){return p})),n.d(t,"NotifierComponent",(function(){return v})),n.d(t,"SurveyNavigation",(function(){return W})),n.d(t,"SidebarComponent",(function(){return z})),n.d(t,"TranslationLineSkeleton",(function(){return J})),n.d(t,"ActionButton",(function(){return D})),n.d(t,"SurveyLocStringEditor",(function(){return X})),n.d(t,"TabDesignerComponent",(function(){return $})),n.d(t,"TabEmbedComponent",(function(){return ee})),n.d(t,"TabJsonEditorAceComponent",(function(){return te})),n.d(t,"TabJsonEditorTextareaComponent",(function(){return ne})),n.d(t,"TabLogicAddButtonComponent",(function(){return re})),n.d(t,"TabLogicComponent",(function(){return oe})),n.d(t,"TabPreviewTestSurveyAgainComponent",(function(){return ie})),n.d(t,"TabPreviewSurveyComponent",(function(){return se})),n.d(t,"TabTranslationComponent",(function(){return ce})),n.d(t,"SurveySimulator",(function(){return ae})),n.d(t,"ReactMouseEvent",(function(){return E})),n.d(t,"ReactDragEvent",(function(){return b})),n.d(t,"PropertyGridComponent",(function(){return ue})),n.d(t,"editorLocalization",(function(){return l.editorLocalization})),n.d(t,"localization",(function(){return l.localization})),n.d(t,"settings",(function(){return l.settings})),n.d(t,"svgBundle",(function(){return l.svgBundle})),n.d(t,"SurveyLogic",(function(){return l.SurveyLogic})),n.d(t,"SurveyLogicUI",(function(){return l.SurveyLogicUI})),n.d(t,"SurveyQuestionEditorDefinition",(function(){return l.SurveyQuestionEditorDefinition})),n.d(t,"ToolboxToolViewModel",(function(){return l.ToolboxToolViewModel})),n.d(t,"PropertyGridEditorCollection",(function(){return l.PropertyGridEditorCollection})),n.d(t,"StylesManager",(function(){return l.StylesManager}));Object.assign;function r(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=n(0),a=n.n(o),i=n(4),s=n.n(i),c=n(1),l=n(2),u=n(3),m=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=a.a.createRef(),n}return r(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 a.a.createElement(d,{item:e,key:e.id})}));return a.a.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu"},e)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new u.ResponsivityManager(t,this.model,".svc-tabbed-menu-item-container:not(.sv-dots)>.sv-action__content"))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t}(c.SurveyElementBase),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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=c.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return a.a.createElement("span",{key:this.item.id,className:e},a.a.createElement("div",{className:"sv-action__content"},t))},t}(c.SurveyElementBase),p=function(e){function t(t){return e.call(this,t)||this}return r(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,t="svc-tabbed-menu-item";e.active&&(t+=" svc-tabbed-menu-item--selected"),void 0===e.enabled||e.enabled||(t+=" svc-tabbed-menu-item--disabled");var n="svc-text svc-tabbed-menu-item__text svc-text--normal";return e.active&&(n+=" svc-text--bold"),Object(c.attachKey2click)(a.a.createElement("div",{className:t,onClick:function(){return e.action(e)}},a.a.createElement("span",{className:n},e.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",(function(e){return a.a.createElement(p,e)}));var v=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){return this.notifier.active?a.a.createElement("div",{className:this.notifier.css},a.a.createElement("span",null,this.notifier.message)):null},t}(c.SurveyElementBase),h=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=a.a.createRef(),n}return r(t,e),t.prototype.componentDidMount=function(){this.containerRef.current&&(this.containerRef.current.innerHTML=u.SvgRegistry.iconsRenderedHtml())},t.prototype.render=function(){return a.a.createElement("svg",{style:{display:"none"},id:"sv-icon-holder-global-container",ref:this.containerRef})},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-svg-bundle",(function(e){return a.a.createElement(h,e)}));var f=function(e){function t(t){var n=e.call(this,t)||this;return n.rootNode=a.a.createRef(),n}return r(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.props.creator},Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.creator.initKeyboardShortcuts(this.rootNode.current),this.creator.initResponsivityManager(this.rootNode.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.creator.removeKeyboardShortcuts(this.rootNode.current),this.creator.resetResponsivityManager()},t.prototype.renderElement=function(){var e=this.props.creator;if(e.isCreatorDisposed)return null;var t="svc-creator"+(this.props.creator.isMobileView?" svc-creator--mobile":""),n="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":""),o="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sidebarLocation,i=null;return this.props.creator.haveCommercialLicense||(i=a.a.createElement("div",{className:"svc-creator__banner"},a.a.createElement("span",{className:"svc-creator__non-commercial-text"},a.a.createElement("a",{href:"https://surveyjs.io/buy"},this.props.creator.licenseText)))),a.a.createElement("div",{className:t,ref:this.rootNode,style:this.style},a.a.createElement(h,null),a.a.createElement("div",{className:n},a.a.createElement("div",{className:o},a.a.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},a.a.createElement("div",{className:"svc-top-bar"},e.showTabs?a.a.createElement("div",{className:"svc-tabbed-menu-wrapper"},a.a.createElement(m,{model:e.tabbedMenu})):null,e.showToolbar?a.a.createElement("div",{className:"svc-toolbar-wrapper"},a.a.createElement(c.SurveyActionBar,{model:e.toolbar})):null),a.a.createElement("div",{className:r},a.a.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),a.a.createElement("div",{className:"svc-footer-bar"},e.isMobileView?a.a.createElement("div",{className:"svc-toolbar-wrapper"},a.a.createElement(c.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSidebar()),i,a.a.createElement(v,{creator:e,notifier:e.notifier})))},t.prototype.renderActiveTab=function(){for(var e=this.props.creator,t=0;t<e.tabs.length;t++)if(e.tabs[t].id===e.activeTab)return this.renderCreatorTab(e.tabs[t]);return null},t.prototype.renderCreatorTab=function(e){if(!1===e.visible)return null;var t=this.props.creator,n=e.renderTab?e.renderTab():c.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 a.a.createElement("div",{key:e.id,id:"scrollableDiv-"+e.id,className:r},n)},t.prototype.renderSidebar=function(){if(this.creator.sidebar){var e=this.creator.isMobileView?"sv-mobile-side-bar":"";return a.a.createElement("div",{className:e},c.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sidebar}))}return null},t}(c.SurveyElementBase),y=function(e){function t(t,n){return void 0===t&&(t={}),e.call(this,t,n)||this}return r(t,e),t.prototype.render=function(e){var t=e;"string"==typeof e&&(t=document.getElementById(e)),s.a.unmountComponentAtNode(t),s.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(f,{creator:this})),t)},t.prototype.createQuestionElement=function(e){return c.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return a.a.createElement("div",{key:e},a.a.createElement("span",{className:n.error.icon,"aria-hidden":"true"}),a.a.createElement("span",{className:n.error.item},a.a.createElement(c.SurveyLocStringViewer,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(l.CreatorBase);c.ReactElementFactory.Instance.registerElement("survey-widget",(function(e){return a.a.createElement(c.Survey,e)}));var g=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.RowViewModel(n.props.componentData.creator,n.props.row,null),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return a.a.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},this.props.element)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-row",(function(e){return a.a.createElement(g,e)}));var E=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}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.event=t,n}return r(t,e),Object.defineProperty(t.prototype,"dataTransfer",{get:function(){return this.event.dataTransfer},enumerable:!1,configurable:!0}),t}(E),_=function(e){function t(t){var n=e.call(this,t)||this;return n.modelValue=n.createQuestionViewModel(),n}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!this.model.isDragged},t.prototype.renderElement=function(){var e=this.model.element.isInteractiveDesignElement,t=this.renderContent(e);return a.a.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.element.name||null,className:"svc-question__adorner"+this.model.rootCss(),onMouseOut:function(t){return e&&Object(l.toggleHovered)(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e&&Object(l.toggleHovered)(t.nativeEvent,t.currentTarget)}},t)},t.prototype.renderContent=function(e){var t=this,n=this.renderElementContent();return e?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-question__content "+this.model.css(),onClick:function(e){return t.model.select(t.model,new E(e))}},this.renderHeader(),n,this.renderFooter())):a.a.createElement(a.a.Fragment,null,n,this.renderFooter())},t.prototype.renderHeader=function(){return c.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})},t.prototype.renderFooter=function(){return c.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model})},t.prototype.renderElementContent=function(){return a.a.createElement(a.a.Fragment,null,this.props.element,this.renderElementPlaceholder())},t.prototype.renderElementPlaceholder=function(){return this.model.isEmptyElement?a.a.createElement("div",{className:"svc-panel__placeholder_frame"},a.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText)):null},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-question",(function(e){return a.a.createElement(_,e)}));var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this;return this.props.model.allowDragging?a.a.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.props.model.onPointerDown(t)}},a.a.createElement("div",{className:"svc-question__drag-element"})):null},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-question-header",(function(e){return a.a.createElement(N,e)}));var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return a.a.createElement("div",{className:this.props.className},a.a.createElement(c.SurveyActionBar,{model:this.props.model.actionContainer}))},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-question-footer",(function(e){return a.a.createElement(S,e)}));var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.renderElementPlaceholder=function(){var e=this.props.question,t=this.props.question.textStyle;return a.a.createElement("div",{className:"svc-question__dropdown-choices"},(e.visibleChoices||[]).map((function(n,r){return a.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(r)},c.ReactSurveyElementsWrapper.wrapItemValue(e.survey,c.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:r,isChecked:e.value===n.value}),e,n))})))},t}(_);c.ReactElementFactory.Instance.registerElement("svc-dropdown-question",(function(e){return a.a.createElement(w,e)}));var C=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionImageAdornerViewModel(this.props.componentData,this.props.question,null,null)},Object.defineProperty(t.prototype,"imageModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.imageModel.questionRoot=this.rootRef.current},t.prototype.renderHeader=function(){return a.a.createElement(a.a.Fragment,null,a.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),e.prototype.renderHeader.call(this))},t.prototype.renderElementPlaceholder=function(){var e=this;return a.a.createElement("div",{className:"svc-image-question-controls"},this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-question-controls__button svc-image-question-controls__choose-file",onClick:function(){return e.imageModel.chooseFile(e.imageModel)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-file"}))):null)},t}(_);c.ReactElementFactory.Instance.registerElement("svc-image-question",(function(e){return a.a.createElement(C,e)}));var x=function(e){function t(t){var n=e.call(this,t)||this;return n.modelValue=n.createQuestionViewModel(),n}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionRatingAdornerViewModel(this.props.componentData,this.props.question,null)},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 a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-rating-question-content"},a.a.createElement("div",{className:"svc-rating-question-controls svc-item-value-controls"},e.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":e.removeTooltip,onClick:function(){return e.removeItem(e)}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null,e.allowAdd?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":e.addTooltip,onClick:function(){return e.addItem(e)}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):null),this.props.element))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-rating-question",(function(e){return a.a.createElement(x,e)})),c.ReactElementFactory.Instance.registerElement("svc-rating-question-content",(function(e){return a.a.createElement(x,e)}));var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.createQuestionViewModel=function(){return new l.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"widgetModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderElementContent=function(){return a.a.createElement("div",{className:"svc-widget__content"},this.props.element)},t}(_);c.ReactElementFactory.Instance.registerElement("svc-widget-question",(function(e){return a.a.createElement(R,e)}));var P=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.QuestionAdornerViewModel(n.props.componentData,n.props.question,null),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return this.model.isDragged?null:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},a.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-cell-question",(function(e){return a.a.createElement(P,e)}));var M=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.QuestionAdornerViewModel(n.props.componentData,n.props.question,null),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){if(this.model.isDragged)return null;var e=this.props.question,t=this.props.question.textStyle;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},a.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element,a.a.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map((function(n,r){return a.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(r)},c.ReactSurveyElementsWrapper.wrapItemValue(e.survey,c.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:r,isChecked:e.value===n.value}),e,n))}))))))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",(function(e){return a.a.createElement(M,e)}));var k=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.PageAdorner(n.props.creator,n.props.page),n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.model.onPageSelectedCallback=function(){t.rootRef.current&&l.SurveyHelper.scrollIntoViewIfNeeded(t.rootRef.current)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.dispose()},t.prototype.canRender=function(){return!!this.model&&this.model.isPageLive&&!!this.model.page&&!!this.model.page.survey},t.prototype.renderElement=function(){var e=this;return this.props.page?Object(c.attachKey2click)(a.a.createElement("div",{ref:this.rootRef,className:"svc-page__content "+this.model.css,id:this.props.page.id,onClick:function(t){return e.model.select(e.model,new E(t))},onMouseLeave:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},this.renderHeader(),this.renderContent(),this.renderFooter())):null},t.prototype.renderContent=function(){return a.a.createElement(c.SurveyPage,{page:this.props.page,survey:this.props.survey,creator:this.props.creator,css:this.model.css})},t.prototype.renderHeader=function(){return a.a.createElement("div",{className:"svc-page__content-actions"},a.a.createElement(c.SurveyActionBar,{model:this.model.actionContainer}))},t.prototype.renderFooter=function(){var e=this;if(!this.model.allowEdit)return null;var t=this.model.questionTypeSelectorModel;return Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-page__add-new-question svc-btn",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion(e.model,new E(t))},onMouseOver:function(t){return e.model.hoverStopper(t.nativeEvent,t.currentTarget)}},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText),Object(c.attachKey2click)(a.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.action()},className:"svc-page__question-type-selector",title:this.model.addNewQuestionText},a.a.createElement("span",{className:"svc-page__question-type-selector-icon"},a.a.createElement(c.SvgIcon,{iconName:t.iconName,size:24})),a.a.createElement(c.Popup,{model:t.popupModel})))))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-page",(function(e){return a.a.createElement(k,e)}));var I=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.renderElementPlaceholder=function(){var e=this;return this.model.isEmptyElement?a.a.createElement("div",{className:"svc-panel__placeholder_frame"},a.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-panel__add-new-question svc-action-button",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion()}},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText))):null):null},t.prototype.renderFooter=function(){var t=this;return a.a.createElement(a.a.Fragment,null,!this.model.isEmptyElement&&this.model.element.isPanel&&this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-panel__add-new-question-container"},a.a.createElement("div",{className:"svc-panel__add-new-question svc-action-button",onClick:function(e){e.stopPropagation(),t.model.addNewQuestion()}},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText)),Object(c.attachKey2click)(a.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.model.questionTypeSelectorModel.action()},className:"svc-panel__question-type-selector",title:this.model.addNewQuestionText},a.a.createElement("span",{className:"svc-panel__question-type-selector-icon"},a.a.createElement(c.SvgIcon,{iconName:this.model.questionTypeSelectorModel.iconName,size:24})),a.a.createElement(c.Popup,{model:this.model.questionTypeSelectorModel.popupModel}))))):null,e.prototype.renderFooter.call(this))},t}(_);c.ReactElementFactory.Instance.registerElement("svc-panel",(function(e){return a.a.createElement(I,e)}));var T=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.LogoImageViewModel(t.data,null),n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.root=this.rootRef.current},t.prototype.render=function(){var e=this,t=null;return t=this.model.survey.locLogo.renderedHtml?a.a.createElement(a.a.Fragment,null,a.a.createElement(c.LogoImage,{data:this.props.data.survey}),this.model.allowEdit?a.a.createElement("div",{className:"svc-image-item-value-controls"},Object(c.attachKey2click)(a.a.createElement(c.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",size:24,iconName:"icon-file",onClick:function(){return e.model.chooseFile(e.model)}})),Object(c.attachKey2click)(a.a.createElement(c.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",size:24,iconName:"icon-delete",onClick:function(){return e.model.remove(e.model)}}))):null):this.model.allowEdit?Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-logo-image-placeholder",onClick:function(){return e.model.chooseFile(e.model)}},this.model.chooseLogoPlaceholder)):null,a.a.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},a.a.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input"}),t)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-logo-image",(function(e){return a.a.createElement(T,e)}));var D=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.renderElement=function(){var e=this,t=this.props.classes+" svc-action-button";return this.props.selected&&(t+=" svc-action-button--selected"),this.props.disabled?(t+=" svc-action-button--disabled",a.a.createElement("span",{className:t},this.props.text)):a.a.createElement(a.a.Fragment,null,Object(c.attachKey2click)(a.a.createElement("span",{role:"button",className:t,onClick:function(t){t.stopPropagation(),e.props.click()},title:this.props.title},this.props.text)))},t}(c.SurveyElementBase),O=function(e){function t(t){return e.call(this,t)||this}return r(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?a.a.createElement(D,{classes:this.question.linkClearButtonCssClasses,click:function(){return e.question.doClearClick()},selected:this.question.isSelected,text:l.editorLocalization.getString("pe.clear")}):null},t.prototype.renderElement=function(){var e=this;return a.a.createElement(a.a.Fragment,null,a.a.createElement(D,{classes:this.question.linkSetButtonCssClasses,click:function(){return e.question.doLinkClick()},selected:this.question.isSelected,disabled:this.question.isReadOnly,text:this.question.linkValueText,title:this.question.tooltip}),this.renderClear())},t}(c.SurveyQuestionElementBase);c.ReactQuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return a.a.createElement(O,e)}));var j=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.props.element||this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.embeddedSurvey)return null;var e=this.embeddedSurvey.embeddedSurvey;return e&&e.currentPage?a.a.createElement(c.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator}):null},t}(c.SurveyQuestionElementBase);c.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return a.a.createElement(j,e)}));var F=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.createQuestionElement=function(e){return c.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 a.a.createElement(a.a.Fragment,null,a.a.createElement(c.SurveyQuestion,{creator:this,element:e}))},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("svc-question-editor-content",(function(e){return a.a.createElement(F,e)}));var q=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.ItemValueWrapperViewModel(n.props.componentData.creator,n.props.question,n.props.item),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=this.model.allowAdd?Object(c.attachKey2click)(a.a.createElement("span",{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}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):a.a.createElement(a.a.Fragment,null," ",this.model.isDraggable?a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__drag","aria-label":this.model.dragTooltip},a.a.createElement(c.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:24,iconName:"icon-drag-area-indicator"})):null,this.model.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":this.model.tooltip,onClick:function(){return e.model.remove(e.model)}},a.a.createElement(c.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null);return a.a.createElement("div",{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: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)}},a.a.createElement("div",{className:"svc-item-value__ghost"}),a.a.createElement("div",{className:"svc-item-value-controls"},t),a.a.createElement("div",{className:"svc-item-value__item",onClick:function(t){return e.model.select(e.model,t)}},this.props.element))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-item-value",(function(e){return a.a.createElement(q,e)}));var B=function(e){function t(t){var n=e.call(this,t)||this;return n.preventDragHandler=function(e){e.preventDefault()},n.model=new l.ImageItemValueWrapperViewModel(n.props.componentData.creator,n.props.question,n.props.item,null,null),n.rootRef=a.a.createRef(),n}return r(t,e),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.render=function(){var e=this;this.model.item=this.props.item;var t=!this.props.question.isItemInList(this.props.item),n={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight},r=null;return r=t?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-image-item-value__item"},a.a.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},a.a.createElement("label",{className:"sd-imagepicker__label"},a.a.createElement("div",{style:n,className:"sd-imagepicker__image"})))),a.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowAdd?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__add",onClick:function(){return e.model.chooseNewFile(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-add-lg"}))):null)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-image-item-value__item"},this.props.element),a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__drag-area-indicator",onPointerDown:function(t){return e.model.onPointerDown(t)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-drag-area-indicator"})),a.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",onClick:function(){return e.model.chooseFile(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-file"}))):null,this.model.allowRemove?Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",onClick:function(){return e.model.remove(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-delete"}))):null)),a.a.createElement("div",{ref:this.rootRef,className:"svc-image-item-value-wrapper"+(t?" svc-image-item-value--new":"")+(this.model.isDragDropGhost?" svc-image-item-value-wrapper--ghost":""),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},a.a.createElement("div",{className:"svc-image-item-value-wrapper__ghost",style:n}),a.a.createElement("div",{className:"svc-image-item-value-wrapper__content"},a.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),r))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-image-item-value",(function(e){return a.a.createElement(B,e)}));var V=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.componentData;return n.model=new l.MatrixCellWrapperViewModel(r.creator,r.element,r.question,r.row,r.column),n}return r(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=this.props.componentData;this.model.templateData=r.element,this.model.row=r.row,this.model.column=r.column,this.model.question=r.question},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=null;return this.model.question&&(t=a.a.createElement("div",{className:"svc-matrix-cell__question-controls"},Object(c.attachKey2click)(a.a.createElement("span",{className:"svc-matrix-cell__question-controls-button",onClick:function(){return e.model.editQuestion(e.model)}},a.a.createElement(c.SvgIcon,{size:24,iconName:"icon-edit"}))))),a.a.createElement("div",{className:"svc-matrix-cell",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)}},a.a.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,t)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-matrix-cell",(function(e){return a.a.createElement(V,e)}));var Q=function(e){function t(t){var n=e.call(this,t)||this;return t.survey&&(n.model=new l.SurveyResultsModel(t.survey)),n}return r(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return this.model?a.a.createElement("div",{className:"svd-test-results"},a.a.createElement("div",{className:"svd-test-results__header"},a.a.createElement("div",{className:"svd-test-results__header-text"},this.model.surveyResultsText),a.a.createElement("div",{className:"svd-test-results__header-types"},a.a.createElement(D,{click:function(){return e.model.selectTableClick()},text:this.model.getLocString("ed.surveyResultsTable"),selected:this.model.isTableSelected,disabled:!1}),a.a.createElement(D,{click:function(){return e.model.selectJsonClick()},text:this.model.getLocString("ed.surveyResultsJson"),selected:this.model.isJsonSelected,disabled:!1}))),this.renderResultAsText(),this.renderResultAsTable()):null},t.prototype.renderResultAsText=function(){return"text"!==this.model.resultViewType?null:a.a.createElement("div",{className:"svd-test-results__text svd-light-bg-color"},a.a.createElement("div",null,this.model.resultText))},t.prototype.renderResultAsTable=function(){return"table"!==this.model.resultViewType?null:a.a.createElement("div",{className:"svd-test-results__table svd-light-bg-color"},a.a.createElement("table",null,a.a.createElement("thead",null,a.a.createElement("tr",{className:"svd-light-background-color"},a.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsTitle),a.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsDisplayValue))),a.a.createElement("tbody",null,t.renderRows(this.model.resultData))))},t.renderRows=function(e){return e.map((function(e){return a.a.createElement(A,{key:e.id,row:e})}))},t}(c.SurveyElementBase),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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 a.a.createElement(a.a.Fragment,null,Object(c.attachKey2click)(a.a.createElement("tr",{onClick:function(){return e.row.toggle()}},a.a.createElement("td",{style:{paddingLeft:this.row.textMargin},className:"svd-dark-border-color"},this.row.isNode?a.a.createElement("span",{style:{left:this.row.markerMargin},className:"svd-test-results__marker "+(this.row.collapsed?"":"svd-test-results__marker--expanded")},a.a.createElement(c.SvgIcon,{iconName:"icon-expand_16x16",size:16})):null,a.a.createElement("span",null,this.row.title)),a.a.createElement("td",{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?Q.renderRows(this.row.data):null)},t}(c.SurveyElementBase),L=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new l.ToolboxToolViewModel(n.item,n.props.creator),n}return r(t,e),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,n="svc-toolbox__tool "+t.css+(t.isVisible?"":" sv-action--hidden"),r=c.ReactElementFactory.Instance.createElement(this.item.component||"svc-toolbox-item",{item:this.item,creator:this.creator,isCompact:this.isCompact});return a.a.createElement("div",{className:n,key:t.id,onPointerDown:function(t){t.persist(),e.model.onPointerDown(t)}},a.a.createElement("div",{className:"sv-action__content"},this.isCompact&&t.needSeparator?a.a.createElement("div",{className:"svc-toolbox__category-separator"}):null,r))},t}(c.SurveyElementBase),U=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.item;return n.model=new l.ToolboxToolViewModel(r,n.props.creator),n}return r(t,e),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}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t="svc-toolbox__item svc-toolbox__item--"+this.item.iconName;return Object(c.attachKey2click)(a.a.createElement("div",{className:t,tabIndex:0,role:"button","aria-label":this.item.tooltip+" "+l.editorLocalization.getString("toolbox")+" item",onClick:function(t){t.persist(),e.model.click(t)}},a.a.createElement("span",{className:"svc-toolbox__item-container"},a.a.createElement(c.SvgIcon,{size:24,iconName:this.item.iconName})),this.props.isCompact?a.a.createElement("span",{className:"svc-toolbox__item-banner svc-item__banner"},a.a.createElement(c.SvgIcon,{size:24,iconName:this.item.iconName,className:"svc-toolbox__item-icon"}),a.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)):a.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-toolbox-item",(function(e){return a.a.createElement(U,e)}));var K=function(e){function t(t){return e.call(this,t)||this}return r(t,e),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.render=function(){return this.toolbox.hasActions?a.a.createElement("div",{className:"svc-toolbox"},a.a.createElement("div",{className:"svc-toolbox__container"},1==this.toolbox.categories.length?a.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.visibleActions)):this.renderCategories())):null},t.prototype.renderItems=function(e){var t=this;return e.map((function(e,n){return a.a.createElement(L,{item:e,creator:t.creator,key:"item"+n,isCompact:!1})}))},t.prototype.renderCategories=function(){var e=this;return this.toolbox.categories.map((function(t){var n=e.renderCategoryHeader(t),r=e.renderCategoryContent(t);return a.a.createElement("div",{className:"svc-toolbox__category",key:t.name},n,r)}))},t.prototype.renderCategoryHeader=function(e){var t=e.collapsed?"arrow-down":"arrow-up",n="svc-toolbox__category-header__button svc-string-editor__button--"+(e.collapsed?"expand":"collapse");return Object(c.attachKey2click)(a.a.createElement("div",{className:"svc-toolbox__category-header",onClick:function(t){return e.toggleState()}},a.a.createElement("span",{className:"svc-toolbox__category-title"},e.name),a.a.createElement("div",{className:"svc-toolbox__category-header__controls"},a.a.createElement(c.SvgIcon,{className:n,iconName:"icon-"+t,size:24}))))},t.prototype.renderCategoryContent=function(e){return e.collapsed?[]:this.renderItems(e.items)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-toolbox",(function(e){return a.a.createElement(K,e)}));var H=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=a.a.createRef(),n}return r(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new u.VerticalResponsivityManager(t,this.toolbox,".svc-toolbox__tool:not(.sv-dots)>.sv-action__content",44,44))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t.prototype.render=function(){if(!this.toolbox.hasActions)return null;var e="svc-toolbox"+(this.toolbox.isCompact?" svc-toolbox--compact":"");return a.a.createElement("div",{ref:this.rootRef,className:e},a.a.createElement("div",{className:"svc-toolbox__container"},this.toolbox.isCompact||1==this.toolbox.categories.length?a.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompact)):this.renderCategories()))},t.prototype.renderItems=function(e,t){var n=this;return e.map((function(e,r){return a.a.createElement(L,{item:e,creator:n.creator,isCompact:t,key:"item"+r})}))},t.prototype.renderCategoryContent=function(e){var t=[];return e.collapsed||(t=this.renderItems(e.items,!1)),t},t}(K);c.ReactElementFactory.Instance.registerElement("svc-adaptive-toolbox",(function(e){return a.a.createElement(H,e)}));var W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPropChangedHandler=function(e,n){if(!t.isRendering){var r=["showProgressBar","progressBarType","currentPageValue"];if(!(r.indexOf(n.name)<0)){for(var o={},a=0;a<r.length;a++){var i=r[a];o[i]=t.survey[i]}t.setState(o)}}},t}return r(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 c.ReactElementFactory.Instance.createElement("sv-progress-"+this.survey.progressBarType.toLowerCase(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})},t}(c.SurveyElementBase),z=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=a.a.createRef(),n}return r(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.visible?"":"none"},n="svc-side-bar"+(this.model.flyoutPanelMode?" svc-flyout-side-bar":""),r=this.model.tabs.map((function(e){return a.a.createElement(G,{item:e,key:e.id})}));return a.a.createElement("div",{className:n,style:{display:this.model.hasVisibleTabs?"":"none"}},a.a.createElement("div",{className:"svc-side-bar__shadow"}),a.a.createElement("div",{className:"svc-flex-column svc-side-bar__wrapper"},a.a.createElement("div",{ref:this.containerRef,style:t,className:"svc-side-bar__container"},a.a.createElement("div",{className:"svc-side-bar__container-header"},a.a.createElement("div",{className:"svc-side-bar__container-actions"},a.a.createElement(c.SurveyActionBar,{model:this.model.toolbar})),a.a.createElement("div",{className:"svc-side-bar__container-title"},this.model.headerText)),a.a.createElement("div",{className:"svc-side-bar__container-content"},r),a.a.createElement("div",{className:"svc-side-bar__container-close"},a.a.createElement("div",{className:"sd-btn sd-btn--action svc-side-bar__container-close-button",onClick:function(){return e.model.collapseSidebar()}}," ",this.model.closeText," ")))))},t}(c.SurveyElementBase),G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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(){return this.item.visible?c.ReactElementFactory.Instance.createElement(this.item.componentName,{model:this.item.model}):null},t}(c.SurveyElementBase);c.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-tab",(function(e){return a.a.createElement(G,e)}));c.ReactElementFactory.Instance.registerElement("svc-side-bar",(function(e){return a.a.createElement(z,e)}));var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return a.a.createElement("div",{className:"sd-translation-line-skeleton"})},t}(a.a.Component);c.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",(function(e){return a.a.createElement(J,e)}));var X=function(e){function t(t){var n=e.call(this,t)||this;return n.blurredByEscape=!1,n.onBlur=function(e){return n.svStringEditorRef.current.spellcheck=!1,n.locString.__isEditing=!1,n.justFocused=!1,n.baseModel.onInput(e.nativeEvent),n.baseModel.errorText},n.justFocused=!1,n.onFocus=function(e){n.baseModel.onFocus(e.nativeEvent),n.justFocused=!0},n.onKeyDown=function(e){return n.baseModel.onKeyDown(e.nativeEvent)},n.onMouseUp=function(e){return n.baseModel.onMouseUp(e.nativeEvent)},n.done=function(e){n.baseModel.done(e),n.locString.__isEditing=!1},n.edit=function(e){n.svStringEditorRef.current.focus(),n.locString.__isEditing=!0,n.baseModel.onClick(e)},n.state={changed:0},n.baseModel=new l.StringEditorViewModelBase(n.locString,n.creator),n.svStringEditorRef=a.a.createRef(),n.baseModel.blurEditor=function(){n.svStringEditorRef.current.blur(),n.svStringEditorRef.current.spellcheck=!1},n}return r(t,e),Object.defineProperty(t.prototype,"locString",{get:function(){return this.props.locStr.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.locStr.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(){if(e.prototype.componentDidMount.call(this),this.locString){var t=this;this.locString.onChanged=function(){t.setState({changed:t.state.changed+1})},this.locString.__isEditing&&this.svStringEditorRef.current.focus()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.locString&&(this.locString.onChanged=function(){})},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;this.baseModel.setLocString(this.locString);var e=null;if(this.locString.hasHtml){var t={__html:this.baseModel.focused&&this.baseModel.editAsText&&this.locString.text||this.locString.renderedHtml};e=a.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:t,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit})}else e=a.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit},this.locString.renderedHtml);return a.a.createElement("span",{className:this.className},a.a.createElement("span",{className:"svc-string-editor__content"},a.a.createElement("div",{className:"svc-string-editor__border",onClick:this.edit},a.a.createElement(c.SvgIcon,{className:"svc-string-editor__button svc-string-editor__button--edit",size:16,iconName:"icon-edit"})),e,a.a.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit})),this.errorText?a.a.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement(l.editableStringRendererName,(function(e){return a.a.createElement(X,e)}));var Y=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=a.a.createRef(),n.model=new l.PageNavigatorViewModel(t.pagesController,t.pageEditMode),n}return r(t,e),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;if(t){var n=this;t.parentElement.parentElement.onscroll=function(e){return n.model.onContainerScroll(e.currentTarget)}}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.containerRef.current;t&&(t.parentElement.parentElement.onscroll=void 0),this.model.dispose()},t.prototype.renderElement=function(){var e=this,t="svc-page-navigator__selector";return this.model.isPopupOpened&&(t+=" svc-page-navigator__selector--opened"),a.a.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},Object(c.attachKey2click)(a.a.createElement("div",{className:t,onClick:function(){return e.model.togglePageSelector()},title:this.model.pageSelectorCaption},a.a.createElement(c.SvgIcon,{className:"svc-page-navigator__navigator-icon",iconName:this.model.icon,size:24}),a.a.createElement(c.Popup,{model:this.model.popupModel}))),this.model.items.map((function(e){return a.a.createElement(Z,{key:e.id,item:e})})))},t}(c.SurveyElementBase),Z=function(e){function t(t){return e.call(this,t)||this}return r(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 Object(u.unwrap)(e.active)&&(t+=" svc-page-navigator-item--selected"),Object(u.unwrap)(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),a.a.createElement("div",{className:"svc-page-navigator-item"},Object(c.attachKey2click)(a.a.createElement("div",{className:t,onClick:function(t){e.action(e),t.stopPropagation()}},a.a.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title}),a.a.createElement("div",{className:"svc-page-navigator-item__banner svc-item__banner"},a.a.createElement("span",{className:"svc-text svc-text--small svc-text--bold"},e.title),a.a.createElement("span",{className:"svc-page-navigator-item__dot"})))))},t}(c.SurveyElementBase),$=function(e){function t(t){var n=e.call(this,t)||this;return n.denyUpdate=function(){n.denyComponentUpdate()},n.allowUpdate=function(){n.allowComponentUpdate()},n.addDragDropEvents=function(){n.creator.onBeforeDrop.add(n.denyUpdate),n.creator.onAfterDrop.add(n.allowUpdate)},n.clearDragDropEvents=function(){n.creator.onBeforeDrop.remove(n.denyUpdate),n.creator.onAfterDrop.remove(n.allowUpdate)},n.renderedPagesCache={},n}return r(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;"pages"!==this.changedStatePropName&&(this.renderedPagesCache={});var t=[];if("bypage"!==this.creator.pageEditMode){this.creator.survey.pages.forEach((function(n,r){var o=e.renderedPagesCache[n.id];o||(o=e.createRenderedPage(n,r),e.renderedPagesCache[n.id]=o),t.push(o)})),this.model.showNewPage&&t.push(this.renderNewPage("svc-page",this.model.newPage.id+"-ghost-new-page"))}else{var n=this.model.pagesController.page2Display,r=this.renderedPagesCache[n.id];r||(r=this.createRenderedPage(n,0),this.renderedPagesCache[n.id]=r),t.push(r)}return t},t.prototype.createRenderedPage=function(e,t){return a.a.createElement("div",{className:"svc-page","data-sv-drop-target-page":e.name,"data-sv-drop-target-survey-element":e.name,key:e.id+"-"+t},this.renderPage(e))},t.prototype.renderNewPage=function(e,t){return void 0===t&&(t=""),a.a.createElement(a.a.Fragment,{key:t},a.a.createElement("div",{className:e,"data-sv-drop-target-survey-element":"newGhostPage"},this.model.newPage?this.renderPage(this.model.newPage):null))},t.prototype.renderPage=function(e){return c.ReactElementFactory.Instance.createElement("svc-page",{survey:this.creator.survey,page:e,creator:this.creator})},t.prototype.renderElement=function(){var e=this,t="svc-tab-designer "+this.model.getRootCss();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?c.ReactElementFactory.Instance.createElement("svc-adaptive-toolbox",{model:this.creator}):null),a.a.createElement("div",{className:t,onClick:function(){return e.model.clickDesigner()}},a.a.createElement("div",{className:"svc-tab-designer_content"},this.model.showPlaceholder?this.renderPlaceHolder():this.renderTabContent())))},t.prototype.renderPlaceHolder=function(){return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"svc-designer__placeholder-container","data-sv-drop-target-survey-element":"newGhostPage"},a.a.createElement("span",{className:"svc-designer-placeholder-text svc-text svc-text--normal"},this.model.placeholderText),this.renderNewPage("svc-designer-placeholder-page")))},t.prototype.renderTabContent=function(){var e=this.creator.survey;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:this.model.getDesignerCss()},this.creator.allowEditSurveyTitle?a.a.createElement("div",{className:"svc-designer-header"},a.a.createElement(c.SurveyHeader,{survey:e})):null,a.a.createElement(W,{survey:e,location:"top"}),this.getRenderedPages(),a.a.createElement(W,{survey:e,location:"bottom",css:e.css})),this.creator.showPageNavigator?a.a.createElement("div",{className:"svc-tab-designer__page-navigator"},a.a.createElement(Y,{pagesController:this.model.pagesController,pageEditMode:this.model.creator.pageEditMode})):null)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-designer",(function(e){return a.a.createElement($,e)}));var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){return a.a.createElement("div",{className:"svc-creator-tab__content svc-embed-tab__content"},this.model.survey?a.a.createElement(c.Survey,{model:this.model.survey}):null)},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-embed",(function(e){return a.a.createElement(ee,e)}));var te=function(e){function t(t){var n=e.call(this,t)||this;return n.aceEditorrRef=a.a.createRef(),n}return r(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(){return a.a.createElement("div",{className:"svc-creator-tab__content"},a.a.createElement("div",{className:"svc-json-editor-tab__content"},a.a.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef})))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",(function(e){return a.a.createElement(te,e)}));var ne=function(e){function t(t){var n=e.call(this,t)||this;return n.model.canShowErrors=!1,n}return r(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(){for(var e=this,t=[],n=1,r=this.model.userFriendlyErrors,o=0;o<r.length;o++)t.push(a.a.createElement("span",{key:n},a.a.createElement("b",null,"Error: "))),n++,t.push(a.a.createElement("span",{key:n},r[o])),n++;return a.a.createElement("div",{className:"svc-creator-tab__content"},a.a.createElement("div",{className:"svc-json-editor-tab__content"},a.a.createElement("textarea",{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.length>0&&a.a.createElement("button",{type:"button",className:"svc-json-editor-tab__errros_button",onClick:function(){return e.model.toggleErrors()}},this.model.errorButtonText),this.model.canShowErrors&&a.a.createElement("div",{className:"svc-json-editor-tab__content-errors"},t)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",(function(e){return a.a.createElement(ne,e)}));var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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 Object(c.attachKey2click)(a.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:t,title:this.model.title},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button",(function(e){return a.a.createElement(re,e)}));var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){this.model;var e=this.renderViewContent();return a.a.createElement("div",{className:"svc-creator-tab__content"},e)},t.prototype.renderViewContent=function(){var e="svc-plugin-tab__content svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab__empty"),t=this.model.readOnly?void 0:a.a.createElement(re,{button:this.model.addNewButton});return a.a.createElement(o.Fragment,null,a.a.createElement("div",{className:e},a.a.createElement(c.Survey,{model:this.model.itemsSurvey}),this.model.hasItems?null:a.a.createElement("div",{className:"svc-logic-tab__content-empty"},a.a.createElement("span",{className:"svc-text"},this.model.emptyTabPlaceHolder)),t))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-logic",(function(e){return a.a.createElement(oe,e)}));var ae=function(e){function t(t){return e.call(this,t)||this}return r(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="svd-simulator-main"+("desktop"===this.model.device?" svd-simulator-main--desktop":"");return this.model.survey?this.model.hasFrame?a.a.createElement("div",{className:t+" "+this.model.simulatorMainCssClass,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},a.a.createElement("div",{className:"svd-simulator-wrapper",id:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},a.a.createElement("div",{className:"svd-simulator-frame "+this.model.simulatorFrame.cssClass,style:{width:this.model.simulatorFrame.landscapedFrameWidth+"px",height:this.model.simulatorFrame.landscapedFrameHeight+"px"}}),a.a.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%)"}},a.a.createElement("div",{className:"svd-simulator-content"},a.a.createElement(c.Survey,{model:this.model.survey}))))):a.a.createElement("div",{className:t},a.a.createElement("div",{className:"svd-simulator-content"},a.a.createElement(c.Survey,{model:this.model.survey}))):a.a.createElement("div",{className:t})},t}(c.SurveyElementBase),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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;return Object(c.attachKey2click)(a.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:"svc-preview__test-again svc-btn",title:this.model.title},a.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-preview-test-again",(function(e){return a.a.createElement(ie,e)}));var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return a.a.createElement("div",{className:e},a.a.createElement("div",{className:"svc-plugin-tab__content"},a.a.createElement(ae,{model:this.model.simulator}),this.model.isRunning?null:a.a.createElement(ie,{button:this.model.testAgainAction}),this.model.isRunning?null:a.a.createElement(Q,{survey:this.model.simulator.survey})),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?a.a.createElement("div",{className:"svc-test-tab__content-actions"},a.a.createElement(c.SurveyActionBar,{model:this.model.pages})):null},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-test",(function(e){return a.a.createElement(se,e)}));var ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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.renderElement=function(){return this.model?a.a.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"},this.renderElementContent()):null},t.prototype.renderElementContent=function(){return this.model.isEmpty?a.a.createElement("div",{className:"st-no-strings"},a.a.createElement("span",null,this.model.noStringsText)):a.a.createElement("div",{className:"st-content"},a.a.createElement("div",{className:"svc-flex-column st-strings-wrapper"},a.a.createElement("div",{className:"svc-flex-row st-strings-header"},a.a.createElement(c.Survey,{model:this.model.stringsHeaderSurvey})),a.a.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},a.a.createElement(c.Survey,{model:this.model.stringsSurvey}))))},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-tab-translation",(function(e){return a.a.createElement(ce,e)}));var le=function(e){function t(t){return e.call(this,t)||this}return r(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?a.a.createElement("div",{className:"svc-object-selector"},a.a.createElement(c.List,{model:this.model.list})):null},t}(c.SurveyElementBase);c.ReactElementFactory.Instance.registerElement("svc-object-selector",(function(e){return a.a.createElement(le,e)}));var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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 a.a.createElement(c.Survey,{model:this.model.survey})},t}(c.SurveyElementBase);c.ReactQuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return a.a.createElement(c.SurveyQuestionButtonGroup,e)}));var me;c.ReactElementFactory.Instance.registerElement("svc-property-grid",(function(e){return a.a.createElement(ue,e)})),me="".concat("1.9.27")}])}));