@elyra/canvas 12.34.0 → 12.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{_baseIteratee-2a601011.js → _baseIteratee-84bbd39d.js} +3 -3
  2. package/dist/{_baseIteratee-2a601011.js.map → _baseIteratee-84bbd39d.js.map} +1 -1
  3. package/dist/{canvas-constants-29b7f65c.js → canvas-constants-d8652829.js} +2 -2
  4. package/dist/{canvas-constants-29b7f65c.js.map → canvas-constants-d8652829.js.map} +1 -1
  5. package/dist/{canvas-controller-273d4b5b.js → canvas-controller-c9f3bef9.js} +2 -2
  6. package/dist/canvas-controller-c9f3bef9.js.map +1 -0
  7. package/dist/canvas-controller-f7820ab0.js +2 -0
  8. package/dist/canvas-controller-f7820ab0.js.map +1 -0
  9. package/dist/{common-canvas-5ccce28e.js → common-canvas-487520d3.js} +2 -2
  10. package/dist/common-canvas-487520d3.js.map +1 -0
  11. package/dist/{common-canvas-f471a9f3.js → common-canvas-e1591f51.js} +2 -2
  12. package/dist/common-canvas-e1591f51.js.map +1 -0
  13. package/dist/common-canvas.es.js +1 -1
  14. package/dist/common-canvas.js +1 -1
  15. package/dist/common-properties-580436d7.js +2 -0
  16. package/dist/common-properties-580436d7.js.map +1 -0
  17. package/dist/common-properties-98a9a99f.js +2 -0
  18. package/dist/common-properties-98a9a99f.js.map +1 -0
  19. package/dist/{datarecord-metadata-v3-schema-db5150c5.js → datarecord-metadata-v3-schema-28d4d7bb.js} +2 -2
  20. package/dist/{datarecord-metadata-v3-schema-db5150c5.js.map → datarecord-metadata-v3-schema-28d4d7bb.js.map} +1 -1
  21. package/dist/{flexible-table-8c6db0fc.js → flexible-table-ddd6132b.js} +2 -2
  22. package/dist/{flexible-table-8c6db0fc.js.map → flexible-table-ddd6132b.js.map} +1 -1
  23. package/dist/{icon-a9c3f51e.js → icon-909437d7.js} +2 -2
  24. package/dist/{icon-a9c3f51e.js.map → icon-909437d7.js.map} +1 -1
  25. package/dist/{index-d4a58ddb.js → index-61e4a113.js} +2 -2
  26. package/dist/{index-d4a58ddb.js.map → index-61e4a113.js.map} +1 -1
  27. package/dist/{isArrayLikeObject-c0bf3ab6.js → isArrayLikeObject-9104c690.js} +2 -2
  28. package/dist/{isArrayLikeObject-c0bf3ab6.js.map → isArrayLikeObject-9104c690.js.map} +1 -1
  29. package/dist/lib/canvas-controller.es.js +1 -1
  30. package/dist/lib/canvas-controller.js +1 -1
  31. package/dist/lib/canvas.es.js +1 -1
  32. package/dist/lib/canvas.js +1 -1
  33. package/dist/lib/properties/field-picker.es.js +1 -1
  34. package/dist/lib/properties/flexible-table.es.js +1 -1
  35. package/dist/lib/properties.es.js +1 -1
  36. package/dist/lib/properties.js +1 -1
  37. package/dist/{toolbar-233c09a8.js → toolbar-3b5a592c.js} +2 -2
  38. package/dist/{toolbar-233c09a8.js.map → toolbar-3b5a592c.js.map} +1 -1
  39. package/package.json +1 -1
  40. package/src/common-canvas/canvas-controller.js +8 -1
  41. package/src/common-canvas/svg-canvas-pipeline.js +2 -2
  42. package/src/common-canvas/svg-canvas-renderer.js +30 -26
  43. package/src/common-properties/properties-controller.js +19 -7
  44. package/src/common-properties/properties-main/properties-main.jsx +9 -5
  45. package/src/object-model/api-pipeline.js +4 -0
  46. package/src/object-model/config-utils.js +1 -0
  47. package/src/object-model/layout-dimensions.js +12 -2
  48. package/src/object-model/object-model.js +18 -6
  49. package/src/object-model/redux/reducers/canvasinfo.js +1 -0
  50. package/src/object-model/redux/reducers/links.js +6 -2
  51. package/stats.html +1 -1
  52. package/dist/canvas-controller-273d4b5b.js.map +0 -1
  53. package/dist/canvas-controller-96abce12.js +0 -2
  54. package/dist/canvas-controller-96abce12.js.map +0 -1
  55. package/dist/common-canvas-5ccce28e.js.map +0 -1
  56. package/dist/common-canvas-f471a9f3.js.map +0 -1
  57. package/dist/common-properties-51bd2ecc.js +0 -2
  58. package/dist/common-properties-51bd2ecc.js.map +0 -1
  59. package/dist/common-properties-e82771ef.js +0 -2
  60. package/dist/common-properties-e82771ef.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{_ as e,a as t,b as r}from"./createClass-ffbbe837.js";import{_ as n,a as o,b as i,c as a}from"./getPrototypeOf-012c454b.js";import s,{Component as l}from"react";import{S as p,P as c,f as u,_ as d,C as h,t as f,T as m,a as v,s as y,l as g,e as b,b as E,I,g as S,c as C,F as R,G as T,E as _,d as k,h as w,O as L,i as A,j as D,k as O,m as P,n as N,o as x,p as B,q as M,r as F,u as V,v as U,w as H,x as j,y as z,z as q}from"./index-61e4a113.js";import{c as G,_ as W,a as $,b as X}from"./canvas-constants-d8652829.js";import{_ as K,a as Y,b as J,i as Q,c as Z,h as ee,g as te,d as re,e as ne,f as oe,j as ie,k as ae,l as se,m as le,n as pe,o as ce,p as ue,q as de,r as he,s as fe,t as me,u as ve,v as ye}from"./isArrayLikeObject-9104c690.js";import{_ as ge,a as be,A as Ee,s as Ie,b as Se,c as Ce,u as Re,d as Te,o as _e}from"./datarecord-metadata-v3-schema-28d4d7bb.js";import{h as ke,C as we,a as Le,b as Ae,c as De,M as Oe,_ as Pe,D as Ne,d as xe,e as Be,T as Me,f as Fe,S as Ve,g as Ue,i as He,j as je,k as ze,l as qe,m as Ge,n as We,o as $e,p as Xe,P as Ke,q as Ye,U as Je,r as Qe,R as Ze,s as et,E as tt,t as rt,A as nt,u as ot,v as it,w as at,x as st}from"./_baseIteratee-84bbd39d.js";import{Modal as lt,ComposedModal as pt,ModalHeader as ct,ModalBody as ut,Button as dt,Accordion as ht,AccordionItem as ft,Tab as mt,Tabs as vt,Link as yt,TextInput as gt,TextArea as bt,NumberInput as Et,Checkbox as It,Dropdown as St,ContentSwitcher as Ct,Switch as Rt,PasswordInput as Tt,DatePicker as _t,DatePickerInput as kt,Toggle as wt,RadioButton as Lt,SelectItem as At,Select as Dt,ComboBox as Ot,FilterableMultiSelect as Pt,MultiSelect as Nt}from"carbon-components-react";import{Portal as xt}from"react-portal";import{injectIntl as Bt,FormattedDate as Mt}from"react-intl";import{connect as Ft,Provider as Vt}from"react-redux";import{Add16 as Ut,Shuffle16 as Ht,Settings16 as jt,TrashCan16 as zt,Edit16 as qt,UpToTop24 as Gt,ArrowUp24 as Wt,ArrowDown24 as $t,DownToBottom24 as Xt,Maximize16 as Kt,Minimize16 as Yt,Calculator24 as Jt,Information16 as Qt,Help16 as Zt,Close16 as er}from"@carbon/icons-react";import tr from"react-dom";import{I as rr}from"./icon-909437d7.js";import{v4 as nr}from"uuid";import or from"./lib/tooltip.es.js";import{T as ir,F as ar}from"./flexible-table-ddd6132b.js";import{_ as sr}from"./extends-093996c9.js";import{combineReducers as lr,createStore as pr}from"redux";import cr from"seedrandom";import ur from"./lib/command-stack.es.js";import{isValid as dr,parse as hr,format as fr}from"date-fns";import mr from"react-inlinesvg";import vr from"prop-types";import{t as yr,T as gr}from"./toolbar-3b5a592c.js";import{UnControlled as br}from"react-codemirror2";import{Validator as Er}from"jsonschema";var Ir=K,Sr=ge,Cr=Y;var Rr=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=Ir(e,a);r(s,a)&&Sr(i,Cr(a,e),s)}return i},Tr=ke;var _r=function(e,t){return Rr(e,t,(function(t,r){return Tr(e,r)}))},kr=be((function(e,t){return null==e?{}:_r(e,t)}));function wr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Lr=function(r){n(i,l);var o=wr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"getCarbonModalSize",value:function(){switch(this.props.bsSize){case p.SMALL:return Ae;case p.LARGE:case p.MAX:return Le;case p.MEDIUM:default:return we}}},{key:"render",value:function(){var e=this.getCarbonModalSize();return s.createElement(xt,null,s.createElement(lt,{className:De("properties-modal",{noButtons:!1===this.props.showPropertiesButtons},this.props.classNames),open:!0,modalHeading:this.props.title,primaryButtonText:this.props.applyLabel,secondaryButtonText:this.props.rejectLabel,onRequestSubmit:this.props.okHandler,onSecondarySubmit:this.props.cancelHandler,"aria-label":"",size:e},s.createElement("div",{className:"properties-modal-children"},this.props.children)))}}]),i}(),Ar=Lr;function Dr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Or=function(r){n(i,l);var o=Dr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e="properties-editing properties-"+(void 0===this.props.bsSize?"large":this.props.bsSize),t=s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return s.createElement("div",{className:e},s.createElement("h2",null,this.props.title),s.createElement("div",{className:"properties-body"},this.props.children),t)}}]),i}(),Pr=Or;function Nr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var xr=function(r){n(i,l);var o=Nr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.tearsheet?this.props.tearsheet.title:null,t=this.props.tearsheet?this.props.tearsheet.description:null,r=this.props.tearsheet?this.props.tearsheet.content:null,n=this.props.showPropertiesButtons&&!this.props.applyOnBlur,o=!Array.isArray(r),i=this.props.applyOnBlur?null:s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return s.createElement(xt,null,s.createElement(pt,{className:De("properties-tearsheet-panel",{"properties-tearsheet-stacked":this.props.stacked}),open:this.props.open,size:"lg","aria-label":u(this.props.intl,Oe.PROPERTIES_LABEL,{label:e}),preventCloseOnClickOutside:!0},null===e?null:s.createElement(ct,{className:De("properties-tearsheet-header",{"with-buttons":n},{"with-tabs":o},{"hide-close-button":"function"!=typeof this.props.onCloseCallback}),title:e,buttonOnClick:this.props.onCloseCallback},t?s.createElement("p",null,t):null),s.createElement(ut,{className:De("properties-tearsheet-body",{"with-buttons":n},{"with-tabs":o})},r),i))}}]),i}();xr.defaultProps={open:!1,showPropertiesButtons:!1,applyOnBlur:!1,stacked:!1};var Br=Bt(xr);function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Fr=function(r){n(i,l);var o=Mr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"shouldEnabledSaveButton",value:function(){return!!this.props.saveButtonEnabled&&(!this.props.disableSaveOnRequiredErrors||0===Object.keys(this.props.requiredErrorMessages).length)}},{key:"render",value:function(){var e=this.shouldEnabledSaveButton();return s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons,applyButtonEnabled:e})}}]),i}();Fr.defaultProps={saveButtonEnabled:!0};var Vr=Ft((function(e,t){return{saveButtonEnabled:!t.controller.getSaveButtonDisable(),requiredErrorMessages:t.controller.getRequiredErrorMessages()}}),null)(Fr),Ur=d;var Hr=function(e,t){var r=[];return Ur(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r},jr=J,zr=Hr,qr=Pe,Gr=Q;var Wr=function(e,t){return(Gr(e)?jr:zr)(e,qr(t))},$r="SET_PROPERTY_VALUES",Xr="UPDATE_PROPERTY_VALUE",Kr="REMOVE_PROPERTY_VALUE",Yr="SET_CONTROL_STATES",Jr="UPDATE_CONTROL_STATE",Qr="SET_PANEL_STATES",Zr="UPDATE_PANEL_STATE",en="SET_ACTION_STATES",tn="UPDATE_ACTION_STATE",rn="SET_ERROR_MESSAGES",nn="UPDATE_ERROR_MESSAGE",on="CLEAR_ERROR_MESSAGE",an="SET_DATASET_METADATA",sn="UPDATE_SELECTED_ROWS",ln="CLEAR_SELECTED_ROWS",pn="SET_TITLE",cn="SET_ACTIVE_TAB",un="DISABLE_ROW_MOVE_BUTTONS",dn="SET_SAVE_BUTTON_DISABLE",hn="SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED",fn="SET_ADD_REMOVE_ROWS",mn="UPDATE_STATIC_ROWS",vn="CLEAR_STATIC_ROWS",yn="SET_TABLE_BUTTON_ENABLED",gn="SET_HIDE_EDIT_BUTTON",bn="SET_ACTIVE_TEARSHEET";function En(e){return{type:pn,title:e}}function In(e){return{type:cn,activeTab:e}}function Sn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Cn=function(r){n(i,r);var o=Sn(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel;return void 0===e&&(e=s.createElement("div",{className:"properties-control-panel"})),e}}]),i}(s.Component),Rn=Ft((function(e,t){return{panel:t.panels[t.controller.getPropertyValue({name:t.dependsOn})]}}),null)(Cn);function Tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var _n=function(r){n(i,l);var o=Tn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={style:{height:0}},r.updateDimensions=r.updateDimensions.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"updateDimensions",value:function(){if(this.wideFlyout&&(this.commonPropertiesParent||(this.commonPropertiesParent=this.findPropertyWrapper(this.wideFlyout)),this.commonPropertiesParent)){var e=tr.findDOMNode(this.commonPropertiesParent).getBoundingClientRect();this.setState({style:{height:e.height+"px",top:e.top+"px"}})}}},{key:"findPropertyWrapper",value:function(e){return e&&e.parentNode&&e.parentNode.className&&e.parentNode.className.includes("properties-right-flyout")?e.parentNode:e&&e.parentNode?this.findPropertyWrapper(e.parentNode):null}},{key:"render",value:function(){var e,t,r,n=this,o=s.createElement("div",{className:De("properties-wf-overlay",{show:this.props.show})});return this.props.show&&(this.props.title&&(e=s.createElement("div",{className:"properties-wf-title"},this.props.title)),t=s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,showPropertiesButtons:this.props.showPropertiesButtons,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,applyButtonEnabled:this.props.okButtonEnabled}),r=s.createElement("div",{className:"properties-wf-children"}," ",this.props.children," ")),s.createElement("div",{className:"properties-wf-modal",ref:function(e){return n.wideFlyout=e}},s.createElement(xt,{node:this.commonPropertiesParent},o,s.createElement("div",{className:De("properties-wf-content",{show:this.props.show,"properties-light-disabled":!this.props.light}),style:this.state.style},e,r,t)))}}]),i}();_n.defaultProps={show:!1,okButtonEnabled:!0};var kn=_n;function wn(e,t){var r=t||nr();return"".concat(Ln(e),"-").concat(r)}function Ln(e){var t=e.name;return void 0!==e.row?(t+="_"+e.row,void 0!==e.col&&(t+="_"+e.col)):void 0!==e.col&&(t+="_"+e.col),"properties-"+t}function An(e,t){var r=t;return e.charLimit&&(r=e.charLimit),r}function Dn(e,t){if(e.length>0){var r=e.split(t);return Array.isArray(r)?r:[r]}return[]}function On(e,t){var r=!1;if(Array.isArray(e)){if(0===e.length)return{value:"",truncated:r};var n="";return e.forEach((function(o,i){var a=Pn(o),s=i===e.length-1?"":t;n+=a+s,r||(r=a.length!==o.length)})),{value:n,truncated:r}}return{value:e,truncated:r}}function Pn(e){return e.length>Me?e.substring(0,Me)+"...":e}function Nn(e,t){var r={};return!e||t||("error"===e.type?(r.invalid=!0,r.invalidText=e.text):"warning"===e.type&&(r.warn=!0,r.warnText=e.text)),r}function xn(e){return e.controlType===h.DATEPICKER||e.controlType===h.DATEPICKERRANGE?e.dateFormat?e.dateFormat:Ne:e.controlType===h.DATEFIELD?e.dateFormat?e.dateFormat:xe:e.timeFormat?e.timeFormat:Be}function Bn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Mn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mn(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Vn=function(r){n(i,r);var o=Fn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showWideFlyout:!1},r.handleLinkClicked=r.handleLinkClicked.bind(a(r)),r.hideWideFlyout=r.hideWideFlyout.bind(a(r)),r.cancelWideFlyout=r.cancelWideFlyout.bind(a(r)),r._getSummaryTables=r._getSummaryTables.bind(a(r)),r}return t(i,[{key:"hideWideFlyout",value:function(){this.props.controller.setIsSummaryPanelShowing(!1),this.setState({showWideFlyout:!1}),this.props.controller.clearSelectedRows()}},{key:"cancelWideFlyout",value:function(){this.props.controller.setPropertyValues(this.initialControlValues),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates),this.hideWideFlyout()}},{key:"handleLinkClicked",value:function(){this.props.children&&(this.props.controller.setIsSummaryPanelShowing(!0),this.setState({showWideFlyout:!0})),this.initialControlValues=this.props.controller.getPropertyValues(),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates()}},{key:"_getSummaryTables",value:function(){var e=[],t=this.props.controller.getSummaryPanelControls(this.props.panel.id);if(!Array.isArray(t))return e;var r,n=Bn(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,i={name:o},a=this.props.controller.getControl(i),l=this.props.controller.getPropertyValue(i,{filterHiddenDisabled:!0}),p=this.props.controller.getCustPropSumPanelValue(i),c=!1;null!=p&&(l=p.value,a.summaryLabel=p.label,c=!0);var d=[];if(Array.isArray(l)){var h=0;if(a.subControls)for(var f=0;f<a.subControls.length;f++){var m={name:i.name,col:f};(this.props.controller.isSummary(m)||c)&&h++}else a.summary&&(h=1);for(var v=0!==h?"calc((100% / "+h+") - 2px)":"100%",y=0;y<l.length;y++){var g=l[y],b=[];if(Array.isArray(g))for(var E=0;E<g.length;E++){var I={name:i.name,col:E};if(this.props.controller.isSummary(I)||c){var S=this._getSummaryDisplayValue(g[E],I),C=void 0===S?"":JSON.stringify(S).replace('"',"").replace(new RegExp('"',"g"),"")+" ";b.push(s.createElement("td",{key:"summary-table-data-"+E,className:"properties-summary-row-data ",style:{width:v}},s.createElement(ir,{content:s.createElement("span",null,C),tooltipText:C,disabled:!1})))}}else if(this.props.controller.isSummary(i)||c){var R=this._getSummaryDisplayValue(g,i);b.push(s.createElement("td",{key:"summary-table-row-data-"+y,className:"properties-summary-row-data "},s.createElement(ir,{content:s.createElement("span",null,R),tooltipText:R,disabled:!1})))}b.length>0&&d.push(s.createElement("tr",{key:"summary-table-row-"+y,className:"properties-summary-row"},b))}}else if(l&&(this.props.controller.isSummary(i)||c)){var T=this._getSummaryDisplayValue(l,i);d.push(s.createElement("tr",{key:"summary-row-"+o,className:"properties-summary-row"},s.createElement("td",{key:"summary-table-row-data-"+o,className:"properties-summary-rows-data"},T)))}if(d.length>0){var _=s.createElement("table",{role:"presentation",key:"summary-table-"+o,className:"properties-summary-table"},s.createElement("tbody",{key:"summary-body-"+o},d));if(d.length>10){var k=u(this.props.controller.getReactIntl(),Oe.LONG_TABLE_SUMMARY_PLACEHOLDER);_=s.createElement("div",{className:"properties-summary-table"},s.createElement("span",null,k))}e.push(s.createElement("div",{key:"summary-container-"+o,className:"properties-summary-values"},s.createElement("span",{key:"summary-text-"+o,className:"properties-summary-label"},a.summaryLabel),_))}}}catch(e){n.e(e)}finally{n.f()}return e}},{key:"_getSummaryDisplayValue",value:function(e,t){var r=e,n=this.props.controller.getControl(t);if(n.values&&n.valueLabels){var o=n.values.indexOf(e);o>-1&&n.valueLabels[o]&&(r=n.valueLabels[o])}return"object"===f(r)&&(r=n.valueDef.propType===m.STRUCTURE&&n.role===v.COLUMN?y(e,n):JSON.stringify(r)),r}},{key:"_getSummaryIconState",value:function(){var e=this,t=this.props.controller.getSummaryPanelControls(this.props.panel.id),r={},n=0,o=0;if(Array.isArray(t)&&t.forEach((function(t){var i=e.props.controller.getErrorMessage({name:t},!0);Z(i)||(i.type===Fe.WARNING&&(o+=1),i.type===Fe.ERROR&&(n+=1)),Z(i)||Z(r)&&"error"===r.type||(r=i)})),!Z(r)){var i="";return n>0&&0===o?i=u(this.props.controller.getReactIntl(),Oe.CONTROL_SUMMARY_ERROR,{errorMsgCount:n}):n>0&&o>0?i=u(this.props.controller.getReactIntl(),Oe.CONTROL_SUMMARY_ERROR_WARNING,{errorMsgCount:n,warningMsgCount:o}):0===n&&o>0&&(i=u(this.props.controller.getReactIntl(),Oe.CONTROL_SUMMARY_WARNING,{warningMsgCount:o})),s.createElement(or,{id:"summary-icon",tip:i,className:"properties-tooltips"},s.createElement(rr,{type:r.type,className:"properties-summary-link-icon ".concat(r.type)}))}return null}},{key:"render",value:function(){var e=this._getSummaryIconState(),t=s.createElement("div",{className:"properties-summary-link-container"},s.createElement(dt,{className:"properties-summary-link-button",onClick:this.handleLinkClicked,size:"small",kind:"ghost",renderIcon:Ut},this.props.panel.label),e),r=u(this.props.controller.getReactIntl(),Oe.APPLYBUTTON_LABEL),n=u(this.props.controller.getReactIntl(),Oe.REJECTBUTTON_LABEL),o=this.state.showWideFlyout?s.createElement(kn,{cancelHandler:this.cancelWideFlyout,okHandler:this.hideWideFlyout,show:!0,applyLabel:r,rejectLabel:n,title:this.props.panel.label,light:this.props.controller.getLight(),okButtonEnabled:this.props.okButtonEnabled},s.createElement("div",null,this.props.children)):s.createElement("div",null),i=this.props.panel.className?this.props.panel.className:"",a=De("properties-summary-panel","properties-control-panel",{hide:this.props.panelState===Ve.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},i);return s.createElement("div",{className:a,disabled:this.props.panelState===Ve.DISABLED,"data-id":Ln({name:this.props.panel.id})},o,t,this._getSummaryTables())}}]),i}(s.Component),Un=Ft((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),okButtonEnabled:!t.controller.getWideFlyoutPrimaryButtonDisabled({name:t.panel.id})}}),null)(Vn);function Hn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var jn=function(r){n(i,r);var o=Hn(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"",t=this.props.panelState===Ve.DISABLED;return s.createElement("div",{className:De("properties-twisty-panel",{hide:this.props.panelState===Ve.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),"data-id":Ln({name:this.props.panel.id})},s.createElement(ht,{disabled:t},s.createElement(ft,{disabled:t,open:this.props.panel.open,title:this.props.panel.label},this.props.children)))}}]),i}(s.Component),zn=Ft((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(jn);function qn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Gn=function(r){n(i,r);var o=qn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={panel:null,title:null,hideHandler:null,subPanelVisible:!1},r.showSubDialog=r.showSubDialog.bind(a(r)),r.hideSubDialog=r.hideSubDialog.bind(a(r)),r}return t(i,[{key:"showSubDialog",value:function(e,t,r){this.props.controller.increaseVisibleSubPanelCounter(),this.setState({panel:t,title:e,hideHandler:r,subPanelVisible:!0})}},{key:"hideSubDialog",value:function(e){this.props.controller.decreaseVisibleSubPanelCounter(),this.state.hideHandler(e),this.setState({panel:null,title:null,hideHandler:null,subPanelVisible:!1})}},{key:"render",value:function(){var e=[];if(this.state.subPanelVisible&&!this.props.rightFlyout){var t=this.props.controller.isTearsheetContainer()?"properties-subpanel-modal-in-tearsheet":"";e=s.createElement(Ar,{title:this.state.title,okHandler:this.hideSubDialog.bind(this,!0),cancelHandler:this.hideSubDialog.bind(this,!1),applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,classNames:t},this.state.panel)}else this.props.rightFlyout&&this.state.subPanelVisible&&(e=s.createElement(kn,{cancelHandler:this.hideSubDialog.bind(this,!1),okHandler:this.hideSubDialog.bind(this,!0),show:!0,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,title:this.state.title,light:this.props.controller.getLight()},s.createElement("div",null,this.state.panel)));return s.createElement("div",null,e,this.props.children)}}]),i}(s.Component);function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}Gn.defaultProps={rightFlyout:!1};var $n=function(r){n(i,r);var o=Wn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).showSubPanel=r.showSubPanel.bind(a(r)),r.onSubPanelHidden=r.onSubPanelHidden.bind(a(r)),r}return t(i,[{key:"onSubPanelHidden",value:function(e){g.info("onSubPanelHidden(): applyChanges="+e)}},{key:"showSubPanel",value:function(){this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=u(this.props.controller.getReactIntl(),Oe.APPLYBUTTON_LABEL),r=u(this.props.controller.getReactIntl(),Oe.REJECTBUTTON_LABEL),n=s.createElement(dt,{className:"properties-subpanel-button",type:"button",small:!0,kind:"secondary",onClick:this.showSubPanel},this.props.label||"");return s.createElement(Gn,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:t,rejectLabel:r,controller:this.props.controller},n)}}]),i}(s.Component);function Xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Kn=function(r){n(i,r);var o=Xn(i);function i(t){var r;e(this,i),r=o.call(this,t);var n="";return t.children.forEach((function(e,t){0===t?n="1fr":n+=" 1fr"})),r.style={gridTemplateColumns:n},r}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return s.createElement("div",{className:De("properties-column-panel",{hide:this.props.panelState===Ve.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===Ve.DISABLED,"data-id":Ln({name:this.props.panel.id}),style:this.style},this.props.children)}}]),i}(s.Component),Yn=Ft((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Kn);function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Qn=function(r){n(i,r);var o=Jn(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return this.props.children.length>0?s.createElement("div",{className:De("properties-control-panel",{hide:this.props.panelState===Ve.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},{"tearsheet-container":this.props.controller.isTearsheetContainer()},e),disabled:this.props.panelState===Ve.DISABLED,"data-id":Ln({name:this.props.panel.id})},this.props.children):null}}]),i}(s.Component),Zn=Ft((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Qn);function eo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var to=function(r){n(i,r);var o=eo(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={activeTabId:""},r.uuid=nr(),r}return t(i,[{key:"onClick",value:function(e){this.setState({activeTabId:e})}},{key:"render",value:function(){for(var e=[],t=0,r=0,n=this.props.className?this.props.className:"",o=0;o<this.props.tabs.length;o++){var i=this.props.tabs[o],a=this.props.controller.getPanelState({name:i.group});if(a!==Ve.HIDDEN){var l=this.props.genUIItem(o,i.content);this.state.activeTabId===i.group&&a!==Ve.DISABLED&&(t=r),e.push(s.createElement(mt,{id:"subtabs.tab.".concat(o,"-").concat(this.uuid),key:"subtabs.tab.".concat(o,"-").concat(this.uuid),disabled:a===Ve.DISABLED,className:De("properties-subtab",{"properties-leftnav-subtab-item":this.props.leftnav}),tabIndex:r,label:i.text,title:i.text,onClick:this.onClick.bind(this,i.group),"data-id":Ln({name:i.group})},l)),r++}}return s.createElement("div",{className:De("properties-sub-tab-container",{vertical:!this.props.rightFlyout},{"properties-control-nested-panel":this.props.nestedPanel},{"properties-leftnav-container":this.props.leftnav},n)},s.createElement(vt,{className:De("properties-subtabs",{"properties-leftnav-subtabs":this.props.leftnav}),selected:t,light:this.props.controller.getLight(),tabContentClassName:"properties-subtab-panel"},e))}}]),i}(s.Component);to.defaultProps={leftnav:!1};var ro=to;function no(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var oo=function(r){n(i,l);var o=no(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===Ve.HIDDEN,n=this.props.panelState===Ve.DISABLED,o=this.props.panel.label?s.createElement("div",{className:"panel-label"},this.props.panel.label):null;if(this.props.panel.description&&!Z(this.props.panel.description.text)){var i=b(this.props.panel.description.text,this.props.controller);if("as_tooltip"===this.props.panel.description.placement){this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id});var a=s.createElement(or,{id:"tooltip-label-".concat(this.props.panel.id),tip:i,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},s.createElement(rr,{type:Ue.INFORMATION,className:"properties-control-description-icon-info"}));o=s.createElement("div",{className:De("properties-label-container")},o,a)}else e=s.createElement("div",{className:"panel-description"},i)}return s.createElement("div",{className:De("properties-text-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),disabled:n},o,e)}}]),i}(),io=Ft((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),propertyValues:t.controller.getPropertyValues()}}),null)(oo);function ao(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var so=function(r){n(i,l);var o=ao(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===Ve.HIDDEN,n=this.props.panelState===Ve.DISABLED;if(this.props.panel.label){var o;if(this.props.panel.description&&!Z(this.props.panel.description.text)){var i=b(this.props.panel.description.text,this.props.controller);this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id}),o=s.createElement(or,{id:"tooltip-label-".concat(this.props.panel.id),tip:i,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},s.createElement(rr,{type:Ue.INFORMATION,className:"properties-control-description-icon-info"}))}e=s.createElement("div",{className:De("properties-label-container")},s.createElement("label",{className:"properties-control-label"},this.props.panel.label),o)}return s.createElement("div",{className:De("properties-action-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),"data-id":Ln({name:this.props.panel.id}),disabled:n},e,this.props.children)}}]),i}(),lo=Ft((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(so);function po(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var co=function(r){n(i,r);var o=po(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={},r.applyAction=r.applyAction.bind(a(r)),r}return t(i,[{key:"getActionButtonKind",value:function(){if(!ee(this.props,"action.button.kind"))return He.TERTIARY;switch(this.props.action.button.kind){case He.PRIMARY:return He.PRIMARY;case He.SECONDARY:return He.SECONDARY;case He.TERTIARY:return He.TERTIARY;case He.GHOST:return He.GHOST;case He.DANGER:return He.DANGER;case He.DANGER_TERTIARY:return He.DANGER_TERTIARY;case He.DANGER_GHOST:return He.DANGER_GHOST;default:return He.TERTIARY}}},{key:"getActionButtonSize",value:function(){if(!ee(this.props,"action.button.size"))return je.SMALL;switch(this.props.action.button.size){case je.SMALL:return je.SMALL;case je.MEDIUM:return je.DEFAULT;case je.LARGE:return je.LARGE;case je.EXTRA_LARGE:return je.EXTRA_LARGE;default:return je.SMALL}}},{key:"applyAction",value:function(){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}},{key:"render",value:function(){var e=this.props.action.className?this.props.action.className:"",t=De("properties-action-button",{hide:this.props.state===Ve.HIDDEN},e),r=this.props.state===Ve.DISABLED,n=this.getActionButtonKind(),o=this.getActionButtonSize(),i=s.createElement(dt,{type:"button",size:o,kind:n,onClick:this.applyAction,disabled:r},this.props.action.label.text),a=i;if(this.props.action.description){var l="tooltip-action-"+this.props.action.name,p=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text);a=s.createElement(or,{id:l,tip:p,direction:"bottom",className:"properties-tooltips",disable:r},i)}return s.createElement("div",{className:t,"data-id":this.props.action.name},a)}}]),i}(s.Component),uo=Ft((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(co);function ho(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var fo=function(r){n(i,r);var o=ho(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={},r.applyAction=r.applyAction.bind(a(r)),r}return t(i,[{key:"applyAction",value:function(){if(this.props.state!==Ve.DISABLED){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}}},{key:"render",value:function(){var e={},t={};this.props.action.image.size&&(e=this.props.action.image.size.height?{height:this.props.action.image.size.height}:{},t=this.props.action.image.size.width?{width:this.props.action.image.size.width}:{});var r=this.props.state===Ve.DISABLED,n=this.props.action.className?this.props.action.className:"",o=De("properties-action-image",{left:"left"===this.props.action.image.placement},{right:"right"===this.props.action.image.placement},{hide:this.props.state===Ve.HIDDEN},{disabled:r},n),i=s.createElement("div",{"data-id":this.props.action.name},s.createElement("img",sr({src:this.props.action.image.url,onClick:this.applyAction},e,t))),a=i;if(this.props.action.description){var l="tooltip-action-"+this.props.action.name,p=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text),c=this.props.action.image.tooltip_direction&&["left","right","top","bottom"].includes(this.props.action.image.tooltip_direction.toLowerCase())?this.props.action.image.tooltip_direction.toLowerCase():"bottom";a=s.createElement(or,{id:l,tip:p,direction:c,className:"properties-tooltips",disable:r},i)}return s.createElement("div",{className:o},a)}}]),i}(s.Component),mo=Ft((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(fo),vo=function(){function r(t){e(this,r),this.controller=t}return t(r,[{key:"generateAction",value:function(e,t){if(t){if("button"===t.actionType)return s.createElement(uo,{key:"action."+e,action:t,controller:this.controller});if("image"===t.actionType)return s.createElement(mo,{key:"action."+e,action:t,controller:this.controller})}return null}}]),r}();function yo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return go(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return go(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function go(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Eo="alertMsgs",Io=function(r){n(i,r);var o=bo(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showFieldPicker:!1},r.genPanel=r.genPanel.bind(a(r)),r.genUIContent=r.genUIContent.bind(a(r)),r.genUIItem=r.genUIItem.bind(a(r)),r._getGroupedMessages=r._getGroupedMessages.bind(a(r)),r.closeFieldPicker=r.closeFieldPicker.bind(a(r)),r.openFieldPicker=r.openFieldPicker.bind(a(r)),r.generateSharedControlNames=r.generateSharedControlNames.bind(a(r)),r.messages=r._getGroupedMessages(t.messages),r.ControlFactory=t.controller.getControlFactory(),r.ControlFactory.setFunctions(r.openFieldPicker,r.genUIItem),r.ControlFactory.setRightFlyout(t.rightFlyout),r.actionFactory=new vo(r.props.controller),r.FIRST_TEARSHEET_ID=null,r.TEARSHEETS={},r.visibleTearsheet=null,r}return t(i,[{key:"shouldComponentUpdate",value:function(e,t){return this.props.controller.isSummaryPanelShowing()||this.props.controller.isSubPanelsShowing()||(this.messages=this._getGroupedMessages(e.messages)),!0}},{key:"_getMessageCountForCategory",value:function(e){var t=this;if(e.group===Eo)return" ("+this.messages.length+")";var r=0;return this.messages.forEach((function(n){var o=t.props.controller.getControl({name:n.id_ref});o&&o.parentCategoryId===e.group&&r++})),r>0?" ("+r+")":null}},{key:"_getGroupedMessages",value:function(e){return Z(e)?[]:E(e,["type"])}},{key:"_getTabId",value:function(e){return e.group}},{key:"_showCategoryPanel",value:function(e){var t=e;this.props.activeTab===e&&(t=""),this.props.setActiveTab(t)}},{key:"_handleMessageClick",value:function(e,t){var r=this.props.controller.getControl(e);this.props.setActiveTab(r.parentCategoryId)}},{key:"_modalTabsOnClick",value:function(e){this.props.setActiveTab(e)}},{key:"genPrimaryTabs",value:function(e,t,r,n){for(var o=[],i=!1,a=0,l=t.filter((function(e){return e.content.itemType!==I.TEARSHEET})),p=t.filter((function(e){return e.content.itemType===I.TEARSHEET})).concat(l),c=0;c<p.length;c++){var u=p[c];if(this.props.controller.getPanelState({name:u.group})!==Ve.HIDDEN){0===c&&u.group===Eo&&(i=!0);var d=this.genUIItem(this._getContainerIndex(i,c),u.content,r,n),h=null;if(this.props.additionalComponents&&(h=this.props.additionalComponents[u.group]),1===p.length&&1===l.length)return s.createElement("div",{key:"cat."+e,className:"properties-single-category"},d,h);if(this.props.rightFlyout&&this.props.categoryView!==ze.TABS){var f=s.createElement(rr,{type:Ue.CHEVRONARROWS.DOWN,className:"properties-category-caret-down"}),m=!1;this.props.activeTab===u.group&&(f=s.createElement(rr,{type:Ue.CHEVRONARROWS.UP,className:"properties-category-caret-up"}),m=!0),u.content.itemType!==I.TEARSHEET&&1===l.length?o.push(s.createElement("div",{key:"cat."+e,className:"properties-single-category"},d,h)):o.push(s.createElement("div",{key:this._getContainerIndex(i,c)+"-"+e,className:De("properties-category-container",{"properties-hidden-container":u.content.itemType===I.TEARSHEET})},s.createElement("button",{type:"button",onClick:this._showCategoryPanel.bind(this,u.group),className:De("properties-category-title",{"properties-light-enabled":this.props.controller.getLight()})},u.text,this._getMessageCountForCategory(u),f),s.createElement("div",{className:De("properties-category-content",{show:m})},d,h)))}else this.props.activeTab===u.group&&(a=c),o.push(s.createElement(mt,{id:"tab."+this._getContainerIndex(i,c)+"-"+e,key:this._getContainerIndex(i,c)+"-"+e,tabIndex:c,label:Wr([u.text,this._getMessageCountForCategory(u)]).join(""),title:Wr([u.text,this._getMessageCountForCategory(u)]).join(""),className:De({"properties-hidden-container":u.content.itemType===I.TEARSHEET}),onClick:this._modalTabsOnClick.bind(this,u.group)},d,h))}}return this.props.rightFlyout&&this.props.categoryView!==ze.TABS?s.createElement("div",{key:"cat."+e,className:"properties-categories"},o):s.createElement(vt,{key:"tab."+e,className:"properties-primaryTabs",selected:a,light:this.props.controller.getLight(),tabContentClassName:De("properties-primary-tab-panel",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===ze.TABS})},o)}},{key:"_getContainerIndex",value:function(e,t){return e&&0===t?"alerts":e?t-1:t}},{key:"genPanelSelector",value:function(e,t,r,n,o,i,a){var l=this.generateAdditionalPanels(t,e,n,o,!1,a);return s.createElement(Rn,{key:"selectorPanel"+e,panels:l,dependsOn:r,controller:this.props.controller})}},{key:"generateAdditionalPanels",value:function(e,t,r,n,o,i){for(var a={},l=0;l<e.length;l++){var p=e[l],c="properties-control-panel";p.content&&"textPanel"===p.content.itemType&&(c=""),o&&(c+=" properties-control-nested-panel"),a[p.group]=s.createElement("div",{className:De(c,i),key:p.group+t},this.genUIItem(l,p.content,r,n))}return a}},{key:"genUIContent",value:function(e,t,r){for(var n=[],o=0;o<e.length;o++)n.push(this.genUIItem(o,e[o],t,r));return n}},{key:"genUIItem",value:function(e,t,r,n){var o="",i=null,a="";switch(t.itemType){case"control":t.additionalItems&&t.additionalItems.length>0&&(t.control.additionalItems=t.additionalItems,t.control.optionalPanels=this.generateAdditionalPanels(t.additionalItems,e,null,n,!0));var l={name:t.control.name};if(r){var p=G(r);return this.props.controller.updateLastChildPropertyId(p,{col:n(t.control.name)}),this.ControlFactory.createControlItem(t.control,p)}return this.ControlFactory.createControlItem(t.control,l);case"additionalLink":var c=this.genPanel(e,t.panel,r,n);return s.createElement($n,{key:"sub-panel-button."+e,label:t.text,title:t.secondaryText,panel:c,controller:this.props.controller,rightFlyout:this.props.rightFlyout});case"staticText":return o=De("properties-static-text",t.textType),i="info"===t.textType?s.createElement("div",null,s.createElement(rr,{type:Ue.INFORMATION,className:"properties-static-text-icon-info"})):null,a=s.createElement("div",{className:o},b(t.text,this.props.controller)),s.createElement("div",{key:"static-text."+e,className:"properties-static-text-container"},i,a);case"linkText":return o=De("properties-link-text-container",t.textType),"warning"===t.textType?i=s.createElement(rr,{type:Fe.WARNING}):"error"===t.textType&&(i=s.createElement(rr,{type:Fe.ERROR})),a=s.createElement(yt,{className:"properties-link-text",onClick:this._handleMessageClick.bind(this,t.controlId)},b(t.text,this.props.controller)),s.createElement("div",{key:"link-text."+e,className:o},i,a);case"hSeparator":return s.createElement("hr",{key:"h-separator."+e,className:"properties-h-separator"});case"panel":case"tearsheet":case"checkboxSelector":return this.genPanel(e,t.panel,r,n);case"subTabs":return s.createElement(ro,{key:"subtabs."+e,tabs:t.tabs,className:t.className,controller:this.props.controller,rightFlyout:this.props.rightFlyout,genUIItem:this.genUIItem,nestedPanel:t.nestedPanel,leftnav:this.props.controller.isTearsheetContainer()});case"primaryTabs":return this.genPrimaryTabs(e,t.tabs,r,n);case"panelSelector":return this.genPanelSelector(e,t.tabs,t.dependsOn,r,n,t.id,t.className);case"customPanel":return this.generateCustomPanel(e,t.panel);case"action":return this.actionFactory.generateAction(e,t.action);case"textPanel":return t.panel?s.createElement(io,{key:"text-panel-"+e,panel:t.panel,controller:this.props.controller}):s.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType);default:return s.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType)}}},{key:"generateCustomPanel",value:function(e,t){if(this.props.customPanels){var r,n=yo(this.props.customPanels);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.id()===t.id)try{return s.createElement("div",{className:De("properties-custom-panel",{"properties-control-nested-panel":te(t,"nestedPanel",!1)}),key:"custom."+e},new o(t.parameters,this.props.controller,t.data).renderPanel())}catch(e){return g.warn("Error thrown creating custom panel: "+e),null}}}catch(e){n.e(e)}finally{n.f()}}return s.createElement("div",{key:"custom."+e},"Panel Not Found: ",t.id)}},{key:"generateSharedControlNames",value:function(e){var t,r=yo(this.props.controller.getSharedCtrlInfo());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(void 0!==n.id&&n.id===e.id)return}}catch(e){r.e(e)}finally{r.f()}var o,i=[],a=yo(e.uiItems);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.control&&s.control.name){var l=s.control.name;i.push({controlName:l})}}}catch(e){a.e(e)}finally{a.f()}this.props.controller.addSharedControls(e.id,i)}},{key:"genPanel",value:function(e,t,r,n){var o=this,i=this.genUIContent(t.uiItems,r,n),a="panel."+e;switch(t.panelType){case"columnSelection":return this.generateSharedControlNames(t),i=this.genUIContent(t.uiItems,r,n),s.createElement(Zn,{key:a,controller:this.props.controller,panel:t},i);case"summary":return this.props.rightFlyout?s.createElement(Un,{key:"summary-panel-"+a,controller:this.props.controller,panel:t},i):i;case"actionPanel":return s.createElement(lo,{key:"action-panel-"+e,controller:this.props.controller,panel:t},i);case"twisty":return s.createElement(zn,{key:a,controller:this.props.controller,panel:t},i);case"tearsheet":if(this.TEARSHEETS[t.id]={panel:t,title:t.label,description:t.description?t.description.text:null,content:i},null!==this.props.controller.getActiveTearsheet()?this.visibleTearsheet=this.TEARSHEETS[this.props.controller.getActiveTearsheet()]:this.visibleTearsheet=null,!this.FIRST_TEARSHEET_ID||this.FIRST_TEARSHEET_ID===t.id){this.FIRST_TEARSHEET_ID=t.id;return s.createElement(Br,{open:null!==this.props.controller.getActiveTearsheet(),onCloseCallback:function(){o.props.controller.clearActiveTearsheet()},key:t.id,tearsheet:this.visibleTearsheet})}return null;case"column":return s.createElement(Yn,{key:a,controller:this.props.controller,panel:t},i);default:return s.createElement(Zn,{key:a,controller:this.props.controller,panel:t},i)}}},{key:"closeFieldPicker",value:function(e,t){this.closeFieldPickerCallback&&(this.closeFieldPickerCallback(e,t),this.closeFieldPickerCallback=null),this.props.showPropertiesButtons(!0),this.fieldPickerPropertyId=null,this.setState({showFieldPicker:!1})}},{key:"openFieldPicker",value:function(e,t){this.props.showPropertiesButtons(!1),this.fieldPickerPropertyId=e,this.closeFieldPickerCallback=t,this.setState({showFieldPicker:!0})}},{key:"fieldPicker",value:function(e){if(this.fieldPickerPropertyId&&this.fieldPickerPropertyId.name){var t,r=this.props.controller.getPropertyValue(this.fieldPickerPropertyId),n=this.props.controller.getFilteredDatasetMetadata(this.fieldPickerPropertyId),o=this.props.controller.getControl(this.fieldPickerPropertyId),i=S(o),a=o.subControls;-1!==i&&(t=a?a[i].dmImage:o.dmImage);var l=C(o,r);return s.createElement("div",{className:"properties-fp-table"},s.createElement(R,{key:"field-picker-control",controller:this.props.controller,closeFieldPicker:this.closeFieldPicker,currentFields:l,fields:n,title:e,rightFlyout:this.props.rightFlyout,dmIcon:t}))}return s.createElement("div",null)}},{key:"genAlertsTab",value:function(e){var t=e.map((function(e){return{itemType:"linkText",text:e.text,textType:e.type,controlId:{name:e.id_ref}}}));return{text:u(this.props.controller.getReactIntl(),Oe.ALERTS_TAB_TITLE),group:Eo,content:{itemType:"panel",panel:{id:"alerts-panel",panelType:"general",uiItems:t}}}}},{key:"render",value:function(){var e=this.props.controller.getUiItems();!Z(this.messages)&&"primaryTabs"===e[0].itemType&&e[0].tabs&&e[0].tabs.length>1&&(e=G(e))[0].tabs.unshift(this.genAlertsTab(this.messages));var t,r=this.genUIContent(e),n=s.createElement("div",null),o=this.props.controller.getForm(),i=u(this.props.controller.getReactIntl(),Oe.FIELDPICKER_SAVEBUTTON_LABEL)+" "+o.label;return this.state.showFieldPicker&&(this.props.rightFlyout?n=s.createElement(kn,{showPropertiesButtons:!1,show:!0,title:i,light:this.props.controller.getLight()},this.fieldPicker(i)):this.props.controller.isTearsheetContainer()?t=s.createElement(Br,{open:!0,stacked:!0,tearsheet:{title:i,content:this.fieldPicker()}}):r=this.fieldPicker(i)),s.createElement("div",{className:De("properties-editor-form",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===ze.TABS},{"field-picker":this.state.showFieldPicker})},r,n,t)}}]),i}(s.Component),So=Ft((function(e,t){return{activeTab:e.componentMetadataReducer.activeTab,messages:t.controller.getErrorMessages(!0,!0,!0)}}),(function(e,t){return{setActiveTab:function(t){e(In(t))}}}))(Io),Co=K;var Ro=function(e){return function(t){return null==e?void 0:Co(e,t)}},To=function(){function r(t){e(this,r),this.resources=t}return t(r,[{key:"l10n",value:function(e,t){if(this.resources){var r=Ro(this.resources)(e);if(r||""===r)return r}return t||e}},{key:"l10nResource",value:function(e){var t;return e&&(e.resource_key?(t=this.l10n(e.resource_key))&&t!==e.resource_key||!e.default||(t=e.default):e.default&&(t=e.default)),t}},{key:"l10nLabel",value:function(e,t){return this.l10nResource(e.label)?this.l10nResource(e.label):this.l10n(t+".label",t)}},{key:"l10nDesc",value:function(e,t){return this.l10nResource(e.description)?this.l10nResource(e.description):this.l10n(t+".desc",t)}},{key:"l10nValueLabel",value:function(e,t){var r=e+"."+t+".label";return this.l10n(r,t)}},{key:"l10nValueDesc",value:function(e,t){var r=e+"."+t+".desc",n=this.l10n(r,t);return n!==t?n:null}}]),r}(),_o=function(){function r(){e(this,r)}return t(r,null,[{key:"make",value:function(e){var t;return e&&((t=new r).default=e.default,t.resource_key=e.resource_key,e.placement&&(t.placement=e.placement),e.type&&(t.type=e.type),e.link&&(t.link=e.link)),t}}]),r}();function ko(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Lo=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.name=t,this.parameters=n,this.actions=o,this.type=i,this.label=_o.make(a),this.dependsOn=s,this.insertPanels=l,this.nestedPanel=p,this.subGroups=c,this.description=_o.make(u),this.data=d,this.className=h,this.open=f}return t(r,[{key:"parameterNames",value:function(){return this.parameters}},{key:"actionIds",value:function(){return this.actions}},{key:"groupType",value:function(){return this.type?this.type:T.CONTROLS}}],[{key:"makeGroup",value:function(e){if(e){var t;if(ee(e,"group_info")){t=[];var n,o=ko(e.group_info);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=r.makeGroup(i);null!==a&&t.push(a)}}catch(e){o.e(e)}finally{o.f()}}return new r(Ro(e)("id"),Ro(e)("parameter_refs"),Ro(e)("action_refs"),Ro(e)("type"),Ro(e)("label"),Ro(e)("depends_on_ref"),Ro(e)("insert_panels"),Ro(e)("nested_panel"),t,Ro(e)("description"),Ro(e)("data"),Ro(e)("class_name"),Ro(e)("open"))}return null}}]),r}(),Ao=function(){function r(t){e(this,r),this.groups=t}return t(r,null,[{key:"makeGroupMetadata",value:function(e,t){var n=[];if(e){var o,i=ko(e);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=Lo.makeGroup(a);null!==s&&n.push(s)}}catch(e){i.e(e)}finally{i.f()}}else n.push(new Lo(nr(),t,null,T.CONTROLS));return new r(n)}}]),r}();function Do(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Oo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Oo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Po=t((function t(r,n,o,i,a,s,l,p){e(this,t),this.name=r,this.label=n,this.description=o,this.actionType=i,this.data=a,this.image=s,this.button=l,this.className=p})),No=function(){function r(){e(this,r)}return t(r,null,[{key:"makeActionDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=_o.make(e.label),t.description=_o.make(e.description),t.control=e.control,t.data=e.data,t.image=e.image,t.button=e.button,t.className=e.class_name,t}return null}}]),r}(),xo=function(){function r(t){e(this,r),this.actionDefs=t}return t(r,[{key:"getAction",value:function(e){var t;return this.actionDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeActionMetadata",value:function(e){if(e){var t,n=[],o=Do(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=No.makeActionDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();function Bo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Mo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Fo=function(){function r(t){e(this,r),t.id&&(this.name=t.id),t.label&&(this.label=_o.make(t.label)),t.description&&(this.description=_o.make(t.description)),t.type&&(this.type=t.type),t.role&&(this.role=t.role),t.valueRestriction&&(this.valueRestriction=t.valueRestriction),null!==t.defaultValue&&"undefined"!==f(t.defaultValue)?t.defaultValue.parameter_ref?(this.defaultValue={},this.defaultValue.parameterRef=t.defaultValue.parameter_ref):this.defaultValue=t.defaultValue:void 0===t.defaultValue&&(this.isList()||this.isMapValue())&&(this.defaultValue=[]),"boolean"==typeof t.labelVisible&&(this.labelVisible=t.labelVisible),t.control&&(this.control=t.control),t.orientation&&(this.orientation=t.orientation),t.width&&(this.width=t.width),t.charLimit&&(this.charLimit=t.charLimit),t.placeHolderText&&(this.placeHolderText=_o.make(t.placeHolderText)),t.separator&&(this.separator=t.separator),t.resource_key&&(this.resource_key=t.resource_key),"boolean"===f(t.visible)?this.visible=t.visible:this.visible=!0,t.valueIcons&&(this.valueIcons=t.valueIcons),"boolean"===f(t.sortable)&&(this.sortable=t.sortable),"boolean"===f(t.filterable)&&(this.filterable=t.filterable),"boolean"===f(t.resizable)&&(this.resizable=t.resizable),t.editStyle&&(this.editStyle=t.editStyle),"boolean"===f(t.required)&&(this.required=t.required),t.numberGenerator&&(t.numberGenerator.label=_o.make(t.numberGenerator.label),this.numberGenerator=t.numberGenerator),t.isKey&&(this.isKey=t.isKey),t.dmDefault&&(this.dmDefault=t.dmDefault),t.dmImage&&(this.dmImage=t.dmImage),t.language&&(this.language=t.language),t.enableMaximize&&(this.enableMaximize=t.enableMaximize),"boolean"===f(t.summary)&&(this.summary=t.summary),t.increment&&(this.increment=t.increment),t.textAfter&&(this.textAfter=_o.make(t.textAfter)),t.textBefore&&(this.textBefore=_o.make(t.textBefore)),"boolean"===f(t.moveableRows)&&(this.moveableRows=t.moveableRows),t.generatedValues&&(this.generatedValues=t.generatedValues),t.dateFormat&&(this.dateFormat=t.dateFormat),t.timeFormat&&(this.timeFormat=t.timeFormat),t.customControlId&&(this.customControlId=t.customControlId),t.data&&(this.data=t.data),t.rows&&(this.rows=t.rows),t.displayChars&&(this.displayChars=t.displayChars),t.uionly&&(this.uionly=t.uionly),t.actionRef&&(this.actionRef=t.actionRef),"boolean"===f(t.customValueAllowed)&&(this.customValueAllowed=t.customValueAllowed),t.className&&(this.className=t.className)}return t(r,[{key:"isList",value:function(){return!!this.type&&this.type.startsWith("array[")}},{key:"isMapValue",value:function(){return!!this.type&&this.type.startsWith("map[")}},{key:"isSubPanelEdit",value:function(){return this.editStyle===_.SUBPANEL}},{key:"isCompoundField",value:function(){return!(!this.role||!this.type)&&((this.type===m.OBJECT||this.baseType()===m.OBJECT)&&this.role===v.COLUMN)}},{key:"propType",value:function(){var e;for(var t in m)this.baseType()===m[t]&&(e=m[t]);return e||(e=m.STRUCTURE),e}},{key:"getRole",value:function(){return this.role?this.role:this.getValidValues()?v.ENUM:v.UNSPECIFIED}},{key:"baseType",value:function(){var e=this.type;return this.isList()?e.substring(6,this.type.length-1):this.isMapValue()?e.substring(e.indexOf(",")+1,this.type.length-1).trim():this.valueRestriction&&!this.type?m.STRING:e}},{key:"getValidValues",value:function(){return this.valueRestriction?this.valueRestriction:this.type===m.BOOLEAN?[!0,!1]:void 0}},{key:"getValidValueCount",value:function(){return this.getValidValues()?this.getValidValues().length:0}},{key:"getAdditionalText",value:function(e){return e.l10nResource(this.placeHolderText)}},{key:"getTextAfter",value:function(e){return e.l10nResource(this.textAfter)}},{key:"getTextAfterType",value:function(){return this.textAfter?this.textAfter.type:null}},{key:"getTextBefore",value:function(e){return e.l10nResource(this.textBefore)}},{key:"getTextBeforeType",value:function(){return this.textBefore?this.textBefore.type:null}},{key:"getControl",value:function(e){return this.control?this.control:e}},{key:"columns",value:function(e){return this.width?this.width:e}},{key:"separatorAfter",value:function(){return this.separator===k.AFTER}},{key:"separatorBefore",value:function(){return this.separator===k.BEFORE}}],[{key:"makeParameterDef",value:function(e,t,n){return e?new r({id:Ro(e)("id"),enableMaximize:Ro(t)("enable_maximize"),label:Ro(t)("label"),description:Ro(t)("description"),type:Ro(e)("type"),role:Ro(e)("role"),valueRestriction:Ro(e)("enum"),defaultValue:Ro(e)("default"),labelVisible:Ro(t)("label_visible"),control:Ro(t)("control"),orientation:Ro(t)("orientation"),width:Ro(t)("width"),charLimit:Ro(t)("char_limit"),placeHolderText:Ro(t)("place_holder_text"),separator:Ro(t)("separator"),resource_key:Ro(t)("resource_key"),visible:Ro(t)("visible"),valueIcons:Ro(t)("value_icons"),sortable:Ro(t)("sortable"),filterable:Ro(t)("filterable"),resizable:Ro(t)("resizable"),editStyle:Ro(t)("edit_style"),required:Ro(e)("required"),numberGenerator:Ro(t)("number_generator"),isKey:n,dmDefault:Ro(t)("dm_default"),dmImage:Ro(t)("dm_image"),language:Ro(t)("language"),summary:Ro(t)("summary"),increment:Ro(t)("increment"),textAfter:Ro(t)("text_after"),textBefore:Ro(t)("text_before"),moveableRows:Ro(t)("moveable_rows"),generatedValues:Ro(t)("generated_values"),dateFormat:Ro(t)("date_format"),timeFormat:Ro(t)("time_format"),customControlId:Ro(t)("custom_control_id"),data:Ro(t)("data"),rows:Ro(t)("rows"),displayChars:Ro(t)("display_chars"),uionly:Ro(e)("uionly"),actionRef:Ro(t)("action_ref"),customValueAllowed:Ro(t)("custom_value_allowed"),className:Ro(t)("class_name")}):null}}]),r}();function Vo(e,t){if(t){var r,n=Bo(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e===o.parameter_ref)return o}}catch(e){n.e(e)}finally{n.f()}}return null}var Uo=function(){function r(t){e(this,r),this.paramDefs=t}return t(r,[{key:"getParameter",value:function(e){var t;return this.paramDefs.forEach((function(r){r.name===e&&(t=r)})),t}},{key:"getParameters",value:function(){return this.paramDefs.map((function(e){return e.name}))}}],[{key:"makeParameterMetadata",value:function(e,t,n){var o=[];if(Array.isArray(e)){var i,a=Bo(e);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=Fo.makeParameterDef(s,Vo(s.id,t));l&&o.push(l)}}catch(e){a.e(e)}finally{a.f()}}if(Array.isArray(n)){var p,c=Bo(n);try{for(c.s();!(p=c.n()).done;){var u=p.value,d=Fo.makeParameterDef(u,Vo(u.id,t));d&&(d.uionly=!0,o.push(d))}}catch(e){c.e(e)}finally{c.f()}}return new r(o)}}]),r}();function Ho(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return jo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function jo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var zo=t((function t(r,n,o,i,a,s,l){e(this,t),this.id=r,this.label=n,this.description=o,this.icon=i,this.carbonIcon=a,this.enabled=s,this.divider=l})),qo=function(){function r(){e(this,r)}return t(r,null,[{key:"makeButtonDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=_o.make(e.label),t.description=_o.make(e.description),t.icon=e.icon,t.carbonIcon=e.carbon_icon,t.enabled=e.enabled,t.divider=e.divider,t}return null}}]),r}(),Go=function(){function r(t){e(this,r),this.buttonDefs=t}return t(r,[{key:"getButton",value:function(e){var t;return this.buttonDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeButtonMetadata",value:function(e){if(e){var t,n=[],o=Ho(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=qo.makeButtonDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();function Wo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return $o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function $o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Xo=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h){e(this,r),this.name=t,this.keyDefinition=n,this.parameterMetadata=o,this.moveableRows=i,this.label=_o.make(a),this.rowSelection=s,this.buttons=d,this.addRemoveRows="boolean"!=typeof l||l,this.header="boolean"!=typeof p||p,"boolean"==typeof c&&(this.includeAllFields=c),Array.isArray(u)&&(this.layout=u),this.type=void 0===h?"array":h}return t(r,[{key:"parameterNames",value:function(){var e=[];if(this.parameterMetadata){var t,r=Wo(this.parameterMetadata.paramDefs);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.push(n.name)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"hasSubPanel",value:function(){if(this.parameterMetadata){var e,t=Wo(this.parameterMetadata.paramDefs);try{for(t.s();!(e=t.n()).done;){if(e.value.isSubPanelEdit())return!0}}catch(e){t.e(e)}finally{t.f()}}return!1}},{key:"keyAttributeIndex",value:function(){return this.keyDefinition?0:-1}},{key:"defaultStructure",value:function(){var e=[];return this.parameterMetadata.paramDefs.forEach((function(t){e.push(t.defaultValue)})),this.keyDefinition&&e.unshift(this.keyDefinition.defaultValue),e}}],[{key:"makeStructure",value:function(e,t){return e?new r(Ro(e)("id"),Fo.makeParameterDef(Ro(e)("key_definition"),Ro(t)("key_definition"),!0),Uo.makeParameterMetadata(Ro(e)("parameters"),Ro(t)("parameters")),Ro(t)("moveable_rows"),Ro(t)("label"),Ro(t)("row_selection"),Ro(t)("add_remove_rows"),Ro(t)("header"),Ro(t)("include_all_fields"),Ro(t)("layout"),Go.makeButtonMetadata(Ro(t)("buttons")),Ro(e)("type")):null}}]),r}();function Ko(e,t){if(t){var r,n=Wo(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e===o.complex_type_ref)return o}}catch(e){n.e(e)}finally{n.f()}}return null}var Yo=function(){function r(t){e(this,r),this.structures=t}return t(r,[{key:"getStructure",value:function(e){var t;return this.structures.forEach((function(r){r.name===e&&(t=r)})),t}}],[{key:"makeStructureMetadata",value:function(e,t){if(e){var n,o=[],i=Wo(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=Xo.makeStructure(a,Ko(a.id,t));null!==s&&o.push(s)}}catch(e){i.e(e)}finally{i.f()}return new r(o)}return null}}]),r}(),Jo=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.name=t,this.icon=n,this.editorSize=o,this.pixelWidth=i,this.label=a,this.labelEditable=s,this.help=l,this.description=_o.make(p),this.structureMetadata=c,this.parameterMetadata=u,this.groupMetadata=d,this.actionMetadata=h,this.heading=f}return t(r,[{key:"editorSizeHint",value:function(e){return this.editorSize?this.editorSize:e||p.SMALL}}],[{key:"makePropertyDef",value:function(e,t,n,o){var i=Yo.makeStructureMetadata(n,Ro(o)("complex_type_info")),a=Uo.makeParameterMetadata(t,Ro(o)("parameter_info"),Ro(o)("ui_parameters")),s=xo.makeActionMetadata(Ro(o)("action_info")),l=Ao.makeGroupMetadata(Ro(o)("group_info"),a.getParameters()),p=e&&e.title?e.title:null,c=e&&void 0!==e.editable?e.editable:qe;return new r(Ro(o)("id"),Ro(o)("icon"),Ro(o)("editor_size"),Ro(o)("pixel_width"),p,c,Ro(o)("help"),Ro(o)("description"),i,a,l,s,Ro(o)("label"))}}]),r}(),Qo=t((function t(r){e(this,t),this.name=r.name,r.label&&(this.label=r.label),r.description&&(this.description=r.description),"boolean"==typeof r.labelVisible&&(this.labelVisible=r.labelVisible),r.controlType&&(this.controlType=r.controlType),r.valueDef&&(this.valueDef=r.valueDef),r.role&&(this.role=r.role),r.additionalText&&(this.additionalText=r.additionalText),r.orientation&&(this.orientation=r.orientation),r.values&&(this.values=r.values),r.valueLabels&&(this.valueLabels=r.valueLabels),r.valueDescs&&(this.valueDescs=r.valueDescs),r.valueIcons&&(this.valueIcons=r.valueIcons),"boolean"==typeof r.sortable&&(this.sortable=r.sortable),"boolean"==typeof r.filterable&&(this.filterable=r.filterable),"boolean"==typeof r.resizable&&(this.resizable=r.resizable),r.language&&(this.language=r.language),r.enableMaximize&&(this.enableMaximize=r.enableMaximize),r.charLimit&&(this.charLimit=r.charLimit),r.summary&&(this.summary=r.summary),r.increment&&(this.increment=r.increment),r.generatedValues&&(this.generatedValues={},r.generatedValues.operation&&(this.generatedValues.operation=r.generatedValues.operation),r.generatedValues.start_value&&(this.generatedValues.startValue=r.generatedValues.start_value)),r.dateFormat&&(this.dateFormat=r.dateFormat),r.timeFormat&&(this.timeFormat=r.timeFormat),r.customControlId&&(this.customControlId=r.customControlId),r.data&&(this.data=r.data),r.rows&&(this.rows=r.rows),r.displayChars&&(this.displayChars=r.displayChars),r.action&&(this.action=r.action),r.structureType&&(this.structureType=r.structureType),r.subControls&&(this.subControls=r.subControls),r.childItem&&(this.childItem=r.childItem),r.layout&&(this.layout=r.layout),"number"==typeof r.keyIndex&&(this.keyIndex=r.keyIndex),r.defaultRow&&(this.defaultRow=r.defaultRow),"boolean"==typeof r.moveableRows&&(this.moveableRows=r.moveableRows),"boolean"==typeof r.required&&(this.required=r.required),r.rowSelection&&(this.rowSelection=r.rowSelection),"boolean"==typeof r.addRemoveRows&&(this.addRemoveRows=r.addRemoveRows),"boolean"==typeof r.hideEditButton&&(this.hideEditButton=r.hideEditButton),"boolean"==typeof r.header&&(this.header=r.header),"boolean"==typeof r.uionly&&(this.uionly=r.uionly),"boolean"==typeof r.includeAllFields&&(this.includeAllFields=r.includeAllFields),r.dmImage&&(this.dmImage=r.dmImage),"boolean"==typeof r.visible&&(this.visible=r.visible),"number"==typeof r.width&&(this.width=r.width),r.editStyle?this.editStyle=r.editStyle:r.isKeyField||void 0===r.structureType||(this.editStyle=_.INLINE),r.dmDefault&&(this.dmDefault=r.dmDefault),r.dmImage&&(this.dmImage=r.dmImage),r.customValueAllowed&&(this.customValueAllowed=r.customValueAllowed),r.className&&(this.className=r.className),r.buttons&&(this.buttons=r.buttons),this.light=te(r,"light",!0)}));function Zo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ei(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zo(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ti=function(){function r(t){e(this,r),this.id=Ro(t)("id"),this.itemType=Ro(t)("itemType"),this.tabs=Ro(t)("tabs"),this.panel=Ro(t)("panel"),this.control=Ro(t)("control"),this.text=Ro(t)("text"),this.textType=Ro(t)("textType"),this.secondaryText=Ro(t)("secondaryText"),this.dependsOn=Ro(t)("dependsOn"),this.action=Ro(t)("action"),this.className=Ro(t)("className"),this.nestedPanel=Ro(t)("nestedPanel")}return t(r,null,[{key:"makePrimaryTabs",value:function(e){return new r({itemType:I.PRIMARY_TABS,tabs:e})}},{key:"makeSubTabs",value:function(e,t,n){return new r({itemType:I.SUB_TABS,tabs:e,className:t,nestedPanel:n})}},{key:"makePanelSelector",value:function(e,t,n,o){return new r({id:e,itemType:I.PANEL_SELECTOR,tabs:t,dependsOn:n,className:o})}},{key:"makePanel",value:function(e){return new r({itemType:I.PANEL,panel:e})}},{key:"makeAdditionalLink",value:function(e,t,n){return new r({itemType:I.ADDITIONAL_LINK,panel:n,text:e,secondaryText:t})}},{key:"makeControl",value:function(e){return new r({itemType:I.CONTROL,control:e})}},{key:"makeAction",value:function(e){return new r({itemType:I.ACTION,action:e})}},{key:"makeHSeparator",value:function(){return new r({itemType:I.HORIZONTAL_SEPARATOR})}},{key:"makeStaticText",value:function(e,t){return new r({itemType:I.STATIC_TEXT,text:e,textType:t})}},{key:"makeTextPanel",value:function(e,t,n,o,i){return new r({itemType:I.TEXT_PANEL,panel:{id:e,label:t,description:n,className:o,nestedPanel:i}})}},{key:"makeCustomPanel",value:function(e,t){return new r({itemType:I.CUSTOM_PANEL,panel:e,className:t})}},{key:"makeTearsheetPanel",value:function(e,t){return new r({itemType:I.TEARSHEET,panel:ei(ei({},e),{},{description:t})})}}]),r}(),ri=t((function t(r,n,o){e(this,t),this.text=r,this.group=n,this.content=o})),ni=function(){function r(t,n,o,i){e(this,r),this.propType=t===m.OBJECT?m.STRUCTURE:t,this.isList=n,this.isMap=o,this.defaultValue=i}return t(r,null,[{key:"make",value:function(e){return new r(e.propType(),e.isList(),e.isMapValue(),e.defaultValue)}}]),r}(),oi=t((function t(r,n){e(this,t),this.text=r,n&&(this.numberGenerator=n)})),ii=t((function t(r,n,o){e(this,t),this.text=r,n&&(this.placement=n),o&&(this.link=o)})),ai=t((function t(r,n,o,i,a,s){var l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.uiItems=a,this.open=l,s&&(this.label=s),o&&(this.className=o)})),si=t((function t(r,n,o,i,a,s,l){e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.uiItems=a,o&&(this.className=o),s&&(this.label=s),l&&(this.description=l)})),li=t((function t(r,n,o,i,a,s){e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.parameters=a,this.data=s,o&&(this.className=o)})),pi=t((function t(r,n){e(this,t),this.text=r,n.range&&(this.range=n.range)}));function ci(e,t,r,n){var o=r.l10nLabel(t,t.name),i={light:!0,containerType:n};return new ri(o,t.name,ui(e.parameterMetadata,e.actionMetadata,t,e.structureMetadata,r,i))}function ui(e,t,r,n,o,i){var a=r.name,s=null,l=null,p=r.className,c=te(r,"nestedPanel",!1);switch(r.groupType()){case T.CONTROLS:return ti.makePanel(new ai(a,w.GENERAL,p,c,di(e,t,r,n,o,i)));case T.COLUMN_SELECTION:return ti.makePanel(new ai(a,w.COLUMN_SELECTION,p,c,di(e,t,r,n,o,i)));case T.ADDITIONAL:var u=new ai(a,w.GENERAL,p,c,di(e,t,r,n,o,i));return l=o.l10nLabel(r,r.name),ti.makeAdditionalLink(l,l,u);case T.SUB_TABS:var d=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=r.name;s=ui(e,t,r,n,o,i),l=o.l10nLabel(r,r.name),d.push(new ri(l,a,s))})),ti.makeSubTabs(d,p,c);case T.PANEL_SELECTOR:var h=hi(r,e,t,n,o,i);return ti.makePanelSelector(a,h,r.dependsOn,p);case T.PANELS:var f=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ui(e,t,r,n,o,i),f.push(s)})),ti.makePanel(new ai(a,w.GENERAL,p,c,f));case T.COLUMN_PANEL:var m=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ui(e,t,r,n,o,i),m.push(s)})),ti.makePanel(new ai(a,w.COLUMN_PANEL,p,c,m));case T.CUSTOM_PANEL:return ti.makeCustomPanel(new li(a,w.CUSTOM,p,c,r.parameterNames(),r.data));case T.SUMMARY_PANEL:l=o.l10nLabel(r,r.name);var v=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ui(e,t,r,n,o,i),v.push(s)})),ti.makePanel(new ai(a,w.SUMMARY,p,c,v,l));case T.ACTION_PANEL:var y;return l=o.l10nResource(r.label),r.description&&(y=new ii(o.l10nResource(r.description),null,r.description?r.description.link:null)),ti.makePanel(new si(a,w.ACTION_PANEL,p,c,function(e,t,r,n,o){var i=[];Array.isArray(r.actionIds())&&r.actionIds().forEach((function(e){var r=ti.makeAction(gi(t.getAction(e),o));i.push(r)}));return i}(0,t,r,0,o),l,y));case T.TEXT_PANEL:var b;return l=o.l10nResource(r.label),r.description&&(b=new ii(o.l10nResource(r.description),r.description?r.description.placement:null,r.description?r.description.link:null)),ti.makeTextPanel(a,l,b,p,c);case T.TWISTY_PANEL:l=o.l10nLabel(r,r.name);var E=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ui(e,t,r,n,o,i),E.push(s)})),ti.makePanel(new ai(a,w.TWISTY_PANEL,p,c,E,l,r.open));case T.TEARSHEET_PANEL:var I;l=o.l10nLabel(r,r.name),r.description&&(I=new ii(o.l10nResource(r.description)));var S=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=Object.assign({},i,{light:!1});s=ui(e,t,r,n,o,a),S.push(s)})),ti.makeTearsheetPanel(new ai(a,w.TEARSHEET,p,c,S,l,!1),I);default:return g.warn("(Unknown group type '"+r.groupType()+"')"),null}}function di(e,t,r,n,o,i){var a=[],s=[];return Array.isArray(r.parameterNames())?(r.parameterNames().forEach((function(l){var p,c=e.getParameter(l);if(c.propType()===m.STRUCTURE&&n&&(p=n.getStructure(c.baseType())),!(r instanceof Xo)||r instanceof Xo&&c.isSubPanelEdit()){var u=mi(e,l,r,p,o,t,n,null,i),d=ti.makeControl(u);if(c.separatorBefore()&&a.push(ti.makeHSeparator()),c.textBefore&&a.push(ti.makeStaticText(c.getTextBefore(o),c.getTextBeforeType())),a.push(d),c.textAfter&&a.push(ti.makeStaticText(c.getTextAfter(o),c.getTextAfterType())),c.separatorAfter()&&a.push(ti.makeHSeparator()),r.subGroups&&r.subGroups.length>0)for(var f=0;f<r.subGroups.length;f++)d.control.controlType===h.RADIOSET&&d.control.orientation===L.VERTICAL&&r.subGroups[f].type===T.PANEL_SELECTOR&&!0===r.subGroups[f].insertPanels&&r.subGroups[f].dependsOn===d.control.name&&(s.push(r.subGroups[f].dependsOn),d.additionalItems=hi(r.subGroups[f],e,t,n,o,i))}})),Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){if(!function(e,t){if(t)for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}(s,r.dependsOn)){var l=ui(e,t,r,n,o,i);a.push(l)}})),a):a}function hi(e,t,r,n,o,i){var a=[];return Array.isArray(e.subGroups)&&e.subGroups.forEach((function(e){var s=e.name,l=ui(t,r,e,n,o,i),p=o.l10nLabel(e,e.name);a.push(new ri(p,s,l))})),a}function fi(e,t){var r,n=e.getRole();if(e.isList()){var o=function(e){var t={};switch(e.getRole()){case v.TEXT:t.controlType=h.TEXTAREA;break;case v.ENUM:e.getValidValueCount()<5?t.controlType=h.CHECKBOXSET:t.controlType=h.SOMEOFSELECT;break;case v.COLUMN:t.role=v.COLUMN,t.controlType=h.SELECTCOLUMNS;break;default:t.controlType=h.TEXTAREA}return t}(e);r=o.controlType,o.role&&(n=o.role)}else switch(e.getRole()){case v.TEXT:r=h.TEXTAREA;break;case v.ENUM:r=e.getValidValueCount()>4||t&&!yi(e)?h.ONEOFSELECT:h.RADIOSET;break;case v.COLUMN:n=v.COLUMN,r=t&&function(e){if(e.isList()||e.isMapValue())return yi(e);return!1}(e)?h.SELECTCOLUMNS:h.SELECTCOLUMN;break;case v.EXPRESSION:r=h.EXPRESSION;break;case v.EMAIL:n=v.EMAIL,r=h.TEXTFIELD;break;case v.URL:n=v.URL,r=h.TEXTFIELD;break;case v.COLOR:n=v.COLOR,r=h.TEXTFIELD;break;default:r=h.TEXTFIELD}return{controlType:r,role:n}}function mi(e,t,r,n,o,i,a,s,l){var p=void 0!==s&&s,c=p?s:e.getParameter(t),u=c.getAdditionalText(o),d=c.orientation,f=c.required;c.numberGenerator&&(c.numberGenerator=new pi(o.l10nLabel(c.numberGenerator,c.name),c.numberGenerator));var y,b=new oi(o.l10nLabel(c,c.name),c.numberGenerator);c.description&&(y=new ii(o.l10nDesc(c,c.name),c.description?c.description.placement:null,c.description?c.description.link:null));var E,I,S,C,R,_,k,L,A,D,O,P,N,x,B,M=!0,F=c.moveableRows,V=c.structureType;if(p||c.getRole()!==v.CUSTOM)switch(c.propType()){case m.STRING:var U=fi(c,p);I=U.controlType,E=U.role;break;case m.PASSWORD:I=h.PASSWORDFIELD;break;case m.BOOLEAN:c.control&&c.control!==h.CHECKBOX||(M=!1,I=h.CHECKBOX);break;case m.INTEGER:case m.LONG:case m.DOUBLE:I=c.isList()?h.TEXTAREA:h.NUMBERFIELD;break;case m.DATE:E=m.DATE,I=c.control===h.DATEPICKER?h.DATEPICKER:c.control===h.DATEPICKERRANGE?h.DATEPICKERRANGE:c.isList()?h.TEXTAREA:h.DATEFIELD;break;case m.TIME:E=m.TIME,I=c.isList()?h.TEXTAREA:h.TIMEFIELD;break;case m.TIMESTAMP:I=h.TIMESTAMP;break;case m.STRUCTURE:var H=p&&a?a.getStructure(c.baseType()):n;if(H){if(H.hasSubPanel()&&(_=function(e,t,r,n){var o=new ai(e.name,w.GENERAL,"properties-editstyle-sub-panel",!1,di(e.parameterMetadata,e.actionMetadata,e,r,t,n)),i=t.l10nLabel(e,e.name);return ti.makeAdditionalLink("...",i,o)}(H,o,a,l)),C=H.keyAttributeIndex(),R=H.defaultStructure(),S=[],H.parameterMetadata&&Array.isArray(H.parameterMetadata.paramDefs)&&H.parameterMetadata.paramDefs.forEach((function(e){var t=vi(e,o,a,l);S.push(t)})),(c.isMapValue()||c.isList())&&H.keyDefinition){var j=vi(H.keyDefinition,o,a,l);S.unshift(j)}c.isList()||c.isMapValue()?(!p&&r&&void 0!==r.groupType&&r.groupType()===T.COLUMN_SELECTION||c.control===h.STRUCTURETABLE||c.getRole()===v.COLUMN?(I=h.STRUCTURETABLE,F=H.moveableRows,k=H.rowSelection,L=H.addRemoveRows,A=H.header,D=H.includeAllFields):(I=h.STRUCTURELISTEDITOR,F=H.moveableRows,k=H.rowSelection,L=H.addRemoveRows,A=H.header),H.buttons&&(P=function(e,t){var r=[];return e.buttonDefs.forEach((function(n){r.push(function(e,t){var r,n;e.label&&(r=new oi(t.l10nLabel(e,e.id)));e.description&&(n=new ii(t.l10nDesc(e,e.description)));return new zo(e.id,r,n,e.icon,e.carbonIcon,e.enabled,e.divider)}(e.getButton(n.id),t))})),r}(H.buttons,o))):(I=h.STRUCTUREEDITOR,H.layout&&(O=H.layout)),V=H.type}else I=h.TEXTFIELD;break;case m.OBJECT:if(p)(E=c.getRole())===v.COLUMN?I=h.SELECTCOLUMN:(g.warn("Complex subControl type that is not a field! Name: "+c.name),I=h.READONLY);else if(c.isCompoundField()){var z=fi(c,p);I=z.controlType,E=z.role}else g.warn("Complex parameter type that is not a field! Name: "+c.name),I=h.READONLY;break;default:E="???"+c.propType()+"???",I=h.TEXTAREA}else I=h.CUSTOM;c.getRole()===v.ENUM&&(N=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var n=[];return e.getValidValues().forEach((function(e){n.push(t.l10nValueLabel(r,String(e)))})),n}return[]}(c,o)),c.getRole()===v.ENUM&&(x=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var n=[];return e.getValidValues().forEach((function(e){n.push(t.l10nValueDesc(r,String(e)))})),n}return[]}(c,o)),!p&&c.actionRef&&(B=gi(i.getAction(c.actionRef),o));var q,G,W,$={};return $.name=c.name,$.label=b,$.description=y,$.labelVisible="boolean"==typeof c.labelVisible?c.labelVisible:M,$.controlType=c.getControl(I),$.valueDef=ni.make(c),$.structureType=V,$.role=E,$.additionalText=u,$.orientation=d,$.values=c.getValidValues(),$.valueLabels=N,$.valueDescs=x,$.valueIcons=c.valueIcons,$.sortable=c.sortable,$.filterable=c.filterable,$.resizable=c.resizable,$.charLimit=c.charLimit,$.subControls=S,$.keyIndex=C,$.defaultRow=R,$.childItem=_,$.moveableRows=F,$.required=f,$.language=c.language,$.enableMaximize=c.enableMaximize,$.summary=c.summary,$.increment=c.increment,$.rowSelection=k,$.generatedValues=c.generatedValues,$.addRemoveRows=L,$.dateFormat=c.dateFormat,$.timeFormat=c.timeFormat,$.customControlId=c.customControlId,$.data=c.data,$.rows=c.rows,$.displayChars=c.displayChars,$.header=A,$.uionly=c.uionly,$.includeAllFields=D,$.layout=O,$.dmImage=c.dmImage,$.action=B,$.customValueAllowed=c.customValueAllowed,$.className=c.className,$.buttons=P,$.light=(q=l.light,G=l.containerType,W=c.isSubPanelEdit(),q&&(G!==Ge.TEARSHEET||G===Ge.TEARSHEET&&W)),p&&($.visible=c.visible,$.width=c.columns(8),$.editStyle=c.editStyle,$.isKeyField=c.isKey,$.dmDefault=c.dmDefault),new Qo($)}function vi(e,t,r,n){return mi(null,null,null,e.propType()===m.STRUCTURE&&r?r.getStructure(e.baseType()):null,t,null,r,e,n)}function yi(e){return"on_panel"===e.editStyle||"subpanel"===e.editStyle}function gi(e,t){var r,n=new oi(t.l10nLabel(e,e.id));return e.description&&(r=new ii(t.l10nDesc(e,e.id))),new Po(e.id,n,r,e.control,e.data,e.image,e.button,e.className)}function bi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ei(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ei(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ii(e,t){for(var n in e)ee(e,n)&&"object"===r(e[n])&&null!==e[n]&&(e[n].message?e[n].message.default=t.l10nResource(e[n].message):Ii(e[n],t))}function Si(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ci(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ci(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ci(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ri=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.componentId=t,this.label=n,this.labelEditable=o,this.help=i,this.editorSize=a,this.pixelWidth=s,this.uiItems=l,this.buttons=p,this.data=c,this.conditions=u,this.resources=d,this.icon=h,this.heading=f}return t(r,null,[{key:"makeForm",value:function(e,t){var n,o,i=Jo.makePropertyDef(Ro(e)("titleDefinition"),Ro(e)("parameters"),Ro(e)("complex_types"),Ro(e)("uihints")),a=Ro(e)("resources"),s=Ro(e)("conditions");if(i){var l=new To(a),c=[];if(i.groupMetadata&&i.groupMetadata.groups){var u,d=Si(i.groupMetadata.groups);try{for(d.s();!(u=d.n()).done;){var h=u.value;c.push(ci(i,h,l,t))}}catch(e){d.e(e)}finally{d.f()}}var f={currentParameters:Ro(e)("current_parameters"),uiCurrentParameters:Ro(e)("current_ui_parameters"),datasetMetadata:Ro(e)("dataset_metadata")},m=t===Ge.TEARSHEET||t===Ge.MODAL?p.LARGE:p.SMALL;return new r(i.name,i.label,i.labelEditable,i.help,i.editorSizeHint(m),i.pixelWidth,[ti.makePrimaryTabs(c)],(n=new Ti("ok","OK",!0,""),o=new Ti("cancel","Cancel",!1,""),[n,o]),f,function(e,t){if(e&&Array.isArray(e)){var r,n=bi(e);try{for(n.s();!(r=n.n()).done;)Ii(r.value,t)}catch(e){n.e(e)}finally{n.f()}}return e}(s,l),a,i.icon,l.l10nResource(i.heading))}return null}}]),r}();var Ti=t((function t(r,n,o,i){e(this,t),this.id=r,this.text=n,this.isPrimary=o,this.url=i}));function _i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ki=function(r){n(i,Ee);var o=_i(i);function i(t,r,n,a,s){var l;return e(this,i),(l=o.call(this,t)).newValues=t,l.initialValues=r,l.appData=n,l.applyPropertyChanges=a,l.propertiesActionLabel=s,l}return t(i,[{key:"do",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"undo",value:function(){this.applyPropertyChanges(this.initialValues.properties,this.appData,this.initialValues.additionalInfo,this.initialValues.undoInfo,this.initialValues.uiProperties)}},{key:"redo",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"getLabel",value:function(){return this.propertiesActionLabel}}]),i}(),wi=re,Li=ne,Ai=ie,Di=oe((function(e,t){return Ai(e)?wi(e,Li(t,1,Ai,!0)):[]})),Oi=Di,Pi=oe,Ni=A;var xi=$,Bi=X,Mi=function(e){return Pi((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Ni(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t}))},Fi=ae,Vi=se,Ui=le,Hi=Object.prototype.hasOwnProperty,ji=Mi((function(e,t){if(Vi(t)||Fi(t))Bi(t,Ui(t),e);else for(var r in t)Hi.call(t,r)&&xi(e,r,t[r])}));function zi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.property&&t.property.propertyId?t.property.propertyId:null;switch(t.type){case Xr:if(null===r)return e;var n=e;return void 0!==r.row?(void 0===n[r.name]&&(n[r.name]=[]),void 0!==r.col?(void 0===n[r.name][r.row]&&(n[r.name][r.row]=[]),void 0!==r.propertyId?qi(r.propertyId,n[r.name][r.row][r.col],t.property.value):n[r.name][r.row][r.col]=t.property.value):void 0!==r.propertyId?qi(r.propertyId,n[r.name][r.row],t.property.value):n[r.name][r.row]=t.property.value):n[r.name]=t.property.value,Object.assign({},e,n);case $r:return Object.assign({},t.properties);case Kr:var o=e;return null!==r&&void 0!==r.name&&delete o[r.name],Object.assign({},e,o);default:return e}}function qi(e,t,r){void 0!==e.row&&(void 0!==e.col?(void 0===t[e.row]&&(t[e.row]=[]),void 0!==e.propertyId?qi(e.propertyId,t[e.row][e.col],r):t[e.row][e.col]=r):t[e.row]=r)}function Gi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Jr:var r=e,n=t.state.propertyId;if(void 0===r[n.name]&&(r[n.name]={}),void 0!==n.row){var o=n.row.toString();if(void 0===r[n.name][o]&&(r[n.name][o]={}),void 0!==n.col){var i=n.col.toString();void 0===r[n.name][o][i]&&(r[n.name][o][i]={}),r[n.name][o][i]={value:t.state.value}}else r[n.name][o]={value:t.state.value}}else r[n.name]={value:t.state.value};return Object.assign({},e,r);case Yr:return Object.assign({},t.states);default:return e}}function Wi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Zr:var r=e;return r[t.state.panelId.name]={value:t.state.value},Object.assign({},e,r);case Qr:return Object.assign({},t.states);default:return e}}function $i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case tn:var r=e;return r[t.state.actionId.name]={value:t.state.value},Object.assign({},e,r);case en:return Object.assign({},t.states);default:return e}}function Xi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case nn:var r=e,n=t.message.propertyId;if(void 0===r[n.name]&&(r[n.name]={}),void 0!==n.row){var o=n.row.toString();if(void 0===r[n.name][o]&&(r[n.name][o]={}),void 0!==n.col){var i=n.col.toString();void 0===r[n.name][o][i]&&(r[n.name][o][i]={}),r[n.name][o][i]=t.message.value}else r[n.name][o]=Object.assign({},t.message.value)}else r[n.name]=Object.assign({},t.message.value);return Object.assign({},e,r);case on:var a=e;return a[t.message.propertyId.name]&&(void 0!==t.message.propertyId.row?void 0!==t.message.propertyId.col?delete a[t.message.propertyId.name][t.message.propertyId.row][t.message.propertyId.col]:delete a[t.message.propertyId.name][t.message.propertyId.row]:(delete a[t.message.propertyId.name].type,delete a[t.message.propertyId.name].text,delete a[t.message.propertyId.name].validation_id,delete a[t.message.propertyId.name].required,delete a[t.message.propertyId.name].propertyId,delete a[t.message.propertyId.name].displayError,Z(a[t.message.propertyId.name])&&delete a[t.message.propertyId.name])),Object.assign({},e,a);case rn:return Object.assign({},t.messages);default:return e}}function Ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===an?Object.assign({},e,t.datasetMetadata):e}function Yi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case sn:var r=e,n=t.info.propertyId;if(r[n.name]||(r[n.name]={}),Number.isInteger(n.row)){var o=String(n.row);if(r[n.name][o]||(r[n.name][o]={}),Number.isInteger(n.col)){var i=String(n.col);r[n.name][o][i]||(r[n.name][o][i]={}),r[n.name][o][i].selectedRows=t.info.selectedRows}else r[n.name][o].selectedRows=t.info.selectedRows}else r[n.name].selectedRows=t.info.selectedRows;return Object.assign({},e,r);case ln:var a=e,s=t.info.propertyId;if(t.info.propertyId){if(a[s.name])if(Number.isInteger(s.row)&&a[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&a[s.name][l][String(s.col)]?a[s.name][l][String(s.col)].selectedRows=[]:a[s.name][l].selectedRows=[]}else a[s.name].selectedRows=[];return Object.assign({},e,a)}return{};default:return e}}function Ji(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case mn:var r=e,n=t.info.propertyId;if(r[n.name]||(r[n.name]={}),Number.isInteger(n.row)){var o=String(n.row);if(r[n.name][o]||(r[n.name][o]={}),Number.isInteger(n.col)){var i=String(n.col);r[n.name][o][i]||(r[n.name][o][i]={}),r[n.name][o][i].staticRows=t.info.staticRows}else r[n.name][o].staticRows=t.info.staticRows}else r[n.name].staticRows=t.info.staticRows;return Object.assign({},e,r);case vn:var a=e,s=t.info.propertyId;if(t.info.propertyId){if(a[s.name])if(Number.isInteger(s.row)&&a[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&a[s.name][l][String(s.col)]?a[s.name][l][String(s.col)].staticRows=[]:a[s.name][l].staticRows=[]}else a[s.name].staticRows=[];return Object.assign({},e,a)}return{};default:return e}}function Qi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case pn:var r=e;return r.title=t.title,Object.assign({},e,r);case cn:var n=e;return n.activeTab=t.activeTab,Object.assign({},e,n);default:return e}}function Zi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===un){var r=e;return r.propertyIds=t.propertyIds,Object.assign({},e,r)}return e}function ea(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===dn){var r=e;return r.disable=t.disableState,Object.assign({},e,r)}return e}function ta(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===hn){var r=e;return r[t.info.panelId.name]=t.info.disableState,Object.assign({},e,r)}return e}function ra(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.info&&t.info.propertyId?t.info.propertyId:null;switch(t.type){case fn:if(null===r)return e;var n=e;return void 0===n[r.name]&&(n[r.name]={}),void 0!==r.row?na(r,n[r.name],"addRemoveRows",t.info.value):n[r.name].addRemoveRows=t.info.value,Object.assign({},e,n);case yn:if(null===r)return e;var o=e;return void 0===o[r.name]&&(o[r.name]={}),void 0!==r.row?na(r,o[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value):Ie(o[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value),Object.assign({},e,o);case gn:if(null===r)return e;var i=e;return void 0===i[r.name]&&(i[r.name]={}),void 0!==r.row?na(r,i[r.name],"hideEditButton",t.info.value):i[r.name].hideEditButton=t.info.value,Object.assign({},e,i);default:return e}}function na(e,t,r,n){void 0!==e.row&&(void 0===t[e.row]&&(t[e.row]={}),void 0!==e.col?(void 0===t[e.row][e.col]&&(t[e.row][e.col]={}),void 0!==e.propertyId?na(e.propertyId,t[e.row][e.col],r,n):Ie(t[e.row][e.col],r,n)):void 0!==e.propertyId?na(e.propertyId,t[e.row],r,n):Ie(t[e.row],r,n))}function oa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===bn?Object.assign({},e,t.tearsheetId):e}var ia=function(){function r(){e(this,r),this.combinedReducer=lr({propertiesReducer:zi,controlStatesReducer:Gi,panelStatesReducer:Wi,errorMessagesReducer:Xi,datasetMetadataReducer:Ki,rowSelectionsReducer:Yi,componentMetadataReducer:Qi,disableRowMoveButtonsReducer:Zi,actionStatesReducer:$i,wideFlyoutPrimaryButtonDisableReducer:ta,tearsheetStatesReducer:oa,saveButtonDisableReducer:ea,propertiesSettingsReducer:ra,rowFreezeReducer:Ji});var t=!1;"undefined"!=typeof window&&(t=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=pr(this.combinedReducer,t)}return t(r,[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"getStore",value:function(){return this.store}},{key:"subscribe",value:function(e){this.store.subscribe(e)}},{key:"getPropertyValue",value:function(e){var t=this.store.getState().propertiesReducer[e.name];return this.getNestedPropertyValue(e,t)}},{key:"getNestedPropertyValue",value:function(e,t){if(void 0!==e.row&&null!=t){var r=t[e.row];return void 0!==e.col&&null!=r&&Array.isArray(r)?void 0!==e.index?r[e.col][e.index]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r[e.col]):r[e.col]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r):r}return t}},{key:"getPropertyValues",value:function(){var e=this.store.getState();return D(e.propertiesReducer)}},{key:"setPropertyValues",value:function(e){this.store.dispatch(function(e){return{type:$r,properties:e}}(e))}},{key:"updatePropertyValue",value:function(e,t){this.store.dispatch({type:Xr,property:{propertyId:e,value:t}})}},{key:"removePropertyValue",value:function(e){this.store.dispatch({type:Kr,property:{propertyId:e}})}},{key:"getControlState",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];if(t&&("hidden"===t.value||"disabled"===t.value))return t;var r=void 0!==e.col?e.col.toString():null,n=void 0!==e.row?e.row.toString():null;return null!==r&&t&&t[r]&&(void 0!==t[r].value||t[r][n]&&(void 0!==t[r][n].value||void 0!==t[r][n].values))&&(t=t[r],null!==n&&t&&t[n]&&(void 0!==t[n].value||void 0!==t[n].values)&&(t=t[n])),t||null}},{key:"getControlStates",value:function(){var e=this.store.getState();return D(e.controlStatesReducer)}},{key:"setControlStates",value:function(e){O(this.getControlStates(),e)||this.store.dispatch(function(e){return{type:Yr,states:e}}(e))}},{key:"updateControlState",value:function(e,t){this.store.dispatch({type:Jr,state:{propertyId:e,value:t}})}},{key:"getPanelState",value:function(e){if(void 0===e)return null;var t=this.store.getState().panelStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getPanelStates",value:function(){var e=this.store.getState();return D(e.panelStatesReducer)}},{key:"setPanelStates",value:function(e){O(this.getPanelStates(),e)||this.store.dispatch(function(e){return{type:Qr,states:e}}(e))}},{key:"updatePanelState",value:function(e,t){this.store.dispatch({type:Zr,state:{panelId:e,value:t}})}},{key:"getActionState",value:function(e){if(void 0===e)return null;var t=this.store.getState().actionStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getActionStates",value:function(){var e=this.store.getState();return D(e.actionStatesReducer)}},{key:"setActionStates",value:function(e){O(this.getActionStates(),e)||this.store.dispatch(function(e){return{type:en,states:e}}(e))}},{key:"updateActionState",value:function(e,t){this.store.dispatch({type:tn,state:{actionId:e,value:t}})}},{key:"setSaveButtonDisable",value:function(e){this.store.dispatch(function(e){return{type:dn,disableState:e}}(e))}},{key:"getSaveButtonDisable",value:function(){return this.store.getState().saveButtonDisableReducer.disable}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.store.dispatch({type:hn,info:{panelId:e,disableState:t}})}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){if(void 0===e)return null;var t=this.store.getState().wideFlyoutPrimaryButtonDisableReducer[e.name];return void 0!==t?t:null}},{key:"getFilteredEnumItems",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];return void 0!==e.col&&t&&t[e.col.toString()]&&(t=t[e.col.toString()],void 0!==e.row&&t[e.row.toString()]&&(t=t[e.row.toString()])),t?t.enumFilter:null}},{key:"getErrorMessage",value:function(e,t){if(void 0===e)return null;var r=this.store.getState().errorMessagesReducer[e.name];if(void 0!==e.row&&r){if(r=r[e.row.toString()],void 0!==e.col&&r)return r[e.col.toString()];if(r&&r.text)return r}var n=null,o=null;if(r&&r.text&&(n=r),r){var i=G(r);o=this._getTableCellErrors(i,t)}return null!==n&&null!==o?n.text=n.text+" "+o.text:null===n&&(n=o),n}},{key:"_getTableCellErrors",value:function(e,t){var r=null,n=0,o=0;for(var i in e)if(ee(e,i)&&"text"!==i){var a=e[i];if(a&&a.text&&(r=a,n+=a.type===Fe.ERROR?1:0,o+=a.type===Fe.WARNING?1:0),a)for(var s in a)if(ee(a,s)&&"text"!==s){var l=a[s];l&&l.text&&(r=l,n+=l.type===Fe.ERROR?1:0,o+=l.type===Fe.WARNING?1:0)}}return n+o!==1&&r&&(r.type=n>0?Fe.ERROR:Fe.WARNING,r.text=n>0?u(t,Oe.TABLE_SUMMARY_ERROR,{errorMsgCount:n}):"",r.text+=o>0?u(t,Oe.TABLE_SUMMARY_WARNING,{warningMsgCount:o}):""),r}},{key:"getErrorMessages",value:function(){var e=this.store.getState();return D(e.errorMessagesReducer)}},{key:"setErrorMessages",value:function(e){O(this.getErrorMessages(),e)||this.store.dispatch(function(e){return{type:rn,messages:e}}(e))}},{key:"updateErrorMessage",value:function(e,t){O(this.getErrorMessage(e),t)||this.store.dispatch({type:nn,message:{propertyId:e,value:t}})}},{key:"clearErrorMessage",value:function(e){null!==this.getErrorMessage(e)&&this.store.dispatch({type:on,message:{propertyId:e}})}},{key:"setDatasetMetadata",value:function(e){this.store.dispatch(function(e){return{type:an,datasetMetadata:e}}(e))}},{key:"getDatasetMetadata",value:function(){return this.store.getState().datasetMetadataReducer}},{key:"getSelectedRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowSelectionsReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.selectedRows?t.selectedRows:[]}},{key:"updateSelectedRows",value:function(e,t){this.store.dispatch({type:sn,info:{propertyId:e,selectedRows:t}})}},{key:"clearSelectedRows",value:function(e){this.store.dispatch({type:ln,info:{propertyId:e}})}},{key:"getStaticRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowFreezeReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.staticRows?t.staticRows:[]}},{key:"updateStaticRows",value:function(e,t){this.store.dispatch({type:mn,info:{propertyId:e,staticRows:t}})}},{key:"clearStaticRows",value:function(e){this.store.dispatch({type:vn,info:{propertyId:e}})}},{key:"setDisableRowMoveButtons",value:function(e){this.store.dispatch(function(e){return{type:un,propertyIds:e}}(e))}},{key:"getDisableRowMoveButtons",value:function(){return this.store.getState().disableRowMoveButtonsReducer.propertyIds}},{key:"setTitle",value:function(e){this.store.dispatch(En(e))}},{key:"getTitle",value:function(){return this.store.getState().componentMetadataReducer.title}},{key:"setActiveTab",value:function(e){this.store.dispatch(In(e))}},{key:"getActiveTab",value:function(){return this.store.getState().componentMetadataReducer.activeTab}},{key:"setAddRemoveRows",value:function(e,t){this.store.dispatch({type:fn,info:{propertyId:e,value:t}})}},{key:"getAddRemoveRows",value:function(e){var t=this.store.getState();return!t.propertiesSettingsReducer[e.name]||(void 0!==e.row?aa(e,t.propertiesSettingsReducer[e.name],"addRemoveRows",true):t.propertiesSettingsReducer[e.name].addRemoveRows)}},{key:"setTableButtonEnabled",value:function(e,t,r){this.store.dispatch({type:yn,info:{propertyId:e,buttonId:t,value:r}})}},{key:"getTableButtons",value:function(e){var t=this.store.getState(),r={};return t.propertiesSettingsReducer[e.name]?void 0!==e.row?aa(e,t.propertiesSettingsReducer[e.name],"tableButtons",r):t.propertiesSettingsReducer[e.name].tableButtons||r:r}},{key:"getTableButtonEnabled",value:function(e,t){var r=this.store.getState();return!!r.propertiesSettingsReducer[e.name]&&(void 0!==e.row?aa(e,r.propertiesSettingsReducer[e.name],"tableButtons.".concat(t),false):r.propertiesSettingsReducer[e.name].tableButtons[t])}},{key:"setHideEditButton",value:function(e,t){this.store.dispatch({type:gn,info:{propertyId:e,value:t}})}},{key:"getHideEditButton",value:function(e){var t=this.store.getState();return!!t.propertiesSettingsReducer[e.name]&&(void 0!==e.row?aa(e,t.propertiesSettingsReducer[e.name],"hideEditButton",false):t.propertiesSettingsReducer[e.name].hideEditButton)}},{key:"setActiveTearsheetId",value:function(e){this.store.dispatch(function(e){return{type:bn,tearsheetId:e}}({tearsheetId:e}))}},{key:"getActiveTearsheetId",value:function(){var e=this.store.getState().tearsheetStatesReducer.tearsheetId;return void 0!==e?e:null}}]),r}();function aa(e,t,r,n){return void 0!==e.row&&t[e.row]?void 0!==e.col&&t[e.row][e.col]?void 0!==e.propertyId?aa(e.propertyId,t[e.row][e.col],r,n):te(t[e.row][e.col],r):void 0!==e.propertyId?aa(e.propertyId,t[e.row],r,n):te(t[e.row],r):n}function sa(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return la(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return la(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function la(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pa(e,t,r){if(e.or)!function(e,t,r){for(var n=0;n<e.length;n++)pa(e[n],t,r)}(e.or,t,r);else if(e.and)!function(e,t,r){for(var n=0;n<e.length;n++)pa(e[n],t,r)}(e.and,t,r);else{if(!e.condition)throw new Error("Failed to parse definition");!function(e,t,r){e.parameter_ref?(t.push(e.parameter_ref),e.parameter_2_ref&&t.push(e.parameter_2_ref)):t.push(r)}(e.condition,t,r)}}function ca(e,t,r){if(t.label&&(t.summaryLabel=t.label.text),r&&(t.parentCategoryId=r),e.push(t),t.subControls)for(var n=0;n<t.subControls.length;n++){var o=t.subControls[n];o.parameterName=t.name,o.columnIndex=n,r&&(o.parentCategoryId=r),e.push(o)}}function ua(e,t,r,n,o){switch(r.itemType){case I.CONTROL:var i=r.control;if(n&&(i.summaryPanelId=n),o&&(i.parentCategoryId=o),ca(e,i,o),r.additionalItems){var a,s=sa(r.additionalItems);try{for(s.s();!(a=s.n()).done;){ua(e,t,a.value.content,n,o)}}catch(e){s.e(e)}finally{s.f()}}break;case I.ADDITIONAL_LINK:case I.CHECKBOX_SELECTOR:case I.TEARSHEET:case I.PANEL:if(r.panel&&r.panel.uiItems){var l=n;r.panel.panelType===w.SUMMARY&&(l=r.panel.id);var p,c=sa(r.panel.uiItems);try{for(c.s();!(p=c.n()).done;){ua(e,t,p.value,l,o)}}catch(e){c.e(e)}finally{c.f()}}break;case I.PRIMARY_TABS:case I.PANEL_SELECTOR:case I.SUB_TABS:if(r.tabs){var u,d=sa(r.tabs);try{for(d.s();!(u=d.n()).done;){var h=u.value;ua(e,t,h.content,n,r.itemType===I.PANEL_SELECTOR||r.itemType===I.SUB_TABS?o:h.group)}}catch(e){d.e(e)}finally{d.f()}}break;case I.CUSTOM_PANEL:if(r.panel&&r.panel.parameters){var f,m=sa(r.panel.parameters);try{for(m.s();!(f=m.n()).done;){var v={name:f.value,controlType:"custom"};n&&(v.summaryPanelId=n),o&&(v.parentCategoryId=o),e.push(v)}}catch(e){m.e(e)}finally{m.f()}}break;case I.ACTION:r.action&&r.action.name&&(t[r.action.name]=r.action);break;case I.STATIC_TEXT:case I.TEXT_PANEL:case I.HORIZONTAL_SEPARATOR:break;default:g.warn("Unknown UiItem type when parsing ui conditions: "+r.itemType)}return e}function da(e,t,r){try{var n=function(e){var t=e;if(t.evaluate){var r=[];t.parameter_refs?pa(t.evaluate,r,t.parameter_refs):pa(t.evaluate,r,t.parameter_ref);var n=Array.from(new Set(r));return n.length>1?n:n[0]}throw new Error("Invalid validation schema")}(t[r]),o={params:n,definition:t};ha(e.controls,n,o);var i=t[r].parameter_refs;t[r].group_refs?i=t[r].group_refs:t[r].action_refs?i=t[r].action_refs:t[r].target&&t[r].target.parameter_ref&&(i=[t[r].target.parameter_ref]),i&&ha(e.refs,i,o)}catch(e){g.info("Error parsing ui conditions: "+e)}return e}function ha(e,t,r){if(!0===Array.isArray(t))for(var n=0;n<t.length;n++)void 0===e[t[n]]&&(e[t[n]]=[]),e[t[n]].push(r);else void 0===e[t]&&(e[t]=[]),e[t].push(r)}function fa(e){var t={};if(e&&e.functions){var r=new To(Ro(e)("resources")),n=G(e.functions);if(Array.isArray(n.function_info)&&Array.isArray(n.function_categories)){var o=n.parmsSet?n.function_info:function(e,t){return e.map((function(e){var r=e;if(r.locLabel=t.l10nLabel(r,r.id),r.help=t.l10nDesc(r,r.locLabel),r.value=r.locLabel,r.return_type_label){var n=_o.make(r.return_type_label);r.locReturnType=t.l10nResource(n)}return Array.isArray(e.parameters)&&(r.locLabel&&-1!==r.locLabel.indexOf("?")?e.parameters.forEach((function(e){-1!==r.locLabel.indexOf("?")&&(r.locLabel=r.locLabel.replace("?"," "+t.l10nLabel(e,e.id)+" "))})):(r.value+="(",r.locLabel+="(",e.parameters.forEach((function(e,n){var o=n>0?", ":"";r.locLabel+=o+t.l10nLabel(e,e.id),r.value+=o+"?"})),r.locLabel+=")",r.value+=")")),r}))}(n.function_info,r);n.parmsSet=!0,t.functionCategories=[],n.function_categories.forEach((function(e){t.functionCategories[e.id]={},t.functionCategories[e.id].locLabel=r.l10nLabel(e,e.id),t.functionCategories[e.id].functionList=[],e.function_refs.forEach((function(r){var n=ma(r,o);n&&t.functionCategories[e.id].functionList.push(n)}))})),t.operators=[],n.operator_refs&&n.operator_refs.forEach((function(e){var r=ma(e,o);r&&t.operators.push(r)})),t.fields={field_categories:[],field_table_info:[]},e.fields&&(e.fields.field_categories&&e.fields.field_categories.forEach((function(e){e.locLabel=r.l10nLabel(e,e.id),e.field_columns.field_column_info.locLabel=r.l10nLabel(e.field_columns.field_column_info,e.id+".field_column_info"),e.field_columns.value_column_info.locLabel=r.l10nLabel(e.field_columns.value_column_info,e.id+".value_column_info");var n=r.l10nDesc(e.field_columns.field_column_info,e.id+".field_column_info");n!==e.id+".field_column_info"&&(e.field_columns.field_column_info.descLabel=n);var o=r.l10nDesc(e.field_columns.value_column_info,e.id+".value_column_info");o!==e.id+".value_column_info"&&(e.field_columns.value_column_info.descLabel=o),e.field_columns.additional_column_info&&e.field_columns.additional_column_info.forEach((function(t){t.locLabel=r.l10nLabel(t,e.id+".additional_column_info."+t.id)})),t.fields.field_categories.push(e)})),e.fields.field_table_info&&e.fields.field_table_info.forEach((function(e){t.fields.field_table_info.push(e)})))}}return e&&e.resources&&(t.resources=e.resources),t}function ma(e,t){var r=t.find((function(t){return t.id===e}));return r||(g.warn("Expression function information list, no function information found for "+e),null)}function va(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ya(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ya(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ga(e,t,r){switch(t.itemType){case I.PRIMARY_TABS:case I.SUB_TABS:if(t.tabs){var n,o=va(t.tabs);try{for(o.s();!(n=o.n()).done;){ga(e,n.value.content,r)}}catch(e){o.e(e)}finally{o.f()}}break;case I.TEXT_PANEL:case I.PANEL:case I.CUSTOM_PANEL:case I.ADDITIONAL_LINK:case I.TEARSHEET:case I.CHECKBOX_SELECTOR:if(t.panel&&t.panel.id&&(e[r].panels.push(t.panel.id),ba(e,t.panel.id),t.panel.uiItems)){var i,a=va(t.panel.uiItems);try{for(a.s();!(i=a.n()).done;){ga(e,i.value,t.panel.id)}}catch(e){a.e(e)}finally{a.f()}}break;case I.CONTROL:if(e[r].controls.push(t.control.name),t.control.action&&e[r].actions.push(t.control.action.name),t.control.additionalItems){var s,l=va(t.control.additionalItems);try{for(l.s();!(s=l.n()).done;){ga(e,s.value.content,r)}}catch(e){l.e(e)}finally{l.f()}}break;case I.PANEL_SELECTOR:if(e[r].panels.push(t.id),ba(e,t.id),t.dependsOn&&e[t.id].controls.push(t.dependsOn),t.tabs){var p,c=va(t.tabs);try{for(c.s();!(p=c.n()).done;){ga(e,p.value.content,t.id)}}catch(e){c.e(e)}finally{c.f()}}break;case I.ACTION:e[r].actions.push(t.action.name);break;case I.STATIC_TEXT:case I.HORIZONTAL_SEPARATOR:break;default:g.warn("Unknown UiItem type when parsing ui conditions: "+t.itemType)}}function ba(e,t){ee(e,t)&&g.warn("Duplicate panel ids, each panel id must be unique. Panel id = "+t),e[t]={controls:[],panels:[],actions:[]}}var Ea=ne,Ia=Se,Sa=ie,Ca=pe,Ra=oe((function(e){var t=Ca(e);return t="function"==typeof t?t:void 0,Ia(Ea(e,1,Sa,!0),void 0,t)})),Ta=ce,_a=fe,ka=me,wa=ue,La=de,Aa=he,Da=Math.min;var Oa=function(e,t,r){for(var n=r?ka:_a,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,p=[];a--;){var c=e[a];a&&t&&(c=wa(c,La(t))),l=Da(c.length,l),s[a]=!r&&(t||o>=120&&c.length>=120)?new Ta(a&&c):void 0}c=e[0];var u=-1,d=s[0];e:for(;++u<o&&p.length<l;){var h=c[u],f=t?t(h):h;if(h=r||0!==h?h:0,!(d?Aa(d,f):n(p,f,r))){for(a=i;--a;){var m=s[a];if(!(m?Aa(m,f):n(e[a],f,r)))continue e}d&&d.push(f),p.push(h)}}return p},Pa=ie;var Na=function(e){return Pa(e)?e:[]},xa=ue,Ba=Oa,Ma=Na,Fa=pe,Va=oe((function(e){var t=Fa(e),r=xa(e,Ma);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?Ba(r,void 0,t):[]}));function Ua(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ha(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ha(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ja(e,t,n){var o=e;if(o.validation)return function(e,t,n){if(e.fail_message&&e.evaluate){var o=e.evaluate;o.isValidation=!0;var i=qa(o,t,n);return"object"===r(i)?i:i||function(e){if(e.focus_parameter_ref&&e.message)return{text:e.message.default,type:e.type};return"Failed to parse failedMessage"}(e.fail_message)}throw new Error("Invalid validation schema")}(o.validation,t,n);if(o.enabled)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return qa(e.evaluate,t,r);throw new Error("Invalid enabled schema")}(o.enabled,t,n);if(o.visible)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return qa(e.evaluate,t,r);throw new Error("Invalid visible schema")}(o.visible,t,n);if(o.enum_filter)return function(e,t,r){if(e.target&&e.evaluate)return qa(e.evaluate,t,r);throw new Error("Invalid filteredEnum schema")}(o.enum_filter,t,n);if(o.allow_change)return function(e,t,r){if((e.parameter_refs||e.group_refs)&&e.evaluate)return qa(e.evaluate,t,r);throw new Error("Invalid allow change schema")}(o.allow_change,t,n);if(o.default_value)return function(e,t,r){if(e.parameter_ref&&e.value&&e.evaluate)return qa(e.evaluate,t,r);throw new Error("Invalid conditional default schema")}(o.default_value,t,n);throw new Error("Invalid user input validation definition schema")}function za(e,t,r,n){return t&&t.filter&&t.filter.evaluate?Ga(e,t.filter,t.filter.evaluate,r,n):n}function qa(e,t,n){if(e.or)return function(e,t,r){for(var n=0;n<e.length;n++){if(!0===qa(e[n],t,r))return!0}return!1}(e.or,t,n);if(e.and)return function(e,t,n){for(var o=0;o<e.length;o++){var i=qa(e[o],t,n);if(!1===i)return!1;if("object"===r(i))return i}return!0}(e.and,t,n);if(e.condition)return function(e,t,r,n){var o=e.op,i=e.parameter_ref,a=e.parameter_2_ref,s=e.value,l={},p=r.getPropertiesConfig();n||"null"!==p.conditionDisabledPropertyHandling||(l.filterDisabled=!0);n||"null"!==p.conditionHiddenPropertyHandling||(l.filterHidden=!0);var c,u={param:i,id:Wa(t,i)};u.value=r.getPropertyValue(u.id,l,null),u.control=r.getControl(u.id),void 0===u.control&&g.warn("Control not found when validating condition for "+i);void 0!==a&&((c={param:a,id:Wa(t,a)}).value=r.getPropertyValue(c.id,l,null),c.control=r.getControl(c.id));var d=r.getConditionOp(o);if(d)return d(u,c,s,r);return g.warn("Ignoring unknown condition operation '"+o+"' for parameter_ref "+i),!0}(e.condition,t,n,e.isValidation);throw new Error("Failed to parse definition")}function Ga(e,t,r,n,o){if(r.or)return function(e,t,r,n,o){var i,a=[],s=Ua(r);try{for(s.s();!(i=s.n()).done;){var l=Ga(e,t,i.value,n,o);a=Ra(a,l,O)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.or,n,o);if(r.and)return function(e,t,r,n,o){var i,a=G(o),s=Ua(r);try{for(s.s();!(i=s.n()).done;){var l=Ga(e,t,i.value,n,a);a=Va(a,l,O)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.and,n,o);if(r.condition)return function(e,t,r,n,o){var i=r.op,a=[];void 0!==r.value&&null!==r.value?a.push(r.value):Array.isArray(r.values)&&a.push.apply(a,Ce(r.values));switch(i){case"dmMeasurement":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Ua(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.metadata&&e.metadata.measure===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmType":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Ua(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.type===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmModelingRole":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Ua(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.metadata&&e.metadata.modeling_role===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmSharedFields":return function(e,t,r,n){var o=n;t.parameter_refs&&(o=r.filterFieldsFromSharedProps(n,t.parameter_refs,e.name));return o}(e,t,n,o);default:var s=n.getConditionOp(i);return s&&e.name===t.parameter_ref?s(e,r,n,o):(g.warn("Ignoring unknown condition operation '"+i+"'"),o)}}(e,t,r.condition,n,o);throw new Error("Failed to parse filter definition")}function Wa(e,t){var r={},n=t.indexOf("[");return n>-1?((r=G(e)).name=t.substring(0,n),r.col=function(e){var t=e.indexOf("[");if(t>-1){var r=e.indexOf("]");return r>-1?parseInt(e.substring(t+1,r),10):-1}return-1}(t)):r.name=t,r}function $a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Xa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xa(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ka(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var n in t)if(ee(t,n)){var o=t[n];if(!o.parameterName)Ja(o.name?{name:o.name}:{name:o},e,r)}}(e,r,t)}function Ya(e){var t={controls:e.getControlStates(),panels:e.getPanelStates(),actions:e.getActionStates()},r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var n in t)if(ee(t,n)){var o=t[n];if(!o.parameterName){var i=o.name?{name:o.name}:{name:o},a=e.getPropertyValue(i);if(o.subControls)if(o.valueDef.isList||o.valueDef.isMap){if(ss(i,r,e),Array.isArray(a))for(var s=0;s<a.length;s++)for(var l=0;l<o.subControls.length;l++)i.row=s,i.col=l,ss(i,r,e)}else for(var p={name:i.name},c=0;c<o.subControls.length;c++)p.col=c,ss(p,r,e);else ss(i,r,e)}}}(e,r,t),is(e.panelTree,t,Ke);var n=es(e);e.setControlStates(t.controls),e.setPanelStates(t.panels),e.setActionStates(t.actions);var o,i=$a(Za(n,es(e)));try{for(i.s();!(o=i.n()).done;){Qa(o.value,e,1)}}catch(e){i.e(e)}finally{i.f()}}function Ja(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.getControl(e);if(n){var o=G(e),i=t.getPropertyValue(o);if(Array.isArray(i)){if(as(o,t,n,r),n.subControls)if(n.valueDef.isList||n.valueDef.isMap)for(var a=0;a<i.length;a++)for(var s=0;s<n.subControls.length;s++)o.row=a,o.col=s,as(o,t,n.subControls[s],r);else for(var l=0;l<n.subControls.length;l++){as({name:e.name,col:l},t,n.subControls[l],r)}else if(void 0===o.row)for(var p=0;p<i.length;p++)o.row=p,o.col=0,as(o,t,n,r)}else as(o,t,n,r)}else g.warn("Control not found for "+e.name)}function Qa(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.getControl(e);if(n){var o={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},i=G(e),a=t.getPropertyValue(i);if(Array.isArray(a)&&n.subControls)if(n.valueDef.isList||n.valueDef.isMap){ss(i,o,t);for(var s=0;s<a.length;s++)for(var l=0;l<n.subControls.length;l++)i.row=s,i.col=l,ss(i,o,t)}else for(var p=0;p<n.subControls.length;p++)i.col=p,ss(i,o,t);else ss(i,o,t);var c=es(t);t.setControlStates(o.controls),t.setPanelStates(o.panels),t.setActionStates(o.actions);var u,d=$a(Za(c,es(t),r));try{for(d.s();!(u=d.n()).done;){Qa(u.value,t,r+1)}}catch(e){d.e(e)}finally{d.f()}r>0&&is(t.panelTree,o,Ke)}else g.warn("Control not found for "+e.name)}function Za(e,t,r){var n=[];if(r>10)return g.warn("More than 10 iteration of processing conditions found. Check your conditions for loops. Updated properties: "+JSON.stringify(t)),[];var o,i=$a(Re(Object.keys(e),Object.keys(t)));try{for(i.s();!(o=i.n()).done;){var a=o.value,s=e[a],l=t[a];O(s,l)||n.push({name:a})}}catch(e){i.e(e)}finally{i.f()}return n}function es(e){var t=e.getPropertiesConfig(),r={};return"null"===t.conditionDisabledPropertyHandling&&(r.filterDisabled=!0),"null"===t.conditionHiddenPropertyHandling&&(r.filterHidden=!0),Z(r)?{}:e.getPropertyValues(r)}function ts(e,t,r,n){var o=e[t.name];o||(o={});var i=Object.assign({},o);if(!(void 0===t.row&&void 0===t.col)||i.value!==Ve.HIDDEN||r!==Ve.DISABLED&&r!==Ve.ENABLED?i.value=r:i.value=Ve.HIDDEN,void 0!==t.col){var a=t.col.toString();if(o[a]||(o[a]={}),void 0!==t.row){var s=t.row.toString();o[a][s]||(o[a][s]={}),o[a][s].value=i.value}else{o[a].value=i.value;var l="hidden"===r,p=n.getColumnVisibility(t,t.col)!==!l;void 0!==n&&p&&n.toggleColumnVisibility(t,t.col,!l)}}else o.value=i.value;e[t.name]=o}function rs(e,t,r,n){var o=e[t.name];o||(o={}),o.values||(o.values={}),o.values[r]||(o.values[r]={});var i=Object.assign({},o);if(!(void 0===t.row&&void 0===t.col)||i.values[r].value!==Ve.HIDDEN||n!==Ve.DISABLED&&n!==Ve.ENABLED?i.values[r].value=n:i.values[r].value=Ve.HIDDEN,void 0!==t.col){var a=t.col.toString();if(o[a]||(o[a]={}),void 0!==t.row){var s=t.row.toString();o[a][s]||(o[a][s]={}),o[a][s].values||(o[a][s].values={}),o[a][s].values[r]||(o[a][s].values[r]={}),o[a][s].values[r].value=i.values[r].value}else o[a].values||(o[a].values={}),o[a].values[r]||(o[a].values[r]={}),o[a].values[r].value=i.values[r].value}else o.values[r]=i.values[r];e[t.name]=o}function ns(e,t){var r={name:e},n=e.indexOf("[");return n>-1&&(r.name=e.substring(0,n),r.col=parseInt(e.substring(n+1,e.indexOf("]")),10)),t&&(r.row=t.row),r}function os(e,t,r,n){for(var o in e)if(ee(e,o)){var i=e[o],a=1e3*cr(o)();if(!0===i.required&&bs(i,t,r,o,a,n),"date"!==i.role&&"time"!==i.role||Es(i,t,o,a,n),"column"===i.role){var s=o;i.valueDef.isList&&(s+="[0]"),Is(i,t,s,a,n)}if(i.subControls){for(var l={},p=0;p<i.subControls.length;p++){l[o+"["+p+"]"]=i.subControls[p]}os(l,t,r,n)}}}function is(e,t,r,n){var o=t.panels[r],i=n?o&&o.value===Ve.DISABLED:o&&(o.value===Ve.HIDDEN||o.value===Ve.DISABLED);if(i&&e[r]){if(e[r].controls){var a,s=$a(e[r].controls);try{for(s.s();!(a=s.n()).done;){var l=a.value;n?t.controls[l].value!==Ve.HIDDEN&&ts(t.controls,{name:l},o.value):ts(t.controls,{name:l},o.value)}}catch(e){s.e(e)}finally{s.f()}}if(e[r].actions){var p,c=$a(e[r].actions);try{for(c.s();!(p=c.n()).done;){var u=p.value;n?t.actions[u].value!==Ve.HIDDEN&&ts(t.actions,{name:u},o.value):ts(t.actions,{name:u},o.value)}}catch(e){c.e(e)}finally{c.f()}}}if(e[r]&&e[r].panels){var d,h=$a(e[r].panels);try{for(h.s();!(d=h.n()).done;){var f=d.value;i&&(n?t.panels[f].value!==Ve.HIDDEN&&ts(t.panels,{name:f},o.value):ts(t.panels,{name:f},o.value)),is(e,t,f,n)}}catch(e){h.e(e)}finally{h.f()}}}function as(e,t,n,o){var i=!1,a=t.getDefinitions(e,We.VALIDATION,$e.CONTROLS);if(a.length>0){var s=t.getRequiredDefinitionIds();try{var l,p=!1,c=$a(a);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=Xe;p=ja(u.definition,e,t);var h=!1;"object"===r(p)&&(h=!0,d={type:p.type,text:p.text});var f=G(e);if(u.definition.validation&&u.definition.validation.fail_message&&u.definition.validation.fail_message.focus_parameter_ref&&(f=ns(u.definition.validation.fail_message.focus_parameter_ref,f)),void 0!==f.col&&void 0===n.columnIndex&&delete f.col,d.validation_id=f.name,u.definition.validation&&u.definition.validation.id&&(d.validation_id=u.definition.validation.id),void 0===f.row&&delete f.row,d.propertyId=f,d.required=s.indexOf(u.definition.validation.id)>-1,o||u.alwaysShow||(d.displayError=!1),t.getErrorMessage(f,!0,!0,!1)||(i=!1),void 0!==f.row||void 0!==f.col){var m=t.convertPropertyId(f.name);null!==t.getErrorMessage(m)&&t.updateErrorMessage(m,null)}if(h&&!i)t.updateErrorMessage(f,d),h&&(i=!0);else if(!h&&!i){var v=t.getErrorMessage(f,!1,!1,!1);Z(v)||v.validation_id!==d.validation_id||t.updateErrorMessage(f,Xe)}}}catch(e){c.e(e)}finally{c.f()}}catch(e){g.warn("Error thrown in validation: "+e)}}}function ss(e,t,r){ls(e,t,r,We.VISIBLE),ls(e,t,r,We.ENABLED),ls(e,t,r,We.FILTEREDENUM)}function ls(e,t,r,n){ps(r.getDefinitions(e,n,$e.CONTROLS),e,t,r,n)}function ps(e,t,r,n,o){if(e.length>0)try{e.forEach((function(i,a){var s=ja(i.definition,t,n);switch(o){case We.VISIBLE:cs(s,i.definition.visible,t,r,n,!0);break;case We.ENABLED:cs(s,i.definition.enabled,t,r,n,!1);break;case We.FILTEREDENUM:var l=function(e,t){var r=e[t],n=r.definition.enum_filter.target.parameter_ref,o=!0;return e.forEach((function(e,r){r>t&&e.definition.enum_filter.target.parameter_ref===n&&(o=!1)})),o}(e,a);!function(e,t,r,n,o){if(e.enum_filter.target&&e.enum_filter.target.parameter_ref){var i=r.controls,a=ns(e.enum_filter.target.parameter_ref,t),s=i[a.name];if(s||(s={}),void 0!==a.col){var l=a.col.toString();if(s[l]||(s[l]={}),void 0!==a.row){var p=a.row.toString();s[l][p]||(s[l][p]={});var c=ys(e,n,s[l][p].enumFilter,s[l][p].enumFilterApplied,o);s[l][p].enumFilter=c.values,s[l][p].enumFilterApplied=c.filterApplied}else{var u=ys(e,n,s[l].enumFilter,s[l].enumFilterApplied,o);s[l].enumFilter=u.values,s[l].enumFilterApplied=u.filterApplied}}else{var d=ys(e,n,s.enumFilter,s.enumFilterApplied,o);s.enumFilter=d.values,s.enumFilterApplied=d.filterApplied}i[a.name]=s}}(i.definition,t,r,s,l)}}))}catch(e){g.warn("Error thrown in validation: "+e)}}function cs(e,t,r,n,o,i){t.parameter_refs&&us(e,t,r,n,o,i,t.parameter_refs,"control"),t.action_refs&&us(e,t,r,n,o,i,t.action_refs,"action"),t.group_refs&&function(e,t,r,n,o,i){var a,s=i?Ve.VISIBLE:Ve.ENABLED,l=i?Ve.HIDDEN:Ve.DISABLED,p=i?Ve.ENABLED:Ve.HIDDEN,c=$a(t.group_refs);try{for(c.s();!(a=c.n()).done;){var u=ns(a.value),d=gs(n.panels,u);if(!0===e){if(u&&d!==s&&d!==p)ms(n,u,s,o)&&ds(n,u,s,o)}else if(u&&(i||!i&&d!==p)){ms(n,u,l,o)&&ds(n,u,l,o)}}}catch(e){c.e(e)}finally{c.f()}}(e,t,0,n,o,i)}function us(e,t,r,n,o,i,a,s){var l,p=i?Ve.VISIBLE:Ve.ENABLED,c=i?Ve.HIDDEN:Ve.DISABLED,u=i?Ve.ENABLED:Ve.HIDDEN,d="control"===s?n.controls:n.actions,h=$a(a);try{for(h.s();!(l=h.n()).done;){var f=ns(l.value,r),m=gs(d,f);if(Array.isArray(t.values)){var v,y=$a(t.values);try{for(y.s();!(v=y.n()).done;){var g=v.value;rs(d,f,g,!0===e?p:c)}}catch(e){y.e(e)}finally{y.f()}}else!0===e?f&&m!==p&&m!==u&&ts(d,f,p,o):f&&(i||!i&&m!==u)&&vs(n,f,c,d,o)}}catch(e){h.e(e)}finally{h.f()}}function ds(e,t,r,n){if(n.panelTree[t.name]){var o,i=n.panelTree[t.name],a=$a(i.panels);try{for(a.s();!(o=a.n()).done;){var s={name:o.value};ts(e.panels,s,r),ds(e,s,r,n),r===Ve.ENABLED?fs(s,n,We.ENABLED,e):r===Ve.VISIBLE&&(e.panels[t.name].disabled&&is(n.panelTree,e,t.name,!0),fs(s,n,We.ENABLED,e),fs(s,n,We.VISIBLE,e))}}catch(e){a.e(e)}finally{a.f()}var l,p=$a(i.controls);try{for(p.s();!(l=p.n()).done;){hs(e,t,r,n,{name:l.value},e.controls)}}catch(e){p.e(e)}finally{p.f()}var c,u=$a(i.actions);try{for(u.s();!(c=u.n()).done;){hs(e,t,r,n,{name:c.value},e.actions)}}catch(e){u.e(e)}finally{u.f()}}}function hs(e,t,r,n,o,i){ts(i,o,r),r===Ve.ENABLED?(fs(o,n,We.ENABLED,e),fs(o,n,We.VISIBLE,e)):r===Ve.VISIBLE&&(ls(o,e,n,We.VISIBLE),fs(o,n,We.VISIBLE,e),e.panels[t.name].value===Ve.DISABLED?ts(i,o,Ve.DISABLED):fs(o,n,We.ENABLED,e))}function fs(e,t,r,n){var o=t.getDefinitions(e,r,$e.REFS);o.length>0&&ps(o,e,n,t,r)}function ms(e,t,r,n,o){var i=t.name;if(!e.panels[i])return ts(e.panels,t,r),!0;var a=e.panels[i].value;return((a===Ve.ENABLED||a===Ve.VISIBLE)&&(r===Ve.DISABLED||r===Ve.HIDDEN)||a===Ve.DISABLED&&r===Ve.ENABLED||a===Ve.HIDDEN&&r===Ve.VISIBLE)&&(ts(e.panels,t,r),!0)}function vs(e,t,r,n,o){var i=t.name;if(n[i]){var a=n[i].value;void 0!==t.col&&(n[i][t.col]&&void 0!==t.row&&n[i][t.col][t.row]?a=n[i][t.col][t.row].value:ts(n,t,r,o)),((a===Ve.ENABLED||a===Ve.VISIBLE)&&(r===Ve.DISABLED||r===Ve.HIDDEN)||a===Ve.DISABLED&&r===Ve.ENABLED||a===Ve.DISABLED&&r===Ve.HIDDEN||a===Ve.HIDDEN&&r===Ve.VISIBLE)&&ts(n,t,r,o)}else ts(n,t,r,o)}function ys(e,t,r,n,o){var i={values:r,filterApplied:!o&&(n||!0)},a=null;return t&&(a=e.enum_filter.target.values),!a&&n||(i.values=a,i.filterApplied=!0),o&&(i.filterApplied=!1),i}function gs(e,t){var r=e[t.name];return void 0!==t.col&&r&&(r=r[t.col.toString()],void 0!==t.row&&r&&(r=r[t.row.toString()])),r?r.value:null}function bs(e,t,r,n,o,i){var a=e.label&&e.label.text?e.label.text:n,s="required_"+n+"_"+o,l={params:n,definition:{validation:{id:s,fail_message:{type:"error",message:{default:u(i,Oe.REQUIRED_ERROR,{label:a})},focus_parameter_ref:n},evaluate:{condition:{parameter_ref:n,op:"isNotEmpty"}}}}};t.controls[n]?t.controls[n].push(l):t.controls[n]=[l],r.push(s)}function Es(e,t,r,n,o){var i=xn(e),a={params:r,definition:{validation:{id:"Format_"+r+"_"+n,fail_message:{type:"error",message:{default:u(o,Oe.DATETIME_FORMAT_ERROR,{role:e.role,format:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"isDateTime",value:e.role}}}}};t.controls[r]?t.controls[r].push(a):t.controls[r]=[a]}function Is(e,t,r,n,o){var i=e.label&&e.label.text?e.label.text:r,a={params:r,definition:{validation:{id:"validField_"+r+"_"+n,fail_message:{type:"warning",message:{default:u(o,Oe.INVALID_FIELD_ERROR,{label:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"colDoesExists"}}}},alwaysShow:!0};t.controls[r]?t.controls[r].push(a):t.controls[r]=[a]}function Ss(e,t,n){if(e.value)if("string"==typeof e.value)for(var o=0;o<t.length;o++){var i=t[o];if(i.name===e.value)return"type"===n?i.type:i.metadata[n]}else if("object"===r(e.value))for(var a=0;a<t.length;a++){var s=t[a];if(s.origName===e.value.field_name&&s.schema===e.value.link_ref)return"type"===n?s.type:s.metadata[n]}return null}var Cs=ue,Rs=Oa,Ts=Na,_s=oe((function(e){var t=Cs(e,Ts);return t.length&&t[0]===e[0]?Rs(t):[]}));function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ws=function(r){n(i,r);var o=ks(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){if(!this.props.messageInfo||this.props.tableOnly&&!this.props.inTable)return null;var e=this.props.inTable?null:s.createElement("span",null,this.props.messageInfo.text),t=s.createElement("div",{className:"icon"},s.createElement(rr,{type:this.props.messageInfo.type})),r=this.props.inTable?s.createElement("div",{className:"properties-tooltips-container table-cell-msg-icon"},s.createElement(or,{id:"table-cell-msg-icon",tip:this.props.messageInfo.text,direction:"bottom",className:"properties-tooltips"},t)):null,n=De("properties-validation-message",this.props.messageInfo.type,{hide:this.props.state===Ve.HIDDEN||this.props.state===Ve.DISABLED,inTable:this.props.inTable});return s.createElement("div",{className:n},r,e)}}]),i}(s.Component),Ls=ws,As={Y:"([1-9][0-9][0-9][0-9])",y:"([0-9][0-9])",m:"([0][1-9]|[1][0-2])",n:"([1-9]|[1-2][0-2])",d:"([0][1-9]|[1-2][0-9]|3[01])",j:"([1-9]|[1-2][0-9]|3[01])"};function Ds(e,t){var r=new Date(e);if(!isNaN(r)){var n=r.getFullYear().toString(),o=(r.getMonth()+1).toString();1===o.length&&(o="0"+o);var i=r.getDate().toString();1===i.length&&(i="0"+i);var a=t;return a=(a=(a=(a=(a=(a=a.replace("Y",n)).replace("y",n.substring(2))).replace("m",o)).replace("n",parseInt(o,10))).replace("d",i)).replace("j",parseInt(i,10))}return e}function Os(e,t){var r=new Date(e);if(!isNaN(r)){if(e instanceof Date)return r.toISOString();if("string"==typeof e&&e.trim().length>0&&t){var n=function(e){var t=e;return"^"+(t=(t=(t=(t=(t=(t=(t=t.replace("Y",As.Y)).replace("y",As.y)).replace("m",As.m)).replace("n",As.n)).replace("d",As.d)).replace("j",As.j)).replaceAll(".","[.]"))+"$"}(t),o=function(e,t,r){var n="",o="",i="",a=e.match(t);if(a){for(var s=1,l=0;l<r.length;l++){switch(r.charAt(l)){case"Y":case"y":n=a[s],s++;break;case"m":case"n":o=a[s],s++;break;case"d":case"j":i=a[s],s++}}return{year:n,month:o,day:i}}return null}(e,n,t),i=o.year,a=o.month,s=o.day;return new Date("".concat(i,"-").concat(a,"-").concat(s,"T00:00:00.00")).toISOString()}}return e}function Ps(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ns=function(o){n(l,o);var i=Ps(l);function l(t){var r;return e(this,l),(r=i.call(this,t)).updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(l,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)&&Array.isArray(this.props.controlOpts.values)&&this.props.control.controlType!==h.CUSTOM){var t=_s(this.props.value,this.props.controlOpts.values);O(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"render",value:function(){var e=this.props.value;if(this.props.control.values&&this.props.control.valueLabels){var t=this.props.control.values.indexOf(this.props.value);t>-1&&this.props.control.valueLabels[t]&&(e=this.props.control.valueLabels[t])}if(null==e?e="":"object"===r(e)&&e.link_ref?e=y(e,this.props.control):Array.isArray(e)?e=e.join(", "):"boolean"==typeof e&&(e=e.toString()),e=Pn(e),this.props.control.controlType===h.CUSTOM)e=this.props.controller.getCustomControl(this.props.propertyId,this.props.control,{table:!0,editStyle:"summary"});else if(this.props.control.controlType===h.TIMESTAMP||this.props.control.valueDef&&this.props.control.valueDef.propType===Ye.TIMESTAMP){var n=new Date(e);e=dr(n)?this.props.tableControl?s.createElement(Mt,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}):s.createElement(Mt,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",weekday:"long"}):""}else if(this.props.control.controlType===h.DATEPICKER)e=e?Ds(e,this.props.control.dateFormat):"";else if(this.props.control.controlType===h.DATEPICKERRANGE){e=[this.props.value&&this.props.value[0]?Ds(this.props.value[0],this.props.control.dateFormat):"",this.props.value&&this.props.value[1]?Ds(this.props.value[1],this.props.control.dateFormat):""].toString()}var o=s.createElement("span",{className:"properties-field-type",disabled:this.props.state===Ve.DISABLED},e),i=o;if(this.props.tableControl){var a=!0;e&&(a=!1);var l=o;this.props.control.icon&&(l=s.createElement("div",{className:"properties-field-readonly"},s.createElement("div",{className:"properties-field-type-icon"},s.createElement(rr,{type:this.props.control.icon})),o)),i=s.createElement(ir,{content:l,tooltipText:e,disabled:a})}return s.createElement("div",{className:De("properties-readonly",{hide:this.props.state===Ve.HIDDEN}),"data-id":Ln(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,i,s.createElement(Ls,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),l}(s.Component),xs=Ft((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(Ns);function Bs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ms=function(r){n(i,r);var o=Bs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=An(t.control,t.controller.getMaxLengthForSingleLineControls()),r.uuid=nr(),r.id=wn(t.propertyId,r.uuid),r.isList=!1,r.props.control.valueDef&&(r.props.control.valueDef.isList&&(r.isList=!0),r.defaultValue=r.props.control.valueDef.defaultValue),r}return t(i,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.isList&&(t=Dn(t,", ")),0!==t.length||void 0!==this.defaultValue&&null!==this.defaultValue||(t=null),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this,t=this.props.value?this.props.value:"",r=!1;if(this.isList){var n=On(t,", ");t=n.value,r=n.truncated}else r=0!==(t=Pn(t)).length&&t.length!==this.props.value.length;var o=De("properties-textfield","properties-input-control",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),i=null;if(r){var a={text:u(this.reactIntl,Oe.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:Me}),type:Fe.ERROR,validation_id:this.props.control.name};i=s.createElement("div",{className:"properties-textinput-readonly"},this.props.tableControl?null:this.props.controlItem,s.createElement(xs,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,tableControl:this.props.tableControl}),"// TODO this could conflict with the below ValidationMessage.",s.createElement(Ls,{inTable:this.props.tableControl,state:"",messageInfo:a}))}else{var l=Nn(this.props.messageInfo,this.props.tableControl);i=s.createElement(gt,sr({},l,{autoComplete:!0===this.props.tableControl?"off":"on",id:this.id,disabled:this.props.state===Ve.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:t,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,ref:function(t){return e.textInputRef=t}}))}var p=i;if(this.props.tableControl){var c={};this.textInputRef&&(c.truncatedRef=this.textInputRef);var d=!0;t&&this.props.state!==Ve.DISABLED&&(d=!1),p=s.createElement(ir,sr({},c,{content:i,tooltipText:t,disabled:d}))}return s.createElement("div",{className:o,"data-id":Ln(this.props.propertyId)},p,s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Fs=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ms);function Vs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Us=function(r){n(i,r);var o=Vs(i);function i(t){var r;e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.valuesMap={},r.iconsMap={};for(var n=0;n<t.control.values.length;++n)r.valuesMap[t.control.values[n]]=t.control.valueLabels[n],void 0!==t.control.valueIcons&&(r.iconsMap[t.control.values[n]]=t.control.valueIcons[n]);return r}return t(i,[{key:"onClick",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId)===this.props.control.values[0]?this.props.control.values[1]:this.props.control.values[0];this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"renderIcon",value:function(){var e=null;if(void 0!==this.iconsMap[this.props.value]){var t=this.iconsMap[this.props.value];e="string"==typeof t&&".svg"===t.slice(t.length-4)?s.createElement(mr,{className:"bx--btn__icon",src:t}):s.createElement("img",{className:"bx--btn__icon",src:t,alt:""})}return e}},{key:"render",value:function(){var e=this.valuesMap[this.props.value];void 0===e&&(e=this.props.value);var t=null,r=this.props.tableControl?"ghost":"tertiary";void 0!==e&&(t=s.createElement(dt,{kind:r,size:"small",onClick:this.onClick.bind(this),renderIcon:this.renderIcon.bind(this),iconDescription:u(this.reactIntl,Oe.TOGGLETEXT_ICON_DESCRIPTION,{toggletext_label:this.props.value}),disabled:this.props.state===Ve.DISABLED},e));var n=De("properties-toggletext",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{"aria-label":this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",className:n,disabled:this.props.state===Ve.DISABLED,"data-id":Ln(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,t,s.createElement(Ls,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Hs=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Us);function js(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var zs=function(r){n(i,r);var o=js(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=An(t.control,t.controller.getMaxLengthForMultiLineControls()),r.uuid=nr(),r.id=wn(r.props.propertyId,r.uuid),r}return t(i,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.props.control.valueDef&&this.props.control.valueDef.isList&&(t=Dn(t,"\n")),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=On(e,"\n");e=t.value;var r=t.truncated,n=null,o=Nn(this.props.messageInfo,this.props.tableControl),i=!1;if(o.warn&&(i=!0,o={}),r){var a={text:u(this.reactIntl,Oe.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:Me}),type:Fe.ERROR,validation_id:this.props.control.name};o=Nn(a,this.props.tableControl),n=s.createElement("div",null,s.createElement(bt,sr({},o,{id:this.id,disabled:!0,placeholder:this.props.control.additionalText,value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!i,state:"",messageInfo:a}))}else n=s.createElement(bt,sr({},o,{id:this.id,disabled:this.props.state===Ve.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light}));var l=n;if(this.props.tableControl){var p=!0;e&&this.props.state!==Ve.DISABLED&&(p=!1);var c=s.createElement("div",{className:"properties-tooltips"},String(e));l=s.createElement(or,{id:"tooltip-column-textarea",tip:c,direction:"bottom",className:"properties-tooltips",disable:p},n)}var d=De("properties-textarea",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:d,"data-id":Ln(this.props.propertyId)},l,s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!i,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),qs=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(zs);function Gs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ws=function(r){n(i,r);var o=Gs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={invalidNumber:!1},r.onDirection=r.onDirection.bind(a(r)),r.generateNumber=r.generateNumber.bind(a(r)),r.id=wn(r.props.propertyId),r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"onDirection",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId);null==t&&(t=0);var r=t.toString().split(".")[1];this.props.control.increment=this.props.control.increment?this.props.control.increment:1;var n=this.props.control.increment.toString().split(".")[1],o="up"===e?Number(t)+this.props.control.increment:Number(t)-this.props.control.increment;if(n){var i=n.length;r&&(i=r.length>=n.length?r.length:n.length),this.props.controller.updatePropertyValue(this.props.propertyId,Number(o.toFixed(i)))}else this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"onInput",value:function(e){this.state.invalidNumber&&e.target.validity&&!e.target.validity.badInput&&this.handleChange(e)}},{key:"handleChange",value:function(e,t){if("string"!=typeof t)if(e.target.validity&&e.target.validity.badInput||!isFinite(e.target.value)){if(null===this.props.controller.getErrorMessage(this.props.propertyId)){var r={type:"error",text:u(this.reactIntl,Oe.INVALID_NUMBER_ERROR),propertyId:this.props.propertyId,validation_id:"invalid_number"};this.props.controller.updateErrorMessage(this.props.propertyId,r)}this.setState({invalidNumber:!0})}else{this.state.invalidNumber&&this.setState({invalidNumber:!1}),this.props.controller.getErrorMessage(this.props.propertyId)&&"invalid_number"===this.props.controller.getErrorMessage(this.props.propertyId).validation_id&&this.props.controller.updateErrorMessage(this.props.propertyId,null);var n=e.target.value;null==n||""===n?this.props.controller.updatePropertyValue(this.props.propertyId,null):this.props.controller.updatePropertyValue(this.props.propertyId,Number(n))}else this.onDirection(t)}},{key:"generateNumber",value:function(){var e=this.props.control.label.numberGenerator,t=e.range&&e.range.min?e.range.min:1e4,r=e.range&&e.range.max?e.range.max:99999,n=Math.floor(Math.random()*(r-t+1)+t);this.props.controller.updatePropertyValue(this.props.propertyId,n)}},{key:"render",value:function(){var e=this,t="";null!==this.props.value&&void 0!==this.props.value&&(t=this.props.value);var r,n=this.props.state===Ve.DISABLED,o=this.props.state===Ve.HIDDEN;ee(this.props.control,"label.numberGenerator")&&(r=s.createElement(dt,{className:De("properties-number-generator",{hide:o}),onClick:this.generateNumber,disabled:n,kind:"tertiary",renderIcon:Ht,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:this.props.control.label.numberGenerator.text,hasIconOnly:!0}));var i=De("properties-numberfield",{"numberfield-with-number-generator":ee(this.props.control,"label.numberGenerator")?this.props.control.label.numberGenerator:null},{hide:o},this.props.messageInfo?this.props.messageInfo.type:null),a=Nn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:i,"data-id":Ln(this.props.propertyId)},s.createElement(Et,sr({},a,{ref:function(t){return e.numberInput=t},id:this.id,onChange:this.handleChange.bind(this),disabled:n,step:this.props.control.increment,value:t,placeholder:this.props.control.additionalText,label:this.props.controlItem,hideLabel:this.props.tableControl,allowEmpty:!0,light:this.props.controller.getLight()&&this.props.control.light,hideSteppers:this.props.tableControl||this.props.control.controlType===h.NUMBERFIELD,onInput:this.onInput.bind(this)})),r,s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),$s=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId,!0)}}),null)(Ws),Xs=ve,Ks=Pe,Ys=yr,Js=Math.max;var Qs=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:Ys(r);return o<0&&(o=Js(n+o,0)),Xs(e,Ks(t),o)};function Zs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var el=function(r){n(i,r);var o=Zs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getCustomButtonEnabled=r.getCustomButtonEnabled.bind(a(r)),r.customButtonIconCallback=r.customButtonIconCallback.bind(a(r)),r.customButtonOnClick=r.customButtonOnClick.bind(a(r)),r.convertToolbarConfig=r.convertToolbarConfig.bind(a(r)),r}return t(i,[{key:"getCustomButtonEnabled",value:function(e,t){var r=void 0!==e&&e===Ve.DISABLED,n=this.props.customButtonsState&&void 0!==this.props.customButtonsState[t.id]?this.props.customButtonsState[t.id]:t.enabled||!1;return!r&&n}},{key:"customButtonIconCallback",value:function(e,t){var r,n=this.props.controller.getHandlers().buttonIconHandler;return n&&n({type:"customButtonIcon",propertyId:this.props.propertyId,buttonId:e,carbonIcon:t},(function(e){r=e})),r}},{key:"customButtonOnClick",value:function(e){var t=this.props.controller.getHandlers().buttonHandler;t&&t({type:"custom_button",propertyId:this.props.propertyId,buttonId:e})}},{key:"convertToolbarConfig",value:function(e){var t=this,r=[];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(n){var o=t.getCustomButtonEnabled(e,n),i={action:n.id,enable:o};n.icon?i.iconEnabled=n.icon:n.carbonIcon&&(i.iconEnabled=t.customButtonIconCallback(n.id,n.carbonIcon)),n.label&&(i.label=n.label.text,i.incLabelWithIcon="before",i.kind="ghost"),n.description&&(i.tooltip=n.description.text),n.divider&&"before"===n.divider&&r.push({divider:!0}),r.push(i),n.divider&&"after"===n.divider&&r.push({divider:!0})})),r}},{key:"render",value:function(){var e={leftBar:this.convertToolbarConfig(this.props.tableState,this.props.customButtons)};return s.createElement("div",{className:"properties-custom-table-buttons"},s.createElement(gr,{config:e,instanceId:0,size:"sm",toolbarActionHandler:this.customButtonOnClick}))}}]),i}(s.Component);function tl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var rl=function(r){n(i,r);var o=tl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).showSubPanel=r.showSubPanel.bind(a(r)),r.onSubPanelHidden=r.onSubPanelHidden.bind(a(r)),r}return t(i,[{key:"onSubPanelHidden",value:function(e){e||(this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates))}},{key:"showSubPanel",value:function(){this.initialControlValue=G(this.props.controller.getPropertyValue(this.props.propertyId)),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates(),this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=void 0!==this.props.disabled&&this.props.disabled,r=u(this.props.controller.getReactIntl(),Oe.SUBPANEL_BUTTON_TOOLTIP),n=u(this.props.controller.getReactIntl(),Oe.APPLYBUTTON_LABEL),o=u(this.props.controller.getReactIntl(),Oe.REJECTBUTTON_LABEL);return s.createElement(Gn,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:n,rejectLabel:o,controller:this.props.controller},s.createElement(or,{id:"tooltip-subpanel-cell",tip:r,direction:"left",className:"properties-tooltips icon-tooltip"},s.createElement(dt,{className:"properties-subpanel-button",kind:"ghost",renderIcon:jt,onClick:this.showSubPanel,disabled:t,iconDescription:r,hasIconOnly:!0})))}}]),i}(s.Component);function nl(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ol(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ol(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ol(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function il(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var al=function(r){n(i,r);var o=il(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={filterText:null,enableRemoveIcon:!1},r.onPanelContainer=[],r.allowColumnControls=!1,r.isReadonlyTable=r.isReadonlyTable.bind(a(r)),r.indexOfColumn=r.indexOfColumn.bind(a(r)),r.setCurrentControlValueSelected=r.setCurrentControlValueSelected.bind(a(r)),r.setReadOnlyColumnValue=r.setReadOnlyColumnValue.bind(a(r)),r.removeSelected=r.removeSelected.bind(a(r)),r.updateRowSelections=r.updateRowSelections.bind(a(r)),r.handleRowClick=r.handleRowClick.bind(a(r)),r.createTable=r.createTable.bind(a(r)),r.onFilter=r.onFilter.bind(a(r)),r.onSort=r.onSort.bind(a(r)),r.setScrollToRow=r.setScrollToRow.bind(a(r)),r.includeInFilter=r.includeInFilter.bind(a(r)),r.makeAddRemoveButtonPanel=r.makeAddRemoveButtonPanel.bind(a(r)),r.makeEditButtonPanel=r.makeEditButtonPanel.bind(a(r)),r.makeCustomButtonsPanel=r.makeCustomButtonsPanel.bind(a(r)),r.buildChildItem=r.buildChildItem.bind(a(r)),r.makeCells=r.makeCells.bind(a(r)),r.checkedAll=r.checkedAll.bind(a(r)),r.isLightTheme=r.isLightTheme.bind(a(r)),t.selectedRows&&t.selectedRows.length>0&&(r.scrollToRow=t.selectedRows[t.selectedRows.length-1]),r.selectSummaryPropertyName="table-multi-select-edit-property-"+t.control.name,t.controller.saveControls([{name:r.selectSummaryPropertyName}]),r.setSelectedSummaryRowValue(t.selectedRows),r.uuid=nr(),r}return t(i,[{key:"componentDidMount",value:function(){if(this.props.control.subControls){var e=this.setReadOnlyColumnValue();this.props.controller.updatePropertyValue(this.props.propertyId,e,!0,Je.INITIAL_LOAD)}}},{key:"componentDidUpdate",value:function(){this.isSelectSummaryEdit(this.props.selectedRows)&&this.updateSelectedRowsValues()}},{key:"componentWillUnmount",value:function(){this.props.controller.removePropertyValue({name:this.selectSummaryPropertyName})}},{key:"onFilter",value:function(e){this.setState({filterText:e})}},{key:"onSort",value:function(e){for(var t=this.props.value,r=-1,n=0;n<this.props.control.subControls.length;n++)if(this.props.control.subControls[n].name===e.column){r=n;break}r>-1&&(t=E(t,(function(e){return e[r]})),e.direction===Qe.DESC&&t.reverse(),this.setCurrentControlValueSelected(t,[]))}},{key:"getOnPanelContainer",value:function(e){return 0===this.onPanelContainer.length||0===e.length||this.isSelectSummaryEdit(e)?s.createElement("div",null):s.createElement("div",{className:"properties-onpanel-container"},this.onPanelContainer[e[0]])}},{key:"getDefaultRow",value:function(){var e=[];if(this.props.control.defaultRow){var t,r=nl(this.props.control.defaultRow);try{for(r.s();!(t=r.n()).done;){var n=t.value;null!=n&&n.parameterRef?e.push(this.props.controller.getPropertyValue({name:n.parameterRef})):e.push(n)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"setScrollToRow",value:function(e){this.scrollToRow=e}},{key:"setCurrentControlValueSelected",value:function(e,t){var r=e;if(this.props.control.subControls&&(r=this.setReadOnlyColumnValue(e)),Array.isArray(r))for(var n=0;n<r.length;n++){var o=r[n];if(Array.isArray(o))for(var i=0;i<this.props.control.subControls.length;i++){var a=this.props.control.subControls[i];"column"===a.role&&"structure"===a.valueDef.propType&&(r[n][i]=P(o[i],a,this.props.controller))}else"column"===this.props.control.role&&"structure"===this.props.control.valueDef.propType&&(r[n]=P(o,this.props.control,this.props.controller))}this.props.controller.updatePropertyValue(this.props.propertyId,r);var s=Array.isArray(t)?t:[];this.updateRowSelections(s)}},{key:"setReadOnlyColumnValue",value:function(e){var t=e||this.props.value;if(!Array.isArray(t))return t;for(var r=0;r<t.length;r++)for(var n=0;n<this.props.control.subControls.length;n++){var o=this.props.control.subControls[n];if(o.controlType===h.READONLY&&o.generatedValues&&"index"===o.generatedValues.operation){var i=void 0!==o.generatedValues.startValue?o.generatedValues.startValue+r:r+1;t[r][n]=i}}return t}},{key:"setSelectedSummaryRowValue",value:function(e){if(this.isSelectSummaryEdit(e)){var t={name:this.selectSummaryPropertyName},r=this.props.controller.getPropertyValue(t);r||(r=[this.getDefaultRow()],this.props.controller.updatePropertyValue(t,r,!0)),this.selectedSummaryRowValue=G(r)}}},{key:"isSelectSummaryEdit",value:function(e){return this.props.control.rowSelection===Ze.MULTIPLE&&e.length>1}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===h.READONLYTABLE}},{key:"indexOfColumn",value:function(e){return Qs(this.props.control.subControls,(function(t){return t.name===e}))}},{key:"handleRowClick",value:function(e,t){var r=this.props.selectedRows;if(this.props.control.rowSelection===Ze.SINGLE)r=[e];else if(!0===t.metaKey||!0===t.ctrlKey){var n=r.indexOf(e);n>=0?r.splice(n,1):r=r.concat(e)}else if(!0===t.shiftKey){for(var o=r.length>0?r[0]:e,i=(o>e?o:e)+1,a=[],s=o>e?e:o;s<i;s++)a.push(s);r=a}this.updateRowSelections(r)}},{key:"updateSelectedRowsValues",value:function(){var e=this,t={name:this.selectSummaryPropertyName},r=this.props.controller.getControl({name:this.props.control.name}),n=this.props.controller.getPropertyValue(t);n&&Array.isArray(n)&&(n[0].forEach((function(t,n){if(null!==t&&!O(t,e.selectedSummaryRowValue[0][n])){var o=void 0===t?null:t;e.props.selectedRows.forEach((function(t){e.props.controller.updatePropertyValue({name:e.props.control.name,row:t,col:n},o,!0)})),r.subControls[n].controlType===h.ONEOFSELECT&&e.props.controller.updatePropertyValue({name:e.selectSummaryPropertyName,row:0,col:n},null)}})),this.selectedSummaryRowValue=G(n))}},{key:"updateRowSelections",value:function(e){this.props.controller.updateSelectedRows(this.props.propertyId,e),this.props.rightFlyout&&this.setState({enableRemoveIcon:0!==e.length}),this.setSelectedSummaryRowValue(e)}},{key:"removeSelected",value:function(){for(var e=this.props.value,t=this.props.selectedRows.sort((function(e,t){return t-e})),r=0;r<t.length;r++)e.splice(t[r],1),this.props.controller.removeErrorMessageRow({name:this.props.propertyId.name,row:t[r]});this.setCurrentControlValueSelected(e)}},{key:"_makeCell",value:function(e,t,r,n,o,i,a){var l={name:r,row:n,col:o},p=G(this.props.propertyId),c=l;a||p.name===l.name||(c=this.props.controller.setChildPropertyId(p,l));var u,d={table:!0,allowColumnControls:this.allowColumnControls},h=this.props.controller.getControlFactory(),f=Object.assign({},e),m=f.className?f.className:"";if(e.dmImage){var v=this.props.controller.getDatasetMetadataFields(),g=y(this.props.controller.getPropertyValue(c),e,!0);f.icon=N(v,g,e.dmImage)}return this.isReadonlyTable()?u=s.createElement("div",{className:De("properties-table-cell-control",m)},s.createElement(xs,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})):e.editStyle===_.SUBPANEL||e.editStyle===_.ON_PANEL?a?u=s.createElement("div",null):(u=s.createElement("div",{className:De("properties-table-cell-control",m)},s.createElement(xs,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})),e.editStyle===_.ON_PANEL&&this.onPanelContainer[n].push(s.createElement("div",{key:o},s.createElement("br",null),h.createControlItem(e,c)))):(d.editStyle=_.INLINE,u=s.createElement("div",{className:De("properties-table-cell-control",m)},h.createControl(f,c,d))),{column:e.name,width:e.width,content:u,className:m,value:this.props.controller.getPropertyValue(c),resizable:e.resizable}}},{key:"_getCustomCtrlContent",value:function(e,t,r,n){var o=r;return t.controlType===h.CUSTOM&&(n.editStyle="summary",o=this.props.controller.getCustomControl(e,t,n)),o}},{key:"_getDisabledStatus",value:function(e,t){return void 0!==t&&t===Ve.DISABLED||this.props.controller.getControlState(e)===Ve.DISABLED}},{key:"includeInFilter",value:function(e){if(!this.state.filterText||0===this.state.filterText.length)return!0;for(var t=this.props.value,r=0;r<this.filterFields.length;r++)for(var n=0;n<this.props.control.subControls.length;n++){if(this.props.control.subControls[n].name===this.filterFields[r]){var o=t[e][n];if("string"==typeof o&&o.toLowerCase().indexOf(this.state.filterText.toLowerCase())>-1)return!0;break}}return!1}},{key:"hasFilter",value:function(){var e=!1;if(this.props.control.subControls){var t,r=nl(this.props.control.subControls);try{for(r.s();!(t=r.n()).done;){if(t.value.filterable){e=!0;break}}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"addOnClick",value:function(e){this.addOnClickCallback&&this.addOnClickCallback(e,this.onFieldPickerCloseCallback)}},{key:"isLightTheme",value:function(){return this.props.controller.getLight()&&this.props.control.light}},{key:"makeSelectedEditRow",value:function(e){if(e&&Array.isArray(e)&&e.length>1){var t=u(this.props.controller.getReactIntl(),Oe.MULTI_SELECTED_ROW_LABEL),r=u(this.props.controller.getReactIntl(),Oe.MULTI_SELECTED_ROW_ACTION),n=e.length+" "+t+" "+r,o=[],i=!1===this.props.control.header?[]:this.makeHeader([],[]),a=this.props.controller.getPropertyValue({name:this.selectSummaryPropertyName});this.makeCells(o,a,null,this.selectSummaryPropertyName,!0);var l=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return s.createElement("div",{className:"properties-at-selectedEditRows"},s.createElement("div",{className:"properties-selectedEditRows-title"},s.createElement("span",null,n)),s.createElement(ar,{showHeader:!1,columns:i,data:o,rows:0,scrollKey:this.selectSummaryPropertyName,tableLabel:l,summaryTable:!0,rowSelection:Ze.MULTIPLE,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText}))}return null}},{key:"makeAddRemoveButtonPanel",value:function(e,t){this.onFieldPickerCloseCallback=t&&t.fieldPickerCloseFunction?t.fieldPickerCloseFunction.bind(this):null;var r=t&&t.removeButtonFunction?t.removeButtonFunction:this.removeSelected,n=t&&t.removeButtonLabel?t.removeButtonLabel:u(this.props.controller.getReactIntl(),Oe.STRUCTURETABLE_REMOVEBUTTON_LABEL),o=!this.state.enableRemoveIcon||e===Ve.DISABLED,i=!1;this.addOnClickCallback=t&&t.addButtonFunction?t.addButtonFunction:this.props.openFieldPicker;var a=t&&t.addButtonLabel?t.addButtonLabel:u(this.props.controller.getReactIntl(),Oe.STRUCTURETABLE_ADDBUTTON_LABEL);return e===Ve.DISABLED&&(i=!0,this.addOnClickCallback=null),s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(dt,{className:"properties-remove-fields-button",disabled:o,onClick:r,size:"small",kind:"ghost",renderIcon:zt},n),s.createElement(dt,{className:"properties-add-fields-button",disabled:i,onClick:this.addOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:Ut},a))}},{key:"makeEditButtonPanel",value:function(e,t){var r=null;return t&&t.editCallback&&(this.editOnClickCallback=t.editCallback,r=s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(dt,{className:"properties-edit-button",onClick:this.editOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:qt},t.label))),r}},{key:"makeCustomButtonsPanel",value:function(e,t){var r=null;return t&&(r=s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(el,{controller:this.props.controller,propertyId:this.props.propertyId,tableState:e,customButtons:t,customButtonsState:this.props.tableButtons}))),r}},{key:"editOnClick",value:function(e){this.editOnClickCallback&&this.editOnClickCallback(e)}},{key:"checkedAllValue",value:function(e,t){var r=this.props.value;if(Array.isArray(r)){for(var n=0;n<r.length;n++){var o={name:this.props.control.name,row:n,col:e};this.props.controller.getControlState(o)!==Ve.DISABLED&&this.props.controller.updatePropertyValue(o,t)}this.checkedAll[e]=t}}},{key:"checkedAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;for(var r=0;r<t.length;r++){var n={name:this.props.control.name,row:r,col:e};if(this.props.controller.getControlState(n)!==Ve.DISABLED&&!t[r][e])return!1}return!0}},{key:"disabledAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;var r,n=nl(t);try{for(n.s();!(r=n.n()).done;){if(!1===r.value[e])return!1}}catch(e){n.e(e)}finally{n.f()}return!0}},{key:"createTable",value:function(e,t,r){var n=[],o=[],i=[];this.filterFields=i;var a=this.makeHeader(o,i),l=!1!==this.props.control.header,p=this.props.value;this.makeCells(n,p,e);var c,u=this.props.control.rowSelection===Ze.MULTIPLE?this.makeSelectedEditRow(this.props.selectedRows):null,d=null;r?d=this.makeCustomButtonsPanel(e,r):this.isReadonlyTable()?this.props.hideEditButton||(d=this.makeEditButtonPanel(e,t)):this.props.addRemoveRows&&(d=this.makeAddRemoveButtonPanel(e,t)),Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(c=this.scrollToRow,delete this.scrollToRow);var h,f=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";this.isReadonlyTable()&&this.props.control.rowSelection===Ze.SINGLE||(h=this.props.control.rowSelection===Ze.SINGLE?this.handleRowClick:this.updateRowSelections);var m=s.createElement(ar,{sortable:o,filterable:i,columns:a,data:n,showHeader:l,scrollToRow:c,onFilter:this.onFilter,onSort:this.onSort,topRightPanel:d,selectedEditRow:u,scrollKey:this.props.control.name,tableState:e,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId),rows:this.props.control.rows,tableLabel:f,updateRowSelections:h,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText});return s.createElement("div",null,m)}},{key:"makeHeader",value:function(e,t){for(var r=[],n=0;n<this.props.control.subControls.length;n++){var o=this.props.control.subControls[n],i=this.props.controller.getControlState({name:this.props.control.name,col:n}),a=i===Ve.DISABLED||i===Ve.HIDDEN,l=o.controlType===h.CHECKBOX?s.createElement(It,{disabled:a,id:"properties-at-header-cb-".concat(this.uuid,"-").concat(this.props.control.name,"=").concat(n),checked:this.checkedAll(n),onChange:this.checkedAllValue.bind(this,n),labelText:o.label.text}):o.label.text;o.visible&&o.controlType!==h.HIDDEN&&(o.sortable&&e.push(o.name),r.push({key:o.name,label:l,width:o.width,description:o.description?o.description.text:null,resizable:!!o.resizable&&o.resizable,operation:o.generatedValues&&o.generatedValues.operation?o.generatedValues.operation:null,disabled:a}),o.filterable&&t.push(o.name))}return this.props.control.childItem&&!this.isReadonlyTable()&&r.push({key:"subpanel",label:"",width:et,staticWidth:!0}),r}},{key:"makeCells",value:function(e,t,r,n,o){if(Array.isArray(t))for(var i=n||this.props.control.name,a=0;a<t.length;a++){var s=[];if(this.onPanelContainer[a]=[],this.includeInFilter(a)||o){for(var l=0;l<this.props.control.subControls.length;l++){var p=this.props.control.subControls[l];if(p.visible||p.editStyle===_.ON_PANEL){var c=this._makeCell(p,t,i,a,l,r,o);p.visible&&s.push(c)}}if(this.props.control.childItem&&!o&&!this.isReadonlyTable()){var u=this.buildChildItem(i,a,r);s.push(u)}e.push({columns:s})}}}},{key:"buildChildItem",value:function(e,t,r){var n={name:e,row:t},o=G(this.props.propertyId),i=n;o.name!==n.name&&(i=this.props.controller.setChildPropertyId(o,n));var a=this.props.buildUIItem(t,this.props.control.childItem,i,this.indexOfColumn),l=s.createElement("div",{className:"properties-table-subcell"},s.createElement(rl,{label:a.props.label,title:a.props.title,panel:a.props.panel,disabled:r===Ve.DISABLED,controller:this.props.controller,propertyId:this.props.propertyId,rightFlyout:this.props.rightFlyout}));return{column:"subpanel",width:et,content:l}}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=0!==e.selectedRows.length;return t.enableRemoveIcon!==r?{enableRemoveIcon:r}:{}}}]),i}(s.Component);function sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}al.defaultProps={addRemoveRows:!0,hideEditButton:!1};var ll=function(r){n(i,r);var o=sl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getEmptyTableText=r.getEmptyTableText.bind(a(r)),r.isReadonlyTable=r.isReadonlyTable.bind(a(r)),r}return t(i,[{key:"getEmptyTableText",value:function(){var e="".concat(this.props.control.name,".empty.table.text"),t=u(this.props.controller.getReactIntl(),Oe.PROPERTIES_EMPTY_TABLE_TEXT,{button_label:this.props.emptyTableButtonLabel});return this.props.controller.getResource(e,t)}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===h.READONLYTABLE}},{key:"render",value:function(){var e=this.getEmptyTableText();return s.createElement("div",{className:"properties-empty-table",disabled:this.props.disabled},s.createElement("span",null,e),s.createElement("br",null),s.createElement(dt,{className:"properties-empty-table-button",kind:"tertiary",size:"small",renderIcon:this.isReadonlyTable()?qt:Ut,onClick:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled},this.props.emptyTableButtonLabel))}}]),i}(s.Component),pl=ll;function cl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ul=function(r){n(i,r);var o=cl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getTableRowMoveImages=r.getTableRowMoveImages.bind(a(r)),r.topMoveRow=r.topMoveRow.bind(a(r)),r.upMoveRow=r.upMoveRow.bind(a(r)),r.downMoveRow=r.downMoveRow.bind(a(r)),r.bottomMoveRow=r.bottomMoveRow.bind(a(r)),r.getMoveableTableRows=r.getMoveableTableRows.bind(a(r)),r.getLeastValue=r.getLeastValue.bind(a(r)),r.getMaxValue=r.getMaxValue.bind(a(r)),r}return t(i,[{key:"getMoveableTableRows",value:function(){var e=null;if(void 0!==this.props.control.moveableRows&&this.props.control.moveableRows){var t=this.getTableRowMoveImages();e=s.createElement("div",{className:"properties-mr-button-container"},t)}var r=s.createElement("table",{role:"presentation",className:"properties-mr-table-container"},s.createElement("tbody",null,s.createElement("tr",{className:De("properties-mr-table-content",{disabled:this.props.disabled})},s.createElement("td",null,this.props.tableContainer),s.createElement("td",null,e))));return s.createElement("div",null,r)}},{key:"getTableRowMoveImages",value:function(){var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(),t=this.props.controller.getPropertyValue(this.props.propertyId),r=!this.props.disableRowMoveButtons&&0!==e.length&&0!==e[0]&&!this.props.disabled,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled,o=this.props.controller.getStaticRows(this.props.propertyId).sort();e.length>0&&o.length>0&&o.includes(e[0])?(r=!1,n=!1):e[0]===o[o.length-1]+1?(r=!1,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled):e[0]===o[0]-1&&(n=!1);var i=u(this.props.controller.getReactIntl(),Oe.MOVEABLE_TABLE_BUTTON_TOP_DESCRIPTION),a=u(this.props.controller.getReactIntl(),Oe.MOVEABLE_TABLE_BUTTON_UP_DESCRIPTION),l=s.createElement("div",{key:"topImages"},s.createElement(dt,{className:"table-row-move-button",onClick:this.topMoveRow,disabled:!r,kind:"ghost",renderIcon:Gt,iconDescription:i,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(dt,{className:"table-row-move-button",onClick:this.upMoveRow,disabled:!r,kind:"ghost",renderIcon:Wt,iconDescription:a,tooltipPosition:"left",hasIconOnly:!0})),p=u(this.props.controller.getReactIntl(),Oe.MOVEABLE_TABLE_BUTTON_DOWN_DESCRIPTION),c=u(this.props.controller.getReactIntl(),Oe.MOVEABLE_TABLE_BUTTON_BOTTOM_DESCRIPTION);return[l,s.createElement("div",{key:"bottomImages"},s.createElement(dt,{className:"table-row-move-button",onClick:this.downMoveRow,disabled:!n,kind:"ghost",renderIcon:$t,iconDescription:p,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(dt,{className:"table-row-move-button",onClick:this.bottomMoveRow,disabled:!n,kind:"ghost",renderIcon:Xt,iconDescription:c,tooltipPosition:"left",hasIconOnly:!0}))]}},{key:"getLeastValue",value:function(){var e=0,t=this.props.controller.getStaticRows(this.props.propertyId).sort();return t&&t.length>0&&t.includes(0)&&(e=t[t.length-1]),e}},{key:"getMaxValue",value:function(){var e=this.props.controller.getPropertyValue(this.props.propertyId),t=e.length-1,r=this.props.controller.getStaticRows(this.props.propertyId).sort();return r&&r.length>0&&r.includes(e.length-1)&&(t=r[0]-1),t}},{key:"topMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getLeastValue(),o=this.props.controller.getStaticRows(this.props.propertyId).sort(),i=t[0];i>n;i--)for(var a=0;a<=t.length-1;a++)if(o.length>0&&t[0]>n+1||0===o.length){var s=t.shift(),l=r[s-1];r[s-1]=r[s],r[s]=l,t.push(s-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,s,s-1)}t.length>0&&this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}},{key:"upMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.getLeastValue(),n=this.props.controller.getStaticRows(this.props.propertyId).sort();if(0!==t.length&&t[0]>r){for(var o=this.props.controller.getPropertyValue(this.props.propertyId),i=0;i<=t.length-1;i++)if(n.length>0&&t[0]>r+1){var a=t.shift(),s=o[a-1];o[a-1]=o[a],o[a]=s,t.push(a-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a-1)}else if(0===n.length){var l=t.shift();if(0!==l){var p=o[l-1];o[l-1]=o[l],o[l]=p,t.push(l-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,l,l-1)}}this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(o,t)}}},{key:"downMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getMaxValue();if(0!==t.length&&t[t.length-1]!==r.length-1){for(var o=t.length-1;o>=0;o--){var i=t.pop();if(i!==n){var a=r[i+1];r[i+1]=r[i],r[i]=a,t.unshift(i+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,i,i+1)}}t.length>1?this.props.setScrollToRow(t[t.length-1]):this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}}},{key:"bottomMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getMaxValue(),o=t[t.length-1];o<n;o++)for(var i=t.length-1;i>=0;i--){var a=t.pop(),s=r[a+1];r[a+1]=r[a],r[a]=s,t.unshift(a+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a+1)}t.length>0&&this.props.setScrollToRow(t[t.length-1]),this.props.setCurrentControlValueSelected(r,t)}},{key:"render",value:function(){return this.props.isEmptyTable&&this.props.addRemoveRows?s.createElement(pl,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:this.props.emptyTableButtonLabel,emptyTableButtonClickHandler:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled}):this.getMoveableTableRows()}}]),i}(s.Component);ul.defaultProps={addRemoveRows:!0};var dl=Ft((function(e,t){return{disableRowMoveButtons:t.controller.isDisableRowMoveButtons(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(ul);function hl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var fl=[m.INTEGER,m.DOUBLE,m.LONG],ml=function(r){n(i,al);var o=hl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).addRow=r.addRow.bind(a(r)),r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"addRow",value:function(){var e=this.props.controller.getControlPropType(this.props.propertyId),t=fl.indexOf(e)>-1?null:"",r=this.props.controller.getPropertyValue(this.props.propertyId);void 0===r&&(r=[]);var n=r.concat([t]);this.setCurrentControlValueSelected(n)}},{key:"makeCell",value:function(e,t,r,n){return fl.indexOf(r)>-1?s.createElement("div",{className:"properties-table-cell-control"},s.createElement($s,{control:e,propertyId:t,controller:this.props.controller,controlItem:n,tableControl:!0})):s.createElement("div",{className:"properties-table-cell-control"},s.createElement(Fs,{control:e,propertyId:t,controller:this.props.controller,controlItem:n,tableControl:!0}))}},{key:"makeRows",value:function(e,t,r){var n=[];if(e)for(var o=0;o<e.length;o++){var i=[],a={name:this.props.control.name,row:o};if(this.props.propertyId.name!==a.name){var s=Object.assign({},this.props.propertyId);a=this.props.controller.setChildPropertyId(s,{name:this.props.control.name,row:o})}var l=this.props.controller.getControlPropType(a),p=void 0===r||0===r.length?"":r[0].label,c=this.makeCell({},a,l,p);i.push({key:o+"-0-value",column:"value",content:c}),n.push({key:o,onClickCallback:this.handleRowClick.bind(this,o,!1),columns:i,className:"list-table-row"})}return n}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"value",label:u(this.reactIntl,Oe.LIST_TABLE_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={addButtonLabel:u(this.props.controller.getReactIntl(),Oe.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:u(this.props.controller.getReactIntl(),Oe.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},n=this.makeRows(this.props.value,this.props.state,t),o=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var i=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",a=s.createElement(ar,{columns:t,data:n,scrollToRow:e,topRightPanel:o,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:i,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),l=s.createElement("div",null,s.createElement("div",{className:"properties-list-table"},a),s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":Ln(this.props.propertyId),className:"properties-list-control"},this.props.controlItem,s.createElement(dl,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Ve.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:r.addButtonLabel,emptyTableButtonClickHandler:this.addRow}))}}]),i}();ml.propTypes={control:vr.object.isRequired,propertyId:vr.object.isRequired,controller:vr.object.isRequired,controlItem:vr.element,selectedRows:vr.array,state:vr.string,value:vr.array,messageInfo:vr.object,addRemoveRows:vr.bool,tableButtons:vr.object};var vl=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(ml);function yl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var gl=new RegExp("[0-9- _$]","g"),bl=function(r){n(i,r);var o=yl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=nr(),r.reactIntl=t.controller.getReactIntl(),r.valueColumn=u(r.reactIntl,Oe.EXPRESSION_VALUE_COLUMN),r.valueColumnDesc=u(r.reactIntl,Oe.EXPRESSION_VALUE_COLUMN_DESCRIPTION),r.recentUseCat=u(r.reactIntl,Oe.EXPRESSION_RECENTLY_USED),r.recentUseCatInfo={id:r.recentUseCat,locLabel:r.recentUseCat,field_columns:{field_column_info:{locLabel:u(r.reactIntl,Oe.EXPRESSION_RECENTLY_USED_COLUMN)},value_column_info:{locLabel:r.valueColumn,descLabel:r.valueColumnDesc}}},r.inCategories=Object.keys(t.functionList),r.fields=r._makeDatasetFields(t.controller.getDatasetMetadataFields(),t.controller.getExpressionInfo().fields),r.resources=te(t.controller.getExpressionInfo(),"resources",{}),r.state={fieldSelected:0,valueSelected:0,functionSelected:0,fieldTableSortSpec:null,valuesTableSortSpec:null,functionTableSortSpec:null,functionCategory:r.inCategories[0],selectedIndex:0,fieldCategory:"fields",currentFieldDataset:r.fields.field_table_info[0].field_value_groups},r.controller=t.controller,r.onFunctionCatChange=r.onFunctionCatChange.bind(a(r)),r.onFieldCatChange=r.onFieldCatChange.bind(a(r)),r.onFieldFilter=r.onFieldFilter.bind(a(r)),r.onValueFilter=r.onValueFilter.bind(a(r)),r.onFunctionFilter=r.onFunctionFilter.bind(a(r)),r.language=t.language,r.onFieldTableClick=r.onFieldTableClick.bind(a(r)),r.onFieldTableDblClick=r.onFieldTableDblClick.bind(a(r)),r.onFunctionTableClick=r.onFunctionTableClick.bind(a(r)),r.onFunctionTableDblClick=r.onFunctionTableDblClick.bind(a(r)),r.onValueTableClick=r.onValueTableClick.bind(a(r)),r.onValueTableDblClick=r.onValueTableDblClick.bind(a(r)),r.sortTableRows=r.sortTableRows.bind(a(r)),r.shouldQuoteField=r.shouldQuoteField.bind(a(r)),r}return t(i,[{key:"onSwitch",value:function(e,t){this.setState({selectedIndex:e.index})}},{key:"onFunctionCatChange",value:function(e){this.setState({functionCategory:e.selectedItem.value,functionSelected:0})}},{key:"onFieldCatChange",value:function(e){var t=[];if(e.selectedItem.value===this.recentUseCat)t=this.props.controller.getExpressionFieldsRecentlyUsed();else for(var r=0;r<this.fields.field_table_info.length;r++)e.selectedItem.value===this.fields.field_table_info[r].id&&(t=this.fields.field_table_info[r].field_value_groups);this.setState({fieldCategory:e.selectedItem.value,fieldSelected:0,currentFieldDataset:t})}},{key:"onFieldTableClick",value:function(e,t,r){this.setState({fieldSelected:r,valueSelected:0})}},{key:"onFieldTableDblClick",value:function(e,t,r){var n=this.state.currentFieldDataset[t],o=n.id;if(this.state.fieldCategory!==this.recentUseCat&&this.props.controller.updateExpressionFieldsRecentlyUsed(n),this.props.onChange){var i="CLEM"===this.language&&"globals"!==this.state.fieldCategory?"'":"";this.shouldQuoteField(n.id)&&(o=i+n.id+i),this.props.onChange(o)}}},{key:"onFieldFilter",value:function(e){this.setState({fieldFilterText:e})}},{key:"onValueTableClick",value:function(e,t,r){this.setState({valueSelected:r})}},{key:"onValueTableDblClick",value:function(e,t,r){if(this.props.onChange){var n=this.state.currentFieldDataset[this.state.fieldSelected],o='"';if(n.values){var i=n.values[t].value,a="string"==typeof i?o+i+o:i;this.props.onChange(a)}else if(n.range){var s="string"==typeof n.range.min.value?o+n.range.min.value+o:n.range.min.value,l="string"==typeof n.range.max.value?o+n.range.max.value+o:n.range.max.value;this.props.onChange(0===t?s:l)}}this.setState({valueSelected:t})}},{key:"onValueFilter",value:function(e){this.setState({valueFilterText:e})}},{key:"onFunctionTableClick",value:function(e,t,r){this.setState({functionSelected:r})}},{key:"onFunctionTableDblClick",value:function(e,t,r){var n;this.state.functionCategory===this.recentUseCat?n=this.props.controller.getExpressionRecentlyUsed()[t]:(n=this.props.functionList[this.state.functionCategory].functionList[t],this.props.controller.updateExpressionRecentlyUsed(n));var o=n.value;this.props.onChange&&this.props.onChange(o)}},{key:"onFunctionFilter",value:function(e){this.setState({functionFilterText:e})}},{key:"setSortColumn",value:function(e,t){switch(e){case"fieldTable":this.setState({fieldTableSortSpec:t});break;case"valuesTable":this.setState({valuesTableSortSpec:t});break;case"functionTable":this.setState({functionTableSortSpec:t})}}},{key:"sortTableRows",value:function(e,t){var r=0;if(e.length>0){for(var n=e[0].columns,o=0;o<n.length;o++)if(n[o].column===t.column){r=o;break}var i=E(e,(function(e){return e.columns[r].value}));return t.direction===Qe.DESC&&i.reverse(),i}return e}},{key:"shouldQuoteField",value:function(e){return null!==e.match(gl)}},{key:"createContentObject",value:function(e){var t=!0;e&&(t=!1);var r=s.createElement("span",{className:"properties-expr-table-cell"},e),n=s.createElement(ir,{content:r,tooltipText:e,disabled:t});return s.createElement("div",{className:"properties-table-cell-control"},n)}},{key:"_makeDatasetFields",value:function(e,t){var r,n,o=u(this.reactIntl,Oe.EXPRESSION_FIELD_COLUMN),i=u(this.reactIntl,Oe.EXPRESSION_FIELD_COLUMN_DESCRIPTION),a=u(this.reactIntl,Oe.EXPRESSION_STORAGE_COLUMN),s={id:"fields",locLabel:u(this.reactIntl,Oe.EXPRESSION_FIELDS_DROPDOWN_TITLE),field_columns:{field_column_info:{locLabel:o,descLabel:i},value_column_info:{locLabel:this.valueColumn,descLabel:this.valueColumnDesc},additional_column_info:[{id:"storage",locLabel:a}]}},l={id:"fields",field_value_groups:[]};e.forEach((function(e){var t={id:e.name,additional_column_entries:[{id:"storage",value:e.type}]};e.metadata.values&&(t.values=[],e.metadata.values.forEach((function(e){t.values.push({value:e})}))),e.metadata.range&&(t.range={},e.metadata.range.min&&(t.range.min={value:e.metadata.range.min}),e.metadata.range.max&&(t.range.max={value:e.metadata.range.max})),l.field_value_groups.push(t)}));for(var p=0;p<t.field_categories.length;p++)"fields"===t.field_categories[p].id&&(r=p);for(var c=0;c<t.field_table_info.length;c++)"fields"===t.field_table_info[c].id&&(n=c);return void 0!==r?t.field_categories[r]=s:t.field_categories.unshift(s),void 0!==n?t.field_table_info[n]=l:t.field_table_info.unshift(l),t}},{key:"_makeFieldAndValuesContent",value:function(){var e=this,t=this._makeFieldDropdown(),r=[],n=[],o=["fieldName"],i=null,a=null;if(this.state.fieldCategory===this.recentUseCat)i=this.recentUseCatInfo,a={id:this.recentUseCat,field_value_groups:this.props.controller.getExpressionFieldsRecentlyUsed()};else{for(var l=0;l<this.fields.field_categories.length;l++)this.state.fieldCategory===this.fields.field_categories[l].id&&(i=this.fields.field_categories[l]);for(var p=0;p<this.fields.field_table_info.length;p++)this.state.fieldCategory===this.fields.field_table_info[p].id&&(a=this.fields.field_table_info[p])}if(i&&(r.push({key:"fieldName",label:i.field_columns.field_column_info.locLabel,description:i.field_columns.field_column_info.descLabel,resizable:!0}),n.push({key:"values",label:i.field_columns.value_column_info.locLabel,description:i.field_columns.value_column_info.descLabel}),i.field_columns.additional_column_info))for(var c=0;c<i.field_columns.additional_column_info.length;c++)o.push(i.field_columns.additional_column_info[c].id),r.push({key:i.field_columns.additional_column_info[c].id,label:i.field_columns.additional_column_info[c].locLabel});var d=[],h=[];if(a&&a.field_value_groups)for(var f=0;f<a.field_value_groups.length;f++){var m=a.field_value_groups[f],v=[];(!this.state.fieldFilterText||0===this.state.fieldFilterText.length||m.id.toLowerCase().indexOf(this.state.fieldFilterText.toLowerCase())>-1)&&(v.push({column:"fieldName",content:this.createContentObject(m.id),value:m.id}),m.additional_column_entries&&this._makeAdditionalColumnsContent(m,v),d.push({columns:v,rowKey:f}),f===this.state.fieldSelected&&(h=this._makeValuesContent(m,h)))}var y=this.state.fieldSelected;null!==this.state.fieldTableSortSpec&&(y=(d=this.sortTableRows(d,this.state.fieldTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.fieldSelected})));var g=this.state.valueSelected;null!==this.state.valuesTableSortSpec&&(g=(h=this.sortTableRows(h,this.state.valuesTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.valueSelected})));var b=u(this.reactIntl,Oe.EXPRESSION_FIELDS_TABLE_LABEL),E=u(this.reactIntl,Oe.EXPRESSION_VALUES_TABLE_LABEL),I=te(this.resources,Oe.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL,u(this.reactIntl,Oe.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL)),S=te(this.resources,Oe.EXPRESSION_VALUES_EMPTY_TABLE_LABEL,u(this.reactIntl,Oe.EXPRESSION_VALUES_EMPTY_TABLE_LABEL));return s.createElement("div",{className:"properties-field-and-values-table-container"},t,s.createElement("div",{className:"properties-field-table-container"},s.createElement(ar,{columns:r,data:d,sortable:o,filterable:["fieldName"],onFilter:this.onFieldFilter,rows:tt,tableLabel:b,rowSelection:Ze.SINGLE,updateRowSelections:this.onFieldTableClick,selectedRows:[y],onRowDoubleClick:this.onFieldTableDblClick,onSort:this.setSortColumn.bind(this,"fieldTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:I})),s.createElement("div",{className:"properties-value-table-container"},s.createElement(ar,{columns:n,data:h,sortable:["values"],filterable:["values"],onFilter:this.onValueFilter,rows:tt,tableLabel:E,rowSelection:Ze.SINGLE,updateRowSelections:this.onValueTableClick,selectedRows:[g],onRowDoubleClick:this.onValueTableDblClick,onSort:this.setSortColumn.bind(this,"valuesTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:S})))}},{key:"_makeValuesContent",value:function(e,t){var r=u(this.reactIntl,Oe.EXPRESSION_MIN_LABEL),n=u(this.reactIntl,Oe.EXPRESSION_MAX_LABEL);if(e.values)for(var o=0;o<e.values.length;o++)this._addValueRow(e.values[o].value,o,t);else e.range&&(e.range.min&&this._addValueRow(r+": "+e.range.min.value,0,t),e.range.max&&this._addValueRow(n+": "+e.range.max.value,1,t));return t}},{key:"_addValueRow",value:function(e,t,r){if(!this.state.valueFilterText||0===this.state.valueFilterText.length||String(e).toLowerCase().indexOf(this.state.valueFilterText.toLowerCase())>-1){var n=[{column:"values",content:this.createContentObject(e),value:e}];r.push({columns:n,rowKey:t})}}},{key:"_makeFunctionsContent",value:function(){if(this.props.functionList){var e=Object.keys(this.props.functionList),t=this._makeFunctionDropdown(e),r=this._makeFunctionsTable(e);return s.createElement("div",{className:"properties-expression-function-table-container"},t,r)}return s.createElement("span",null,"formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS);")}},{key:"_makeAdditionalColumnsContent",value:function(e,t){for(var r=0;r<e.additional_column_entries.length;r++)t.push({column:e.additional_column_entries[r].id,content:this.createContentObject(e.additional_column_entries[r].value),value:e.additional_column_entries[r].value})}},{key:"_makeFunctionDropdown",value:function(e){var t=this,r=e.map((function(e,r){return{value:e,label:t.props.functionList[e].locLabel}})),n=r.slice(0,1),o=r.slice(1);r=n.concat({value:this.recentUseCat,label:this.recentUseCat},o);var i=this.state.functionCategory===this.recentUseCat?this.recentUseCat:this.props.functionList[this.state.functionCategory].locLabel,a=u(this.reactIntl,Oe.TABLE_SEARCH_HEADER),l={"close.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-function-select"},s.createElement(St,{id:"properties-expression-function-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:r,onChange:this.onFunctionCatChange,translateWithId:function(e){return l[e]},titleText:a}))}},{key:"_makeFieldDropdown",value:function(){for(var e=[],t=0;t<this.fields.field_categories.length;t++)e.push({value:this.fields.field_categories[t].id,label:this.fields.field_categories[t].locLabel});var r=e.slice(0,1),n=e.slice(1),o=r.concat({value:this.recentUseCat,label:this.recentUseCat},n),i=this.state.fieldCategory===this.recentUseCat?this.recentUseCat:e[0].label,a=u(this.reactIntl,Oe.TABLE_SEARCH_HEADER),l={"close.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-field-select"},s.createElement(St,{id:"properties-expression-field-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:o,onChange:this.onFieldCatChange,translateWithId:function(e){return l[e]},titleText:a}))}},{key:"_makeFunctionsTable",value:function(e){var t=this,r=[],n=u(this.reactIntl,Oe.EXPRESSION_FUNCTION_COLUMN),o=u(this.reactIntl,Oe.EXPRESSION_RETURN_COLUMN);r.push({key:"function",label:n,width:73,resizable:!0}),r.push({key:"return",label:o,width:27});var i=this._buildFunctionTable(this.state.functionCategory),a=i.rows,l=this.state.functionSelected;null!==this.state.functionTableSortSpec&&(l=(a=this.sortTableRows(a,this.state.functionTableSortSpec)).findIndex((function(e){return e.rowKey===t.state.functionSelected})));var p=u(this.reactIntl,Oe.EXPRESSION_FUNCTIONS_TABLE_LABEL),c=te(this.resources,Oe.EXPRESSION_NO_FUNCTIONS,u(this.reactIntl,Oe.EXPRESSION_NO_FUNCTIONS));return s.createElement("div",{className:"properties-functions-table-container"},s.createElement("div",{className:"properties-functions-table"},s.createElement(ar,{columns:r,data:a,sortable:["function","return"],filterable:["function"],onFilter:this.onFunctionFilter,rows:tt,tableLabel:p,rowSelection:Ze.SINGLE,updateRowSelections:this.onFunctionTableClick,selectedRows:[l],onRowDoubleClick:this.onFunctionTableDblClick,onSort:this.setSortColumn.bind(this,"functionTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:c})),s.createElement("div",{className:"properties-help-table-container"},i.helpContainer))}},{key:"_buildFunctionTable",value:function(e){var t={rows:[],helpContainer:s.createElement("div",null)},r=e===this.recentUseCat?this.props.controller.getExpressionRecentlyUsed():this.props.functionList[e].functionList;if(r)for(var n=0;n<r.length;n++){var o=r[n],i=[];if(!this.state.functionFilterText||0===this.state.functionFilterText.length||o.locLabel.toLowerCase().indexOf(this.state.functionFilterText.toLowerCase())>-1){var a=o.locReturnType?o.locReturnType:o.return_type;i.push({column:"function",content:this.createContentObject(o.locLabel),value:o.locLabel}),i.push({column:"return",content:this.createContentObject(a),value:a}),t.rows.push({columns:i,rowKey:n}),n===this.state.functionSelected&&(t.helpContainer=s.createElement("div",{className:"properties-function-help-text"},s.createElement("span",{className:"properties-function-help-command"},o.locLabel,":"),s.createElement("br",null),s.createElement("br",null),s.createElement("span",null,o.help)))}}return t}},{key:"render",value:function(){var e=this._makeFieldAndValuesContent(),t=this._makeFunctionsContent(),r=u(this.reactIntl,Oe.EXPRESSION_FIELD_TAB),n=u(this.reactIntl,Oe.EXPRESSION_FUNCTIONS_TAB),o=null;return 0===this.state.selectedIndex?o=e:1===this.state.selectedIndex&&(o=t),s.createElement("div",{className:"properties-expression-selection-fieldOrFunction"},s.createElement("div",{className:"properties-expression-selection-content-switcher"},s.createElement(Ct,{onChange:this.onSwitch.bind(this),selectedIndex:this.state.selectedIndex},s.createElement(Rt,{key:0,name:"expresson-builder-fields-tab",className:"expresson-builder-fields-tab",text:r}),s.createElement(Rt,{key:1,name:"expresson-builder-function-tab",className:"expresson-builder-function-tab",text:n}))),o)}}]),i}(s.Component);function El(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Il=function(r){n(i,r);var o=El(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"onOperatorClick",value:function(e,t){this.props.onChange&&this.props.onChange(e)}},{key:"_makeOperatorContent",value:function(){var e=this;if(this.props.operatorList){var t=[];return this.props.operatorList.forEach((function(r,n){var o="tooltip-expression-operator-".concat(n),i=s.createElement("div",{className:"properties-tooltips"},r.help);t.push(s.createElement("div",{className:"properties-operator-tooltip-container",key:"expression-operator-"+n},s.createElement(or,{id:o,tip:i,direction:"bottom",className:"properties-tooltips"},s.createElement(dt,{className:De("properties-operator-button",{first:n%2==0,second:!(n%2==0)}),size:"small",kind:"tertiary",onClick:e.onOperatorClick.bind(e,r.value)},s.createElement("div",{className:"properties-operator-button-label"},r.locLabel)))))})),s.createElement("div",{className:"properties-operator-container"},t)}return s.createElement("div",null)}},{key:"render",value:function(){var e=this._makeOperatorContent();return s.createElement("div",{className:"properties-expression-selection-operator"},e)}}]),i}(s.Component);function Sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Cl=function(r){n(i,r);var o=Sl(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=s.createElement(bl,{controller:this.props.controller,onChange:this.props.onChange,functionList:this.props.functionList,language:this.props.language}),t=s.createElement(Il,{controller:this.props.controller,onChange:this.props.onChange,operatorList:this.props.operatorList});return s.createElement("div",{className:"properties-expression-selection-container"},t,e)}}]),i}(s.Component);function Rl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Tl=function(r){n(i,r);var o=Rl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).selection=[],r.expressionInfo=t.controller.getExpressionInfo(),r.editorDidMount=r.editorDidMount.bind(a(r)),r.onChange=r.onChange.bind(a(r)),r.onBlur=r.onBlur.bind(a(r)),r.onSelectionChange=r.onSelectionChange.bind(a(r)),r.lastCursorPos=null,r}return t(i,[{key:"onChange",value:function(e){var t="string"==typeof e?e:e.toString(),r=this.editor.getCursor(),n=1;if(this.editor.somethingSelected())n=0,this.editor.replaceSelection(t);else{var o=" ";this.lastCursorPos&&(this.editor.setCursor(this.lastCursorPos),r=this.lastCursorPos);var i=this.editor.getLine(r.line)[r.ch-1];-1!==["(","[","{"].indexOf(i)&&(o=""),this.editor.replaceSelection(o+t)}this._setSelection(t,r,n);var a=this.editor.getValue();this.props.controller.updatePropertyValue(this.props.propertyId,a,!0),this.lastCursorPos=this.editor.getCursor()}},{key:"onSelectionChange",value:function(e){this.selection=e}},{key:"onBlur",value:function(e,t){this.lastCursorPos=e.getCursor();var r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.editor.getValue(),o=this.expressionSelectionPanel&&t&&this.expressionSelectionPanel.contains(t.relatedTarget);O(r,n)&&o||this.props.controller.updatePropertyValue(this.props.propertyId,n,o)}},{key:"editorDidMount",value:function(e,t){this.editor=e}},{key:"_setSelection",value:function(e,t,r){if("string"==typeof e){var n=e.indexOf("?");if(-1!==n){var o={anchor:{line:t.line,ch:t.ch+n+r+1},head:{line:t.line,ch:t.ch+n+r}};return void this.onSelectionChange([o])}}for(var i=this.editor.lineCount(),a=0;a<i;a++){var s=this.editor.getLine(a).indexOf("?");if(-1!==s){var l={anchor:{line:a,ch:s+1},head:{line:a,ch:s}};return void this.onSelectionChange([l])}}var p={anchor:{line:t.line,ch:t.ch+e.length+r},head:{line:t.line,ch:t.ch+e.length+r}};this.onSelectionChange([p])}},{key:"render",value:function(){var e=this,t=u(this.props.controller.getReactIntl(),Oe.EXPRESSION_BUILDER_LABEL);return s.createElement("div",{className:"properties-expression-builder"},s.createElement(Yl,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,builder:!1,editorDidMount:this.editorDidMount,selectionRange:this.selection,onSelectionChange:this.onSelectionChange,onBlur:this.onBlur,height:96,expressionLabel:t}),s.createElement("div",{ref:function(t){return e.expressionSelectionPanel=t}},s.createElement(Cl,{controller:this.props.controller,onChange:this.onChange,functionList:this.expressionInfo.functionCategories,operatorList:this.expressionInfo.operators,language:this.props.control.language})))}}]),i}(s.Component);function _l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var kl,wl=Bt(function(r){n(i,r);var o=_l(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).buttonHandler=t.controller.getHandlers().buttonHandler||function(){return null},r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"render",value:function(){var e=this;return s.createElement("div",{className:"properties-expression-toggle"},s.createElement("div",{className:"properties-expression-toggle-absolute"},this.props.enableMaximize?s.createElement(dt,{className:"maximize",type:"button",size:"small",kind:"ghost",renderIcon:Kt,hasIconOnly:!0,iconDescription:u(this.reactIntl,Oe.EXPRESSION_MAXIMIZE_LABEL),onClick:function(){!e.buttonHandler({type:"maximize_tearsheet",propertyId:e.props.control.data||{}})&&e.props.control.data&&e.props.control.data.tearsheet_ref&&e.props.controller.setActiveTearsheet(e.props.control.data.tearsheet_ref)}}):s.createElement(dt,{type:"button",className:"minimize",size:"small",kind:"ghost",hasIconOnly:!0,renderIcon:Yt,iconDescription:u(this.reactIntl,Oe.EXPRESSION_MINIMIZE_LABEL),onClick:function(){return e.props.controller.clearActiveTearsheet()}})))}}]),i}(s.Component));function Ll(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function Al(e,t,r){var n,o=e.getCursor(),i=r(e,o),a=i;/^[\w$_]*$/.test(i.string)||(i=a={start:o.ch,end:o.ch,string:"",state:i.state,className:":"===i.string?"python-type":null}),n||(n=[]),n.push(a);var s=function(e,t){var r=[],n=e.string;function o(e){0!==e.lastIndexOf(n,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function i(e){Ll(Nl,o),Ll(Pl,o)}if(t){var a=t.pop(),s="";for("variable"===a.type?s=a.string:"variable-3"===a.type&&(s=":"+a.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&i()}return r}(i,n);return s.sort(),{list:s,from:kl.Pos(o.line,i.start),to:kl.Pos(o.line,i.end)}}function Dl(e){return Al(e,0,(function(e,t){return e.getTokenAt(t)}))}var Ol,Pl="and del from not while as elif global or with assert else if pass yieldbreak except import print class exec in raise continue finally is return def for lambda try".split(" "),Nl="abs divmod input open staticmethod all enumerate int ord str any eval isinstance pow sum basestring execfile issubclass print superbin file iter property tuple bool filter len range typebytearray float list raw_input unichr callable format locals reduce unicodechr frozenset long reload vars classmethod getattr map repr xrangecmp globals max reversed zip compile hasattr memoryview round __import__complex hash min set apply delattr help next setattr bufferdict hex object slice coerce dir id oct sorted intern ".split(" ").join("() ").split(" ");function xl(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function Bl(e,t,r){var n,o=e.getCursor(),i=r(e,o),a=i;/^[\w$_]*$/.test(i.string)||(i=a={start:o.ch,end:o.ch,string:"",state:i.state,className:":"===i.string?"r-type":null}),n||(n=[]),n.push(a);var s=function(e,t){var r=[],n=e.string;function o(e){0!==e.lastIndexOf(n,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function i(e){xl(Ul,o),xl(Vl,o)}if(t){var a=t.pop(),s="";for("variable"===a.type?s=a.string:"variable-3"===a.type&&(s=":"+a.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&i()}return r}(i,n);return s.sort(),{list:s,from:Ol.Pos(o.line,i.start),to:Ol.Pos(o.line,i.end)}}function Ml(e){return Bl(e,0,(function(e,t){return e.getTokenAt(t)}))}var Fl,Vl="function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|"),Ul="zapsmall xzfile xtfrm xor writeLines writeChar writeBin write withVisible withRestarts withinwithCallingHandlers withAutoprint with while which weekdays warnings warning version Vectorize vector vapplyvalidUTF8 validEnc utf8ToInt UseMethod url unz untracemem untrace unsplit unserialize unname unlockBinding unloadNamespaceunlist unlink unique union undebug unclass typeof tryCatch try truncate trunc trimws trigammatransform tracingState tracemem traceback trace toupper toString topenv tolower textConnectionValue textConnectiontestPlatformEquivalence tempfile tempdir tcrossprod taskCallbackManager tapply tanpi tanh tan tabulate table T t system2 systemswitch sweep svd suspendInterrupts suppressWarnings suppressPackageStartupMessages suppressMessages summary sumsubstring substr substitute subset sub strwrap structure strtrim strtoi strsplit strrep strptime strftimestopifnot stop stdout stdin stderr startsWith standardGeneric srcref srcfilecopy srcfilealias srcfile sQuote sqrt sprintf splitsource sort solve socketSelect socketConnection sinpi sink sinh single sin simplify2array simpleWarning simpleMessage simpleErrorsimpleCondition signif signalCondition sign shQuote showConnections setwd setTimeLimit setSessionTimeLimit setNamespaceInfo setHooksetequal setdiff serialize sequence seq_len seq_along seq seek searchpaths search scan scale saveRDS save sapply sample rowSumsrowsum rownames rowMeans row round RNGversion length lchoose lbeta lazyLoadDBfetch lazyLoadDBexecRNGkind rm rle rev returnValue return retracemem restartFormals restartDescription requireNamespace require replicate replace repeatrep_len rep removeTaskCallback remove regmatches registerS3methods registerS3method regexpr regexec Reduce RecallreadRenviron readRDS readLines readline readChar readBin Re rcond rbind rawToChar rawToBits rawShift rawConnectionValue rawConnectionraw rapply rank range R_system_version quote quit quarters qr q pushBackLength pushBack psigamma provideDimnames prod prmatrix printprettyNum pretty Position polyroot pmin pmax pmatch pipe pi pcre_config paste0 paste parseNamespaceFile parsepackBits packageStartupMessage packageHasNamespace packageEvent package_version outer ordered order options open OlsonNamesoldClass objects nzchar numeric_version numeric NROW nrow normalizePath norm noquote nlevels ngettext NextMethod next Negate NCOL ncolnchar nargs namespaceImportMethods namespaceImportFrom namespaceImportClasses namespaceImport namespaceExportmonths mode Mod missing min mget message merge memDecompress memCompress mean max matrix match mapply MapmakeActiveBinding ls logical logb log2 log1p log10 log lockEnvironment lockBinding local loadNamespace loadingNamespaceInfo loadedNamespacesload list2env list license licence library libcurlVersion lgamma lfactorial levels LETTERS letters lengthslazyLoad lapply labels La_version La_library l10n_info kronecker kappa julian jitter isTRUE isSymmetric isSeekable isS4 isRestart isOpenISOdatetime ISOdate isNamespaceLoaded isNamespace isIncomplete isFALSE isdebugged isBaseNamespace isattyinvokeRestartInteractively invokeRestart invisible intToUtf8 intToBits intersect acosh acos abs abbreviateinteractive interaction integer inherits importIntoEnv Im ifelse if identity identical icuSetCollate icuGetCollate iconvlist iconv Igzfile gzcon gsub grouping grepRaw grepl grep gregexpr globalenv gl getwd gettextf gettext getTaskCallbackNames getSrcLines getRversiongetOption getNativeSymbolInfo getNamespaceVersion getNamespaceUsers getNamespaceName getNamespaceInfo getNamespaceImports getNamespaceExportsgetNamespace getLoadedDLLs getHook getExportedValue geterrmessage getElement getDLLRegisteredRoutines getConnection getCallingDLLegetCallingDLL getAllConnections get0 get gctorture2 gctorture gcinfo gc gamma function forwardsolve formatDL formatC formatformals forceAndCall force for flush floor findRestart findPackageEnv findInterval Find Filter file fifo factorial factor F extSoftVersionexpression expm1 exp exists evalq eval environmentName environmentIsLocked environment enquote endsWith EncodingencodeString enc2utf8 enc2native emptyenv eigen eapply dynGet duplicated dump droplevels drop dQuote dput double dontCheck dirname dirdigamma difftime diff dget determinant detach det deparse delayedAssign asNamespace asinh asindebugonce debuggingState debug date cut curlGetHeaders cumsum cumprod cummin cummax Cstack_info crossprod cospi cosh cos contributors Conjconflicts conditionMessage conditionCall computeRestarts complex comment commandArgs colSums colnames colMeans colcloseAllConnections close clearPushBack class choose chol2inv chol chkDots check_tzones chartr charToRaw charmatch character ceilingcbind cat casefold capabilities callCC call c bzfile by builtins browserText browserSetDebug browserCondition browser break bquote bodybitwXor bitwShiftR bitwShiftL bitwOr bitwNot bitwAnd bindtextdomain bindingIsLocked bindingIsActive beta besselY besselK besselJ besselIbasename baseenv backsolve autoloader autoload attributes attr attachNamespace attach atanh atan2 atan assign asS4 asS3arrayInd array args Arg apply append aperm anyNA anyDuplicated any allowInterrupts all alist agrepl agrep addTaskCallback addNA".split(" ");var Hl="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" ");function jl(e,t){return function(e,t,r,n){var o=e.getCursor(),i=r(e,o);if(/\b(?:string|comment)\b/.test(i.type))return null;i.state=Fl.innerMode(e.getMode(),i.state).state,/^[\w$_@]*$/.test(i.string)?i.end>o.ch&&(i.end=o.ch,i.string=i.string.slice(0,o.ch-i.start)):i={start:o.ch,end:o.ch,string:"",state:i.state,type:"."===i.string?"property":null};return{list:zl(i,t),from:Fl.Pos(o.line,i.start),to:Fl.Pos(o.line,i.end)}}(e,Hl,(function(e,t){return e.getTokenAt(t)}))}function zl(e,t,r){for(var n=[],o=e.string,i=0;i<t.length;i++)0===t[i].lastIndexOf(o,0)&&-1===n.indexOf(t[i])&&n.push(t[i]);return n}function ql(){var e="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" "),t=/[\[\]{}\(\),;\:\.]/,r=/\d/,n=/[\w\.]/,o=/[\w\$_]/,i=/[+\-*&%=<>!?|\/]/;function a(a,s){var l=a.next();if("#"===l&&s.startOfLine)return a.skipToEnd(),"meta";if('"'===l)return function(e,t,r){var n,o=!1;for(;void 0!==(n=t.next());)if(n===e){o=!0;break}o&&(r.tokenize=null)}(l,a,s),"string";if("'"===l)return function(e,t,r){var n,o=!1;for(;void 0!==(n=t.next());)if(n===e){o=!0;break}o&&(r.tokenize=null)}(l,a,s),"variable";if(t.test(l))return null;if(r.test(l))return a.eatWhile(n),"number";if(i.test(l))return a.eatWhile(i),"operator";a.eatWhile(o);var p=a.current();return-1!==e.indexOf(p)?"keyword":"variable"}return{startState:function(){return{tokenize:null}},token:function(e,t){return e.eatSpace()?null:(t.tokenize||a)(e,t)},electricChars:"{}"}}function Gl(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Wl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wl(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Wl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Xl=null;"undefined"!=typeof window&&void 0!==window.navigator&&(Xl=require("codemirror"),require("codemirror/addon/hint/show-hint"),require("codemirror/addon/display/placeholder"),require("codemirror/addon/display/autorefresh"),require("codemirror/mode/javascript/javascript"),require("codemirror/addon/hint/javascript-hint"),require("codemirror/addon/hint/sql-hint"),require("codemirror/mode/sql/sql"),require("codemirror/mode/python/python"),require("codemirror/mode/r/r"),function(e){(kl=e).registerHelper("hint","python",Dl)}(Xl),function(e){(Ol=e).registerHelper("hint","r",Ml)}(Xl),function(e){(Fl=e).registerHelper("hint","CLEM",jl),Fl.defineMode("CLEM",ql),Fl.defineMIME("text/x-CLEM","CLEM")}(Xl));var Kl=function(r){n(i,r);var o=$l(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showExpressionBuilder:!1,validationInProgress:!1},r.origHint="",r.expressionInfo=r.props.controller.getExpressionInfo(),r.handleValidate=r.handleValidate.bind(a(r)),r.hasValidate=r.hasValidate.bind(a(r)),r.cancelExpressionBuilder=r.cancelExpressionBuilder.bind(a(r)),r.hideExpressionBuilder=r.hideExpressionBuilder.bind(a(r)),r.showExpressionBuilder=r.showExpressionBuilder.bind(a(r)),r.editorDidMount=r.editorDidMount.bind(a(r)),r.addonHints=r.addonHints.bind(a(r)),r.getDatasetFields=r.getDatasetFields.bind(a(r)),r.handleBlur=r.handleBlur.bind(a(r)),r.handleKeyDown=r.handleKeyDown.bind(a(r)),r.handleChange=function(e,t,n){if(Array.isArray(t.text)&&1===t.text.length&&1===t.text[0].length&&r.props.onSelectionChange){var o=t.removed[0].length>0?{line:t.from.line,ch:t.from.ch+1}:{line:t.to.line,ch:t.to.ch+1};r.props.onSelectionChange([{anchor:o,head:o}])}r.state.validateIcon&&(r.setState({validateIcon:null}),r.props.controller.updateErrorMessage(r.props.propertyId,Xe))},r}return t(i,[{key:"componentDidUpdate",value:function(e){var t=this;this.props.selectionRange&&this.props.selectionRange.length>0&&!O(e.selectionRange,this.props.selectionRange)&&this.editor&&(this.props.selectionRange.forEach((function(e){t.editor.setSelection(e.anchor,e.head)})),this.editor.focus())}},{key:"componentWillUnmount",value:function(){this.origHint&&Xl&&Xl.registerHelper("hint",this.props.control.language,this.origHint)}},{key:"getDatasetFields",value:function(){var e,t=[],r=Gl(this.props.controller.getDatasetMetadataFields());try{for(r.s();!(e=r.n()).done;){var n=e.value;t.push(n.name)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"addonHints",value:function(e,t){var r={},n=e.getCursor(),o=e.getTokenAt(n);if(this.origHint){r=this.origHint(e,t);for(var i=this.getDatasetFields(),a=0;a<i.length;++a){var s=i[a];(0===s.lastIndexOf(o.string,0)&&-1===r.list.indexOf(s)||" "===o.string&&null===o.type)&&r.list.unshift(s)}}return r}},{key:"editorDidMount",value:function(e,t){this.editor=e;var r=this.expressionEditorDiv?this.expressionEditorDiv.clientWidth:0,n=r>0?r/8.5:30,o=this.props.control.charLimit?Math.min(this.props.control.charLimit/n*26,390):104;o=this.props.control.rows?26*this.props.control.rows:o,o=this.props.height?this.props.height:o,this.editor.setSize(null,Math.max(Math.floor(o),104)),this.origHint=e.getHelper({line:0,ch:0},"hint");var i=this.props.control.language;switch(this.props.control.language){case"text/x-hive":i="sql";break;case"text/x-python":i="python";break;case"text/x-rsrc":i="r"}Xl&&Xl.registerHelper("hint",i,this.addonHints),this.props.editorDidMount&&this.props.editorDidMount(e,t)}},{key:"showExpressionBuilder",value:function(){this.initialControlValue=this.props.controller.getPropertyValue(this.props.propertyId),this.initialMessage=this.props.controller.getErrorMessage(this.props.propertyId),this.initialState=this.props.controller.getControlState(this.props.propertyId),this.setState({showExpressionBuilder:!0})}},{key:"hideExpressionBuilder",value:function(){this.setState({showExpressionBuilder:!1})}},{key:"cancelExpressionBuilder",value:function(){this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.updateErrorMessage(this.props.propertyId,this.initialMessage),this.props.controller.updateControlState(this.props.propertyId,this.initialState),this.hideExpressionBuilder()}},{key:"handleValidate",value:function(){var e=this;this.setState({validateIcon:null,validationInProgress:!0});var t=this.props.controller.getAppData();this.props.controller.getHandlers().validationHandler(this.props.controller,this.props.propertyId,this.props.value,t,(function(t){e.props.controller.updateErrorMessage(e.props.propertyId,t),e.setState({validateIcon:t.type,validationInProgress:!1}),e.editor.display.input.blur()}))}},{key:"hasValidate",value:function(){return"function"==typeof this.props.controller.getHandlers().validationHandler}},{key:"handleKeyDown",value:function(e,t){if("Enter"===t.code&&this.props.selectionRange&&this.props.selectionRange.length>0&&this.props.onSelectionChange){var r={line:this.props.selectionRange[0].anchor.line+1,ch:0};this.props.onSelectionChange([{anchor:r,head:r}])}}},{key:"handleBlur",value:function(e,t){if(this.props.onBlur)this.props.onBlur(e,t);else{var r=this.editor.getValue(),n=t&&t.relatedTarget&&t.relatedTarget.classList.contains("properties-expression-button");this.props.controller.updatePropertyValue(this.props.propertyId,r,n)}}},{key:"_showBuilderButton",value:function(){return this.props.builder&&this.props.rightFlyout&&this.expressionInfo.functionCategories&&Object.keys(this.expressionInfo.functionCategories).length>0}},{key:"render",value:function(){var e=this,t=this.props.messageInfo,r=t?t.type:Fe.INFO;r===Fe.SUCCESS&&(t=null);var n=this.props.state===Ve.DISABLED?"disabled":r,o=this.props.controller.getReactIntl(),i=this._showBuilderButton()?s.createElement(dt,{kind:"ghost",size:"small",className:"properties-expression-button",disabled:this.props.state===Ve.DISABLED,onClick:this.showExpressionBuilder,renderIcon:Jt,iconDescription:u(o,Oe.EXPRESSION_BUILDER_ICON_DESCRIPTION),tooltipPosition:"right",hasIconOnly:!0}):null,a=null;this.state.validateIcon&&(a=s.createElement("div",{className:"icon validateIcon"},s.createElement(rr,{type:this.state.validateIcon,className:"properties-validation-icon-".concat(this.state.validateIcon)})));var l=this.state.validationInProgress?u(o,Oe.EXPRESSION_VALIDATING_LABEL):u(o,Oe.EXPRESSION_VALIDATE_LABEL),p=this.hasValidate()&&this.props.validateLink?s.createElement("div",{className:"properties-expression-validate",disabled:this.props.state===Ve.DISABLED},s.createElement(dt,{className:"validateLink",kind:"ghost",onClick:this.handleValidate,disabled:this.props.state===Ve.DISABLED||this.state.validationInProgress},l),a):null,c={mode:this.props.control.language,placeholder:this.props.control.additionalText,theme:n+" custom",readOnly:this.props.state===Ve.DISABLED&&"nocursor",extraKeys:{"Ctrl-Space":"autocomplete"},autoRefresh:!0,lineNumbers:!0},d=u(o,Oe.APPLYBUTTON_LABEL),h=u(o,Oe.REJECTBUTTON_LABEL),f=u(o,Oe.EXPRESSION_BUILDER_TITLE),m=this.state.showExpressionBuilder?s.createElement(kn,{cancelHandler:this.cancelExpressionBuilder,okHandler:this.hideExpressionBuilder,show:this.state.showExpressionBuilder,applyLabel:d,rejectLabel:h,title:f,light:this.props.controller.getLight()&&this.props.control.light},s.createElement("div",null,s.createElement(Tl,{control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId}))):null,v=De("properties-expression-editor ".concat(r),{"properties-light-disabled":!this.props.control.light||!this.props.controller.getLight()}),y=s.createElement("div",{className:"properties-expression-link-container"},i,p),g=y;this.props.expressionLabel&&(g=s.createElement("div",{className:"properties-expression-header"},s.createElement("div",{className:"properties-expression-title"},this.props.expressionLabel),y));var b=null;if(this.props.control.enableMaximize){var E=this.props.controller.getActiveTearsheet()===te(this,"props.control.data.tearsheet_ref");b=s.createElement(wl,{control:this.props.control,controller:this.props.controller,enableMaximize:!E})}return s.createElement("div",{className:"properties-expression-editor-wrapper"},this.props.controlItem,m,s.createElement("div",{className:"properties-editor-container"},g,b,s.createElement("div",{ref:function(t){return e.expressionEditorDiv=t},"data-id":Ln(this.props.propertyId),className:v},s.createElement(br,{ref:function(t){return e.codeMirror=t},options:c,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,editorDidMount:this.editorDidMount,value:this.props.value}),s.createElement(Ls,{state:this.props.state,messageInfo:t,inTable:this.props.tableControl}))))}}]),i}(s.Component);Kl.defaultProps={builder:!0,validateLink:!0};var Yl=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Kl);function Jl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ql=function(r){n(i,r);var o=Jl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=wn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e.target.value)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".passwordShow.tooltip"),t="".concat(this.props.control.name,".passwordHide.tooltip"),r=u(this.reactIntl,Oe.SHOW_PASSWORD_TOOLTIP),n=u(this.reactIntl,Oe.HIDE_PASSWORD_TOOLTIP),o=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),a=this.props.value?this.props.value:"",l=De("properties-pwdfield","properties-input-control",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),p=Nn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:l,"data-id":Ln(this.props.propertyId)},s.createElement(Tt,sr({},p,{autoComplete:"off",id:this.id,disabled:this.props.state===Ve.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:a,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,tooltipAlignment:"end",showPasswordLabel:o,hidePasswordLabel:i})),s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Zl=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ql);function ep(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var tp=function(r){n(i,r);var o=ep(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=wn(r.props.propertyId),r.getDateFormat=r.getDateFormat.bind(a(r)),r.handleChange=r.handleChange.bind(a(r)),r.value=t.value,r.value){var n=hr(r.value,xe,new Date);dr(n)&&(r.value=fr(n,r.getDateFormat()))}else r.value="";return r}return t(i,[{key:"getDateFormat",value:function(){var e=this.props.control.dateFormat||xe;return e=e.replace(/Y/g,"y").replace(/D/g,"d")}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=hr(e.target.value,this.getDateFormat(),new Date);t=dr(r)?fr(r,xe):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=De("properties-datefield","properties-input-control",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Nn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":Ln(this.props.propertyId)},s.createElement(gt,sr({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===Ve.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),rp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(tp);function np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var op=function(r){n(i,r);var o=np(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=wn(t.propertyId),r.locale=t.controller.getLocale(),r.dateFormat=xn(t.control),r.state={value:t.value?Ds(t.value,r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(a(r)),r}return t(i,[{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleChange",value:function(e){if(e.length>0){var t=Os(e[0]),r=Ds(e[0],this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,t),this.setState({value:r})}else this.props.controller.updatePropertyValue(this.props.propertyId,""),this.setState({value:""})}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.setState({value:t})}},{key:"render",value:function(){var e=this.props.controller.getResource("".concat(this.props.control.name,".helper"),null),t=De("properties-datepicker","properties-input-control",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),r=Nn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:t,"data-id":Ln(this.props.propertyId)},s.createElement(_t,{className:"properties-datepicker-wrapper-parent",datePickerType:rt.SINGLE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleChange.bind(this),locale:this.locale},s.createElement(kt,sr({},r,{id:this.id,className:"properties-datepicker-wrapper-input",placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&this.props.controlItem,disabled:this.props.state===Ve.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputChange.bind(this),value:this.state.value,helperText:!this.props.tableControl&&e}))),s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),ip=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(op);function ap(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var sp=function(r){n(i,r);var o=ap(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.id=wn(r.props.propertyId),r.locale=t.controller.getLocale(),r.uuid=nr(),r.dateFormat=xn(t.control),r.state={valueStart:t.value&&t.value[0]?Ds(t.value[0],r.dateFormat):"",valueEnd:t.value&&t.value[1]?Ds(t.value[1],r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(a(r)),r.createInfoDesc=r.createInfoDesc.bind(a(r)),r}return t(i,[{key:"onStartBlur",value:function(e){var t=Os(e.target.value,this.dateFormat),r=Os(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"onEndBlur",value:function(e){var t=Os(e.target.value,this.dateFormat),r=Os(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleDateRangeChange",value:function(e){if(e[0]){var t=Os(e[0]),r=Ds(e[0],this.dateFormat),n="",o="";e[1]&&(n=Os(e[1]),o=Ds(e[1],this.dateFormat)),this.props.controller.updatePropertyValue(this.props.propertyId,[t,n]),this.setState({valueStart:r,valueEnd:o})}}},{key:"handleInputStartChange",value:function(e){this.setState({valueStart:e.target.value})}},{key:"handleInputEndChange",value:function(e){this.setState({valueEnd:e.target.value})}},{key:"createInfoDesc",value:function(e,t,r){return t?s.createElement("div",{className:"properties-label-container"},e,s.createElement(or,{id:"".concat(this.uuid,"-tooltip-label-").concat(this.props.control.name,"-").concat(r),tip:t,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:this.props.state===Ve.DISABLED,showToolTipOnClick:!0},s.createElement(rr,{type:Ue.INFORMATION,className:"properties-control-description-icon-info"}))):e}},{key:"render",value:function(){var e="".concat(this.props.control.name,".range.start.label"),t="".concat(this.props.control.name,".range.start.desc"),r="".concat(this.props.control.name,".range.start.helper"),n="".concat(this.props.control.name,".range.end.label"),o="".concat(this.props.control.name,".range.end.desc"),i="".concat(this.props.control.name,".range.end.helper"),a=u(this.reactIntl,Oe.DATEPICKER_RANGE_START_LABEL),l=u(this.reactIntl,Oe.DATEPICKER_RANGE_END_LABEL),p=this.props.controller.getResource(e,a),c=this.props.controller.getResource(t,null),d=this.props.controller.getResource(r,null),h=this.props.controller.getResource(n,l),f=this.props.controller.getResource(o,null),m=this.props.controller.getResource(i,null);p=this.createInfoDesc(p,c,"start"),h=this.createInfoDesc(h,f,"end");var v=De("properties-datepicker-range","properties-input-control",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),y=Nn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:v,"data-id":Ln(this.props.propertyId)},s.createElement(_t,{datePickerType:rt.RANGE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleDateRangeChange.bind(this),locale:this.locale,allowInput:!0},s.createElement(kt,sr({},y,{id:"".concat(this.id,"-start"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&p,disabled:this.props.state===Ve.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputStartChange.bind(this),value:this.state.valueStart,onBlur:this.onStartBlur.bind(this),helperText:!this.props.tableControl&&d})),s.createElement(kt,sr({},y,{id:"".concat(this.id,"-end"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&h,disabled:this.props.state===Ve.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputEndChange.bind(this),value:this.state.valueEnd,onBlur:this.onEndBlur.bind(this),helperText:!this.props.tableControl&&m}))),s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),lp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(sp);function pp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var cp=function(r){n(i,r);var o=pp(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=wn(t.propertyId),r.value=t.value,r.value){var n=hr(r.value,"HH:mm:ss:xxx",new Date);dr(n)&&(r.value=fr(n,r.getTimeFormat()))}else r.value="";return r.getTimeFormat=r.getTimeFormat.bind(a(r)),r.handleChange=r.handleChange.bind(a(r)),r}return t(i,[{key:"getTimeFormat",value:function(){return this.props.control.timeFormat||Be}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=hr(e.target.value,this.getTimeFormat(),new Date);t=dr(r)?fr(r,"HH:mm:ss:xxx"):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=De("properties-timefield","properties-input-control",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Nn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":Ln(this.props.propertyId)},s.createElement(gt,sr({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===Ve.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Ls,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),up=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(cp);function dp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var hp=function(r){n(i,r);var o=dp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=wn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e=this.props.control.label?this.props.control.label.text:"",t="tooltip-"+this.props.control.name,r="";this.props.control.description&&this.props.state!==Ve.DISABLED&&this.props.state!==Ve.HIDDEN&&!this.props.tableControl&&(r=s.createElement("span",null,this.props.control.description.text),this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId));var n=Z(r)?"":s.createElement(or,{id:t,tip:r,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},s.createElement(rr,{type:Ue.INFORMATION,className:"properties-control-description-icon-info"})),o=s.createElement("span",{className:"properties-checkbox-label"},e);return s.createElement("div",{className:De("properties-checkbox",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),"data-id":Ln(this.props.propertyId)},s.createElement(It,{disabled:this.props.state===Ve.DISABLED,id:this.id,labelText:o,onChange:this.handleChange.bind(this),checked:Boolean(this.props.value),hideLabel:this.props.tableControl}),n,s.createElement(Ls,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId)}))}}]),i}(s.Component),fp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(hp);function mp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var vp=function(r){n(i,r);var o=mp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=wn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".toggle.on.label"),t="".concat(this.props.control.name,".toggle.off.label"),r=u(this.reactIntl,Oe.TOGGLE_ON_LABEL),n=u(this.reactIntl,Oe.TOGGLE_OFF_LABEL),o=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),a=this.props.tableControl?"sm":"md",l=s.createElement(wt,{id:this.id,size:a,disabled:this.props.state===Ve.DISABLED,toggled:Boolean(this.props.value),labelB:o,labelA:i,onToggle:this.handleChange.bind(this),labelText:this.props.tableControl?null:this.props.controlItem}),p=De("properties-toggle",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:p,"data-id":Ln(this.props.propertyId)},l,s.createElement(Ls,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),yp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(vp);function gp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var bp=function(r){n(i,r);var o=gp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=nr(),r.handleChange=r.handleChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)){var t=_s(this.props.value,this.props.controlOpts.values);O(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"handleChange",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId);null==r&&(r=[]);var n=r.indexOf(e);t&&n<0&&(r=r.concat([e])),!t&&n>=0&&r.splice(n,1);var o=r.concat();this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"render",value:function(){var e=this.props.state===Ve.HIDDEN,t=this.props.value;null==t&&(t=[]);for(var r=[],n=0;n<this.props.control.values.length;n++){var o=this.props.control.values[n],i=this.props.state===Ve.DISABLED||!this.props.controlOpts.values.includes(o),a=null;if(Array.isArray(this.props.control.valueDescs)&&!Z(this.props.control.valueDescs[n])&&!this.props.tableControl){var l=s.createElement("span",null,this.props.control.valueDescs[n]);a=s.createElement(or,{id:"tooltip-".concat(n),tip:l,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:e||i},s.createElement(Qt,{disabled:i,className:"properties-control-description-icon-info"}))}var p={name:this.props.propertyId.name,row:n},c=t.indexOf(o)>=0;r.push(s.createElement("div",{className:"properties-checkbox-tooltip-container",key:wn(p,this.uuid)},s.createElement(It,{disabled:i,id:wn(p,this.uuid),key:o+n,labelText:this.props.control.valueLabels[n],onChange:this.handleChange.bind(this,o),checked:c}),a))}return s.createElement("fieldset",null,s.createElement("legend",null,this.props.controlItem),s.createElement("div",{className:De("properties-checkboxset",{hide:this.props.state===Ve.HIDDEN}),"data-id":Ln(this.props.propertyId)},s.createElement("div",{className:De("properties-checkboxset-container",this.props.messageInfo?this.props.messageInfo.type:null)},r),s.createElement(Ls,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo})))}}]),i}(s.Component),Ep=Ft((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(bp);function Ip(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Sp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Rp=function(r){n(i,r);var o=Cp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=nr(),r.handleChange=r.handleChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Je.INITIAL_LOAD);var e=this.props.controller.getPropertyValue(this.props.propertyId);this.setEnabledStateOfOptionalPanels(e),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"setEnabledStateOfOptionalPanels",value:function(e){if(this.props.control.optionalPanels){var t=this.props.controlOpts,r=this.props.controller.getPanelStates();this.props.controller.parsePanelTree();for(var n=0;n<t.values.length;n++){var o=t.values[n];ts(r,{name:o},t.values[n]===e?Ve.ENABLED:Ve.DISABLED,o)}this.props.controller.setPanelStates(r),function(e,t){for(var r={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},n=0;n<e.length;n++){var o=t.getPanelState({name:e[n]});ds(r,{name:e[n]},o,t)}t.setControlStates(r.controls),t.setPanelStates(r.panels),t.setActionStates(r.actions)}(t.values,this.props.controller)}}},{key:"getOptionalPanel",value:function(e){return this.props.control.optionalPanels?this.props.control.optionalPanels[e]:null}},{key:"updateValueFromFilterEnum",value:function(e,t){if(null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)&&(r=this.props.control.valueDef.defaultValue),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{key:"convertTargetValue",value:function(e){return"boolean"===this.props.control.valueDef.propType?"true"===e:"integer"===this.props.control.valueDef.propType||"long"===this.props.control.valueDef.propType||"double"===this.props.control.valueDef.propType?Number(e):e}},{key:"handleChange",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.convertTargetValue(e);this.props.controller.updatePropertyValue(this.props.propertyId,r),t!==r&&this.setEnabledStateOfOptionalPanels(r)}},{key:"isRadioButtonDisabled",value:function(e){var t=this.props.valueStates;return!!(t&&t[e]&&t[e].value)&&t[e].value===Ve.DISABLED}},{key:"handleCheckedDisabled",value:function(e,t){if(null!=e&&t&&this.props.state!==Ve.DISABLED){var r,n=this.props.controller.getControl(this.props.propertyId),o=this.props.control.valueDef.defaultValue;if(o&&!this.isRadioButtonDisabled(o))r=o;else{var i,a=Ip(n.values);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s!==e&&!this.isRadioButtonDisabled(s)){r=s;break}}}catch(e){a.e(e)}finally{a.f()}}r&&this.props.controller.updatePropertyValue(this.props.propertyId,r)}}},{key:"render",value:function(){var e=this.props.state===Ve.DISABLED,t=this.props.state===Ve.HIDDEN;this.props.control.values||"radioset"!==this.props.control.controlType||(this.props.control.values=[!0,!1],this.props.control.valueLabels=["true","false"]);for(var r=[],n=this.props.controlOpts,o=0;o<n.values.length;o++){var i=null;if(Array.isArray(this.props.control.valueDescs)&&!Z(this.props.control.valueDescs[o])&&!this.props.tableControl){var a=s.createElement("span",null,this.props.control.valueDescs[o]);i=s.createElement(or,{id:"tooltip-".concat(o),tip:a,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:t||e},s.createElement(Qt,{disabled:e,className:"properties-control-description-icon-info"}))}var l=n.values[o]===this.props.value,p="boolean"===this.props.control.valueDef.propType?String(n.values[o]):n.values[o],c=this.isRadioButtonDisabled(p),u=this.getOptionalPanel(p),d={name:this.props.propertyId.name,row:o};r.push(s.createElement("div",{key:o,className:"properties-radioset-panel"},s.createElement("div",{className:"properties-radioset-tooltip"},s.createElement(Lt,{key:o,id:wn(d,this.uuid),disabled:e||c,labelText:n.valueLabels[o],value:p,onChange:this.handleChange,checked:l}),i),u))}return s.createElement("div",{"data-id":Ln(this.props.control,this.props.propertyId),className:De("properties-radioset ",{hide:this.props.state===Ve.HIDDEN})},s.createElement("div",{className:De("properties-radio-button-group",this.props.messageInfo?this.props.messageInfo.type:null,{horizontal:this.props.control.orientation!==L.VERTICAL}),disabled:this.props.state===Ve.DISABLED},r),s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Tp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),valueStates:t.controller.getControlValueStates(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Rp);function _p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return kp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function kp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Lp=function(r){n(i,r);var o=wp(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.emptyLabel="...",r.disableEmptyListDropdown=!1,Z(t.controlOpts)){var n="".concat(r.props.control.name,".emptyList.placeholder"),s=t.controller.getResource(n);s&&(r.emptyLabel=s,r.disableEmptyListDropdown=!0)}else t.control.additionalText&&(r.emptyLabel=t.control.additionalText);return r.id=wn(r.props.propertyId),r.handleChange=r.handleChange.bind(a(r)),r.handleComboOnChange=r.handleComboOnChange.bind(a(r)),r.handleOnInputChange=r.handleOnInputChange.bind(a(r)),r.genSchemaSelectOptions=r.genSchemaSelectOptions.bind(a(r)),r.genSelectOptions=r.genSelectOptions.bind(a(r)),r.genFieldSelectOptions=r.genFieldSelectOptions.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Je.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"getSelectedOption",value:function(e,t){var r=y(t,this.props.control),n=e.find((function(e){return e.value===r}));return(null===(n=void 0===n?null:n)&&r||this.props.control.customValueAllowed)&&(n={value:r,label:r}),n}},{key:"genSchemaSelectOptions",value:function(e){var t=[];if(t.push({value:"",label:this.emptyLabel}),Array.isArray(this.props.controlOpts)){var r,n=_p(this.props.controlOpts);try{for(n.s();!(r=n.n()).done;){var o=r.value;t.push({value:o,label:o})}}catch(e){n.e(e)}finally{n.f()}}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genFieldSelectOptions",value:function(e){var t=[];t.push({value:"",label:this.emptyLabel});var r,n=_p(this.props.controlOpts);try{for(n.s();!(r=n.n()).done;){var o=r.value;t.push({value:o.name,label:o.name})}}catch(e){n.e(e)}finally{n.f()}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({value:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e,t){if(this.props.control.controlType===h.ONEOFSELECT&&null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)?r=this.props.control.valueDef.defaultValue:this.props.control.customValueAllowed&&this.props.value&&(r=this.props.value),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{key:"handleChange",value:function(e){var t=this.props.tableControl?e.target.value:e.selectedItem.value;this.props.control.controlType===h.SELECTCOLUMN&&(t=P(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleComboOnChange",value:function(e){var t=e.selectedItem&&e.selectedItem.value?e.selectedItem.value:"";this.props.control.controlType===h.SELECTCOLUMN&&(t=P(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleOnInputChange",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId);if((null!=t||""!==e)&&null!==e&&e!==t){var r=e;this.props.controller.updatePropertyValue(this.props.propertyId,r)}}},{key:"render",value:function(){var e;e=this.props.control.controlType===h.SELECTSCHEMA?this.genSchemaSelectOptions(this.props.value):this.props.control.controlType===h.SELECTCOLUMN?this.genFieldSelectOptions(this.props.value):this.genSelectOptions(this.props.value);var t={"close.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_OPENMENU),"clear.selection":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_CLEARSELECTION)},r=null,n=Nn(this.props.messageInfo,this.props.tableControl);if(this.props.tableControl){var o=[],i=e.selectedOption&&e.selectedOption.value?e.selectedOption.value:"";e.selectedOption||o.push(s.createElement(At,{text:this.emptyLabel,key:this.id,value:""}));var a,l=_p(e.options);try{for(l.s();!(a=l.n()).done;){var p=a.value;o.push(s.createElement(At,{text:p.label,key:this.id+"-"+p.value,value:p.value}))}}catch(e){l.e(e)}finally{l.f()}r=s.createElement(Dt,{id:this.id,hideLabel:!0,inline:!0,labelText:this.props.control.label?this.props.control.label.text:"",disabled:this.props.state===Ve.DISABLED||this.disableEmptyListDropdown,onChange:this.handleChange,value:i,light:this.props.controller.getLight()&&this.props.control.light},o)}else r=this.props.control.customValueAllowed?s.createElement(Ot,sr({},n,{ariaLabel:this.props.control.label?this.props.control.label.text:"",id:"".concat(Ln(this.props.propertyId),"-dropdown"),disabled:this.props.state===Ve.DISABLED||this.disableEmptyListDropdown,placeholder:e.selectedOption.label,selectedItem:e.selectedOption.label,items:e.options,onChange:this.handleComboOnChange,onInputChange:this.handleOnInputChange,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem})):s.createElement(St,sr({},n,{id:"".concat(Ln(this.props.propertyId),"-dropdown"),disabled:this.props.state===Ve.DISABLED||this.disableEmptyListDropdown,type:"default",items:e.options,onChange:this.handleChange,selectedItem:e.selectedOption,label:this.emptyLabel,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem}));return s.createElement("div",{"data-id":Ln(this.props.propertyId),className:De("properties-dropdown",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},r,s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl,tableOnly:!0}))}}]),i}(s.Component),Ap=Ft((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return t.control.controlType===h.SELECTSCHEMA?r.controlOpts=t.controller.getDatasetMetadataSchemas():t.control.controlType===h.SELECTCOLUMN?r.controlOpts=t.controller.getFilteredDatasetMetadata(t.propertyId):r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(Lp);function Dp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Op=function(r){n(i,r);var o=Dp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.getSelectedOption=r.getSelectedOption.bind(a(r)),r.genSelectOptions=r.genSelectOptions.bind(a(r)),r.handleOnChange=r.handleOnChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r.setShouldRender=r.setShouldRender.bind(a(r)),r.state={shouldRender:!0},r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),this.setShouldRender(e)}},{key:"setShouldRender",value:function(e){!O(this.props.controlOpts.values,e.controlOpts.values)&&this.state.shouldRender?this.setState({shouldRender:!1}):this.state.shouldRender||this.setState({shouldRender:!0})}},{key:"getSelectedOption",value:function(e,t){var r=y(t,this.props.control),n=[];return r&&r.forEach((function(t){return n.push(e.find((function(e){return e.id===t})))})),n}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({id:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOptions:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e){var t=_s(this.props.value,this.props.controlOpts.values);O(t,this.props.value)||(Z(t)&&this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&(t=_s(this.props.control.valueDef.defaultValue,this.props.controlOpts.values)),this.props.controller.updatePropertyValue(this.props.propertyId,t,e))}},{key:"handleOnChange",value:function(e){for(var t=[],r=0;r<e.selectedItems.length;r++)t.push(e.selectedItems[r].id);this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.genSelectOptions(this.props.value);if(!this.state.shouldRender)return null;var t={"close.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_OPENMENU),"clear.all":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_CLEARALL),"clear.selection":u(this.reactIntl,Oe.DROPDOWN_TOOLTIP_CLEARSELECTION)},r="".concat(this.props.control.name,".multiselect.dropdown.empty.label"),n=u(this.reactIntl,Oe.MULTISELECT_DROPDOWN_EMPTY_LABEL),o="".concat(this.props.control.name,".multiselect.dropdown.options.selected.label"),i=u(this.reactIntl,Oe.MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL),a="";a=0===e.selectedOptions.length?this.props.controller.getResource(r,n):this.props.controller.getResource(o,i);var l=Nn(this.props.messageInfo,this.props.tableControl),p=null;return p=this.props.control.filterable?s.createElement(Pt,sr({},l,{id:"".concat(Ln(this.props.propertyId),"-multiselect-filterable"),disabled:this.props.state===Ve.DISABLED,translateWithId:function(e){return t[e]},items:e.options,initialSelectedItems:e.selectedOptions,onChange:this.handleOnChange,placeholder:a,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})):s.createElement(Nt,sr({},l,{id:"".concat(Ln(this.props.propertyId),"-multiselect"),disabled:this.props.state===Ve.DISABLED,translateWithId:function(e){return t[e]},items:e.options,selectedItems:e.selectedOptions,onChange:this.handleOnChange,label:a,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement("div",{"data-id":Ln(this.props.propertyId),className:De("properties-dropdown",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},p,s.createElement(Ls,{state:this.props.state,tableOnly:!0,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Pp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Op);function Np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var xp=function(r){n(i,r);var o=Np(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).genSelectOptions=r.genSelectOptions.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r.updateSelections=r.updateSelections.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Je.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e,t){var r=_s(this.props.value,this.props.controlOpts.values);O(r,this.props.value)||this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}},{key:"updateSelections",value:function(e){for(var t=[],r=0;r<e.length;r++){var n=this.props.controlOpts.values[e[r]];t.push(n)}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"genSelectOptions",value:function(e){for(var t={options:[],selected:[]},r=0;r<this.props.controlOpts.values.length;r++){-1!==e.indexOf(this.props.controlOpts.values[r])&&t.selected.push(r);var n=[];n.push({column:"someofselect",state:this.props.state,content:this.props.controlOpts.valueLabels[r]}),t.options.push({className:"table-row",columns:n,disabled:this.props.state===Ve.DISABLED})}return t}},{key:"render",value:function(){var e=this.props.value;null==e&&(e=[]);var t=this.genSelectOptions(e),r=this.props.control.rows?this.props.control.rows:5.5,n=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return s.createElement("div",{"data-id":Ln(this.props.control,this.props.propertyId),className:De("properties-someofselect ",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},this.props.controlItem,s.createElement(ar,{columns:[{key:"someofselect",label:""}],rows:r,data:t.options,scrollKey:this.props.control.name,tableLabel:n,selectedRows:t.selected,updateRowSelections:this.updateSelections,selectable:!0,showHeader:!1,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Bp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(xp);function Mp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Fp=function(r){n(i,al);var o=Mp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.emptyTableButtonClickHandler=r.addOnClick.bind(a(r),r.props.propertyId),r.emptyTableButtonLabel=u(r.reactIntl,Oe.STRUCTURETABLE_ADDBUTTON_LABEL),r}return t(i,[{key:"makeRows",value:function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var o=[],i=void 0!==this.props.propertyId.row?{row:this.props.propertyId.row,index:n}:{row:n},a=Object.assign({},this.props.propertyId,i),l=Object.assign({},this.props.control);if(l.dmImage){var p=this.props.controller.getDatasetMetadataFields(),c=y(this.props.controller.getPropertyValue(a),l,!0),u=N(p,c,l.dmImage);l.icon=u}var d=s.createElement("div",{className:"properties-table-cell-control"},s.createElement(xs,{control:l,propertyId:a,controller:this.props.controller,tableControl:!0}));o.push({key:n+"-0-field",column:"field",content:d}),r.push({key:n,onClickCallback:this.handleRowClick.bind(this,n,!1),columns:o,className:"column-select-table-row"})}return r}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){this.setCurrentControlValueSelected(e,t);var r=t[t.length-1];this.setScrollToRow(r)}}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"field",label:u(this.reactIntl,Oe.FIELDPICKER_FIELDCOLUMN_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={fieldPickerCloseFunction:this.onFieldPickerClose},n=this.makeRows(this.props.value,this.props.state),o=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var i=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",a=s.createElement(ar,{columns:t,data:n,scrollToRow:e,topRightPanel:o,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:i,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),l=s.createElement("div",null,s.createElement("div",{className:"properties-column-select-table"},a),s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":Ln(this.props.propertyId),className:"properties-column-select"},this.props.controlItem,s.createElement(dl,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Ve.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler}))}}]),i}();Fp.propTypes={control:vr.object.isRequired,propertyId:vr.object.isRequired,controller:vr.object.isRequired,controlItem:vr.element,openFieldPicker:vr.func.isRequired,selectedRows:vr.array,state:vr.string,value:vr.array,messageInfo:vr.object,addRemoveRows:vr.bool,tableButtons:vr.object};var Vp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Fp);function Up(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Hp=function(r){n(i,r);var o=Up(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).controlFactory=new uc(r.props.controller),r.controlFactory.setFunctions(r.props.openFieldPicker,r.props.buildUIItem),r}return t(i,[{key:"_getSubControlDef",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return this.props.control.subControls[t];return null}},{key:"_getColumnIndex",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return t;return null}},{key:"_makeRow",value:function(e){for(var t=[],r=0;r<e.length;r++){var n=this._getSubControlDef(e[r]);if(n&&n.visible){var o={name:this.props.control.name,col:this._getColumnIndex(e[r])},i=G(this.props.propertyId),a=o;i.name!==o.name&&(a=this.props.controller.setChildPropertyId(i,o)),t.push(this.controlFactory.createControlItem(n,a))}}return t}},{key:"_makeControls",value:function(){var e=[];if(Array.isArray(this.props.control.layout))for(var t=this.props.control.layout,r=0;r<t.length;r++)Array.isArray(t[r])&&e.push(this._makeRow(t[r]));else for(var n=0;n<this.props.control.subControls.length;n++)if(this.props.control.subControls[n].visible){var o={name:this.props.control.name,col:this._getColumnIndex(this.props.control.subControls[n].name)},i=G(this.props.propertyId),a=o;i.name!==o.name&&(a=this.props.controller.setChildPropertyId(i,o)),e.push([this.controlFactory.createControlItem(this.props.control.subControls[n],a)])}return e}},{key:"_makeControlTable",value:function(e){for(var t=[],r=0;r<e.length;r++){for(var n=[],o=0;o<e[r].length;o++)n.push(s.createElement("td",{key:(1+r)*o,className:"properties-structureeditor-cell"},s.createElement("div",null,e[r][o])));t.push(s.createElement("tr",{key:1+r},n))}return s.createElement("table",{role:"presentation"},s.createElement("tbody",null,t))}},{key:"render",value:function(){var e=this._makeControlTable(this._makeControls());return s.createElement("div",{"data-id":Ln(this.props.control,this.props.propertyId),className:De("properties-structureeditor ",{hide:this.props.state===Ve.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},e,s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:!1}))}}]),i}(s.Component),jp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Hp);var zp=J,qp=Hr,Gp=Pe,Wp=Q,$p=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};var Xp=function(e,t){return(Wp(e)?zp:qp)(e,$p(Gp(t)))};function Kp(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Yp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Yp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Qp=function(r){n(i,al);var o=Jp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.addColumns=r.addColumns.bind(a(r)),r.removeColumns=r.removeColumns.bind(a(r)),r.getDefaultRow=r.getDefaultRow.bind(a(r)),r.indexOfRow=r.indexOfRow.bind(a(r)),r.emptyTableButtonClickHandler=r.addOnClick.bind(a(r),r.props.propertyId),r.emptyTableButtonLabel=u(r.reactIntl,Oe.STRUCTURETABLE_ADDBUTTON_LABEL),r}return t(i,[{key:"indexOfRow",value:function(e){var t=this.props.control.keyIndex;return Qs(this.props.controller.getPropertyValue(this.props.propertyId),(function(r){return r[t]===e}))}},{key:"addColumns",value:function(e,t){for(var r=[],n=this.props.control.valueDef.isMap,o=0;o<e.length;o++){var i=e[o];if(this.indexOfRow(i)<0){var a=G(this.props.control.defaultRow);n?a.unshift(i):a[this.props.control.keyIndex]=i,r.push(a)}}var s=this.props.controller.getPropertyValue(this.props.propertyId).concat(r);this.setCurrentControlValueSelected(s)}},{key:"removeColumns",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.props.control.keyIndex,o=Xp(r,(function(t){return e.indexOf(t[n])>=0}));this.setCurrentControlValueSelected(o)}},{key:"getDefaultRow",value:function(e){var t=[];if(this.props.value&&e)for(var r=S(this.props.control),n=0;n<this.props.value.length;n++){if(this.props.value[n][r]===e||this.props.value[n]===e)return this.props.value[n]}for(var o=0;o<this.props.control.subControls.length;o++){var i=this.props.control.subControls[o];if(i.role===v.COLUMN)t.push(e);else if(i.role===v.NEW_COLUMN)t.push(y(e,i).replace(".","_"));else if(void 0!==i.dmDefault)t.push(x(i,e,this.props.controller.getDatasetMetadataFields()));else if(void 0!==this.props.control.defaultRow){var a=o;this.props.control.subControls.length!==this.props.control.defaultRow.length&&(a-=1);var s=this.props.control.defaultRow[a];this.props.control.subControls[a].valueDef.propType===m.STRUCTURE?t.push([]):s&&s.parameterRef?t.push(this.props.controller.getPropertyValue({name:s.parameterRef})):t.push(s)}else i.valueDef&&i.valueDef.defaultValue?i.valueDef.defaultValue.parameterRef?t.push(this.props.controller.getPropertyValue({name:i.valueDef.defaultValue.parameterRef})):t.push(i.valueDef.defaultValue):t.push(null)}return t}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){var r,n=[],o=Kp(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.push(this.getDefaultRow(i))}}catch(e){o.e(e)}finally{o.f()}this.setCurrentControlValueSelected(n,t);var a=t[t.length-1];this.setScrollToRow(a)}}},{key:"render",value:function(){var e={fieldPickerCloseFunction:this.onFieldPickerClose},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),n=s.createElement("div",null,s.createElement("div",{className:"properties-st properties-st-buttons"},r),s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":Ln(this.props.control,this.props.propertyId),className:"properties-column-structure-wrapper"},s.createElement("div",{className:"properties-column-structure"},s.createElement(dl,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Ve.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler})),s.createElement("div",null,o))}}]),i}();Qp.propTypes={buildUIItem:vr.func,control:vr.object.isRequired,propertyId:vr.object.isRequired,controller:vr.object.isRequired,openFieldPicker:vr.func.isRequired,rightFlyout:vr.bool,selectedRows:vr.array,state:vr.string,value:vr.array,messageInfo:vr.object,addRemoveRows:vr.bool,tableButtons:vr.object};var Zp=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Qp);function ec(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var tc=function(r){n(i,al);var o=ec(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).addRow=r.addRow.bind(a(r)),r.allowColumnControls=!0,r}return t(i,[{key:"addRow",value:function(){var e=this.getDefaultRow(),t=this.props.controller.getPropertyValue(this.props.propertyId).concat([e]);this.setCurrentControlValueSelected(t)}},{key:"render",value:function(){var e={addButtonLabel:u(this.props.controller.getReactIntl(),Oe.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:u(this.props.controller.getReactIntl(),Oe.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),n=s.createElement("div",null,s.createElement("div",{className:"properties-sle properties-sle-buttons"},r),s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":Ln(this.props.control,this.props.propertyId),className:"properties-sle-wrapper"},s.createElement("div",{"data-id":Ln(this.props.control,this.props.propertyId),className:"properties-sle-container"},s.createElement(dl,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Ve.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:e.addButtonLabel,emptyTableButtonClickHandler:this.addRow})),s.createElement("div",null,o))}}]),i}();tc.propTypes={buildUIItem:vr.func,control:vr.object.isRequired,propertyId:vr.object.isRequired,controller:vr.object.isRequired,rightFlyout:vr.bool,selectedRows:vr.array,state:vr.string,value:vr.array,messageInfo:vr.object,addRemoveRows:vr.bool,tableButtons:vr.object};var rc=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(tc);function nc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var oc=function(r){n(i,al);var o=nc(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.editCallback=r.editCallback.bind(a(r)),r.buttonHandler=r.props.controller.getHandlers().buttonHandler,r}return t(i,[{key:"editCallback",value:function(){this.buttonHandler&&this.buttonHandler({type:"edit",propertyId:this.props.propertyId})}},{key:"render",value:function(){var e="".concat(this.props.control.name,".edit.button.label"),t=u(this.reactIntl,Oe.READONLYTABLE_EDIT_BUTTON_LABEL),r=this.props.controller.getResource(e,t),n=this.buttonHandler?{editCallback:this.editCallback,label:r}:null,o=this.props.control&&this.props.control.buttons,i=this.createTable(this.props.state,n,o),a=s.createElement("div",null,s.createElement("div",{className:"properties-rt properties-rt-buttons"},i),s.createElement(Ls,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":Ln(this.props.control,this.props.propertyId),className:"properties-readonly-table-wrapper"},this.props.controlItem,s.createElement("div",{className:"properties-readonly-table"},s.createElement(dl,{tableContainer:a,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Ve.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:r,emptyTableButtonClickHandler:this.editCallback})))}}]),i}();oc.propTypes={buildUIItem:vr.func,control:vr.object.isRequired,propertyId:vr.object.isRequired,controller:vr.object.isRequired,controlItem:vr.element,rightFlyout:vr.bool,selectedRows:vr.array,state:vr.string,value:vr.array,messageInfo:vr.object,addRemoveRows:vr.bool,tableButtons:vr.object,hideEditButton:vr.bool};var ic=Ft((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId),hideEditButton:t.controller.getHideEditButton(t.propertyId)}}),null)(oc);function ac(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var sc=function(r){n(i,r);var o=ac(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).actionFactory=new vo(r.props.controller),r.showRequiredIndicator=!t.controller||te(t.controller.getPropertiesConfig(),"showRequiredIndicator",!0),r}return t(i,[{key:"render",value:function(){if(this.props.control.controlType===h.HIDDEN)return null;var e,t,r,n,o=this.props.state===Ve.HIDDEN,i=this.props.state===Ve.DISABLED;this.props.control.label&&!1!==this.props.control.labelVisible&&(this.props.control.description&&!Z(this.props.control.description.text)&&("on_panel"===this.props.control.description.placement?t=s.createElement("div",{className:"properties-control-description"},this.props.control.description.text):(this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId),r=s.createElement(or,{id:"tooltip-label-".concat(this.props.control.name),tip:this.props.control.description.text,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:o||i,showToolTipOnClick:!0},s.createElement(rr,{type:Ue.INFORMATION,className:"properties-control-description-icon-info"})))),this.showRequiredIndicator&&this.props.control.required?n=s.createElement("span",{className:"properties-indicator"},u(this.props.controller.getReactIntl(),Oe.LABEL_INDICATOR_REQUIRED)):this.showRequiredIndicator||"required"in this.props.control||(n=s.createElement("span",{className:"properties-indicator"},u(this.props.controller.getReactIntl(),Oe.LABEL_INDICATOR_OPTIONAL))),e=s.createElement("div",{className:De("properties-label-container",{"table-control":!0===this.props.tableControl})},s.createElement("label",{className:"properties-control-label"},this.props.control.label.text),n,r));var a=this.actionFactory.generateAction(0,this.props.control.action),l=De("properties-control-item",{hide:o});return this.props.accessibleControls.includes(this.props.control.controlType)?s.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:l,disabled:i},e,t):s.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:l,disabled:i},e,t,this.props.controlObj,a)}}]),i}(s.Component),lc=Ft((function(e,t){return{state:t.controller.getControlState(t.propertyId)}}),null)(sc),pc=[h.CHECKBOXSET,h.HIDDEN,h.DATEFIELD,h.DATEPICKER,h.DATEPICKERRANGE,h.NUMBERFIELD,h.SPINNER,h.PASSWORDFIELD,h.TEXTAREA,h.TEXTFIELD,h.TIMEFIELD,h.TOGGLETEXT,h.LIST,h.TOGGLE,h.SOMEOFSELECT,h.SELECTCOLUMNS,h.READONLY,h.READONLYTABLE,h.TIMESTAMP,h.EXPRESSION,h.CODE,h.ONEOFSELECT,h.MULTISELECT,h.SELECTSCHEMA,h.SELECTCOLUMN],cc=[h.LIST,h.READONLYTABLE,h.SOMEOFSELECT,h.SELECTCOLUMNS,h.STRUCTURETABLE,h.STRUCTURELISTEDITOR],uc=function(){function r(t){e(this,r),this.rightFlyout=!!t&&te(t.getPropertiesConfig(),"rightFlyout",!1),this.controller=t,this.actionFactory=new vo(this.controller)}return t(r,[{key:"setFunctions",value:function(e,t){this.genUIItem=t,this.openFieldPicker=e}},{key:"setRightFlyout",value:function(e){this.rightFlyout=e}},{key:"createControlItem",value:function(e,t,r){if(this.controller.getControlState(t)===Ve.HIDDEN)return null;var n=this.createControl(e,t,r),o=e.className?e.className:"";return pc.includes(e.controlType)?n:s.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:De("properties-ctrl-wrapper",o)},s.createElement(lc,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,controlObj:n,accessibleControls:pc,tableControl:cc.includes(e.controlType)}))}},{key:"createControl",value:function(e,t,r){if(!e||!t)return null;var n,o=Ln(t),i=this.controller.getControlState(t)===Ve.HIDDEN,a=this.actionFactory.generateAction(0,e.action),l={};switch(l.key=o,l.control=e,l.controller=this.controller,l.propertyId=t,l.controlItem=s.createElement(lc,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,accessibleControls:pc,tableControl:cc.includes(e.controlType)}),r&&(l.tableControl=r.table),e.controlType){case h.HIDDEN:return null;case h.TEXTFIELD:n=s.createElement(Fs,l);break;case h.READONLY:case h.TIMESTAMP:n=s.createElement(xs,l);break;case h.TEXTAREA:n=s.createElement(qs,l);break;case h.TOGGLE:n=s.createElement(yp,l);break;case h.LIST:n=s.createElement(vl,l);break;case h.EXPRESSION:n=s.createElement(Yl,sr({},l,{rightFlyout:this.rightFlyout}));break;case h.CODE:n=s.createElement(Yl,sr({},l,{builder:!1,validateLink:!1,rightFlyout:this.rightFlyout}));break;case h.TOGGLETEXT:n=s.createElement(Hs,l);break;case h.PASSWORDFIELD:n=s.createElement(Zl,l);break;case h.NUMBERFIELD:case h.SPINNER:n=s.createElement($s,l);break;case h.DATEFIELD:n=s.createElement(rp,l);break;case h.DATEPICKER:n=s.createElement(ip,l);break;case h.DATEPICKERRANGE:n=s.createElement(lp,l);break;case h.TIMEFIELD:n=s.createElement(up,l);break;case h.CHECKBOX:n=s.createElement(fp,l);break;case h.CHECKBOXSET:n=r?s.createElement(xs,l):s.createElement(Ep,l);break;case h.RADIOSET:n=s.createElement(Tp,l);break;case h.ONEOFSELECT:case h.SELECTSCHEMA:n=s.createElement(Ap,sr({},l,{rightFlyout:this.rightFlyout}));break;case h.MULTISELECT:n=s.createElement(Pp,l);break;case h.SELECTCOLUMN:n=!r||r&&r.allowColumnControls?s.createElement(Ap,sr({},l,{rightFlyout:this.rightFlyout})):s.createElement(xs,l);break;case h.SOMEOFSELECT:n=r?s.createElement(xs,l):s.createElement(Bp,l);break;case h.SELECTCOLUMNS:n=r?s.createElement(xs,l):s.createElement(Vp,sr({},l,{openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case h.STRUCTURETABLE:n=r?s.createElement(xs,l):s.createElement(Zp,sr({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case h.STRUCTURELISTEDITOR:n=r?s.createElement(xs,l):s.createElement(rc,sr({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case h.READONLYTABLE:n=r?s.createElement(xs,l):s.createElement(ic,sr({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case h.CUSTOM:n=s.createElement("div",{className:"properties-custom-ctrl",key:o},this.controller.getCustomControl(t,e,r));break;case h.STRUCTUREEDITOR:n=s.createElement(jp,sr({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;default:n=s.createElement(xs,l)}if(pc.includes(e.controlType)){if(r)return n;var p=e.className?e.className:"";return s.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:De("properties-ctrl-wrapper",{hide:i,action:ee(e,"action.image.placement")},p)},n,a)}return n}},{key:"createFormControl",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ge.CUSTOM;if(!e)return null;var o=Jo.makePropertyDef(null,e.parameters,e.complex_types,e.uihints);if(o&&o.parameterMetadata){var i,a=new To(e.resources),s=o.parameterMetadata.getParameter(t);s.propType()===m.STRUCTURE&&o.structureMetadata&&(i=o.structureMetadata.getStructure(s.baseType()));var l={light:r,containerType:n};return mi(o.parameterMetadata,t,null,i,a,null,null,null,l)}return null}}]),r}();function dc(e,t,r,n){if(["structuretable","structureeditor","structurelisteditor"].indexOf(e.control.controlType)>=0){var o=f(e.value);return"undefined"!==o&&"null"!==o&&String(e.value).length>0}return g.warn("Ignoring unsupported condition operation 'cellNotEmpty' for control type "+e.control.controlType),!0}function hc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return fc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function fc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mc(e,t,r,n){if(["textfield"].indexOf(e.control.controlType)>=0){var o=n.getDatasetMetadataFields();if(!o)return!0;var i,a=!0,s=hc(o);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(B(e.value,l)){a=!1;break}}}catch(e){s.e(e)}finally{s.f()}if(!a){var p,c=function(e,t){var r=[];if(void 0!==e.control.columnIndex){var n=t.getPropertyValue({name:e.id.name,row:e.id.row});Array.isArray(n)&&n.forEach((function(n,o){o!==e.control.columnIndex&&(t.getControl({name:e.id.name,col:o}).role===v.COLUMN&&r.push(n))}))}return r}(e,n),u=hc(c);try{for(u.s();!(p=u.n()).done;){var d=p.value;if(O(e.value,d)){a=!0;break}}}catch(e){u.e(e)}finally{u.f()}}return a}return g.warn("Ignoring unsupported condition operation 'colNotExists' for control type "+e.control.controlType),!0}function vc(e,t,r,n){var o=n.getDatasetMetadataFields();if(!o)return!1;var i=e.control.controlType;switch(i){case"selectcolumns":case"selectcolumn":if(Array.isArray(e.value)&&void 0!==e.control.editStyle){if(e.value.length>0){var a=!0;return e.value.forEach((function(e){a=a&&void 0!==yc(o,e)})),a}return!0}return void 0!==yc(o,e.value);default:return g.warn("Ignoring unsupported condition operation 'colDoesExists' for control type "+i),!0}}function yc(e,t){return!(null!=t&&!Z(t))||e.find((function(e){return B(t,e)}))}var gc=ue;var bc=function(e,t){return gc(t,(function(t){return e[t]}))},Ec=le;var Ic=ye,Sc=ae,Cc=M,Rc=yr,Tc=function(e){return null==e?[]:bc(e,Ec(e))},_c=Math.max;var kc=function(e,t,r,n){e=Sc(e)?e:Tc(e),r=r&&!n?Rc(r):0;var o=e.length;return r<0&&(r=_c(o+r,0)),Cc(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Ic(e,t,r)>-1};function wc(e,t,n,o){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(e.control.controlType)<0){var i=r(e.value);if(void 0!==t)switch(i){case"undefined":return!1;case"string":case"object":return kc(e.value,t.value);default:return g.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!1;case"string":case"object":return kc(e.value,n);default:return g.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation contains")}return g.warn("Ignoring unsupported condition operation 'contains' for control type "+e.control.controlType),!0}function Lc(e,t,n,o){if("passwordfield"!==e.control.controlType){var i=r(e.value);if(t){if(null===e.value||null===t.value)return e.value===t.value;switch(i){case"undefined":case"boolean":case"number":return e.value===t.value;case"string":return e.value.trim()===t.value.trim();case"object":return JSON.stringify(e.value)===JSON.stringify(t.value);default:return g.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value===n;switch(i){case"undefined":case"boolean":case"number":return e.value===n;case"string":return e.value.trim()===n.toString().trim();case"object":return JSON.stringify(e.value)===JSON.stringify(n);default:return g.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation equals")}return g.warn("Ignoring unsupported condition operation 'equals' for control type "+e.control.controlType),!0}function Ac(e,t,n,o){var i=r(e.value);switch(i){case"undefined":case"number":if(void 0!==t)return"number"==typeof t.value&&e.value>t.value;if(void 0!==n)return null===n||e.value>n;throw new Error("Insufficient parameter for condition operation 'greaterThan'");case"object":return null===e.value||null===t.value||null===n;case"string":if(e.control&&e.control.controlType===h.DATEPICKER){var a=new Date(e.value);if(!isNaN(a)&&t){var s=new Date(t.value);if(!isNaN(s))return a.getTime()>s.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}if(!isNaN(a)&&n){var l=new Date(n);if(!isNaN(l))return a.getTime()>l.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}throw new Error("Insufficient parameter for condition operation 'greaterThan'")}return!0;default:return g.warn("Ignoring condition operation 'greaterThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function Dc(e,t,n,o){var i=o.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!0;case"boolean":return!1;case"string":return i.trimSpaces?0===e.value.trim().length:0===e.value.length;case"number":return null===e.value;case"object":if(e.control&&e.control.controlType===h.DATEPICKERRANGE){var s=e.value[0].trim(),l=e.value[1].trim();return""===s&&""===l}return null===e.value||0===e.value.length;default:return g.warn("Ignoring condition operation 'isEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function Oc(e,t,n,o){var i=o.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!1;case"boolean":return!0;case"string":return i.trimSpaces?0!==e.value.trim().length:0!==e.value.length;case"number":return null!==e.value;case"object":return e.control&&e.control.controlType===h.DATEPICKERRANGE?""!==e.value[0].trim()||""!==e.value[1].trim():null!==e.value&&0!==e.value.length;default:return g.warn("Ignoring condition operation 'isNotEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function Pc(e,t,n,o){var i=r(e.value);switch(i){case"undefined":case"number":if(void 0!==t)return"number"==typeof t.value&&e.value<t.value;if(void 0!==n)return null===n||e.value<n;throw new Error("Insufficient parameter for condition operation 'lessThan'");case"object":return null===e.value||null===t.value||null===n;case"string":if(e.control&&e.control.controlType===h.DATEPICKER){var a=new Date(e.value);if(!isNaN(a)&&t){var s=new Date(t.value);if(!isNaN(s))return a.getTime()<s.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}if(!isNaN(a)&&n){var l=new Date(n);if(!isNaN(l))return a.getTime()<l.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}throw new Error("Insufficient parameter for condition operation 'lessThan'")}return!0;default:return g.warn("Ignoring condition operation 'lessThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function Nc(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return g.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=n}return"string"===i||"undefined"===i?new RegExp(a).test(e.value):(g.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" with input data type "+i),!0)}function xc(e,t,n,o){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(e.control.controlType)<0){var i=r(e.value);if(void 0!==t)switch(i){case"undefined":return!0;case"string":case"object":return!kc(e.value,t.value);default:return g.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!0;case"string":case"object":return!kc(e.value,n);default:return g.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation notContains")}return g.warn("Ignoring unsupported condition operation 'notContains' for control type "+e.control.controlType),!0}function Bc(e,t,n,o){if("passwordfield"!==e.control.controlType){var i=r(e.value);if(t){if(null===e.value||null===t.value)return e.value!==t.value;switch(i){case"undefined":case"boolean":case"number":return e.value!==t.value;case"string":return e.value.trim()!==t.value.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(t.value);default:return g.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value!==n;switch(i){case"undefined":case"boolean":case"number":return e.value!==n;case"string":return e.value.trim()!==n.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(n);default:return g.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation notEquals")}return g.warn("Ignoring unsupported condition operation 'notEquals' for control type "+e.control.controlType),!0}function Mc(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return g.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=n}return"string"===i||"undefined"===i?!new RegExp(a).test(e.value):(g.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" with input data type "+i),!0)}function Fc(e,t,r,n){if(e.value){if(e.control&&e.control.controlType!==h.DATEPICKER&&e.control.controlType!==h.DATEPICKERRANGE){var o="time"===r?"HH:mm:ss:xxx":xe,i=hr(e.value,o,new Date);return dr(i)}return!0}return!0}function Vc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmTypeEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=Ss(t,i,"type")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?Ss(e,i,"type")===a:(void 0!==e.value&&g.warn("dmTypeEquals cannot handle the given type: "+r(e.value)),!1))}function Uc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmTypeNotEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=Ss(t,i,"type")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?Ss(e,i,"type")!==a:(void 0!==e.value&&g.warn("dmTypeNotEquals cannot handle the given type: "+r(e.value)),!1))}function Hc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmMeasurementEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=Ss(t,i,"measure")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?Ss(e,i,"measure")===a:(void 0!==e.value&&g.warn("dmMeasurementEquals cannot handle the given type: "+r(e.value)),!1))}function jc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmMeasurementNotEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=Ss(t,i,"measure")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?Ss(e,i,"measure")!==a:(void 0!==e.value&&g.warn("dmMeasurementNotEquals cannot handle the given type: "+r(e.value)),!1))}function zc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=Ss(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?Ss(e,i,"modeling_role")===a:(void 0!==e.value&&g.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function qc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=Ss(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?Ss(e,i,"modeling_role")!==a:(void 0!==e.value&&g.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function Gc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o===i:(g.warn("Ignoring condition operation 'lengthEquals' for parameter_ref "+e.param),!0)}function Wc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o<i:(g.warn("Ignoring condition operation 'lengthLessThan' for parameter_ref "+e.param),!0)}function $c(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o>i:(g.warn("Ignoring condition operation 'lengthGreaterThan' for parameter_ref "+e.param),!0)}function Xc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Kc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yc(e){var t={};if(t.cellNotEmpty=dc,t.colNotExists=mc,t.colDoesExists=vc,t.contains=wc,t.equals=Lc,t.greaterThan=Ac,t.isEmpty=Dc,t.isNotEmpty=Oc,t.lessThan=Pc,t.matches=Nc,t.notContains=xc,t.notEquals=Bc,t.notMatches=Mc,t.isDateTime=Fc,t.dmTypeEquals=Vc,t.dmTypeNotEquals=Uc,t.dmMeasurementEquals=Hc,t.dmMeasurementNotEquals=jc,t.dmRoleEquals=zc,t.dmRoleNotEquals=qc,t.lengthEquals=Gc,t.lengthLessThan=Wc,t.lengthGreaterThan=$c,Array.isArray(e)){var r,n=Xc(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o&&"function"==typeof o.op&&"function"==typeof o.evaluate?t[o.op()]=o.evaluate:g.warn("Custom operator missing require function of `op` or `evaluate`")}}catch(e){n.e(e)}finally{n.f()}}return t}function Jc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Qc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Qc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Zc=function(){function r(){e(this,r),this.propertiesStore=new ia,this.handlers={propertyListener:null,controllerHandler:null,actionHandler:null,buttonHandler:null,buttonIconHandler:null,titleChangeHandler:null,tooltipLinkHandler:null},this.propertiesConfig={},this.visibleDefinitions={},this.enabledDefinitions={},this.validationDefinitions={},this.requiredDefinitionsIds=[],this.filterDefinitions={},this.filteredEnumDefinitions={},this.allowChangeDefinitions={},this.conditionalDefaultDefinitions={},this.panelTree={},this.prevControls={},this.controls={},this.actions={},this.customControls=[],this.summaryPanelControls={},this.controllerHandlerCalled=!1,this.commandStack=new ur,this.custPropSumPanelValues={},this.controlFactory=new uc(this),this.sharedCtrlInfo=[],this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this.conditionOps=Yc(),this.expressionFunctionInfo={},this.expressionRecentlyUsed=[],this.expressionFieldsRecentlyUsed=[],this.selectionListeners={}}return t(r,[{key:"getStore",value:function(){return this.propertiesStore.getStore()}},{key:"subscribe",value:function(e){this.propertiesStore.subscribe(e)}},{key:"getHandlers",value:function(){return this.handlers}},{key:"setHandlers",value:function(e){this.handlers=Object.assign(this.handlers,e),this.handlers.controllerHandler&&!this.controllerHandlerCalled&&(this.handlers.controllerHandler(this),this.controllerHandlerCalled=!0)}},{key:"setCommandStack",value:function(e){this.commandStack=e}},{key:"getCommandStack",value:function(){return this.commandStack}},{key:"setEditorSize",value:function(e){this.editorSize=e}},{key:"getEditorSize",value:function(){return this.editorSize}},{key:"setLight",value:function(e){this.light=e}},{key:"getLight",value:function(){return this.light}},{key:"setPropertiesConfig",value:function(e){this.propertiesConfig=e}},{key:"getPropertiesConfig",value:function(){return this.propertiesConfig}},{key:"getLocale",value:function(){return te(this.propertiesConfig,"locale",ot)}},{key:"isTearsheetContainer",value:function(){return"Tearsheet"===this.propertiesConfig.containerType}},{key:"setParamDef",value:function(e){var t=te(this.getPropertiesConfig(),"containerType"),r=te(this.getPropertiesConfig(),"convertTypes"),n=Ri.makeForm(e,t,r);this.setForm(n)}},{key:"setForm",value:function(e,t,r){if(this.form=e,this.reactIntl=t,this.form){this.prevControls=this.controls,this.controls={},this.setControlStates({}),this.setErrorMessages({}),this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this._parseUiConditions();var n,o=[];!function(e,t,r){if(r.uiItems){var n,o=sa(r.uiItems);try{for(o.s();!(n=o.n()).done;)ua(e,t,n.value)}catch(e){o.e(e)}finally{o.f()}}}(o,this.actions,this.form),this.saveControls(o),this._parseSummaryControls(o),this.parsePanelTree(),os(this.controls,this.validationDefinitions,this.requiredDefinitionsIds,t);var i={};if(this.form.data&&(n=this.form.data.datasetMetadata,i=this.form.data.uiCurrentParameters?ji({},this.form.data.currentParameters,this.form.data.uiCurrentParameters):this.form.data.currentParameters),this.setDatasetMetadata(n),this.setPropertyValues(i,!0),this.differentProperties=[],r&&(this.differentProperties=Oi(Object.keys(this.controls),Object.keys(this.prevControls))),this._addToControlValues(r),this._addToControlValues(r,!0),this.setInitialAddRemoveRows(),this.setInitialTableButtonState(),this.uiItems=this.form.uiItems,!Z(this.uiItems)&&!Z(this.uiItems[0].tabs)){var a=this.uiItems[0].tabs.filter((function(e){return e.content.itemType!==I.TEARSHEET}));a.length&&this.propertiesStore.setActiveTab(a[0].group)}this.setTitle(this.form.label)}}},{key:"getForm",value:function(){return this.form}},{key:"getResource",value:function(e,t){return this.form&&this.form.resources&&this.form.resources[e]?this.form.resources[e]:t}},{key:"setAppData",value:function(e){this.appData=e}},{key:"getAppData",value:function(){return this.appData}},{key:"_parseUiConditions",value:function(){if(this.visibleDefinitions={controls:{},refs:{}},this.enabledDefinitions={controls:{},refs:{}},this.validationDefinitions={controls:{},refs:{}},this.filterDefinitions={controls:{},refs:{}},this.filteredEnumDefinitions={controls:{},refs:{}},this.allowChangeDefinitions={controls:{},refs:{}},this.conditionalDefaultDefinitions={controls:{},refs:{}},this.form.conditions){var e,t=Jc(this.form.conditions);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.visible?da(this.visibleDefinitions,r,We.VISIBLE):r.enabled?da(this.enabledDefinitions,r,We.ENABLED):r.validation?da(this.validationDefinitions,r,We.VALIDATION):r.filter?da(this.filterDefinitions,r,We.FILTER):r.enum_filter?da(this.filteredEnumDefinitions,r,We.FILTEREDENUM):r.allow_change?da(this.allowChangeDefinitions,r,We.ALLOWCHANGE):r.default_value?da(this.conditionalDefaultDefinitions,r,We.CONDITIONALDEFAULT):g.info("Invalid definition: "+JSON.stringify(r))}}catch(e){t.e(e)}finally{t.f()}}}},{key:"getDefinitions",value:function(e,t,r){var n;switch(t){case We.VISIBLE:n=this.visibleDefinitions[r];break;case We.ENABLED:n=this.enabledDefinitions[r];break;case We.FILTEREDENUM:n=this.filteredEnumDefinitions[r];break;case We.ALLOWCHANGE:n=this.allowChangeDefinitions[r];break;case We.CONDITIONALDEFAULT:n=this.conditionalDefaultDefinitions[r];break;case We.VALIDATION:n=this.validationDefinitions[r]}var o=[];for(var i in n)if(ee(n,i)){var a=ns(i);a.name===e.name&&a.col===e.col&&(o=o.concat(n[i]))}return o}},{key:"getRequiredDefinitionIds",value:function(){return this.requiredDefinitionsIds}},{key:"convertPropertyId",value:function(e){return"string"==typeof e?{name:e}:this.convertNestedPropertyId(e)}},{key:"convertNestedPropertyId",value:function(e){var t;return e&&void 0!==e.col&&void 0===e.row?(void 0!==e.propertyId&&(t=this.convertNestedPropertyId(e.propertyId)),{name:e.name,row:e.col,propertyId:t}):e&&void 0!==e.col&&void 0!==e.row&&void 0!==e.propertyId?{name:e.name,row:e.row,col:e.col,propertyId:this.convertNestedPropertyId(e.propertyId)}:e}},{key:"updateLastChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.updateLastChildPropertyId(e.propertyId,t):(void 0!==t.row&&(e.row=t.row),void 0!==t.col&&(e.col=t.col),e)}},{key:"setChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.setChildPropertyId(e.propertyId,t):(e.propertyId=t,e)}},{key:"parsePanelTree",value:function(){this.panelTree={},this.panelTree[Ke]={controls:[],panels:[],actions:[]},function(e,t,r){if(t.uiItems){var n,o=va(t.uiItems);try{for(o.s();!(n=o.n()).done;)ga(e,n.value,r)}catch(e){o.e(e)}finally{o.f()}}}(this.panelTree,this.form,Ke)}},{key:"_addToControlValues",value:function(e,t){for(var r in this.controls)if(ee(this.controls,r)){var n=this.controls[r],o={name:n.name},i=this.getPropertyValue(o);t?null!=i&&void 0!==i.parameterRef&&(i=this.getPropertyValue({name:i.parameterRef}),this.updatePropertyValue(o,i,!0,Je.INITIAL_LOAD)):"structuretable"===n.controlType&&!1===n.addRemoveRows&&!0===n.includeAllFields?(i=this._populateFieldData(i,n),this.updatePropertyValue(o,i,!0,Je.INITIAL_LOAD)):void 0!==n.valueDef&&void 0!==n.valueDef.defaultValue&&void 0===i?(i=n.valueDef.defaultValue,F(n)&&(i=V(n.valueDef.isList,n.subControls,i)),e&&!this.differentProperties.includes(n.name)?this.updatePropertyValue(o,i,!0):this.updatePropertyValue(o,i,!0,Je.INITIAL_LOAD)):"structureeditor"===n.controlType&&(!i||Array.isArray(i)&&0===i.length)&&Array.isArray(n.defaultRow)&&this.updatePropertyValue(o,n.defaultRow,!0,Je.INITIAL_LOAD)}}},{key:"_populateFieldData",value:function(e,t){for(var r=this.getDatasetMetadataFields(),n=this._isMultiSchemaControl(t),o=[].concat(e),i=0;i<r.length;i++){var a=[];if(-1===this._indexOfField(r[i].name,e)){for(var s=0;s<t.subControls.length;s++)if(s===t.keyIndex){var l=n?{link_ref:r[i].schema,field_name:r[i].origName}:r[i].name;a.push(l)}else a.push(this._getDefaultSubControlValue(s,r[i].name,r,t));o.push(a)}}return o}},{key:"_isMultiSchemaControl",value:function(e){if(e.role===v.COLUMN&&e.valueDef.propType===m.STRUCTURE)return!0;if("array"===f(e.subControls))for(var t in e.subControls)if(ee(e.subControls,t)){var r=e.subControls[t];if(r.role===v.COLUMN&&r.valueDef.propType===m.STRUCTURE)return!0}return!1}},{key:"_canHaveMultipleSchemas",value:function(){for(var e in this.controls)if(ee(this.controls,e)){var t=this.controls[e];if(this._isMultiSchemaControl(t))return!0}return!1}},{key:"_getDefaultSubControlValue",value:function(e,t,r,n){var o,i=n.subControls[e];return"undefined"!==f(i.dmDefault)?o=x(i,t,r):"undefined"!==f(i.valueDef.defaultValue)?(o=i.valueDef.defaultValue).parameterRef&&(o=this.getPropertyValue({name:o.parameterRef})):o=i.values?i.values[0]:"string"===i.valueDef.propType?"":"boolean"!==i.valueDef.propType&&("enum"===i.valueDef.propType?i.values[0]:"integer"===i.valueDef.propType||"long"===i.valueDef.propType||"double"===i.valueDef.propType?0:"structure"===i.valueDef.propType?{}:null),o}},{key:"_indexOfField",value:function(e,t){for(var r=0;r<t.length;r++)if(t[r][0]===e)return r;return-1}},{key:"getUiItems",value:function(){return this.uiItems}},{key:"getReactIntl",value:function(){return this.reactIntl}},{key:"addSharedControls",value:function(e,t){this.sharedCtrlInfo.push({id:e,controlNames:t})}},{key:"getSharedCtrlInfo",value:function(){return this.sharedCtrlInfo}},{key:"isSummaryPanelShowing",value:function(){return this.isSummaryPanel}},{key:"setIsSummaryPanelShowing",value:function(e){this.isSummaryPanel=e}},{key:"increaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter++}},{key:"decreaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter--}},{key:"isSubPanelsShowing",value:function(){return this.visibleSubPanelCounter>0}},{key:"getTitle",value:function(){return this.propertiesStore.getTitle()}},{key:"setTitle",value:function(e){return this.propertiesStore.setTitle(e)}},{key:"setConditionOps",value:function(e){this.conditionOps=Yc(e)}},{key:"getConditionOp",value:function(e){return this.conditionOps?this.conditionOps[e]:null}},{key:"getConditionOps",value:function(){return this.conditionOps}},{key:"getDatasetMetadata",value:function(){return this.propertiesStore.getDatasetMetadata().schemas}},{key:"getDatasetMetadataFields",value:function(){return this.propertiesStore.getDatasetMetadata().fields}},{key:"getDatasetMetadataSchemas",value:function(){return this.propertiesStore.getDatasetMetadata().schemaNames}},{key:"getFilteredDatasetMetadata",value:function(e){var t=this.getDatasetMetadataFields();return e&&(t=this._filterSharedDataset(e,t),t=function(e,t,r,n){var o=n;if(t&&Array.isArray(t[e.name]))try{for(var i=t[e.name],a=0;a<i.length;a++)o=za(e,t[e.name][a].definition,r,o)}catch(t){g.warn("Error thrown in filter for propertyId ("+e.name+"): "+t)}return o}(e,this.filterDefinitions.controls,this,t)),t}},{key:"_filterSharedDataset",value:function(e,t){if(!this.sharedCtrlInfo||!e)return t;var r,n=e.name,o=[],i=Jc(this.sharedCtrlInfo);try{for(i.s();!(r=i.n()).done;){var a,s=r.value,l=Jc(s.controlNames);try{for(l.s();!(a=l.n()).done;){if(n===a.value.controlName){o=s.controlNames;break}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}var p=o.map((function(e){return e.controlName}));return this.filterFieldsFromSharedProps(t,p,n)}},{key:"filterFieldsFromSharedProps",value:function(e,t,r){try{var n,o=[],i=Jc(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a!==r){var s=this.getControl({name:a}),l=this.getPropertyValue({name:a});if(Array.isArray(l)){var p,c=Jc(l);try{for(c.s();!(p=c.n()).done;){var u=p.value;if(Array.isArray(u)){var d=S(s);d>=0&&d<u.length&&o.push(y(u[d],s))}else o.push(y(u,s))}}catch(e){c.e(e)}finally{c.f()}}else o.push(y(l,s))}}}catch(e){i.e(e)}finally{i.f()}var h=Array.from(new Set(o));return e.filter((function(e){return-1===h.indexOf(e.name)}))}catch(e){g.warn("Error filtering shared controls "+e)}return e}},{key:"setDatasetMetadata",value:function(e){var t=[],r=[];if(e){var n=G(e);Array.isArray(n)||(n=[n]);for(var o=0;o<n.length;o++)n[o].name||(n[o].name=o.toString()),n[o].idx=o;var i,a=Jc(n);try{var s=function(){var e=i.value,t=n.filter((function(t){return t.name===e.name}));if(t&&t.length>1)for(var r=0;r<t.length;r++)t[r].name=t[r].name+"_"+t[r].idx};for(a.s();!(i=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}var l,p=Jc(n);try{for(p.s();!(l=p.n()).done;){var c=l.value;if(t.push(c.name),c.fields){var u,d=Jc(c.fields);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.schema=c.name,h.origName=h.name,r.push(h)}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){p.e(e)}finally{p.f()}}if(void 0===this.multipleSchemas&&(this.multipleSchemas=this._canHaveMultipleSchemas()),this.multipleSchemas){var f,m=Jc(r);try{for(m.s();!(f=m.n()).done;){var v=f.value;v.name=v.schema+"."+v.origName}}catch(e){m.e(e)}finally{m.f()}}this.propertiesStore.setDatasetMetadata({schemas:e,fields:r,schemaNames:t})}},{key:"validateInput",value:function(e){Ja(e,this,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"validatePropertiesValues",value:function(){Ka(this,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"getSelectedRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getSelectedRows(t)}},{key:"updateSelectedRows",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateSelectedRows(r,t),this._notifySelectionListener(r,t)}},{key:"clearSelectedRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearSelectedRows(t)}},{key:"setDisableRowMoveButtons",value:function(e){Array.isArray(e)&&this.propertiesStore.setDisableRowMoveButtons(e)}},{key:"getDisableRowMoveButtons",value:function(){return this.propertiesStore.getDisableRowMoveButtons()}},{key:"isDisableRowMoveButtons",value:function(e){var t=this.getDisableRowMoveButtons();return!!Array.isArray(t)&&t.some((function(t){return O(t,e)}))}},{key:"addRowSelectionListener",value:function(e,t){var r=this.convertPropertyId(e),n=r.name;if(this.selectionListeners[n]||(this.selectionListeners[n]={}),Number.isInteger(r.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[n].listener=t}},{key:"removeRowSelectionListener",value:function(e){var t=this.convertPropertyId(e),r=t.name;if(Number.isInteger(t.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[r]&&delete this.selectionListeners[r]}},{key:"_notifySelectionListener",value:function(e,t){var r=this.convertPropertyId(e).name;this.selectionListeners[r]&&this.selectionListeners[r].listener(t)}},{key:"setExpressionInfo",value:function(e){this.expressionFunctionInfo=fa(e)}},{key:"getExpressionInfo",value:function(){return this.expressionFunctionInfo}},{key:"getExpressionRecentlyUsed",value:function(){return this.expressionRecentlyUsed}},{key:"updateExpressionRecentlyUsed",value:function(e){var t=this.expressionRecentlyUsed.indexOf(e);-1===t?this.expressionRecentlyUsed.splice(0,0,e):(this.expressionRecentlyUsed.splice(t,1),this.expressionRecentlyUsed.unshift(e))}},{key:"clearExpressionRecentlyUsed",value:function(){this.expressionRecentlyUsed=[]}},{key:"getExpressionFieldsRecentlyUsed",value:function(){return this.expressionFieldsRecentlyUsed}},{key:"updateExpressionFieldsRecentlyUsed",value:function(e){var t=this.expressionFieldsRecentlyUsed.indexOf(e);-1===t?this.expressionFieldsRecentlyUsed.splice(0,0,e):(this.expressionFieldsRecentlyUsed.splice(t,1),this.expressionFieldsRecentlyUsed.unshift(e))}},{key:"clearExpressionFieldsRecentlyUsed",value:function(){this.expressionFieldsRecentlyUsed=[]}},{key:"getFilteredEnumItems",value:function(e,t){var r=this.propertiesStore.getFilteredEnumItems(e);if(Array.isArray(r)){for(var n={values:[],valueLabels:[]},o=function(e){n.values.push(r[e]);var o=r[e],i=t.values.findIndex((function(t){return t===r[e]}));i>-1&&(o=t.valueLabels[i]),n.valueLabels.push(o)},i=0;i<r.length;i++)o(i);return n}return t}},{key:"updatePropertyValue",value:function(e,t,r,n){var o=this.convertPropertyId(e),i=this.getPropertyValue(o);if(void 0===t?this.removePropertyValue(o):this.propertiesStore.updatePropertyValue(o,t),function(e,t){var r=!0;if(!t.getControl(e))return g.warn("Control not found for "+e.name),r;var n=t.getDefinitions(e,We.ALLOWCHANGE,$e.CONTROLS);if(n.length>0)try{var o,i=$a(n);try{for(i.s();!(o=i.n()).done;)if(!(r=ja(o.value.definition,e,t)))return r}catch(e){i.e(e)}finally{i.f()}}catch(e){g.warn("Error thrown in validation: "+e)}return r}(e,this)){if(Qa(e,this),r||Ja(e,this,!0),this.handlers.propertyListener){var a=this._convertObjectStructure(o,t),s={action:nt.UPDATE_PROPERTY,property:o,value:a,previousValue:i};void 0!==n&&(s.type=n),this.handlers.propertyListener(s)}}else this.propertiesStore.updatePropertyValue(o,i)}},{key:"getPropertyValue",value:function(e,t,r){var n=this.convertPropertyId(e),o=this.propertiesStore.getPropertyValue(n),i=r,a=t&&(t.filterHiddenDisabled||t.filterHidden),s=t&&(t.filterHiddenDisabled||t.filterDisabled),l=t&&t.filterHiddenControls;if(a||s||l){var p=this.getControlState(n),c=this.getControlType(n);if(p===Ve.DISABLED&&s||p===Ve.HIDDEN&&a||c===h.HIDDEN&&l)return i;if(i=D(o),Array.isArray(i))for(var u=0;u<i.length;u++){var d=i[u];if(Array.isArray(d))for(var f=0;f<d.length;f++){var m={name:n.name,row:u,col:f},v=this.getControlState(m),y=this.getControlType(m);(v===Ve.DISABLED&&s||v===Ve.HIDDEN&&a||y===h.HIDDEN&&l)&&(i[u][f]=null)}}return t&&!0===t.applyProperties?this._convertObjectStructure(n,i):i}return t&&!0===t.applyProperties?this._convertObjectStructure(n,o):o}},{key:"removePropertyValue",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.removePropertyValue(t)}},{key:"_convertObjectStructure",value:function(e,t){var r=this.getControl(e);if(F(r)){var n=r.structureType&&"object"===r.structureType;return U(r.valueDef.isList,r.subControls,t,n)}return t}},{key:"getPropertyValues",value:function(e){var t=this.propertiesStore.getPropertyValues(),r=t;if(e&&(e.filterHiddenDisabled||e.filterHidden||e.filterDisabled||e.filterHiddenControls||e.valueFilters)){var n={};for(var o in t)if(ee(t,o)){var i=this.getPropertyValue({name:o},e),a=Array.isArray(e.valueFilters)?e.valueFilters:[];void 0===i||a.includes(i)||(n[o]=i)}r=n}if(e&&!0===e.applyProperties)for(var s in r)if(ee(r,s)){var l=this.convertPropertyId(s),p=this.propertiesStore.getPropertyValue(l);r[s]=this._convertObjectStructure(l,p)}return r}},{key:"setPropertyValues",value:function(e,t){var r=this,n=G(e);if(e){var o=this.getControls();Object.keys(n).forEach((function(t){if(F(o[t])){var r=e[t],i=o[t],a=V(i.valueDef.isList,i.subControls,r);n[t]=a}})),te(this.getPropertiesConfig(),"convertValueDataTypes")&&(n=H(n,o))}if(this.propertiesStore.setPropertyValues(n),t){var i={};Z(n)||(Object.keys(n).forEach((function(e){!function(e,t,r){if(!t.getControl(e))return g.warn("Control not found for "+e.name),null;var n=t.getDefinitions(e,We.CONDITIONALDEFAULT,$e.CONTROLS);if(n.length>0)try{var o,i=$a(n);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a.definition.default_value.parameter_ref;s in r||ja(a.definition,e,t)&&(r[s]=a.definition.default_value.value)}}catch(e){i.e(e)}finally{i.f()}}catch(e){g.warn("Error thrown in validation: "+e)}}({name:e},r,i)})),Z(i)||Object.keys(i).forEach((function(e){if(!(e in n)){var t=r.getControl({name:e});F(t)&&(i[e]=V(t.valueDef.isList,t.subControls,i[e])),r.propertiesStore.updatePropertyValue({name:e},i[e])}})))}Ya(this),this.handlers.propertyListener&&this.handlers.propertyListener({action:nt.SET_PROPERTIES})}},{key:"setControlStates",value:function(e){this.propertiesStore.setControlStates(e)}},{key:"updateControlState",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateControlState(r,t)}},{key:"getControlState",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.value:""}},{key:"getControlStates",value:function(){return this.propertiesStore.getControlStates()}},{key:"getControlValueStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.values:{}}},{key:"getControlEnumFilterStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.enumFilter:{}}},{key:"setPanelStates",value:function(e){this.propertiesStore.setPanelStates(e)}},{key:"updatePanelState",value:function(e,t){this.propertiesStore.updatePanelState(e,t)}},{key:"getPanelState",value:function(e){return this.propertiesStore.getPanelState(e)}},{key:"getPanelStates",value:function(){return this.propertiesStore.getPanelStates()}},{key:"clearActiveTearsheet",value:function(){this.propertiesStore.setActiveTearsheetId(null)}},{key:"setActiveTearsheet",value:function(e){this.propertiesStore.setActiveTearsheetId(e)}},{key:"getActiveTearsheet",value:function(){return this.propertiesStore.getActiveTearsheetId()||null}},{key:"setActionStates",value:function(e){this.propertiesStore.setActionStates(e)}},{key:"updateActionState",value:function(e,t){this.propertiesStore.updateActionState(e,t)}},{key:"getActionState",value:function(e){return this.propertiesStore.getActionState(e)}},{key:"getActionStates",value:function(){return this.propertiesStore.getActionStates()}},{key:"getAction",value:function(e){return this.actions[e.name]}},{key:"setErrorMessages",value:function(e){this.propertiesStore.setErrorMessages(e)}},{key:"getErrorMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.convertPropertyId(e);if(t){var i=this.getControlState(o),a=this.getControlType(o);if(i===Ve.DISABLED||i===Ve.HIDDEN||a===h.HIDDEN)return null}var s=this.propertiesStore.getErrorMessage(o,this.reactIntl);return r&&s&&s.type===Fe.SUCCESS||n&&s&&!j(s.displayError)&&!s.displayError?null:s}},{key:"getErrorMessages",value:function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.propertiesStore.getErrorMessages();return n&&(o=this._filterDisplayErrors(o)),(e||t)&&(o=this._filterMessages(o,e,t,r)),o}},{key:"getAllErrorMessages",value:function(){return this.getErrorMessages(!1,!1,!1,!1)}},{key:"getRequiredErrorMessages",value:function(){var e=this.propertiesStore.getErrorMessages(),t=this._filterNonRequiredErrors(e);return this._filterHiddenDisabledErrors(t)}},{key:"_filterMessages",value:function(e,t,r,n){var o={},i=[];for(var a in e)if(ee(e,a)){var s=this.getErrorMessage({name:a},r,n);s&&s.text&&(t?i.push({id_ref:a,validation_id:s.validation_id,type:s.type,text:s.text}):o[a]=s)}return t?i:o}},{key:"_filterDisplayErrors",value:function(e){return this._filterErrors(e,(function(e){return j(e.displayError)||e.displayError}))}},{key:"_filterNonRequiredErrors",value:function(e){return this._filterErrors(e,(function(e){return!0===e.required}))}},{key:"_filterHiddenDisabledErrors",value:function(e){var t=this;return this._filterErrors(e,(function(e,r){var n=t.getControlState(r),o=t.getControlType(r);return n!==Ve.HIDDEN&&n!==Ve.DISABLED&&o!==h.HIDDEN}))}},{key:"_filterErrors",value:function(e,t){var r={};return Object.keys(e).forEach((function(n){var o=e[n];if(o.text&&t(o,o.propertyId))r[n]=o;else for(var i in o)if(ee(o,i)){var a=o[i];if(a&&a.text&&t(a,a.propertyId))void 0===r[n]&&(r[n]={}),r[n][i]=a;else for(var s in a)if(ee(a,s)){var l=a[s];l&&l.text&&t(l,l.propertyId)&&(void 0===r[n]&&(r[n]={}),void 0===r[n][i]&&(r[n][i]={}),r[n][i][s]=l)}}})),r}},{key:"updateErrorMessage",value:function(e,t){var r=this.convertPropertyId(e);t&&"info"!==t.type?this.propertiesStore.updateErrorMessage(r,t):this.propertiesStore.clearErrorMessage(r)}},{key:"removeErrorMessageRow",value:function(e){var t=this.convertPropertyId(e),r=this.propertiesStore.getErrorMessages(),n=r[t.name];if(void 0!==n){for(var o=0,i=Object.keys(n);o<i.length;o++){var a=i[o],s=parseInt(a,10);s===t.row?delete r[t.name][s]:s>t.row&&(r=this._moveMessageRows(r,t.name,s,s-1))}this.setErrorMessages(r)}}},{key:"moveErrorMessageRows",value:function(e,t,r){var n=this.propertiesStore.getErrorMessages(),o=n[e];if(void 0!==o){var i=o[t],a=o[r];if(void 0!==i&&void 0!==a){(n=this._moveMessageRows(n,e,t,r))[e][t]={};for(var s=0,l=Object.keys(a);s<l.length;s++){var p=l[s];n[e][t][p]=a[p]}}else void 0!==i?n=this._moveMessageRows(n,e,t,r):void 0!==a&&(n=this._moveMessageRows(n,e,r,t));this.setErrorMessages(n)}}},{key:"_moveMessageRows",value:function(e,t,r,n){return e[t][n]=e[t][r],delete e[t][r],e}},{key:"saveControls",value:function(e){var t=this;e.forEach((function(e){void 0===e.columnIndex?(!ee(t.controls,e.name)||ee(t.controls,e.name)&&e.controlType!==h.CUSTOM)&&(t.controls[e.name]=e):t.controls[e.parameterName][e.columnIndex]=e}))}},{key:"getControl",value:function(e){var t=this.controls[e.name];if(void 0!==e.col&&t){var r=this.controls[e.name][e.col.toString()];if(r)return r}return t}},{key:"getControlPropType",value:function(e){var t=this.getControl(e);return void 0!==t.valueDef?t.valueDef.propType:null}},{key:"updateControlEnumValues",value:function(e,t){var r=this.getControl(e);Array.isArray(t)&&r?(r.values=t.map((function(e){return e.value})),r.valueLabels=t.map((function(e){return e.label?e.label:e.value}))):g.warn("properties-controller",new Error("updateControlEnumValues - control not found or valuesObj not valid"))}},{key:"getControls",value:function(){return this.controls}},{key:"setSaveButtonDisable",value:function(e){this.propertiesStore.setSaveButtonDisable(e)}},{key:"getSaveButtonDisable",value:function(){return this.propertiesStore.getSaveButtonDisable()}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.propertiesStore.setWideFlyoutPrimaryButtonDisabled(e,t)}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){return this.propertiesStore.getWideFlyoutPrimaryButtonDisabled(e)}},{key:"isRequired",value:function(e){var t=this.getControl(e);if(t){var r=t.required;return r||!1}return!1}},{key:"isSummary",value:function(e){var t=this.getControl(e);if(t){var r=t.summary;return r||!1}return!1}},{key:"getControlType",value:function(e){if(void 0===e)return null;var t=this.getControl(e);return t?t.controlType:null}},{key:"getColumnVisibility",value:function(e,t){return this.controls[e.name][t].visible}},{key:"toggleColumnVisibility",value:function(e,t,r){this.controls[e.name][t].visible=r}},{key:"_parseSummaryControls",value:function(e){var t={};e.forEach((function(e){e.summaryPanelId&&(void 0===t[e.summaryPanelId]&&(t[e.summaryPanelId]=[]),void 0===e.columnIndex&&t[e.summaryPanelId].push(e.name))})),this.setSummaryPanelControls(t)}},{key:"setSummaryPanelControls",value:function(e){this.summaryPanelControls=e}},{key:"getSummaryPanelControls",value:function(e){return this.summaryPanelControls[e]}},{key:"updateCustPropSumPanelValue",value:function(e,t){void 0!==e.name&&(this.custPropSumPanelValues[e.name]=t)}},{key:"getCustPropSumPanelValue",value:function(e){var t=this.getControlState(e);return t===Ve.DISABLED||t===Ve.HIDDEN?null:this.custPropSumPanelValues[e.name]}},{key:"setControlInSummary",value:function(e,t,r){var n=this.getControl(e);n&&(n.summary=!0,n.summaryLabel=t)}},{key:"createControl",value:function(e,t,r){var n=te(this.getPropertiesConfig(),"containerType"),o=this.controlFactory.createFormControl(t,r,this.getLight(),n),i=[];return ca(i,o,this.getControl(e).parentCategoryId),this.saveControls(i),this.controlFactory.createControlItem(o,e)}},{key:"getControlFactory",value:function(){return this.controlFactory}},{key:"setCustomControls",value:function(e){this.customControls=e}},{key:"getCustomControl",value:function(e,t,r){if(t.customControlId){var n,o=Jc(this.customControls);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.id()===t.customControlId)try{return new i(e,this,t.data,r).renderControl()}catch(e){return g.warn("Error thrown creating custom control: "+e),""}}}catch(e){o.e(e)}finally{o.f()}}return"Custom control not found: "+t.customControlId}},{key:"getMaxLengthForMultiLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForMultiLineControls?this.getPropertiesConfig().maxLengthForMultiLineControls:1024}},{key:"getMaxLengthForSingleLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForSingleLineControls?this.getPropertiesConfig().maxLengthForSingleLineControls:128}},{key:"setInitialAddRemoveRows",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t];if(r.valueDef&&r.valueDef.propType===m.STRUCTURE&&!j(r.addRemoveRows)){var n={name:r.name};e.setAddRemoveRows(n,r.addRemoveRows)}}))}},{key:"setAddRemoveRows",value:function(e,t){this.propertiesStore.setAddRemoveRows(e,t)}},{key:"getAddRemoveRows",value:function(e){return this.propertiesStore.getAddRemoveRows(e)}},{key:"setHideEditButton",value:function(e,t){this.propertiesStore.setHideEditButton(e,t)}},{key:"getHideEditButton",value:function(e){return this.propertiesStore.getHideEditButton(e)}},{key:"getStaticRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getStaticRows(t)}},{key:"updateStaticRows",value:function(e,t){var r=this.convertPropertyId(e),n=this.getPropertyValue(e),o=t.sort();this.validateSelectionValues(o,n)&&this.propertiesStore.updateStaticRows(r,o)}},{key:"clearStaticRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearStaticRows(t)}},{key:"setInitialTableButtonState",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t],n={name:r.name};j(r.buttons)||r.buttons.forEach((function(t){e.setTableButtonEnabled(n,t.id,t.enabled||!1)})),r.subControls&&e.setInitialTableButtonSubControlState(n,r.subControls)}))}},{key:"setInitialTableButtonSubControlState",value:function(e,t){var r=this;t.forEach((function(t){var n=r.getPropertyValue(e);j(t.buttons)||n.forEach((function(n,o){var i={name:e.name,row:o,col:t.columnIndex};t.buttons.forEach((function(e){r.setTableButtonEnabled(i,e.id,e.enabled||!1)}))}))}))}},{key:"setTableButtonEnabled",value:function(e,t,r){this.propertiesStore.setTableButtonEnabled(e,t,r)}},{key:"getTableButtons",value:function(e){return this.propertiesStore.getTableButtons(e)}},{key:"getTableButtonEnabled",value:function(e,t){return this.propertiesStore.getTableButtonEnabled(e,t)}},{key:"validateSelectionValues",value:function(e,t){var r=!1;e&&t.length>0?r=!(!e.slice(1).map((function(t,r){return t-e[r]})).every((function(e){return 1===e}))||!(e.includes(0)&&!e.includes(t.length-1)||!e.includes(0)&&e.includes(t.length-1))):r=!1;return r}}]),r}(),eu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-canvas/parameter-defs/parameter-defs-v3-schema.json",title:"Property Definitions Schema",description:"Watson Data Platform Property Definition Schema for the Common Properties editor",type:"object",properties:{titleDefinition:{type:"object",properties:{title:{type:"string"},editable:{description:"True if the title can be edited. False if the title should be readonly.",default:!0,type:"boolean"}}},current_parameters:{description:"Current parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},current_ui_parameters:{description:"Current UI only parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},parameters:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/parameters"},complex_types:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/complex_types"},uihints:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#"},conditions:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#/properties/conditions"},dataset_metadata:{oneOf:[{description:"A single datarecord object. Deprecated.",$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"},{description:"An array of datarecord objects",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"}}]},resources:{description:"Map of string resources.",type:"object",properties:{},additionalProperties:!0}}},tu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#",description:"WDP UI Hints schema",title:"WDP UI Hints schema",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json"]},label:{description:"External name of operator",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Description of operator",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to operation icon",type:"string"},group_info:{type:"array",items:{$ref:"#/definitions/group_definition"}},editor_size:{description:"Editor size for node edits",enum:["small","medium","large"]},pixel_width:{description:"Gives more control of editor panel width. The panel is shown at min size if editor_size is small and max size if editor_size is medium. If min and max are the same no sizing button is displayed.",type:"object",properties:{min:{description:"Minimum size in pixels for the right side editor flyout",type:"number"},max:{description:"Maximum size in pixels for the right side editor flyout",type:"number"}}},parameter_info:{items:{$ref:"#/definitions/parameter_definition"},type:"array"},complex_type_info:{items:{$ref:"#/definitions/complex_type_definition"},type:"array"},ui_parameters:{description:"List of UI only parameters",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/definitions/parameter_definition"}},action_info:{items:{$ref:"#/definitions/action_definition"},type:"array"},help:{description:"Help information",type:"object",properties:{data:{description:"Data passed in the helpClickHandler.",type:"object",additionalProperties:!0}},additionalProperties:!0}},required:["id"],definitions:{group_definition:{description:"Grouping for parameters and groups",type:"object",properties:{id:{description:"Identifier for this group",type:"string"},type:{description:"The group type to be displayed",type:"string",enum:["controls","tabs","subTabs","panels","columnSelection","columnSelectionRecursive","panelSelector","customPanel","summaryPanel","actionPanel","textPanel","twistyPanel","tearsheetPanel","columnPanel"]},depends_on_ref:{description:"Parameter name this group depends upon. Valid for panelSelector groups only.",type:"string"},insert_panels:{description:"Indicates whether panels, contained with a panelSelector, should be inserted between the radio buttons of a radio button set indicated by the depends_on_ref parameter.",type:"boolean"},nested_panel:{description:"Indicate whether panel should be nested. Nested panels are indented by 16px from the left and display left border. Default is false.",type:"boolean"},open:{description:"Used to determine if a panel is open or closed when UI is displayed. Currenty only supported with twistyPanel. Default is false.",type:"boolean"},label:{description:"Group label",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Group description. Used in a textPanel and tearsheetPanel",type:"object",$ref:"#/definitions/resource_definition"},parameter_refs:{description:"List of parameters to be displayed",type:"array",items:{type:"string"}},action_refs:{description:"List of actions to be displayed. Used with an actionPanel",type:"array",items:{type:"string"}},data:{description:"Data passed to custom panel when group type is 'customPanel'",additionalProperties:!0,oneOf:[{type:"object"},{type:"array"}]},group_info:{items:{$ref:"#/definitions/group_definition"},type:"array"},class_name:{description:"Optional class name to set for this group",type:"string"}},required:["id"]},parameter_definition:{description:"Operator parameters hints",type:"object",properties:{parameter_ref:{description:"Parameter reference to base operator parameter definition",type:"string"},label:{description:"External name for parameter",type:"object",$ref:"#/definitions/resource_definition"},label_visible:{description:"Whether to display the label or not. If not displayed, the label can still be used by screen readers",type:"boolean",default:!0},description:{description:"Description of parameter with optional placement context and optional link",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{placement:{description:"Optional placement context for the text",enum:["as_tooltip","on_panel"],default:"as_tooltip"},link:{description:"Optional link in the description. tooltipLinkHandler callback must be defined whenever link object is added in uiHints.",type:"object",properties:{id:{description:"link id",type:"string"},data:{description:"Data passed to the tooltipLinkHandler callback",type:"object",additionalProperties:!0}},required:["id"]}}}]},control:{description:"Which control to use. In most cases the control gets to be determined and should not be set",type:"string",enum:["readonly","readonlyTable","textfield","passwordfield","textarea","expression","numberfield","spinner","checkbox","radioset","checkboxset","toggletext","toggle","oneofselect","multiselect","someofselect","selectcolumn","selectcolumns","selectschema","structuretable","structurelisteditor","structureeditor","custom","datefield","datepicker","datepickerRange","timefield","timestampfield","code","list","hidden"]},increment:{description:"Determines the increment/decrement value for the spinner control only",type:"number",default:1},orientation:{description:"Determines how the control is displayed",type:"string",enum:["vertical","horizontal"]},width:{description:"Percentage of group width the control should use",type:"number"},char_limit:{description:"Limits the number of characters a user can enter into the control for string parameters only",type:"number"},display_chars:{description:"This has been deprecated and is subject to removal. Limits the number of characters displayed for a text field in a column in a table. The text will have an ellipsis appended at this limit.",type:"number",default:64},separator:{description:"Determines where to put a separator relative to the current control",type:"string",enum:["before","after"]},visible:{description:"Determines whether to display parameter in control. Used in complex structures",type:"boolean"},place_holder_text:{description:"Text hint for the user displayed input controls",type:"object",$ref:"#/definitions/resource_definition"},text_before:{description:"Static text to be displayed before the control",type:"object",$ref:"#/definitions/text_definition"},text_after:{description:"Static text to be displayed after the control",type:"object",$ref:"#/definitions/text_definition"},resource_key:{description:"Used as a key for enum value labels",type:"string"},edit_style:{description:"Editing style of elements in a table",type:"string",enum:["subpanel","inline","on_panel"]},value_icons:{description:"For enumerated types, this defines the set of icons for the valid values. The ordering must be consistent with the order in the parameter enum attribute.",type:"array",items:{type:"string"}},sortable:{description:"Determines if this column values can be sorted into ascending/descending order in a table. Applies to structure parameters only.",type:"boolean"},filterable:{description:"Determines if this column values can be filtered so that only rows that match the filter in column values are shown in the table. Applies to structure parameters and multiselect control only.",type:"boolean"},resizable:{description:"Determines if this column can be resized in a table. When a column is resized, width of all the columns to the right of resized column is adjusted. Applies to structure parameters only.",type:"boolean",default:!1},language:{description:"The language for the expression editor syntax highlight and autocomplete workds. Applies to expression control type.",type:"string",enum:["CLEM","javascript","text/x-hive","text/x-rsrc","text/x-python","text/x-sql"]},summary:{description:"Determines if this column values will be shown in the summaryPanel",type:"boolean"},generated_values:{description:"Generates values for a column in a 'readonly' parameter.",type:"object",properties:{operation:{description:"Currently only 'index' is supported which will auto-increment the integer column value starting at 1. The start value can be configured by setting a start_value.",type:"string",enum:["index"]},start_value:{description:"Optional start value to increment from when the 'type' is 'index'. If the start_value is not set, it will default to 1.",type:"integer"}},required:["operation"]},number_generator:{description:"Adds a number generation button beside the numeric control",type:"object",properties:{label:{description:"Number generator button label. It is visible on hover.",type:"object",$ref:"#/definitions/resource_definition"},range:{description:"Number generator range",type:"object",properties:{min:{description:"Maximum value for generated numbers",type:"number"}},required:["min","max"]}},required:["label"]},dm_default:{description:"Used within complex structures containing 'column' key_definition fields. This associates the subControl parameter with a field attribute in the current record schema.",type:"string",enum:["type","description","measure","modeling_role"]},dm_icon:{description:"This can be set to display an icon of the corresponding dm type in the `role`:`column' field of a table.",type:"string",enum:["measure","none"]},custom_control_id:{description:"Used to determine which custom control to use when control=custom.",type:"string"},data:{description:"Data passed to custom control when control=custom",type:"object",additionalProperties:!0},date_format:{description:"A format string such as YYYY-MM-DD which describes the display and entry format for a date field.",type:"string"},time_format:{description:"A format string such as HH:mm:ss which describes the display and entry format for a time field.",type:"string"},moveable_rows:{description:"Determines if rows can be moved up or down in a table or array of strings",type:"boolean"},rows:{description:"Number of rows to display in tables",type:"integer",default:4},action_ref:{description:"Determines an action should be added to the control",type:"string"},custom_value_allowed:{description:"Determines if a dropdown, outside of a table, can allow a custom value to be entered",type:"boolean"},class_name:{description:"Optional class name to set for this control",type:"string"},enable_maximize:{description:"Determines if maximize/minimze buttons are shown for code control",type:"boolean"}},required:["parameter_ref"]},complex_type_definition:{type:"object",description:"Complex parameters",properties:{complex_type_ref:{type:"string",description:"Name of complex type, can be referenced in other places."},label:{description:"External name used in subpanels",type:"object",$ref:"#/definitions/resource_definition"},key_definition:{$ref:"#/definitions/parameter_definition"},layout:{description:"Array of rows containing structure element names",type:"array",items:{description:"A single row of structure parameter names for laying out horizontally",type:"array",items:{description:"A parameter name within the current structure",type:"string"}}},parameters:{type:"array",description:"List of parameters",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}},add_remove_rows:{description:"Determines if the table can have rows added and removed",type:"boolean",default:!0},row_selection:{description:"Determines how many rows can be selected at a time. 'multiple-edit': select multiple rows and allow the editing of column values for all selected rows.",type:"string",enum:["single","multiple","multiple-edit"]},header:{description:"Determines if the table header should be displayed",type:"boolean",default:!0},include_all_fields:{description:"Use when `add_remove_rows` is false. Ensures the control contains a record for each field in the data model.",type:"boolean",default:!0},buttons:{description:"Display custom buttons in place of any buttons from the table. Will override 'add_remove_rows' and readonlyTable edit buttons.",type:"array",items:{$ref:"#/definitions/button_definition"}}},required:["complex_type_ref","parameters"]},action_definition:{description:"Actions that callback to application",type:"object",properties:{id:{description:"Identifier for this action",type:"string"},description:{description:"Description of action. Use for tooltip.",type:"object",$ref:"#/definitions/resource_definition"},control:{description:"The action type to be displayed",type:"string",enum:["button","image"]},class_name:{description:"Optional class name to set for this action",type:"string"},label:{description:"Action label",type:"object",$ref:"#/definitions/resource_definition"},button:{description:"Properties for button kind and size. Use when control=button.",type:"object",properties:{kind:{description:"button kind",type:"string",enum:["primary","secondary","tertiary","ghost","danger","danger--tertiary","danger--ghost"],default:"tertiary"},size:{description:"button size",enum:["sm","md","lg","xl"],default:"sm"}}},image:{description:"Properties for how the image will look. Use when control=image.",type:"object",properties:{url:{description:"image url to be used for action",type:"string"},placement:{description:"placement of the action image",enum:["right","left"]},size:{description:"pixel size of the image.",type:"object",properties:{height:{description:"image height in pixels",type:"number"},width:{description:"image width in pixels",type:"number"}}},tooltip_direction:{description:"Action image tooltip direction.",enum:["right","left","top","bottom"],default:"bottom"}}},data:{description:"Data returned when action called",type:"object",additionalProperties:!0}},required:["id"]},resource_definition:{description:"Localizable string resource",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},text_definition:{description:"Static text to be displayed before or after the control",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{type:{description:"Type of text message to display",enum:["info"]}}}]},button_definition:{description:"Button to be displayed after the table's search bar",type:"object",properties:{id:{description:"Button identifier used to idenify the button in the callback function",type:"string"},label:{description:"Button label to display. If an icon is specified as well, the icon will be shown to the right of the label.",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Tooltip text to display when the button is hovered",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to .svg image to display",type:"string"},carbon_icon:{description:"Host provided name of Carbon icon to display. A callback function is required for the host application to return the jsx icon object imported from @carbon/icons-react library",type:"string"},enabled:{description:"Button will be enabled if true, disabled if false",type:"boolean",default:!1},divider:{description:"Display a divider before or after this button",type:"string",enum:["before","after"],default:"after"}},anyOf:[{required:["id","label"]},{required:["id","icon","description"]},{required:["id","carbon_icon","description"]}]}}},ru={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#",title:"Watson Data Platform Validation Schema",description:"User Interface Condition schema for the Watson Data Platform",type:"object",properties:{json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json"]},conditions:{type:"array",items:{$ref:"#/definitions/conditions_definition"}}},required:["conditions"],definitions:{conditions_definition:{type:"object",oneOf:[{$ref:"#/definitions/validation_definition"},{$ref:"#/definitions/enabled_definition"},{$ref:"#/definitions/visible_definition"},{$ref:"#/definitions/filter_definition"},{$ref:"#/definitions/enum_filter_definition"},{$ref:"#/definitions/allow_change_definition"},{$ref:"#/definitions/default_value_definition"}]},validation_definition:{properties:{validation:{description:"A single validation. The fail_message is displayed upon validation failure.",type:"object",properties:{id:{description:"Unique identifier. Required when multiple fail_message sections have the same focus_parameter_ref value.",type:"string"},fail_message:{description:"Error/warning",type:"object",$ref:"#/definitions/fail_message_definition"},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["fail_message","evaluate"]}},required:["validation"]},enabled_definition:{properties:{enabled:{description:"Enablement test. Disables controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["enabled"]},visible_definition:{properties:{visible:{description:"Visibility test. Hides controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["visible"]},evaluate_definition:{oneOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]},or_definition:{description:"Container for 'or' operations",type:"object",properties:{or:{description:"The 'or' condition. Any sub-condition evaluates to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["or"]},and_definition:{description:"Container for 'and' operations",type:"object",properties:{and:{description:"The 'and' condition. All sub-conditions evaluate to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["and"]},condition_definition:{description:"A parameter condition. Evaluates to true or false.",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",properties:{op:{description:"A single operator for the properties of the condition.",anyOf:[{enum:["isEmpty","isNotEmpty","greaterThan","lessThan","equals","notEquals","contains","notContains","colNotExists","cellNotEmpty","colDoesExist","isDateTime","dmTypeEquals","dmTypeNotEquals","dmMeasurementEquals","dmMeasurementNotEquals","dmRoleEquals","dmRoleNotEquals","matches","notMatches"]},{description:"The name of the custom operator",type:"string"}]},parameter_ref:{description:"The primary parameter - must be present",type:"string"},parameter_2_ref:{description:"Optional second parameter for multi-parameter validation",type:"string"},value:{description:"Optional value against which to compare the primary parameter value",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"null"}]}},required:["op","parameter_ref"]}},required:["condition"]},fail_message_definition:{properties:{focus_parameter_ref:{description:"The parameter control to get the error/warning message.",type:"string"},message:{description:"User message",type:"object",$ref:"#/definitions/message_definition"},type:{enum:["error","warning","info"]}},required:["focus_parameter_ref","message"]},message_definition:{description:"User message",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},filter_definition:{properties:{filter:{description:"Filter test. Includes support for filtering the values to be displayed in a control",type:"object",properties:{parameter_ref:{description:"Parameter affected by this operation",type:"string"},parameter_refs:{description:"Parameters affected by this operation - exclusive with parameter_ref",type:"array",items:{type:"string"}},evaluate:{description:"Evaluates to return values included in a control",type:"object",$ref:"#/definitions/evaluate_definition"}},oneOf:[{required:["evaluate","parameter_ref"]},{required:["evaluate","parameter_refs"]}]}},required:["filter"]},enum_filter_definition:{properties:{enum_filter:{description:"Allows filtering of available enumeration options",type:"object",properties:{target:{description:"The target parameter information",type:"object",properties:{parameter_ref:{description:"The enumeration parameter affected by this operation",type:"string"},values:{description:"Array of available enumeration options when the condition evaluates to 'true'",type:"array",minItems:1,uniqueItems:!0}},required:["parameter_ref","values"]},evaluate:{description:"Evaluates to return values included in an enumeration control",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["target","evaluate"]}},required:["enum_filter"]},filter_condition_definition:{description:"Allows for filtering available fields in the data record schema(s)",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",anyOf:[{properties:{op:{$ref:"#/definitions/filter_op_definition"},value:{description:"Value to compare against data record schema field attribute",type:"string"}},required:["op"]},{properties:{op:{$ref:"#/definitions/filter_op_definition"},values:{description:"Array of values which are compared to a data record schema field attribute",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0}},required:["op","values"]}]}},required:["condition"]},filter_op_definition:{description:"A single operator for comparing data record schema field attributes and sharing source fields",enum:["dmMeasurement","dmType","dmModelingRole","dmSharedFields"]},allow_change_definition:{properties:{allow_change:{description:"Allow change test. Allows a field value to be changed if evaluates to true.",type:"object",properties:{parameter_refs:{description:"Array of parameter names who values changes are allowed by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_refs","evaluate"]}},required:["allow_change"]},default_value_definition:{properties:{default_value:{description:"Set default value of the parameter_ref if condition evaluates to true.",type:"object",properties:{parameter_ref:{description:"Parameter whose default value is to be set.",type:"string"},value:{description:"This will be the default value of parameter_ref if condition evaluates to true.",type:["number","string","boolean","object","array"]},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_ref","value","evaluate"]}},required:["default_value"]}}},nu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#",title:"Watson Data Platform Operator Schema",description:"Operator schema for the Watson Data Platform",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json"]},operator_type:{description:"operator type",enum:["model","transformer","estimator","dataReader","dataWriter"]},input_ports:{description:"List of input ports. If no ports are defined this is a source operator that accepts no data inputs. If the input_ports array is missing a single input port with id 'input_port' is assumed which accepts only a single connection.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},output_ports:{description:"List of output ports. If no ports are defined this is a terminal operator that provides no data outputs. If the output_ports array is missing a single output port named 'output_port' is assumed which accepts multiple connections.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","operator_type","parameters"],definitions:{parameter_definition:{description:"Operator parameters definition",type:"object",properties:{id:{description:"A unique name for the parameter.",type:"string"},required:{description:"Indication whether parameter is required or optional",type:"boolean",default:!1},role:{description:"Role of parameter",enum:["column","new_column","expression"]},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, or custom), an array, or map containing those types(note arrays and maps can contain complex_types)",type:"string"},enum:{description:"List of valid values. Can be used instead of specifying type.",type:"array"},default:{description:"default value based on type of parameter",anyOf:[{$ref:"#/definitions/parameter_ref_definition"},{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{type:"null"}]}]}},anyOf:[{required:["id","type"]},{required:["id","enum"]},{required:["id","type","enum"]}]},parameter_ref_definition:{description:"Structure for parameter refs",type:"object",properties:{parameter_ref:{description:"Reference to another parameter.",type:"string"}},required:["parameter_ref"]},complex_type_definition:{description:"Structure for complex parameters",type:"object",properties:{id:{description:"Identifier of complex type, can be referenced in other places.",type:"string"},type:{description:"Used to determine how parameters in the complex_type stored. Valid values are array and object.",type:"string"},key_definition:{$ref:"#/definitions/parameter_definition"},parameters:{description:"List of parameters",type:"array",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}}},required:["id","parameters"]},port_definition:{description:"Operator ports support multiple differentiated connections for either inputs or outputs.",type:"object",properties:{id:{description:"Unique identifier within the node",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}}}},app_data_def:{description:"Object containing application-specific data",type:"object",properties:{},additionalProperties:!0}}};function ou(e){var t=function(){var e=new Er,t="https://api.dataplatform.ibm.com/schemas/common-canvas/",r="https://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(eu,t+"parameter-defs/pipeline-flow-v3-schema.json"),e.addSchema(tu,r+"operators/uihints-v3-schema.json"),e.addSchema(ru,r+"operators/conditions-v3-schema.json"),e.addSchema(nu,r+"operators/operator-v3-schema.json"),e.addSchema(Te,r+"datarecord-metadata/datarecord-metadata-v3-schema.json"),e}();!function(e,t,r,n){var o=n.validate(e,t,{nestedErrors:!0});o&&o.errors&&o.errors.length>0&&console.error(o)}(e,eu,0,t)}function iu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var au=function(o){n(p,l);var i=iu(p);function p(t){var r;return e(this,p),(r=i.call(this,t)).state={focused:!1,titleValidation:null},r.editTitleClickHandler=r.editTitleClickHandler.bind(a(r)),r.helpClickHandler=r.helpClickHandler.bind(a(r)),r.id=z(),r.textInputRef=s.createRef(),r.labelText=u(t.controller.getReactIntl(),Oe.TITLE_EDITOR_LABEL),r.textInputOnFocus=r.textInputOnFocus.bind(a(r)),r.textInputOnBlur=r.textInputOnBlur.bind(a(r)),r.headingEnabled=r.props.showHeading&&(r.props.heading||r.props.icon),r.handleTitleChange=r.handleTitleChange.bind(a(r)),r.titleChangeHandler=r.props.controller.getHandlers().titleChangeHandler,r}return t(p,[{key:"_handleKeyPress",value:function(e){"Enter"===e.key&&this.textInputRef.current.blur()}},{key:"editTitleClickHandler",value:function(){this.textInputRef.current.focus()}},{key:"helpClickHandler",value:function(){this.props.helpClickHandler&&this.props.helpClickHandler(this.props.controller.getForm().componentId,this.props.help.data,this.props.controller.getAppData())}},{key:"textInputOnFocus",value:function(){this.setState({focused:!0})}},{key:"textInputOnBlur",value:function(){this.setState({focused:!1})}},{key:"handleTitleChange",value:function(e){var t=this;null!==this.state.titleValidation&&this.setState({titleValidation:null});var n=e.target.value;"function"==typeof this.titleChangeHandler&&this.titleChangeHandler(n,(function(e){e&&"object"===r(e)&&e.type&&e.message?t.setState({titleValidation:e}):t.setState({titleValidation:null})})),this.props.setTitle(n)}},{key:"render",value:function(){var e=this;if(null===this.props.title)return null;var t=u(this.props.controller.getReactIntl(),Oe.TITLE_EDITOR_LABEL),r=u(this.props.controller.getReactIntl(),Oe.TITLE_EDITOR_HELPBUTTON_LABEL),n=u(this.props.controller.getReactIntl(),Oe.PROPERTIESEDIT_CLOSEBUTTON_LABEL),o=[Fe.ERROR,Fe.WARNING],i=te(this.state.titleValidation,"type",null)===Fe.WARNING,a=te(this.state.titleValidation,"type",null)===Fe.ERROR,l=!1===this.props.labelEditable||this.state.focused?s.createElement("div",null):s.createElement(dt,{kind:"ghost",className:"properties-title-editor-btn edit","data-id":"edit",onClick:this.editTitleClickHandler,tooltipPosition:"bottom",tooltipAlignment:"end",renderIcon:qt,size:"small",iconDescription:t,hasIconOnly:!0}),p=this.props.help?s.createElement(dt,{kind:"ghost",className:"properties-title-editor-btn help","data-id":"help",onClick:this.helpClickHandler,tooltipPosition:"bottom",renderIcon:Zt,size:"small",iconDescription:r,hasIconOnly:!0}):null,c=this.props.closeHandler?s.createElement("div",{className:"properties-close-button"},s.createElement(dt,{kind:"ghost",size:"small","data-id":"close",onClick:this.props.closeHandler,tooltipPosition:"left",renderIcon:er,iconDescription:n,hasIconOnly:!0})):null,d=null;if(this.headingEnabled){var h=this.props.heading?s.createElement("div",{className:"properties-title-heading-label"},this.props.heading):null,f=this.props.icon&&"string"==typeof this.props.icon?s.createElement(mr,{className:"properties-title-heading-icon",src:this.props.icon}):null;(h||f)&&(d=s.createElement("div",{className:"properties-title-heading"},f,h,p))}return s.createElement("div",{className:De("properties-title-editor",{"properties-title-with-heading":this.headingEnabled},{"properties-title-right-flyout-tabs-view":this.props.rightFlyoutTabsView})},c,d,s.createElement("div",{className:De("properties-title-editor-input",{"properties-title-editor-with-help":this.props.help&&!this.headingEnabled&&!o.includes(te(this.state.titleValidation,"type")),"properties-title-editor-with-warning":i,"properties-title-editor-with-error":a})},s.createElement(gt,sr({id:this.id,ref:this.textInputRef,value:this.props.title,onChange:this.handleTitleChange,onKeyPress:function(t){return e._handleKeyPress(t)},readOnly:!1===this.props.labelEditable,labelText:this.labelText,hideLabel:!0,size:"sm",onFocus:this.textInputOnFocus,onBlur:this.textInputOnBlur,light:this.props.controller.getLight(),invalid:a,invalidText:te(this.state.titleValidation,"message"),warn:i,warnText:te(this.state.titleValidation,"message")},this.state.focused&&{className:"properties-title-editor-focused"})),o.includes(te(this.state.titleValidation,"type"))?null:l),this.headingEnabled||o.includes(te(this.state.titleValidation,"type"))?null:p)}}]),p}(),su=Ft((function(e,t){return{title:e.componentMetadataReducer.title}}),(function(e,t){return{setTitle:function(t){e(En(t))}}}))(au),lu='/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n:export {\n flyoutWidthSmall: 320px;\n flyoutWidthMedium: 480px;\n flyoutWidthLarge: 640px;\n flyoutWidthMax: 900px;\n}';function pu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var cu=parseInt(lu.flyoutWidthSmall,10),uu=parseInt(lu.flyoutWidthMedium,10),du=parseInt(lu.flyoutWidthLarge,10),hu=parseInt(lu.flyoutWidthMax,10),fu=function(r){n(i,r);var o=pu(i);function i(t){var r;e(this,i),(r=o.call(this,t)).propertiesController=new Zc,r.propertiesController.setPropertiesConfig(r.props.propertiesConfig),r.props.propertiesInfo.initialEditorSize&&r.propertiesController.setEditorSize(r.props.propertiesInfo.initialEditorSize),r.propertiesController.setCustomControls(t.customControls),r.propertiesController.setConditionOps(t.customConditionOps),r.propertiesController.setLight(t.light),r.propertiesController.setAppData(t.propertiesInfo.appData),r.propertiesController.setExpressionInfo(t.propertiesInfo.expressionInfo),r.propertiesController.setHandlers({controllerHandler:t.callbacks.controllerHandler,propertyListener:t.callbacks.propertyListener,actionHandler:t.callbacks.actionHandler,buttonHandler:t.callbacks.buttonHandler,buttonIconHandler:t.callbacks.buttonIconHandler,validationHandler:t.callbacks.validationHandler,titleChangeHandler:t.callbacks.titleChangeHandler,tooltipLinkHandler:t.callbacks.tooltipLinkHandler}),r.setForm(t.propertiesInfo,!1),r.previousErrorMessages={},r.propertiesController.validatePropertiesValues(!1),t.propertiesInfo.messages&&(r.propertiesController.validatePropertiesValues(!0),r.previousErrorMessages=r.propertiesController.getAllErrorMessages()),r.props.callbacks.propertyListener&&r.props.callbacks.propertyListener({action:nt.PROPERTIES_LOADED}),r.currentParameters=r.propertiesController.getPropertyValues();var n=r.getEditorSize();return r.state={showPropertiesButtons:!0,editorSize:n},r.applyPropertiesEditing=r.applyPropertiesEditing.bind(a(r)),r.showPropertiesButtons=r.showPropertiesButtons.bind(a(r)),r.updateEditorSize=r.updateEditorSize.bind(a(r)),r.cancelHandler=r.cancelHandler.bind(a(r)),r._getOverrideSize=r._getOverrideSize.bind(a(r)),r._getResizeButton=r._getResizeButton.bind(a(r)),r._isResizeButtonRequired=r._isResizeButtonRequired.bind(a(r)),r.onBlur=r.onBlur.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.props.callbacks.setPropertiesHasMounted()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(e.propertiesInfo&&(!O(Object.keys(e.propertiesInfo),Object.keys(this.props.propertiesInfo))||e.propertiesInfo.formData&&!O(e.propertiesInfo.formData,this.props.propertiesInfo.formData)||e.propertiesInfo.parameterDef&&!O(e.propertiesInfo.parameterDef,this.props.propertiesInfo.parameterDef)||e.propertiesInfo.appData&&!O(e.propertiesInfo.appData,this.props.propertiesInfo.appData))){var t=e.propertiesInfo.id===this.props.propertiesInfo.id;this.setForm(e.propertiesInfo,t);var r=this.propertiesController.getForm().editorSize;this.state.editorSize!==r&&this.setState({editorSize:r}),e.propertiesInfo.id&&!t&&(this.currentParameters=this.propertiesController.getPropertyValues()),this.propertiesController.setAppData(e.propertiesInfo.appData),this.propertiesController.setCustomControls(e.customControls),this.propertiesController.setConditionOps(e.customConditionOps),this.previousErrorMessages={},e.propertiesInfo.messages&&(this.propertiesController.validatePropertiesValues(),this.previousErrorMessages=this.propertiesController.getAllErrorMessages())}e.propertiesConfig&&!O(e.propertiesConfig,this.propertiesController.getPropertiesConfig())&&this.propertiesController.setPropertiesConfig(e.propertiesConfig)}},{key:"onBlur",value:function(e){!this.props.propertiesConfig.applyOnBlur||!this.commonProperties||this.commonProperties.contains(e.relatedTarget)||this.propertiesController.isSummaryPanelShowing()||this.propertiesController.isSubPanelsShowing()||this.applyPropertiesEditing(!1)}},{key:"setForm",value:function(e,t){var r=null;e.formData&&0!==Object.keys(e.formData).length?r=e.formData:e.parameterDef&&(this.props.propertiesConfig.schemaValidation&&ou(e.parameterDef),r=Ri.makeForm(e.parameterDef,this.props.propertiesConfig.containerType)),r&&r.data&&r.data.inputDataModel&&!r.data.datasetMetadata&&(r.data.datasetMetadata=q(r.data.inputDataModel)),this.propertiesController.setForm(r,this.props.intl,t),r&&(this.originalTitle=r.label),this.initialValueInfo={additionalInfo:{messages:[]},undoInfo:{}},this.uiParameterKeys=this._getUiOnlyKeys(),this.initialValueInfo=this._setValueInforProperties(this.initialValueInfo),e.messages&&(this.initialValueInfo.additionalInfo.messages=G(e.messages)),this.initialValueInfo.undoInfo.properties=this.propertiesController.getPropertyValues(),this.initialValueInfo.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.initialValueInfo.additionalInfo.title=this.propertiesController.getTitle()}},{key:"getApplyButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.primary?this.props.propertiesConfig.buttonLabels.primary:u(this.props.intl,Oe.PROPERTIESEDIT_APPLYBUTTON_LABEL)}},{key:"getRejectButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.secondary?this.props.propertiesConfig.buttonLabels.secondary:u(this.props.intl,Oe.PROPERTIESEDIT_REJECTBUTTON_LABEL)}},{key:"getPropertiesActionLabel",value:function(){if(this.props.callbacks.propertiesActionLabelHandler){var e=this.props.callbacks.propertiesActionLabelHandler();if(e)return e}return u(this.props.intl,Oe.PROPERTIES_ACTION_LABEL,{node_label:this.propertiesController.getTitle()})}},{key:"getEditorSize",value:function(){var e=this.propertiesController.getForm().editorSize,t=this.props.propertiesInfo.initialEditorSize;return(e!==p.SMALL||t!==p.LARGE&&t!==p.MAX)&&(e!==p.MEDIUM||t!==p.SMALL&&t!==p.MAX)&&(e!==p.LARGE||t!==p.SMALL&&t!==p.MEDIUM)?e===p.MAX?e:t||e:e}},{key:"_getOverrideSize",value:function(){var e=this.propertiesController.getForm().pixelWidth,t=this.propertiesController.getForm().editorSize,r=null;return e&&(t===p.SMALL?this.state.editorSize===p.SMALL&&e.min?r=e.min:this.state.editorSize===p.MEDIUM&&e.max&&(r=e.max):t===p.MEDIUM?this.state.editorSize===p.MEDIUM&&e.min?r=e.min:this.state.editorSize===p.LARGE&&e.max&&(r=e.max):t===p.LARGE?this.state.editorSize===p.LARGE&&e.min?r=e.min:this.state.editorSize===p.MAX&&e.max&&(r=e.max):t===p.MAX&&e.max&&(r=e.max)),r}},{key:"_getResizeButton",value:function(){var e=s.createElement(rr,{type:Ue.CHEVRONARROWS.LEFT,className:"properties-resize-caret-left"});return this.propertiesController.getForm().editorSize===p.SMALL?this.state.editorSize===p.MEDIUM&&(e=s.createElement(rr,{type:Ue.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.MEDIUM?this.state.editorSize===p.LARGE&&(e=s.createElement(rr,{type:Ue.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.LARGE&&this.state.editorSize===p.MAX&&(e=s.createElement(rr,{type:Ue.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})),e}},{key:"_isResizeButtonRequired",value:function(){var e=this.propertiesController.getForm().pixelWidth;if(!1!==this.props.propertiesConfig.enableResize){if(e){if(!e.min&&!e.max)return g.warn("Pixel width was provided but no min or max property was found in it."),!0;if(this.propertiesController.getForm().editorSize===p.SMALL){if(e.min&&!e.max&&e.min>=uu)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+uu),!1;if(!e.min&&e.max&&e.max<=cu)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+cu),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to pixel width max size."),!1}else if(this.propertiesController.getForm().editorSize===p.MEDIUM){if(e.min&&!e.max&&e.min>=du)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+du),!1;if(!e.min&&e.max&&e.max<=uu)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+uu),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size."),!1}else if(this.propertiesController.getForm().editorSize===p.LARGE){if(e.min&&!e.max&&e.min>=hu)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+hu),!1;if(!e.min&&e.max&&e.max<=du)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+du),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size."),!1}else if(this.propertiesController.getForm().editorSize===p.MAX)return!!e.min&&(g.warn("No resize button shown. Pixel width min size ignored."),!1)}else if(this.propertiesController.getForm().editorSize===p.MAX)return!1;return!0}return!1}},{key:"_setValueInforProperties",value:function(e,t){var r=t&&!0===t.applyProperties,n=this.props.propertiesConfig.conditionReturnValueHandling===it.NULL,o=this.propertiesController.getPropertyValues({filterHiddenDisabled:n,applyProperties:r,valueFilters:this.props.propertiesConfig.returnValueFiltering});return this.uiParameterKeys.length>0?(e.properties=_e(o,this.uiParameterKeys),e.uiProperties=kr(o,this.uiParameterKeys)):e.properties=o,e}},{key:"_getUiOnlyKeys",value:function(){var e=[],t=this.propertiesController.getControls();if(Object.keys(t).length>0)for(var r in t){if(ee(t,r))t[r].uionly&&e.push(r)}return e}},{key:"cancelHandler",value:function(e){this.props.callbacks.closePropertiesDialog&&this.props.callbacks.closePropertiesDialog(e)}},{key:"applyPropertiesEditing",value:function(e){this.propertiesController.validatePropertiesValues();var t=this.propertiesController.getAllErrorMessages();if(this.originalTitle!==this.propertiesController.getTitle()||this.currentParameters&&JSON.stringify(this.currentParameters)!==JSON.stringify(this.propertiesController.getPropertyValues())||JSON.stringify(this.previousErrorMessages)!==JSON.stringify(t)||this.props.propertiesConfig.applyPropertiesWithoutEdit){var r={additionalInfo:{},undoInfo:{}};(r=this._setValueInforProperties(r,{applyProperties:!0})).undoInfo.properties=this.propertiesController.getPropertyValues();var n=this.propertiesController.getErrorMessages(!0,!0,!0,!1);n&&(r.additionalInfo.messages=n),r.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.propertiesController.getTitle()&&(r.additionalInfo.title=this.propertiesController.getTitle());var o=this.getPropertiesActionLabel(),i=new ki(r,this.initialValueInfo,this.props.propertiesInfo.appData,this.props.callbacks.applyPropertyChanges,o);this.propertiesController.getCommandStack().do(i),this.currentParameters=this.propertiesController.getPropertyValues(),this.initialValueInfo=G(r),this.previousErrorMessages=this.propertiesController.getAllErrorMessages()}e&&this.cancelHandler(at)}},{key:"showPropertiesButtons",value:function(e){this.setState({showPropertiesButtons:e})}},{key:"updateEditorSize",value:function(e){this.setState({editorSize:e}),this.propertiesController.setEditorSize(e)}},{key:"resize",value:function(){this.propertiesController.getForm().editorSize===p.SMALL?this.state.editorSize===p.SMALL?this.updateEditorSize(p.MEDIUM):this.updateEditorSize(p.SMALL):this.propertiesController.getForm().editorSize===p.MEDIUM?this.state.editorSize===p.MEDIUM?this.updateEditorSize(p.LARGE):this.updateEditorSize(p.MEDIUM):this.propertiesController.getForm().editorSize===p.LARGE&&(this.state.editorSize===p.LARGE?this.updateEditorSize(p.MAX):this.updateEditorSize(p.LARGE))}},{key:"render",value:function(){var e=this,t=this.props.propertiesConfig.applyOnBlur&&this.props.propertiesConfig.rightFlyout,r=this.cancelHandler.bind(this,st);t&&(r=null);var n=this.getApplyButtonLabel(),o=this.getRejectButtonLabel(),i=this.propertiesController.getTitle(),a=this.propertiesController.getForm();if(null!==a){var l=[],p=s.createElement("div",null),c=s.createElement("div",null),d=null,h=!1;if(this.props.propertiesConfig.rightFlyout&&(p=s.createElement(su,{labelEditable:a.labelEditable,help:a.help,controller:this.propertiesController,helpClickHandler:this.props.callbacks.helpClickHandler,closeHandler:t?this.applyPropertiesEditing.bind(this,!0):null,icon:a.icon,heading:a.heading,showHeading:this.props.propertiesConfig.heading,rightFlyoutTabsView:this.props.propertiesConfig.categoryView===ze.TABS}),h=this.props.propertiesConfig.heading&&(a.icon||a.heading),c=s.createElement(Vr,{controller:this.propertiesController,okHandler:t?null:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,applyLabel:n,rejectLabel:o,showPropertiesButtons:this.state.showPropertiesButtons,disableSaveOnRequiredErrors:this.props.propertiesConfig.disableSaveOnRequiredErrors}),this._isResizeButtonRequired())){var f=this._getResizeButton(),m=f.props&&"properties-resize-caret-left"===f.props.className?u(this.props.intl,Oe.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL):u(this.props.intl,Oe.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);d=s.createElement(dt,{kind:"ghost",className:"properties-btn-resize",onClick:this.resize.bind(this),"aria-label":m},f)}var v=s.createElement(So,{key:"editor-form-key",controller:this.propertiesController,additionalComponents:this.props.propertiesInfo.additionalComponents,showPropertiesButtons:this.showPropertiesButtons,customPanels:this.props.customPanels,rightFlyout:this.props.propertiesConfig.rightFlyout,categoryView:this.props.propertiesConfig.categoryView});l="Editing"===this.props.propertiesConfig.containerType?s.createElement(Pr,{applyLabel:n,rejectLabel:o,bsSize:this.state.editorSize,title:i,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons},v):"Custom"===this.props.propertiesConfig.containerType?s.createElement("div",{className:De("properties-custom-container",{"properties-custom-container-with-heading":!t&&h,"properties-custom-container-applyOnBlur":t&&!h,"properties-custom-container-applyOnBlur-with-heading":t&&h})},v):"Tearsheet"===this.props.propertiesConfig.containerType?s.createElement(Br,{open:!0,onCloseCallback:this.props.propertiesConfig.applyOnBlur?this.applyPropertiesEditing.bind(this,!0):null,tearsheet:{title:i,content:v},applyLabel:n,rejectLabel:o,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyOnBlur:this.props.propertiesConfig.applyOnBlur}):s.createElement(Ar,{onHide:this.props.callbacks.closePropertiesDialog,title:i,bsSize:this.state.editorSize,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyLabel:n,rejectLabel:o},v);var y=De("properties-wrapper",{"properties-right-flyout":this.props.propertiesConfig.rightFlyout,"properties-light-enabled":this.props.light,"properties-light-disabled":!this.props.light},"properties-".concat(this.state.editorSize)),g=this._getOverrideSize(),b=null;return null!==g&&(b={width:g+"px"}),s.createElement(Vt,{store:this.propertiesController.getStore()},s.createElement("aside",{"aria-label":u(this.props.intl,Oe.PROPERTIES_LABEL,{label:i}),role:"complementary",ref:function(t){return e.commonProperties=t},className:y,onBlur:this.onBlur,style:b},d,p,l,c))}return s.createElement("div",null)}}]),i}(s.Component),mu=Bt(fu,{forwardRef:!0});function vu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var yu=function(r){n(i,r);var o=vu(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={hasError:!1,error:null,info:null},r.createPropertiesMainComponent=r.createPropertiesMainComponent.bind(a(r)),r.revertState=r.revertState.bind(a(r)),r.propertiesMainHasMounted=!1,r.setPropertiesHasMounted=r.setPropertiesHasMounted.bind(a(r)),r.applyPropertiesEditing=r.applyPropertiesEditing.bind(a(r)),r}return t(i,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"setPropertiesHasMounted",value:function(){this.propertiesMainHasMounted=!0}},{key:"applyPropertiesEditing",value:function(e){this.PropertiesMain.applyPropertiesEditing(e)}},{key:"createPropertiesMainComponent",value:function(){var e=this;return Object.assign(this.props.callbacks,{setPropertiesHasMounted:this.setPropertiesHasMounted}),s.createElement(mu,{ref:function(t){e.PropertiesMain=t},propertiesInfo:this.props.propertiesInfo,propertiesConfig:this.props.propertiesConfig,customPanels:this.props.customPanels,callbacks:this.props.callbacks,customControls:this.props.customControls,customConditionOps:this.props.customConditionOps,light:this.props.light})}},{key:"revertState",value:function(){this.setState({hasError:!1,error:null,info:null})}},{key:"displayAppropriateUIFallback",value:function(){var e,t,r={text:u(this.props.intl,Oe.PROPERTIES_UNEXPECTED_MESSAGE),type:"error"},n=s.createElement("div",{className:"properties-error-heading"},s.createElement(Ls,{messageInfo:r})),o=u(this.props.intl,Oe.PROPERTIES_SUPPORT_MESSAGE),i=u(this.props.intl,Oe.PROPERTIESEDIT_CLOSEBUTTON_LABEL),a=this.props.callbacks.closePropertiesDialog,l=u(this.props.intl,Oe.PROPERTIESEDIT_REVERTBUTTON_LABEL),p=this.revertState,d=u(this.props.intl,Oe.PROPERTIES_ERROR_LABEL);return"Custom"===this.props.propertiesConfig.containerType?(!0===this.propertiesMainHasMounted?(e=u(this.props.intl,Oe.PROPERTIES_REVERT_MESSAGE),t=s.createElement("div",{className:"properties-modal-buttons"},s.createElement(c,{className:"properties-error-display-close-button",okHandler:a,cancelHandler:p,showPropertiesButtons:!0,applyLabel:i,rejectLabel:l}))):(e=u(this.props.intl,Oe.PROPERTIES_CLOSE_MESSAGE),t=s.createElement("div",{className:"properties-modal-buttons"},s.createElement(c,{className:"properties-error-display-close-button",okHandler:a,showPropertiesButtons:!0,applyLabel:i}))),this.props.propertiesConfig.rightFlyout?s.createElement("aside",{"aria-label":d,role:"complementary",className:"properties-wrapper properties-right-flyout properties-small"},s.createElement("div",{className:"properties-flyout-error-container"},n,s.createElement("br",null),s.createElement("br",null),s.createElement("div",{className:"properties-error-content"},e,s.createElement("br",null),o)),t):s.createElement("aside",{"aria-label":d,role:"complementary",className:"properties-wrapper properties-custom-container"},s.createElement("div",{className:"properties-flyout-error-container"},n,s.createElement("br",null),s.createElement("br",null),s.createElement("div",{className:"properties-error-content"},e,s.createElement("br",null),o)),t)):(!0===this.propertiesMainHasMounted?(e=u(this.props.intl,Oe.PROPERTIES_REVERT_MESSAGE),t=s.createElement(Ar,{bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:l,okHandler:a,cancelHandler:p,title:n},s.createElement("div",{className:"properties-modal-container properties-error-content"},e,s.createElement("br",null),o))):(e=u(this.props.intl,Oe.PROPERTIES_CLOSE_MESSAGE),t=s.createElement("div",{className:"properties-modal-error"},s.createElement(Ar,{okHandler:a,bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:"null",title:n},s.createElement("div",{className:"properties-modal-container properties-error-content"},e,s.createElement("br",null),o)))),t)}},{key:"render",value:function(){return this.state.hasError?this.displayAppropriateUIFallback():this.createPropertiesMainComponent()}}]),i}(s.Component);yu.defaultProps={propertiesConfig:{containerType:"Custom",rightFlyout:!0,categoryView:ze.ACCORDIONS,applyOnBlur:!1,trimSpaces:!0,disableSaveOnRequiredErrors:!1,enableResize:!0,conditionReturnValueHandling:"value",schemaValidation:!1,applyPropertiesWithoutEdit:!1,maxLengthForMultiLineControls:1024,maxLengthForSingleLineControls:128,convertValueDataTypes:!1,showRequiredIndicator:!0,locale:ot},callbacks:{},light:!0};var gu=Bt(yu,{forwardRef:!0});export{Ri as F,Zc as P,gu as c};
2
+ //# sourceMappingURL=common-properties-98a9a99f.js.map