@elyra/canvas 12.28.2 → 12.30.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 (88) hide show
  1. package/dist/canvas-controller-6fe261d9.js +2 -0
  2. package/dist/canvas-controller-6fe261d9.js.map +1 -0
  3. package/dist/canvas-controller-ea7d4a8f.js +2 -0
  4. package/dist/canvas-controller-ea7d4a8f.js.map +1 -0
  5. package/dist/common-canvas-2953ff65.js +2 -0
  6. package/dist/common-canvas-2953ff65.js.map +1 -0
  7. package/dist/common-canvas-fbd62592.js +2 -0
  8. package/dist/common-canvas-fbd62592.js.map +1 -0
  9. package/dist/common-canvas.es.js +1 -1
  10. package/dist/common-canvas.js +1 -1
  11. package/dist/common-properties-0df4ed36.js +2 -0
  12. package/dist/common-properties-0df4ed36.js.map +1 -0
  13. package/dist/common-properties-8409565f.js +2 -0
  14. package/dist/common-properties-8409565f.js.map +1 -0
  15. package/dist/flexible-table-3a78cdf3.js +2 -0
  16. package/dist/{flexible-table-a3180c2b.js.map → flexible-table-3a78cdf3.js.map} +1 -1
  17. package/dist/flexible-table-6e801de4.js +2 -0
  18. package/dist/{flexible-table-25f1f3a4.js.map → flexible-table-6e801de4.js.map} +1 -1
  19. package/dist/index-92422c18.js +2 -0
  20. package/dist/index-92422c18.js.map +1 -0
  21. package/dist/index-aee893ad.js +2 -0
  22. package/dist/index-aee893ad.js.map +1 -0
  23. package/dist/lib/canvas-controller.es.js +1 -1
  24. package/dist/lib/canvas-controller.js +1 -1
  25. package/dist/lib/canvas.es.js +1 -1
  26. package/dist/lib/canvas.js +1 -1
  27. package/dist/lib/properties/field-picker.es.js +1 -1
  28. package/dist/lib/properties/field-picker.js +1 -1
  29. package/dist/lib/properties/flexible-table.es.js +1 -1
  30. package/dist/lib/properties/flexible-table.js +1 -1
  31. package/dist/lib/properties.es.js +1 -1
  32. package/dist/lib/properties.js +1 -1
  33. package/dist/lib/tooltip.es.js +1 -1
  34. package/dist/lib/tooltip.es.js.map +1 -1
  35. package/dist/lib/tooltip.js +1 -1
  36. package/dist/lib/tooltip.js.map +1 -1
  37. package/dist/styles/common-canvas.min.css +1 -1
  38. package/dist/styles/common-canvas.min.css.map +1 -1
  39. package/dist/{toolbar-2bbc9542.js → toolbar-3fdd090b.js} +1 -1
  40. package/dist/{toolbar-2bbc9542.js.map → toolbar-3fdd090b.js.map} +1 -1
  41. package/dist/{toolbar-c173e22a.js → toolbar-5437484a.js} +1 -1
  42. package/dist/{toolbar-c173e22a.js.map → toolbar-5437484a.js.map} +1 -1
  43. package/locales/common-properties/locales/en.json +1 -1
  44. package/locales/common-properties/locales/eo.json +1 -1
  45. package/package.json +2 -2
  46. package/src/common-canvas/canvas-controller.js +19 -15
  47. package/src/common-canvas/svg-canvas-d3.scss +5 -0
  48. package/src/common-canvas/svg-canvas-pipeline.js +12 -6
  49. package/src/common-canvas/svg-canvas-renderer.js +156 -103
  50. package/src/common-canvas/svg-canvas-utils-external.js +34 -0
  51. package/src/common-properties/actions/button/button.jsx +2 -1
  52. package/src/common-properties/actions/image/image.jsx +2 -1
  53. package/src/common-properties/components/title-editor/title-editor.jsx +3 -0
  54. package/src/common-properties/components/virtualized-table/virtualized-table.scss +2 -4
  55. package/src/common-properties/controls/datepicker/datepicker.scss +9 -0
  56. package/src/common-properties/controls/passwordfield/passwordfield.jsx +16 -18
  57. package/src/common-properties/form/ActionInfo.js +3 -1
  58. package/src/common-properties/form/EditorForm.js +1 -1
  59. package/src/common-properties/form/PropertyDef.js +1 -1
  60. package/src/common-properties/panels/subtabs/subtabs.jsx +4 -2
  61. package/src/common-properties/panels/tearsheet/tearsheet.jsx +21 -16
  62. package/src/common-properties/panels/tearsheet/tearsheet.scss +1 -1
  63. package/src/common-properties/ui-conditions/ui-conditions.js +6 -1
  64. package/src/object-model/layout-dimensions.js +20 -2
  65. package/src/object-model/object-model.js +1 -1
  66. package/src/object-model/pipeline-out-handler.js +1 -1
  67. package/src/palette/palette-content-list-item.jsx +3 -2
  68. package/src/palette/palette-dialog-content-grid-node.jsx +3 -2
  69. package/src/tooltip/tooltip.jsx +1 -1
  70. package/stats.html +1 -1
  71. package/dist/canvas-controller-1bbd9c0e.js +0 -2
  72. package/dist/canvas-controller-1bbd9c0e.js.map +0 -1
  73. package/dist/canvas-controller-d6aa7d4d.js +0 -2
  74. package/dist/canvas-controller-d6aa7d4d.js.map +0 -1
  75. package/dist/common-canvas-9c735f47.js +0 -2
  76. package/dist/common-canvas-9c735f47.js.map +0 -1
  77. package/dist/common-canvas-a02e75c1.js +0 -2
  78. package/dist/common-canvas-a02e75c1.js.map +0 -1
  79. package/dist/common-properties-21c4c338.js +0 -2
  80. package/dist/common-properties-21c4c338.js.map +0 -1
  81. package/dist/common-properties-80e20c2a.js +0 -2
  82. package/dist/common-properties-80e20c2a.js.map +0 -1
  83. package/dist/flexible-table-25f1f3a4.js +0 -2
  84. package/dist/flexible-table-a3180c2b.js +0 -2
  85. package/dist/index-501de495.js +0 -2
  86. package/dist/index-501de495.js.map +0 -1
  87. package/dist/index-8c2f3663.js +0 -2
  88. package/dist/index-8c2f3663.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{_ as e,a as t,b as r}from"./createClass-be661622.js";import{_ as n,a as o,b as i,c as a}from"./getPrototypeOf-3751add9.js";import s,{Component as l}from"react";import{S as p,P as c,C as u,f as d,t as h,T as f,a as m,s as v,l as y,e as g,b,I as E,g as I,c as S,F as C,G as R,E as T,d as _,h as k,O as w,_ 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-501de495.js";import{_ as G,a as W,b as $,c as X,d as K,e as Y}from"./en-7201b548.js";import{_ as J,a as Q,b as Z,c as ee,d as te,l as re,e as ne,f as oe,i as ie,g as ae,h as se,j as le,k as pe,m as ce,n as ue,o as de,p as he,q as fe,r as me,s as ve,t as ye,u as ge,v as be,w as Ee,x as Ie,y as Se,z as Ce}from"./isArrayLikeObject-a9c7973b.js";import{_ as Re,A as Te,s as _e,a as ke,b as we,u as Le,d as Ae}from"./datarecord-metadata-v3-schema-ba1f2849.js";import{h as De,T as Oe,_ as Pe,F as Ne}from"./flexible-table-25f1f3a4.js";import{Modal as xe,ComposedModal as Be,ModalHeader as Me,ModalBody as Fe,Button as Ve,Accordion as Ue,AccordionItem as He,Tab as je,Tabs as ze,Link as qe,TextInput as Ge,TextArea as We,NumberInput as $e,Checkbox as Xe,Dropdown as Ke,ContentSwitcher as Ye,Switch as Je,Form as Qe,PasswordInput as Ze,DatePicker as et,DatePickerInput as tt,Toggle as rt,RadioButton as nt,SelectItem as ot,Select as it,ComboBox as at,FilterableMultiSelect as st,MultiSelect as lt}from"carbon-components-react";import{C as pt,a as ct,b as ut,c as dt,D as ht,d as ft,e as mt,T as vt,M as yt,f as gt,S as bt,g as Et,h as It,i as St,_ as Ct,j as Rt,k as Tt,l as _t,m as kt,n as wt,P as Lt,o as At,U as Dt,p as Ot,R as Pt,q as Nt,E as xt,r as Bt,A as Mt,s as Ft,t as Vt,u as Ut,v as Ht}from"./extends-7d4f15b6.js";import{Portal as jt}from"react-portal";import{connect as zt,Provider as qt}from"react-redux";import{Add16 as Gt,Shuffle16 as Wt,Settings16 as $t,TrashCan16 as Xt,Edit16 as Kt,UpToTop24 as Yt,ArrowUp24 as Jt,ArrowDown24 as Qt,DownToBottom24 as Zt,Maximize16 as er,Minimize16 as tr,Calculator24 as rr,Information16 as nr,Help16 as or,Close16 as ir}from"@carbon/icons-react";import ar from"react-dom";import{I as sr}from"./icon-ea917a08.js";import{v4 as lr}from"uuid";import pr from"./lib/tooltip.es.js";import{_ as cr}from"./canvas-constants-f4e65d4d.js";import{combineReducers as ur,createStore as dr}from"redux";import hr from"seedrandom";import fr from"./lib/command-stack.es.js";import{FormattedDate as mr,injectIntl as vr}from"react-intl";import{isValid as yr,parse as gr,format as br}from"date-fns";import Er from"react-inlinesvg";import Ir from"prop-types";import{t as Sr,T as Cr}from"./toolbar-c173e22a.js";import{UnControlled as Rr}from"react-codemirror2";import{Validator as Tr}from"jsonschema";var _r=J,kr=Re,wr=Q;var Lr=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=_r(e,a);r(s,a)&&kr(i,wr(a,e),s)}return i},Ar=De;var Dr=Z;var Or=function(e){return(null==e?0:e.length)?Dr(e,1):[]},Pr=ee,Nr=te;var xr=function(e){return Nr(Pr(e,void 0,Or),e+"")},Br=function(e,t){return Lr(e,t,(function(t,r){return Ar(e,r)}))},Mr=xr((function(e,t){return null==e?{}:Br(e,t)}));var Fr=J,Vr=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i};var Ur=Q,Hr=re,jr=function(e,t){return t.length<2?e:Fr(e,Vr(t,0,-1))},zr=ne;var qr=function(e,t){return t=Ur(t,e),null==(e=jr(e,t))||delete e[zr(Hr(t))]},Gr=oe,Wr=G,$r=ie,Xr=Function.prototype,Kr=Object.prototype,Yr=Xr.toString,Jr=Kr.hasOwnProperty,Qr=Yr.call(Object);var Zr=function(e){if(!$r(e)||"[object Object]"!=Gr(e))return!1;var t=Wr(e);if(null===t)return!0;var r=Jr.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Yr.call(r)==Qr};var en=ae,tn=X,rn=qr,nn=Q,on=W,an=function(e){return Zr(e)?void 0:e},sn=$,ln=xr((function(e,t){var r={};if(null==e)return r;var n=!1;t=en(t,(function(t){return t=nn(t,e),n||(n=t.length>1),t})),on(e,sn(e),r),n&&(r=tn(r,7,an));for(var o=t.length;o--;)rn(r,t[o]);return r}));function pn(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,l);var o=pn(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 ut;case p.LARGE:case p.MAX:return ct;case p.MEDIUM:default:return pt}}},{key:"render",value:function(){var e=this.getCarbonModalSize();return s.createElement(jt,null,s.createElement(xe,{className:dt("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}(),un=cn;function dn(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 hn=function(r){n(i,l);var o=dn(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}(),fn=hn;function mn(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,l);var o=mn(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(jt,null,s.createElement(Be,{className:dt("properties-tearsheet-panel",{"properties-tearsheet-stacked":this.props.stacked}),open:this.props.open,size:"lg","aria-label":e,preventCloseOnClickOutside:!0},s.createElement(Me,{className:dt("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(Fe,{className:dt("properties-tearsheet-body",{"with-buttons":n},{"with-tabs":o})},r),i))}}]),i}();vn.defaultProps={open:!1,showPropertiesButtons:!1,applyOnBlur:!1,stacked:!1};var yn=vn;function gn(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 bn=function(r){n(i,l);var o=gn(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}();bn.defaultProps={saveButtonEnabled:!0};var En=zt((function(e,t){return{saveButtonEnabled:!t.controller.getSaveButtonDisable(),requiredErrorMessages:t.controller.getRequiredErrorMessages()}}),null)(bn),In="SET_PROPERTY_VALUES",Sn="UPDATE_PROPERTY_VALUE",Cn="REMOVE_PROPERTY_VALUE",Rn="SET_CONTROL_STATES",Tn="UPDATE_CONTROL_STATE",_n="SET_PANEL_STATES",kn="UPDATE_PANEL_STATE",wn="SET_ACTION_STATES",Ln="UPDATE_ACTION_STATE",An="SET_ERROR_MESSAGES",Dn="UPDATE_ERROR_MESSAGE",On="CLEAR_ERROR_MESSAGE",Pn="SET_DATASET_METADATA",Nn="UPDATE_SELECTED_ROWS",xn="CLEAR_SELECTED_ROWS",Bn="SET_TITLE",Mn="SET_ACTIVE_TAB",Fn="DISABLE_ROW_MOVE_BUTTONS",Vn="SET_SAVE_BUTTON_DISABLE",Un="SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED",Hn="SET_ADD_REMOVE_ROWS",jn="UPDATE_STATIC_ROWS",zn="CLEAR_STATIC_ROWS",qn="SET_TABLE_BUTTON_ENABLED",Gn="SET_HIDE_EDIT_BUTTON",Wn="SET_ACTIVE_TEARSHEET";function $n(e){return{type:Bn,title:e}}function Xn(e){return{type:Mn,activeTab:e}}function Kn(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 Yn=function(r){n(i,r);var o=Kn(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),Jn=zt((function(e,t){return{panel:t.panels[t.controller.getPropertyValue({name:t.dependsOn})]}}),null)(Yn);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 Zn=function(r){n(i,l);var o=Qn(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=ar.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:dt("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(jt,{node:this.commonPropertiesParent},o,s.createElement("div",{className:dt("properties-wf-content",{show:this.props.show,"properties-light-disabled":!this.props.light}),style:this.state.style},e,r,t)))}}]),i}();Zn.defaultProps={show:!1,okButtonEnabled:!0};var eo=Zn;function to(e,t){var r=t||lr();return"".concat(ro(e),"-").concat(r)}function ro(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 no(e,t){var r=t;return e.charLimit&&(r=e.charLimit),r}function oo(e,t){if(e.length>0){var r=e.split(t);return Array.isArray(r)?r:[r]}return[]}function io(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=ao(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 ao(e){return e.length>vt?e.substring(0,vt)+"...":e}function so(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 lo(e){return e.controlType===u.DATEPICKER||e.controlType===u.DATEPICKERRANGE?e.dateFormat?e.dateFormat:ht:e.controlType===u.DATEFIELD?e.dateFormat?e.dateFormat:ft:e.timeFormat?e.timeFormat:mt}function po(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 co(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 co(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 co(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 uo(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 ho=function(r){n(i,r);var o=uo(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=po(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 u=[];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(Oe,{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(Oe,{content:s.createElement("span",null,R),tooltipText:R,disabled:!1})))}b.length>0&&u.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);u.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(u.length>0){var _=s.createElement("table",{role:"presentation",key:"summary-table-"+o,className:"properties-summary-table"},s.createElement("tbody",{key:"summary-body-"+o},u));if(u.length>10){var k=d(this.props.controller.getReactIntl(),yt.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"===h(r)&&(r=n.valueDef.propType===f.STRUCTURE&&n.role===m.COLUMN?v(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);se(i)||(i.type===gt.WARNING&&(o+=1),i.type===gt.ERROR&&(n+=1)),se(i)||se(r)&&"error"===r.type||(r=i)})),!se(r)){var i="";return n>0&&0===o?i=d(this.props.controller.getReactIntl(),yt.CONTROL_SUMMARY_ERROR,{errorMsgCount:n}):n>0&&o>0?i=d(this.props.controller.getReactIntl(),yt.CONTROL_SUMMARY_ERROR_WARNING,{errorMsgCount:n,warningMsgCount:o}):0===n&&o>0&&(i=d(this.props.controller.getReactIntl(),yt.CONTROL_SUMMARY_WARNING,{warningMsgCount:o})),s.createElement(pr,{id:"summary-icon",tip:i,className:"properties-tooltips"},s.createElement(sr,{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(Ve,{className:"properties-summary-link-button",onClick:this.handleLinkClicked,size:"small",kind:"ghost",renderIcon:Gt},this.props.panel.label),e),r=d(this.props.controller.getReactIntl(),yt.APPLYBUTTON_LABEL),n=d(this.props.controller.getReactIntl(),yt.REJECTBUTTON_LABEL),o=this.state.showWideFlyout?s.createElement(eo,{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=dt("properties-summary-panel","properties-control-panel",{hide:this.props.panelState===bt.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},i);return s.createElement("div",{className:a,disabled:this.props.panelState===bt.DISABLED,"data-id":ro({name:this.props.panel.id})},o,t,this._getSummaryTables())}}]),i}(s.Component),fo=zt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),okButtonEnabled:!t.controller.getWideFlyoutPrimaryButtonDisabled({name:t.panel.id})}}),null)(ho);function mo(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 vo=function(r){n(i,r);var o=mo(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===bt.DISABLED;return s.createElement("div",{className:dt("properties-twisty-panel",{hide:this.props.panelState===bt.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),"data-id":ro({name:this.props.panel.id})},s.createElement(Ue,{disabled:t},s.createElement(He,{disabled:t,open:this.props.panel.open,title:this.props.panel.label},this.props.children)))}}]),i}(s.Component),yo=zt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(vo);function go(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 bo=function(r){n(i,r);var o=go(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(un,{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(eo,{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 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)}}bo.defaultProps={rightFlyout:!1};var Io=function(r){n(i,r);var o=Eo(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){y.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=d(this.props.controller.getReactIntl(),yt.APPLYBUTTON_LABEL),r=d(this.props.controller.getReactIntl(),yt.REJECTBUTTON_LABEL),n=s.createElement(Ve,{className:"properties-subpanel-button",type:"button",small:!0,kind:"secondary",onClick:this.showSubPanel},this.props.label||"");return s.createElement(bo,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:t,rejectLabel:r,controller:this.props.controller},n)}}]),i}(s.Component);function So(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=So(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:dt("properties-column-panel",{hide:this.props.panelState===bt.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===bt.DISABLED,"data-id":ro({name:this.props.panel.id}),style:this.style},this.props.children)}}]),i}(s.Component),Ro=zt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Co);function To(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 _o=function(r){n(i,r);var o=To(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:dt("properties-control-panel",{hide:this.props.panelState===bt.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},{"tearsheet-container":this.props.controller.isTearsheetContainer()},e),disabled:this.props.panelState===bt.DISABLED,"data-id":ro({name:this.props.panel.id})},this.props.children):null}}]),i}(s.Component),ko=zt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(_o);function wo(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 Lo=function(r){n(i,r);var o=wo(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={activeTabId:""},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!==bt.HIDDEN){var l=this.props.genUIItem(o,i.content);this.state.activeTabId===i.group&&a!==bt.DISABLED&&(t=r),e.push(s.createElement(je,{id:"subtabs.tab."+o,key:"subtabs.tab."+o,disabled:a===bt.DISABLED,className:dt("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":ro({name:i.group})},l)),r++}}return s.createElement("div",{className:dt("properties-sub-tab-container",{vertical:!this.props.rightFlyout},{"properties-control-nested-panel":this.props.nestedPanel},{"properties-leftnav-container":this.props.leftnav},n)},s.createElement(ze,{className:dt("properties-subtabs",{"properties-leftnav-subtabs":this.props.leftnav}),selected:t,light:this.props.controller.getLight()},e))}}]),i}(s.Component);Lo.defaultProps={leftnav:!1};var Ao=Lo;function Do(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=Do(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===bt.HIDDEN,n=this.props.panelState===bt.DISABLED,o=this.props.panel.label?s.createElement("div",{className:"panel-label"},this.props.panel.label):null;if(this.props.panel.description&&!se(this.props.panel.description.text)){var i=g(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(pr,{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(sr,{type:Et.INFORMATION,className:"properties-control-description-icon-info"}));o=s.createElement("div",{className:dt("properties-label-container")},o,a)}else e=s.createElement("div",{className:"panel-description"},i)}return s.createElement("div",{className:dt("properties-text-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),disabled:n},o,e)}}]),i}(),Po=zt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),propertyValues:t.controller.getPropertyValues()}}),null)(Oo);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 xo=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===bt.HIDDEN,n=this.props.panelState===bt.DISABLED;if(this.props.panel.label){var o;if(this.props.panel.description&&!se(this.props.panel.description.text)){var i=g(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(pr,{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(sr,{type:Et.INFORMATION,className:"properties-control-description-icon-info"}))}e=s.createElement("div",{className:dt("properties-label-container")},s.createElement("label",{className:"properties-control-label"},this.props.panel.label),o)}return s.createElement("div",{className:dt("properties-action-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),"data-id":ro({name:this.props.panel.id}),disabled:n},e,this.props.children)}}]),i}(),Bo=zt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(xo);function Mo(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=Mo(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(!le(this.props,"action.button.kind"))return It.TERTIARY;switch(this.props.action.button.kind){case It.PRIMARY:return It.PRIMARY;case It.SECONDARY:return It.SECONDARY;case It.TERTIARY:return It.TERTIARY;case It.GHOST:return It.GHOST;case It.DANGER:return It.DANGER;case It.DANGER_TERTIARY:return It.DANGER_TERTIARY;case It.DANGER_GHOST:return It.DANGER_GHOST;default:return It.TERTIARY}}},{key:"getActionButtonSize",value:function(){if(!le(this.props,"action.button.size"))return St.SMALL;switch(this.props.action.button.size){case St.SMALL:return St.SMALL;case St.MEDIUM:return St.DEFAULT;case St.LARGE:return St.LARGE;case St.EXTRA_LARGE:return St.EXTRA_LARGE;default:return St.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=dt("properties-action-button",{hide:this.props.state===bt.HIDDEN}),t=this.props.state===bt.DISABLED,r=this.getActionButtonKind(),n=this.getActionButtonSize(),o=s.createElement(Ve,{type:"button",size:n,kind:r,onClick:this.applyAction,disabled:t},this.props.action.label.text),i=o;if(this.props.action.description){var a="tooltip-action-"+this.props.action.name,l=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text);i=s.createElement(pr,{id:a,tip:l,direction:"bottom",className:"properties-tooltips",disable:t},o)}return s.createElement("div",{className:e,"data-id":this.props.action.name},i)}}]),i}(s.Component),Vo=zt((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(Fo);function Uo(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 Ho=function(r){n(i,r);var o=Uo(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!==bt.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===bt.DISABLED,n=dt("properties-action-image",{left:"left"===this.props.action.image.placement},{right:"right"===this.props.action.image.placement},{hide:this.props.state===bt.HIDDEN},{disabled:r}),o=s.createElement("div",{"data-id":this.props.action.name},s.createElement("img",Ct({src:this.props.action.image.url,onClick:this.applyAction},e,t))),i=o;if(this.props.action.description){var a="tooltip-action-"+this.props.action.name,l=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text),p=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";i=s.createElement(pr,{id:a,tip:l,direction:p,className:"properties-tooltips",disable:r},o)}return s.createElement("div",{className:n},i)}}]),i}(s.Component),jo=zt((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(Ho),zo=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(Vo,{key:"action."+e,action:t,controller:this.controller});if("image"===t.actionType)return s.createElement(jo,{key:"action."+e,action:t,controller:this.controller})}return null}}]),r}();function qo(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 Wo(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 $o="alertMsgs",Xo=function(r){n(i,r);var o=Wo(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 zo(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===$o)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 se(e)?[]:b(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!==E.TEARSHEET})),p=t.filter((function(e){return e.content.itemType===E.TEARSHEET})).concat(l),c=0;c<p.length;c++){var u=p[c];if(this.props.controller.getPanelState({name:u.group})!==bt.HIDDEN){0===c&&u.group===$o&&(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){var f=s.createElement(sr,{type:Et.CHEVRONARROWS.DOWN,className:"properties-category-caret-down"}),m=!1;this.props.activeTab===u.group&&(f=s.createElement(sr,{type:Et.CHEVRONARROWS.UP,className:"properties-category-caret-up"}),m=!0),u.content.itemType!==E.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:dt("properties-category-container",{"properties-hidden-container":u.content.itemType===E.TEARSHEET})},s.createElement("button",{type:"button",onClick:this._showCategoryPanel.bind(this,u.group),className:dt("properties-category-title",{"properties-light-enabled":this.props.controller.getLight()})},u.text,this._getMessageCountForCategory(u),f),s.createElement("div",{className:dt("properties-category-content",{show:m})},d,h)))}else this.props.activeTab===u.group&&(a=c),o.push(s.createElement(je,{id:"tab."+this._getContainerIndex(i,c)+"-"+e,key:this._getContainerIndex(i,c)+"-"+e,tabIndex:c,label:u.text,title:u.text,className:dt({"properties-hidden-container":u.content.itemType===E.TEARSHEET}),onClick:this._modalTabsOnClick.bind(this,u.group)},d,h))}}return this.props.rightFlyout?s.createElement("div",{key:"cat."+e,className:"properties-categories"},o):s.createElement(ze,{key:"tab."+e,className:"properties-primaryTabs",selected:a,light:this.props.controller.getLight(),tabContentClassName:dt("properties-primary-tab-panel",{"tearsheet-container":this.props.controller.isTearsheetContainer()})},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(Jn,{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:dt(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=K(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(Io,{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=dt("properties-static-text",t.textType),i="info"===t.textType?s.createElement("div",null,s.createElement(sr,{type:Et.INFORMATION,className:"properties-static-text-icon-info"})):null,a=s.createElement("div",{className:o},g(t.text,this.props.controller)),s.createElement("div",{key:"static-text."+e,className:"properties-static-text-container"},i,a);case"linkText":return o=dt("properties-link-text-container",t.textType),"warning"===t.textType?i=s.createElement(sr,{type:gt.WARNING}):"error"===t.textType&&(i=s.createElement(sr,{type:gt.ERROR})),a=s.createElement(qe,{className:"properties-link-text",onClick:this._handleMessageClick.bind(this,t.controlId)},g(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(Ao,{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(Po,{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=qo(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:dt("properties-custom-panel",{"properties-control-nested-panel":pe(t,"nestedPanel",!1)}),key:"custom."+e},new o(t.parameters,this.props.controller,t.data).renderPanel())}catch(e){return y.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=qo(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=qo(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(ko,{key:a,controller:this.props.controller,panel:t},i);case"summary":return this.props.rightFlyout?s.createElement(fo,{key:"summary-panel-"+a,controller:this.props.controller,panel:t},i):i;case"actionPanel":return s.createElement(Bo,{key:"action-panel-"+e,controller:this.props.controller,panel:t},i);case"twisty":return s.createElement(yo,{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(yn,{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(Ro,{key:a,controller:this.props.controller,panel:t},i);default:return s.createElement(ko,{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=I(o),a=o.subControls;-1!==i&&(t=a?a[i].dmImage:o.dmImage);var l=S(o,r);return s.createElement("div",{className:"properties-fp-table"},s.createElement(C,{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:d(this.props.controller.getReactIntl(),yt.ALERTS_TAB_TITLE),group:$o,content:{itemType:"panel",panel:{id:"alerts-panel",panelType:"general",uiItems:t}}}}},{key:"render",value:function(){var e=this.props.controller.getUiItems();!se(this.messages)&&"primaryTabs"===e[0].itemType&&e[0].tabs&&e[0].tabs.length>1&&(e=K(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=d(this.props.controller.getReactIntl(),yt.FIELDPICKER_SAVEBUTTON_LABEL)+" "+o.label;return this.state.showFieldPicker&&(this.props.rightFlyout?n=s.createElement(eo,{showPropertiesButtons:!1,show:!0,title:i,light:this.props.controller.getLight()},this.fieldPicker(i)):this.props.controller.isTearsheetContainer()?t=s.createElement(yn,{open:!0,stacked:!0,tearsheet:{title:i,content:this.fieldPicker()}}):r=this.fieldPicker(i)),s.createElement("div",{className:dt("properties-editor-form",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"field-picker":this.state.showFieldPicker})},r,n,t)}}]),i}(s.Component),Ko=zt((function(e,t){return{activeTab:e.componentMetadataReducer.activeTab,messages:t.controller.getErrorMessages(!0,!0,!0)}}),(function(e,t){return{setActiveTab:function(t){e(Xn(t))}}}))(Xo),Yo=J;var Jo=function(e){return function(t){return null==e?void 0:Yo(e,t)}},Qo=function(){function r(t){e(this,r),this.resources=t}return t(r,[{key:"l10n",value:function(e,t){if(this.resources){var r=Jo(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}(),Zo=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 ei(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 ti(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 ti(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 ti(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.name=t,this.parameters=n,this.actions=o,this.type=i,this.label=Zo.make(a),this.dependsOn=s,this.insertPanels=l,this.nestedPanel=p,this.subGroups=c,this.description=Zo.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:R.CONTROLS}}],[{key:"makeGroup",value:function(e){if(e){var t;if(le(e,"group_info")){t=[];var n,o=ei(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(Jo(e)("id"),Jo(e)("parameter_refs"),Jo(e)("action_refs"),Jo(e)("type"),Jo(e)("label"),Jo(e)("depends_on_ref"),Jo(e)("insert_panels"),Jo(e)("nested_panel"),t,Jo(e)("description"),Jo(e)("data"),Jo(e)("class_name"),Jo(e)("open"))}return null}}]),r}(),ni=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=ei(e);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=ri.makeGroup(a);null!==s&&n.push(s)}}catch(e){i.e(e)}finally{i.f()}}else n.push(new ri(lr(),t,null,R.CONTROLS));return new r(n)}}]),r}();function oi(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 ii(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 ii(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 ii(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 ai=t((function t(r,n,o,i,a,s,l){e(this,t),this.name=r,this.label=n,this.description=o,this.actionType=i,this.data=a,this.image=s,this.button=l})),si=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=Zo.make(e.label),t.description=Zo.make(e.description),t.control=e.control,t.data=e.data,t.image=e.image,t.button=e.button,t}return null}}]),r}(),li=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=oi(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=si.makeActionDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();function pi(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 ui=function(){function r(t){e(this,r),t.id&&(this.name=t.id),t.label&&(this.label=Zo.make(t.label)),t.description&&(this.description=Zo.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"!==h(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=Zo.make(t.placeHolderText)),t.separator&&(this.separator=t.separator),t.resource_key&&(this.resource_key=t.resource_key),"boolean"===h(t.visible)?this.visible=t.visible:this.visible=!0,t.valueIcons&&(this.valueIcons=t.valueIcons),"boolean"===h(t.sortable)&&(this.sortable=t.sortable),"boolean"===h(t.filterable)&&(this.filterable=t.filterable),"boolean"===h(t.resizable)&&(this.resizable=t.resizable),t.editStyle&&(this.editStyle=t.editStyle),"boolean"===h(t.required)&&(this.required=t.required),t.numberGenerator&&(t.numberGenerator.label=Zo.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"===h(t.summary)&&(this.summary=t.summary),t.increment&&(this.increment=t.increment),t.textAfter&&(this.textAfter=Zo.make(t.textAfter)),t.textBefore&&(this.textBefore=Zo.make(t.textBefore)),"boolean"===h(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"===h(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===T.SUBPANEL}},{key:"isCompoundField",value:function(){return!(!this.role||!this.type)&&((this.type===f.OBJECT||this.baseType()===f.OBJECT)&&this.role===m.COLUMN)}},{key:"propType",value:function(){var e;for(var t in f)this.baseType()===f[t]&&(e=f[t]);return e||(e=f.STRUCTURE),e}},{key:"getRole",value:function(){return this.role?this.role:this.getValidValues()?m.ENUM:m.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?f.STRING:e}},{key:"getValidValues",value:function(){return this.valueRestriction?this.valueRestriction:this.type===f.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===_.AFTER}},{key:"separatorBefore",value:function(){return this.separator===_.BEFORE}}],[{key:"makeParameterDef",value:function(e,t,n){return e?new r({id:Jo(e)("id"),enableMaximize:Jo(t)("enable_maximize"),label:Jo(t)("label"),description:Jo(t)("description"),type:Jo(e)("type"),role:Jo(e)("role"),valueRestriction:Jo(e)("enum"),defaultValue:Jo(e)("default"),labelVisible:Jo(t)("label_visible"),control:Jo(t)("control"),orientation:Jo(t)("orientation"),width:Jo(t)("width"),charLimit:Jo(t)("char_limit"),placeHolderText:Jo(t)("place_holder_text"),separator:Jo(t)("separator"),resource_key:Jo(t)("resource_key"),visible:Jo(t)("visible"),valueIcons:Jo(t)("value_icons"),sortable:Jo(t)("sortable"),filterable:Jo(t)("filterable"),resizable:Jo(t)("resizable"),editStyle:Jo(t)("edit_style"),required:Jo(e)("required"),numberGenerator:Jo(t)("number_generator"),isKey:n,dmDefault:Jo(t)("dm_default"),dmImage:Jo(t)("dm_image"),language:Jo(t)("language"),summary:Jo(t)("summary"),increment:Jo(t)("increment"),textAfter:Jo(t)("text_after"),textBefore:Jo(t)("text_before"),moveableRows:Jo(t)("moveable_rows"),generatedValues:Jo(t)("generated_values"),dateFormat:Jo(t)("date_format"),timeFormat:Jo(t)("time_format"),customControlId:Jo(t)("custom_control_id"),data:Jo(t)("data"),rows:Jo(t)("rows"),displayChars:Jo(t)("display_chars"),uionly:Jo(e)("uionly"),actionRef:Jo(t)("action_ref"),customValueAllowed:Jo(t)("custom_value_allowed"),className:Jo(t)("class_name")}):null}}]),r}();function di(e,t){if(t){var r,n=pi(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 hi=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=pi(e);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=ui.makeParameterDef(s,di(s.id,t));l&&o.push(l)}}catch(e){a.e(e)}finally{a.f()}}if(Array.isArray(n)){var p,c=pi(n);try{for(c.s();!(p=c.n()).done;){var u=p.value,d=ui.makeParameterDef(u,di(u.id,t));d&&(d.uionly=!0,o.push(d))}}catch(e){c.e(e)}finally{c.f()}}return new r(o)}}]),r}();function fi(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 mi(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 mi(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 mi(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 vi=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})),yi=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=Zo.make(e.label),t.description=Zo.make(e.description),t.icon=e.icon,t.carbonIcon=e.carbon_icon,t.enabled=e.enabled,t.divider=e.divider,t}return null}}]),r}(),gi=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=fi(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=yi.makeButtonDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();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}var Ii=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=Zo.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=bi(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=bi(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(Jo(e)("id"),ui.makeParameterDef(Jo(e)("key_definition"),Jo(t)("key_definition"),!0),hi.makeParameterMetadata(Jo(e)("parameters"),Jo(t)("parameters")),Jo(t)("moveable_rows"),Jo(t)("label"),Jo(t)("row_selection"),Jo(t)("add_remove_rows"),Jo(t)("header"),Jo(t)("include_all_fields"),Jo(t)("layout"),gi.makeButtonMetadata(Jo(t)("buttons")),Jo(e)("type")):null}}]),r}();function Si(e,t){if(t){var r,n=bi(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 Ci=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=bi(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=Ii.makeStructure(a,Si(a.id,t));null!==s&&o.push(s)}}catch(e){i.e(e)}finally{i.f()}return new r(o)}return null}}]),r}(),Ri=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=Zo.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=Ci.makeStructureMetadata(n,Jo(o)("complex_type_info")),a=hi.makeParameterMetadata(t,Jo(o)("parameter_info"),Jo(o)("ui_parameters")),s=li.makeActionMetadata(Jo(o)("action_info")),l=ni.makeGroupMetadata(Jo(o)("group_info"),a.getParameters()),p=e&&e.title?e.title:"",c=e&&void 0!==e.editable?e.editable:Rt;return new r(Jo(o)("id"),Jo(o)("icon"),Jo(o)("editor_size"),Jo(o)("pixel_width"),p,c,Jo(o)("help"),Jo(o)("description"),i,a,l,s,Jo(o)("label"))}}]),r}(),Ti=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=T.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=pe(r,"light",!0)}));function _i(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 ki(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_i(Object(r),!0).forEach((function(t){cr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wi=function(){function r(t){e(this,r),this.id=Jo(t)("id"),this.itemType=Jo(t)("itemType"),this.tabs=Jo(t)("tabs"),this.panel=Jo(t)("panel"),this.control=Jo(t)("control"),this.text=Jo(t)("text"),this.textType=Jo(t)("textType"),this.secondaryText=Jo(t)("secondaryText"),this.dependsOn=Jo(t)("dependsOn"),this.action=Jo(t)("action"),this.className=Jo(t)("className"),this.nestedPanel=Jo(t)("nestedPanel")}return t(r,null,[{key:"makePrimaryTabs",value:function(e){return new r({itemType:E.PRIMARY_TABS,tabs:e})}},{key:"makeSubTabs",value:function(e,t,n){return new r({itemType:E.SUB_TABS,tabs:e,className:t,nestedPanel:n})}},{key:"makePanelSelector",value:function(e,t,n,o){return new r({id:e,itemType:E.PANEL_SELECTOR,tabs:t,dependsOn:n,className:o})}},{key:"makePanel",value:function(e){return new r({itemType:E.PANEL,panel:e})}},{key:"makeAdditionalLink",value:function(e,t,n){return new r({itemType:E.ADDITIONAL_LINK,panel:n,text:e,secondaryText:t})}},{key:"makeControl",value:function(e){return new r({itemType:E.CONTROL,control:e})}},{key:"makeAction",value:function(e){return new r({itemType:E.ACTION,action:e})}},{key:"makeHSeparator",value:function(){return new r({itemType:E.HORIZONTAL_SEPARATOR})}},{key:"makeStaticText",value:function(e,t){return new r({itemType:E.STATIC_TEXT,text:e,textType:t})}},{key:"makeTextPanel",value:function(e,t,n,o,i){return new r({itemType:E.TEXT_PANEL,panel:{id:e,label:t,description:n,className:o,nestedPanel:i}})}},{key:"makeCustomPanel",value:function(e,t){return new r({itemType:E.CUSTOM_PANEL,panel:e,className:t})}},{key:"makeTearsheetPanel",value:function(e,t){return new r({itemType:E.TEARSHEET,panel:ki(ki({},e),{},{description:t})})}}]),r}(),Li=t((function t(r,n,o){e(this,t),this.text=r,this.group=n,this.content=o})),Ai=function(){function r(t,n,o,i){e(this,r),this.propType=t===f.OBJECT?f.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}(),Di=t((function t(r,n){e(this,t),this.text=r,n&&(this.numberGenerator=n)})),Oi=t((function t(r,n,o){e(this,t),this.text=r,n&&(this.placement=n),o&&(this.link=o)})),Pi=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)})),Ni=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)})),xi=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)})),Bi=t((function t(r,n){e(this,t),this.text=r,n.range&&(this.range=n.range)}));function Mi(e,t,r,n){var o=r.l10nLabel(t,t.name),i={light:!0,containerType:n};return new Li(o,t.name,Fi(e.parameterMetadata,e.actionMetadata,t,e.structureMetadata,r,i))}function Fi(e,t,r,n,o,i){var a=r.name,s=null,l=null,p=r.className,c=pe(r,"nestedPanel",!1);switch(r.groupType()){case R.CONTROLS:return wi.makePanel(new Pi(a,k.GENERAL,p,c,Vi(e,t,r,n,o,i)));case R.COLUMN_SELECTION:return wi.makePanel(new Pi(a,k.COLUMN_SELECTION,p,c,Vi(e,t,r,n,o,i)));case R.ADDITIONAL:var u=new Pi(a,k.GENERAL,p,c,Vi(e,t,r,n,o,i));return l=o.l10nLabel(r,r.name),wi.makeAdditionalLink(l,l,u);case R.SUB_TABS:var d=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=r.name;s=Fi(e,t,r,n,o,i),l=o.l10nLabel(r,r.name),d.push(new Li(l,a,s))})),wi.makeSubTabs(d,p,c);case R.PANEL_SELECTOR:var h=Ui(r,e,t,n,o,i);return wi.makePanelSelector(a,h,r.dependsOn,p);case R.PANELS:var f=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=Fi(e,t,r,n,o,i),f.push(s)})),wi.makePanel(new Pi(a,k.GENERAL,p,c,f));case R.COLUMN_PANEL:var m=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=Fi(e,t,r,n,o,i),m.push(s)})),wi.makePanel(new Pi(a,k.COLUMN_PANEL,p,c,m));case R.CUSTOM_PANEL:return wi.makeCustomPanel(new xi(a,k.CUSTOM,p,c,r.parameterNames(),r.data));case R.SUMMARY_PANEL:l=o.l10nLabel(r,r.name);var v=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=Fi(e,t,r,n,o,i),v.push(s)})),wi.makePanel(new Pi(a,k.SUMMARY,p,c,v,l));case R.ACTION_PANEL:var g;return l=o.l10nResource(r.label),r.description&&(g=new Oi(o.l10nResource(r.description),null,r.description?r.description.link:null)),wi.makePanel(new Ni(a,k.ACTION_PANEL,p,c,function(e,t,r,n,o){var i=[];Array.isArray(r.actionIds())&&r.actionIds().forEach((function(e){var r=wi.makeAction(Gi(t.getAction(e),o));i.push(r)}));return i}(0,t,r,0,o),l,g));case R.TEXT_PANEL:var b;return l=o.l10nResource(r.label),r.description&&(b=new Oi(o.l10nResource(r.description),r.description?r.description.placement:null,r.description?r.description.link:null)),wi.makeTextPanel(a,l,b,p,c);case R.TWISTY_PANEL:l=o.l10nLabel(r,r.name);var E=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=Fi(e,t,r,n,o,i),E.push(s)})),wi.makePanel(new Pi(a,k.TWISTY_PANEL,p,c,E,l,r.open));case R.TEARSHEET_PANEL:var I;l=o.l10nLabel(r,r.name),r.description&&(I=new Oi(o.l10nResource(r.description)));var S=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=Object.assign({},i,{light:!1});s=Fi(e,t,r,n,o,a),S.push(s)})),wi.makeTearsheetPanel(new Pi(a,k.TEARSHEET,p,c,S,l,!1),I);default:return y.warn("(Unknown group type '"+r.groupType()+"')"),null}}function Vi(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()===f.STRUCTURE&&n&&(p=n.getStructure(c.baseType())),!(r instanceof Ii)||r instanceof Ii&&c.isSubPanelEdit()){var d=ji(e,l,r,p,o,t,n,null,i),h=wi.makeControl(d);if(c.separatorBefore()&&a.push(wi.makeHSeparator()),c.textBefore&&a.push(wi.makeStaticText(c.getTextBefore(o),c.getTextBeforeType())),a.push(h),c.textAfter&&a.push(wi.makeStaticText(c.getTextAfter(o),c.getTextAfterType())),c.separatorAfter()&&a.push(wi.makeHSeparator()),r.subGroups&&r.subGroups.length>0)for(var m=0;m<r.subGroups.length;m++)h.control.controlType===u.RADIOSET&&h.control.orientation===w.VERTICAL&&r.subGroups[m].type===R.PANEL_SELECTOR&&!0===r.subGroups[m].insertPanels&&r.subGroups[m].dependsOn===h.control.name&&(s.push(r.subGroups[m].dependsOn),h.additionalItems=Ui(r.subGroups[m],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=Fi(e,t,r,n,o,i);a.push(l)}})),a):a}function Ui(e,t,r,n,o,i){var a=[];return Array.isArray(e.subGroups)&&e.subGroups.forEach((function(e){var s=e.name,l=Fi(t,r,e,n,o,i),p=o.l10nLabel(e,e.name);a.push(new Li(p,s,l))})),a}function Hi(e,t){var r,n=e.getRole();if(e.isList()){var o=function(e){var t={};switch(e.getRole()){case m.TEXT:t.controlType=u.TEXTAREA;break;case m.ENUM:e.getValidValueCount()<5?t.controlType=u.CHECKBOXSET:t.controlType=u.SOMEOFSELECT;break;case m.COLUMN:t.role=m.COLUMN,t.controlType=u.SELECTCOLUMNS;break;default:t.controlType=u.TEXTAREA}return t}(e);r=o.controlType,o.role&&(n=o.role)}else switch(e.getRole()){case m.TEXT:r=u.TEXTAREA;break;case m.ENUM:r=e.getValidValueCount()>4||t&&!qi(e)?u.ONEOFSELECT:u.RADIOSET;break;case m.COLUMN:n=m.COLUMN,r=t&&function(e){if(e.isList()||e.isMapValue())return qi(e);return!1}(e)?u.SELECTCOLUMNS:u.SELECTCOLUMN;break;case m.EXPRESSION:r=u.EXPRESSION;break;case m.EMAIL:n=m.EMAIL,r=u.TEXTFIELD;break;case m.URL:n=m.URL,r=u.TEXTFIELD;break;case m.COLOR:n=m.COLOR,r=u.TEXTFIELD;break;default:r=u.TEXTFIELD}return{controlType:r,role:n}}function ji(e,t,r,n,o,i,a,s,l){var p=void 0!==s&&s,c=p?s:e.getParameter(t),d=c.getAdditionalText(o),h=c.orientation,v=c.required;c.numberGenerator&&(c.numberGenerator=new Bi(o.l10nLabel(c.numberGenerator,c.name),c.numberGenerator));var g,b=new Di(o.l10nLabel(c,c.name),c.numberGenerator);c.description&&(g=new Oi(o.l10nDesc(c,c.name),c.description?c.description.placement:null,c.description?c.description.link:null));var E,I,S,C,T,_,w,L,A,D,O,P,N,x,B,M=!0,F=c.moveableRows,V=c.structureType;if(p||c.getRole()!==m.CUSTOM)switch(c.propType()){case f.STRING:var U=Hi(c,p);I=U.controlType,E=U.role;break;case f.PASSWORD:I=u.PASSWORDFIELD;break;case f.BOOLEAN:c.control&&c.control!==u.CHECKBOX||(M=!1,I=u.CHECKBOX);break;case f.INTEGER:case f.LONG:case f.DOUBLE:I=c.isList()?u.TEXTAREA:u.NUMBERFIELD;break;case f.DATE:E=f.DATE,I=c.control===u.DATEPICKER?u.DATEPICKER:c.control===u.DATEPICKERRANGE?u.DATEPICKERRANGE:c.isList()?u.TEXTAREA:u.DATEFIELD;break;case f.TIME:E=f.TIME,I=c.isList()?u.TEXTAREA:u.TIMEFIELD;break;case f.TIMESTAMP:I=u.TIMESTAMP;break;case f.STRUCTURE:var H=p&&a?a.getStructure(c.baseType()):n;if(H){if(H.hasSubPanel()&&(_=function(e,t,r,n){var o=new Pi(e.name,k.GENERAL,"properties-editstyle-sub-panel",!1,Vi(e.parameterMetadata,e.actionMetadata,e,r,t,n)),i=t.l10nLabel(e,e.name);return wi.makeAdditionalLink("...",i,o)}(H,o,a,l)),C=H.keyAttributeIndex(),T=H.defaultStructure(),S=[],H.parameterMetadata&&Array.isArray(H.parameterMetadata.paramDefs)&&H.parameterMetadata.paramDefs.forEach((function(e){var t=zi(e,o,a,l);S.push(t)})),(c.isMapValue()||c.isList())&&H.keyDefinition){var j=zi(H.keyDefinition,o,a,l);S.unshift(j)}c.isList()||c.isMapValue()?(!p&&r&&void 0!==r.groupType&&r.groupType()===R.COLUMN_SELECTION||c.control===u.STRUCTURETABLE||c.getRole()===m.COLUMN?(I=u.STRUCTURETABLE,F=H.moveableRows,w=H.rowSelection,L=H.addRemoveRows,A=H.header,D=H.includeAllFields):(I=u.STRUCTURELISTEDITOR,F=H.moveableRows,w=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 Di(t.l10nLabel(e,e.id)));e.description&&(n=new Oi(t.l10nDesc(e,e.description)));return new vi(e.id,r,n,e.icon,e.carbonIcon,e.enabled,e.divider)}(e.getButton(n.id),t))})),r}(H.buttons,o))):(I=u.STRUCTUREEDITOR,H.layout&&(O=H.layout)),V=H.type}else I=u.TEXTFIELD;break;case f.OBJECT:if(p)(E=c.getRole())===m.COLUMN?I=u.SELECTCOLUMN:(y.warn("Complex subControl type that is not a field! Name: "+c.name),I=u.READONLY);else if(c.isCompoundField()){var z=Hi(c,p);I=z.controlType,E=z.role}else y.warn("Complex parameter type that is not a field! Name: "+c.name),I=u.READONLY;break;default:E="???"+c.propType()+"???",I=u.TEXTAREA}else I=u.CUSTOM;c.getRole()===m.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()===m.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=g,$.labelVisible="boolean"==typeof c.labelVisible?c.labelVisible:M,$.controlType=c.getControl(I),$.valueDef=Ai.make(c),$.structureType=V,$.role=E,$.additionalText=d,$.orientation=h,$.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=T,$.childItem=_,$.moveableRows=F,$.required=v,$.language=c.language,$.enableMaximize=c.enableMaximize,$.summary=c.summary,$.increment=c.increment,$.rowSelection=w,$.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!==Tt.TEARSHEET||G===Tt.TEARSHEET&&W)),p&&($.visible=c.visible,$.width=c.columns(8),$.editStyle=c.editStyle,$.isKeyField=c.isKey,$.dmDefault=c.dmDefault),new Ti($)}function zi(e,t,r,n){return ji(null,null,null,e.propType()===f.STRUCTURE&&r?r.getStructure(e.baseType()):null,t,null,r,e,n)}function qi(e){return"on_panel"===e.editStyle||"subpanel"===e.editStyle}function Gi(e,t){var r,n=new Di(t.l10nLabel(e,e.id));return e.description&&(r=new Oi(t.l10nDesc(e,e.id))),new ai(e.id,n,r,e.control,e.data,e.image,e.button)}function Wi(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 $i(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 $i(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 $i(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 Xi(e,t){for(var n in e)le(e,n)&&"object"===r(e[n])&&null!==e[n]&&(e[n].message?e[n].message.default=t.l10nResource(e[n].message):Xi(e[n],t))}function Ki(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 Yi(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 Yi(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 Yi(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 Ji=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=Ri.makePropertyDef(Jo(e)("titleDefinition"),Jo(e)("parameters"),Jo(e)("complex_types"),Jo(e)("uihints")),a=Jo(e)("resources"),s=Jo(e)("conditions");if(i){var l=new Qo(a),c=[];if(i.groupMetadata&&i.groupMetadata.groups){var u,d=Ki(i.groupMetadata.groups);try{for(d.s();!(u=d.n()).done;){var h=u.value;c.push(Mi(i,h,l,t))}}catch(e){d.e(e)}finally{d.f()}}var f={currentParameters:Jo(e)("current_parameters"),uiCurrentParameters:Jo(e)("current_ui_parameters"),datasetMetadata:Jo(e)("dataset_metadata")},m=t===Tt.TEARSHEET||t===Tt.MODAL?p.LARGE:p.SMALL;return new r(i.name,i.label,i.labelEditable,i.help,i.editorSizeHint(m),i.pixelWidth,[wi.makePrimaryTabs(c)],(n=new Qi("ok","OK",!0,""),o=new Qi("cancel","Cancel",!1,""),[n,o]),f,function(e,t){if(e&&Array.isArray(e)){var r,n=Wi(e);try{for(n.s();!(r=n.n()).done;)Xi(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 Qi=t((function t(r,n,o,i){e(this,t),this.id=r,this.text=n,this.isPrimary=o,this.url=i}));function Zi(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 ea=function(r){n(i,Te);var o=Zi(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}(),ta=ce,ra=L;var na=Y,oa=W,ia=function(e){return ta((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&&ra(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}))},aa=ue,sa=de,la=he,pa=Object.prototype.hasOwnProperty,ca=ia((function(e,t){if(sa(t)||aa(t))oa(t,la(t),e);else for(var r in t)pa.call(t,r)&&na(e,r,t[r])}));function ua(){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 Sn: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?da(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?da(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 In:return Object.assign({},t.properties);case Cn:var o=e;return null!==r&&void 0!==r.name&&delete o[r.name],Object.assign({},e,o);default:return e}}function da(e,t,r){void 0!==e.row&&(void 0!==e.col?(void 0===t[e.row]&&(t[e.row]=[]),void 0!==e.propertyId?da(e.propertyId,t[e.row][e.col],r):t[e.row][e.col]=r):t[e.row]=r)}function ha(){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,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 Rn:return Object.assign({},t.states);default:return e}}function fa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case kn:var r=e;return r[t.state.panelId.name]={value:t.state.value},Object.assign({},e,r);case _n:return Object.assign({},t.states);default:return e}}function ma(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ln:var r=e;return r[t.state.actionId.name]={value:t.state.value},Object.assign({},e,r);case wn:return Object.assign({},t.states);default:return e}}function va(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Dn: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,se(a[t.message.propertyId.name])&&delete a[t.message.propertyId.name])),Object.assign({},e,a);case An:return Object.assign({},t.messages);default:return e}}function ya(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===Pn?Object.assign({},e,t.datasetMetadata):e}function ga(){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.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 xn: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 ba(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case jn: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 zn: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 Ea(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Bn:var r=e;return r.title=t.title,Object.assign({},e,r);case Mn:var n=e;return n.activeTab=t.activeTab,Object.assign({},e,n);default:return e}}function Ia(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===Fn){var r=e;return r.propertyIds=t.propertyIds,Object.assign({},e,r)}return e}function Sa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===Vn){var r=e;return r.disable=t.disableState,Object.assign({},e,r)}return e}function Ca(){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[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 Hn:if(null===r)return e;var n=e;return void 0===n[r.name]&&(n[r.name]={}),void 0!==r.row?Ta(r,n[r.name],"addRemoveRows",t.info.value):n[r.name].addRemoveRows=t.info.value,Object.assign({},e,n);case qn:if(null===r)return e;var o=e;return void 0===o[r.name]&&(o[r.name]={}),void 0!==r.row?Ta(r,o[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value):_e(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?Ta(r,i[r.name],"hideEditButton",t.info.value):i[r.name].hideEditButton=t.info.value,Object.assign({},e,i);default:return e}}function Ta(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?Ta(e.propertyId,t[e.row][e.col],r,n):_e(t[e.row][e.col],r,n)):void 0!==e.propertyId?Ta(e.propertyId,t[e.row],r,n):_e(t[e.row],r,n))}function _a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===Wn?Object.assign({},e,t.tearsheetId):e}var ka=function(){function r(){e(this,r),this.combinedReducer=ur({propertiesReducer:ua,controlStatesReducer:ha,panelStatesReducer:fa,errorMessagesReducer:va,datasetMetadataReducer:ya,rowSelectionsReducer:ga,componentMetadataReducer:Ea,disableRowMoveButtonsReducer:Ia,actionStatesReducer:ma,wideFlyoutPrimaryButtonDisableReducer:Ca,tearsheetStatesReducer:_a,saveButtonDisableReducer:Sa,propertiesSettingsReducer:Ra,rowFreezeReducer:ba});var t=!1;"undefined"!=typeof window&&(t=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=dr(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 A(e.propertiesReducer)}},{key:"setPropertyValues",value:function(e){this.store.dispatch(function(e){return{type:In,properties:e}}(e))}},{key:"updatePropertyValue",value:function(e,t){this.store.dispatch({type:Sn,property:{propertyId:e,value:t}})}},{key:"removePropertyValue",value:function(e){this.store.dispatch({type:Cn,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 A(e.controlStatesReducer)}},{key:"setControlStates",value:function(e){D(this.getControlStates(),e)||this.store.dispatch(function(e){return{type:Rn,states:e}}(e))}},{key:"updateControlState",value:function(e,t){this.store.dispatch({type:Tn,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 A(e.panelStatesReducer)}},{key:"setPanelStates",value:function(e){D(this.getPanelStates(),e)||this.store.dispatch(function(e){return{type:_n,states:e}}(e))}},{key:"updatePanelState",value:function(e,t){this.store.dispatch({type:kn,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 A(e.actionStatesReducer)}},{key:"setActionStates",value:function(e){D(this.getActionStates(),e)||this.store.dispatch(function(e){return{type:wn,states:e}}(e))}},{key:"updateActionState",value:function(e,t){this.store.dispatch({type:Ln,state:{actionId:e,value:t}})}},{key:"setSaveButtonDisable",value:function(e){this.store.dispatch(function(e){return{type:Vn,disableState:e}}(e))}},{key:"getSaveButtonDisable",value:function(){return this.store.getState().saveButtonDisableReducer.disable}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.store.dispatch({type:Un,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=K(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(le(e,i)&&"text"!==i){var a=e[i];if(a&&a.text&&(r=a,n+=a.type===gt.ERROR?1:0,o+=a.type===gt.WARNING?1:0),a)for(var s in a)if(le(a,s)&&"text"!==s){var l=a[s];l&&l.text&&(r=l,n+=l.type===gt.ERROR?1:0,o+=l.type===gt.WARNING?1:0)}}return n+o!==1&&r&&(r.type=n>0?gt.ERROR:gt.WARNING,r.text=n>0?d(t,yt.TABLE_SUMMARY_ERROR,{errorMsgCount:n}):"",r.text+=o>0?d(t,yt.TABLE_SUMMARY_WARNING,{warningMsgCount:o}):""),r}},{key:"getErrorMessages",value:function(){var e=this.store.getState();return A(e.errorMessagesReducer)}},{key:"setErrorMessages",value:function(e){D(this.getErrorMessages(),e)||this.store.dispatch(function(e){return{type:An,messages:e}}(e))}},{key:"updateErrorMessage",value:function(e,t){D(this.getErrorMessage(e),t)||this.store.dispatch({type:Dn,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:Pn,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:Nn,info:{propertyId:e,selectedRows:t}})}},{key:"clearSelectedRows",value:function(e){this.store.dispatch({type:xn,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:jn,info:{propertyId:e,staticRows:t}})}},{key:"clearStaticRows",value:function(e){this.store.dispatch({type:zn,info:{propertyId:e}})}},{key:"setDisableRowMoveButtons",value:function(e){this.store.dispatch(function(e){return{type:Fn,propertyIds:e}}(e))}},{key:"getDisableRowMoveButtons",value:function(){return this.store.getState().disableRowMoveButtonsReducer.propertyIds}},{key:"setTitle",value:function(e){this.store.dispatch($n(e))}},{key:"getTitle",value:function(){return this.store.getState().componentMetadataReducer.title}},{key:"setActiveTab",value:function(e){this.store.dispatch(Xn(e))}},{key:"getActiveTab",value:function(){return this.store.getState().componentMetadataReducer.activeTab}},{key:"setAddRemoveRows",value:function(e,t){this.store.dispatch({type:Hn,info:{propertyId:e,value:t}})}},{key:"getAddRemoveRows",value:function(e){var t=this.store.getState();return!t.propertiesSettingsReducer[e.name]||(void 0!==e.row?wa(e,t.propertiesSettingsReducer[e.name],"addRemoveRows",true):t.propertiesSettingsReducer[e.name].addRemoveRows)}},{key:"setTableButtonEnabled",value:function(e,t,r){this.store.dispatch({type:qn,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?wa(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?wa(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?wa(e,t.propertiesSettingsReducer[e.name],"hideEditButton",false):t.propertiesSettingsReducer[e.name].hideEditButton)}},{key:"setActiveTearsheetId",value:function(e){this.store.dispatch(function(e){return{type:Wn,tearsheetId:e}}({tearsheetId:e}))}},{key:"getActiveTearsheetId",value:function(){var e=this.store.getState().tearsheetStatesReducer.tearsheetId;return void 0!==e?e:null}}]),r}();function wa(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?wa(e.propertyId,t[e.row][e.col],r,n):pe(t[e.row][e.col],r):void 0!==e.propertyId?wa(e.propertyId,t[e.row],r,n):pe(t[e.row],r):n}function La(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 Aa(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 Aa(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 Aa(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 Da(e,t,r){if(e.or)!function(e,t,r){for(var n=0;n<e.length;n++)Da(e[n],t,r)}(e.or,t,r);else if(e.and)!function(e,t,r){for(var n=0;n<e.length;n++)Da(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 Oa(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 Pa(e,t,r,n,o){switch(r.itemType){case E.CONTROL:var i=r.control;if(n&&(i.summaryPanelId=n),o&&(i.parentCategoryId=o),Oa(e,i,o),r.additionalItems){var a,s=La(r.additionalItems);try{for(s.s();!(a=s.n()).done;){Pa(e,t,a.value.content,n,o)}}catch(e){s.e(e)}finally{s.f()}}break;case E.ADDITIONAL_LINK:case E.CHECKBOX_SELECTOR:case E.TEARSHEET:case E.PANEL:if(r.panel&&r.panel.uiItems){var l=n;r.panel.panelType===k.SUMMARY&&(l=r.panel.id);var p,c=La(r.panel.uiItems);try{for(c.s();!(p=c.n()).done;){Pa(e,t,p.value,l,o)}}catch(e){c.e(e)}finally{c.f()}}break;case E.PRIMARY_TABS:case E.PANEL_SELECTOR:case E.SUB_TABS:if(r.tabs){var u,d=La(r.tabs);try{for(d.s();!(u=d.n()).done;){var h=u.value;Pa(e,t,h.content,n,r.itemType===E.PANEL_SELECTOR||r.itemType===E.SUB_TABS?o:h.group)}}catch(e){d.e(e)}finally{d.f()}}break;case E.CUSTOM_PANEL:if(r.panel&&r.panel.parameters){var f,m=La(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 E.ACTION:r.action&&r.action.name&&(t[r.action.name]=r.action);break;case E.STATIC_TEXT:case E.TEXT_PANEL:case E.HORIZONTAL_SEPARATOR:break;default:y.warn("Unknown UiItem type when parsing ui conditions: "+r.itemType)}return e}function Na(e,t,r){try{var n=function(e){var t=e;if(t.evaluate){var r=[];t.parameter_refs?Da(t.evaluate,r,t.parameter_refs):Da(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};xa(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&&xa(e.refs,i,o)}catch(e){y.info("Error parsing ui conditions: "+e)}return e}function xa(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 Ba(e){var t={};if(e&&e.functions){var r=new Qo(Jo(e)("resources")),n=K(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=Zo.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||(y.warn("Expression function information list, no function information found for "+e),null)}function Fa(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 Va(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 Va(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 Va(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 Ua(e,t,r){switch(t.itemType){case E.PRIMARY_TABS:case E.SUB_TABS:if(t.tabs){var n,o=Fa(t.tabs);try{for(o.s();!(n=o.n()).done;){Ua(e,n.value.content,r)}}catch(e){o.e(e)}finally{o.f()}}break;case E.TEXT_PANEL:case E.PANEL:case E.CUSTOM_PANEL:case E.ADDITIONAL_LINK:case E.TEARSHEET:case E.CHECKBOX_SELECTOR:if(t.panel&&t.panel.id&&(e[r].panels.push(t.panel.id),Ha(e,t.panel.id),t.panel.uiItems)){var i,a=Fa(t.panel.uiItems);try{for(a.s();!(i=a.n()).done;){Ua(e,i.value,t.panel.id)}}catch(e){a.e(e)}finally{a.f()}}break;case E.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=Fa(t.control.additionalItems);try{for(l.s();!(s=l.n()).done;){Ua(e,s.value.content,r)}}catch(e){l.e(e)}finally{l.f()}}break;case E.PANEL_SELECTOR:if(e[r].panels.push(t.id),Ha(e,t.id),t.dependsOn&&e[t.id].controls.push(t.dependsOn),t.tabs){var p,c=Fa(t.tabs);try{for(c.s();!(p=c.n()).done;){Ua(e,p.value.content,t.id)}}catch(e){c.e(e)}finally{c.f()}}break;case E.ACTION:e[r].actions.push(t.action.name);break;case E.STATIC_TEXT:case E.HORIZONTAL_SEPARATOR:break;default:y.warn("Unknown UiItem type when parsing ui conditions: "+t.itemType)}}function Ha(e,t){le(e,t)&&y.warn("Duplicate panel ids, each panel id must be unique. Panel id = "+t),e[t]={controls:[],panels:[],actions:[]}}var ja=Z,za=ke,qa=fe,Ga=re,Wa=ce((function(e){var t=Ga(e);return t="function"==typeof t?t:void 0,za(ja(e,1,qa,!0),void 0,t)})),$a=me,Xa=ge,Ka=be,Ya=ae,Ja=ve,Qa=ye,Za=Math.min;var es=function(e,t,r){for(var n=r?Ka:Xa,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,p=[];a--;){var c=e[a];a&&t&&(c=Ya(c,Ja(t))),l=Za(c.length,l),s[a]=!r&&(t||o>=120&&c.length>=120)?new $a(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?Qa(d,f):n(p,f,r))){for(a=i;--a;){var m=s[a];if(!(m?Qa(m,f):n(e[a],f,r)))continue e}d&&d.push(f),p.push(h)}}return p},ts=fe;var rs=function(e){return ts(e)?e:[]},ns=ae,os=es,is=rs,as=re,ss=ce((function(e){var t=as(e),r=ns(e,is);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?os(r,void 0,t):[]}));function ls(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 ps(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 ps(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 ps(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 cs(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=ds(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 ds(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 ds(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 ds(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 ds(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 ds(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 us(e,t,r,n){return t&&t.filter&&t.filter.evaluate?hs(e,t.filter,t.filter.evaluate,r,n):n}function ds(e,t,n){if(e.or)return function(e,t,r){for(var n=0;n<e.length;n++){if(!0===ds(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=ds(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:fs(t,i)};u.value=r.getPropertyValue(u.id,l,null),u.control=r.getControl(u.id),void 0===u.control&&y.warn("Control not found when validating condition for "+i);void 0!==a&&((c={param:a,id:fs(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 y.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 hs(e,t,r,n,o){if(r.or)return function(e,t,r,n,o){var i,a=[],s=ls(r);try{for(s.s();!(i=s.n()).done;){var l=hs(e,t,i.value,n,o);a=Wa(a,l,D)}}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=K(o),s=ls(r);try{for(s.s();!(i=s.n()).done;){var l=hs(e,t,i.value,n,a);a=ss(a,l,D)}}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,we(r.values));switch(i){case"dmMeasurement":return function(e,t){var r=K(e);r&&(r=r.filter((function(e){var r,n=ls(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=K(e);r&&(r=r.filter((function(e){var r,n=ls(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=K(e);r&&(r=r.filter((function(e){var r,n=ls(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:return y.warn("Ignoring unknown condition operation '"+i+"'"),o}}(e,t,r.condition,n,o);throw new Error("Failed to parse filter definition")}function fs(e,t){var r={},n=t.indexOf("[");return n>-1?((r=K(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 ms(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 vs(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 vs(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 vs(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 ys(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(le(t,n)){var o=t[n];if(!o.parameterName)bs(o.name?{name:o.name}:{name:o},e,r)}}(e,r,t)}function gs(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(le(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(Ls(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,Ls(i,r,e)}else for(var p={name:i.name},c=0;c<o.subControls.length;c++)p.col=c,Ls(p,r,e);else Ls(i,r,e)}}}(e,r,t),ks(e.panelTree,t,Lt);var n=Ss(e);e.setControlStates(t.controls),e.setPanelStates(t.panels),e.setActionStates(t.actions);var o,i=ms(Is(n,Ss(e)));try{for(i.s();!(o=i.n()).done;){Es(o.value,e,1)}}catch(e){i.e(e)}finally{i.f()}}function bs(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.getControl(e);if(n){var o=K(e),i=t.getPropertyValue(o);if(Array.isArray(i)){if(ws(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,ws(o,t,n.subControls[s],r);else for(var l=0;l<n.subControls.length;l++){ws({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,ws(o,t,n,r)}else ws(o,t,n,r)}else y.warn("Control not found for "+e.name)}function Es(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=K(e),a=t.getPropertyValue(i);if(Array.isArray(a)&&n.subControls)if(n.valueDef.isList||n.valueDef.isMap){Ls(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,Ls(i,o,t)}else for(var p=0;p<n.subControls.length;p++)i.col=p,Ls(i,o,t);else Ls(i,o,t);var c=Ss(t);t.setControlStates(o.controls),t.setPanelStates(o.panels),t.setActionStates(o.actions);var u,d=ms(Is(c,Ss(t),r));try{for(d.s();!(u=d.n()).done;){Es(u.value,t,r+1)}}catch(e){d.e(e)}finally{d.f()}r>0&&ks(t.panelTree,o,Lt)}else y.warn("Control not found for "+e.name)}function Is(e,t,r){var n=[];if(r>10)return y.warn("More than 10 iteration of processing conditions found. Check your conditions for loops. Updated properties: "+JSON.stringify(t)),[];var o,i=ms(Le(Object.keys(e),Object.keys(t)));try{for(i.s();!(o=i.n()).done;){var a=o.value,s=e[a],l=t[a];D(s,l)||n.push({name:a})}}catch(e){i.e(e)}finally{i.f()}return n}function Ss(e){var t=e.getPropertiesConfig(),r={};return"null"===t.conditionDisabledPropertyHandling&&(r.filterDisabled=!0),"null"===t.conditionHiddenPropertyHandling&&(r.filterHidden=!0),se(r)?{}:e.getPropertyValues(r)}function Cs(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!==bt.HIDDEN||r!==bt.DISABLED&&r!==bt.ENABLED?i.value=r:i.value=bt.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!==bt.HIDDEN||n!==bt.DISABLED&&n!==bt.ENABLED?i.values[r].value=n:i.values[r].value=bt.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 Ts(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 _s(e,t,r,n){for(var o in e)if(le(e,o)){var i=e[o],a=1e3*hr(o)();if(!0===i.required&&Hs(i,t,r,o,a,n),"date"!==i.role&&"time"!==i.role||js(i,t,o,a,n),"column"===i.role){var s=o;i.valueDef.isList&&(s+="[0]"),zs(i,t,s,a,n)}if(i.subControls){for(var l={},p=0;p<i.subControls.length;p++){l[o+"["+p+"]"]=i.subControls[p]}_s(l,t,r,n)}}}function ks(e,t,r,n){var o=t.panels[r],i=n?o&&o.value===bt.DISABLED:o&&(o.value===bt.HIDDEN||o.value===bt.DISABLED);if(i&&e[r]){if(e[r].controls){var a,s=ms(e[r].controls);try{for(s.s();!(a=s.n()).done;){var l=a.value;n?t.controls[l].value!==bt.HIDDEN&&Cs(t.controls,{name:l},o.value):Cs(t.controls,{name:l},o.value)}}catch(e){s.e(e)}finally{s.f()}}if(e[r].actions){var p,c=ms(e[r].actions);try{for(c.s();!(p=c.n()).done;){var u=p.value;n?t.actions[u].value!==bt.HIDDEN&&Cs(t.actions,{name:u},o.value):Cs(t.actions,{name:u},o.value)}}catch(e){c.e(e)}finally{c.f()}}}if(e[r]&&e[r].panels){var d,h=ms(e[r].panels);try{for(h.s();!(d=h.n()).done;){var f=d.value;i&&(n?t.panels[f].value!==bt.HIDDEN&&Cs(t.panels,{name:f},o.value):Cs(t.panels,{name:f},o.value)),ks(e,t,f,n)}}catch(e){h.e(e)}finally{h.f()}}}function ws(e,t,n,o){var i=!1,a=t.getDefinitions(e,_t.VALIDATION,kt.CONTROLS);if(a.length>0){var s=t.getRequiredDefinitionIds();try{var l,p=!1,c=ms(a);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=wt;p=cs(u.definition,e,t);var h=!1;"object"===r(p)&&(h=!0,d={type:p.type,text:p.text});var f=K(e);if(u.definition.validation&&u.definition.validation.fail_message&&u.definition.validation.fail_message.focus_parameter_ref&&(f=Ts(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),h&&!i)t.updateErrorMessage(f,d),h&&(i=!0);else if(!h&&!i){var m=t.getErrorMessage(f,!1,!1,!1);se(m)||m.validation_id!==d.validation_id||t.updateErrorMessage(f,wt)}}}catch(e){c.e(e)}finally{c.f()}}catch(e){y.warn("Error thrown in validation: "+e)}}}function Ls(e,t,r){As(e,t,r,_t.VISIBLE),As(e,t,r,_t.ENABLED),As(e,t,r,_t.FILTEREDENUM)}function As(e,t,r,n){Ds(r.getDefinitions(e,n,kt.CONTROLS),e,t,r,n)}function Ds(e,t,r,n,o){if(e.length>0)try{e.forEach((function(i,a){var s=cs(i.definition,t,n);switch(o){case _t.VISIBLE:Os(s,i.definition.visible,t,r,n,!0);break;case _t.ENABLED:Os(s,i.definition.enabled,t,r,n,!1);break;case _t.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=Ts(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=Vs(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=Vs(e,n,s[l].enumFilter,s[l].enumFilterApplied,o);s[l].enumFilter=u.values,s[l].enumFilterApplied=u.filterApplied}}else{var d=Vs(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){y.warn("Error thrown in validation: "+e)}}function Os(e,t,r,n,o,i){t.parameter_refs&&Ps(e,t,r,n,o,i,t.parameter_refs,"control"),t.action_refs&&Ps(e,t,r,n,o,i,t.action_refs,"action"),t.group_refs&&function(e,t,r,n,o,i){var a,s=i?bt.VISIBLE:bt.ENABLED,l=i?bt.HIDDEN:bt.DISABLED,p=i?bt.ENABLED:bt.HIDDEN,c=ms(t.group_refs);try{for(c.s();!(a=c.n()).done;){var u=Ts(a.value),d=Us(n.panels,u);if(!0===e){if(u&&d!==s&&d!==p)Ms(n,u,s,o)&&Ns(n,u,s,o)}else if(u&&(i||!i&&d!==p)){Ms(n,u,l,o)&&Ns(n,u,l,o)}}}catch(e){c.e(e)}finally{c.f()}}(e,t,0,n,o,i)}function Ps(e,t,r,n,o,i,a,s){var l,p=i?bt.VISIBLE:bt.ENABLED,c=i?bt.HIDDEN:bt.DISABLED,u=i?bt.ENABLED:bt.HIDDEN,d="control"===s?n.controls:n.actions,h=ms(a);try{for(h.s();!(l=h.n()).done;){var f=Ts(l.value,r),m=Us(d,f);if(Array.isArray(t.values)){var v,y=ms(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&&Cs(d,f,p,o):f&&(i||!i&&m!==u)&&Fs(n,f,c,d,o)}}catch(e){h.e(e)}finally{h.f()}}function Ns(e,t,r,n){if(n.panelTree[t.name]){var o,i=n.panelTree[t.name],a=ms(i.panels);try{for(a.s();!(o=a.n()).done;){var s={name:o.value};Cs(e.panels,s,r),Ns(e,s,r,n),r===bt.ENABLED?Bs(s,n,_t.ENABLED,e):r===bt.VISIBLE&&(e.panels[t.name].disabled&&ks(n.panelTree,e,t.name,!0),Bs(s,n,_t.ENABLED,e),Bs(s,n,_t.VISIBLE,e))}}catch(e){a.e(e)}finally{a.f()}var l,p=ms(i.controls);try{for(p.s();!(l=p.n()).done;){xs(e,t,r,n,{name:l.value},e.controls)}}catch(e){p.e(e)}finally{p.f()}var c,u=ms(i.actions);try{for(u.s();!(c=u.n()).done;){xs(e,t,r,n,{name:c.value},e.actions)}}catch(e){u.e(e)}finally{u.f()}}}function xs(e,t,r,n,o,i){Cs(i,o,r),r===bt.ENABLED?(Bs(o,n,_t.ENABLED,e),Bs(o,n,_t.VISIBLE,e)):r===bt.VISIBLE&&(As(o,e,n,_t.VISIBLE),Bs(o,n,_t.VISIBLE,e),e.panels[t.name].value===bt.DISABLED?Cs(i,o,bt.DISABLED):Bs(o,n,_t.ENABLED,e))}function Bs(e,t,r,n){var o=t.getDefinitions(e,r,kt.REFS);o.length>0&&Ds(o,e,n,t,r)}function Ms(e,t,r,n,o){var i=t.name;if(!e.panels[i])return Cs(e.panels,t,r),!0;var a=e.panels[i].value;return((a===bt.ENABLED||a===bt.VISIBLE)&&(r===bt.DISABLED||r===bt.HIDDEN)||a===bt.DISABLED&&r===bt.ENABLED||a===bt.HIDDEN&&r===bt.VISIBLE)&&(Cs(e.panels,t,r),!0)}function Fs(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:Cs(n,t,r,o)),((a===bt.ENABLED||a===bt.VISIBLE)&&(r===bt.DISABLED||r===bt.HIDDEN)||a===bt.DISABLED&&r===bt.ENABLED||a===bt.DISABLED&&r===bt.HIDDEN||a===bt.HIDDEN&&r===bt.VISIBLE)&&Cs(n,t,r,o)}else Cs(n,t,r,o)}function Vs(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 Us(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 Hs(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:d(i,yt.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 js(e,t,r,n,o){var i=lo(e),a={params:r,definition:{validation:{id:"Format_"+r+"_"+n,fail_message:{type:"error",message:{default:d(o,yt.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 zs(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:d(o,yt.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 qs(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 Gs=ae,Ws=es,$s=rs,Xs=ce((function(e){var t=Gs(e,$s);return t.length&&t[0]===e[0]?Ws(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 Ys=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(sr,{type:this.props.messageInfo.type})),r=this.props.inTable?s.createElement("div",{className:"properties-tooltips-container table-cell-msg-icon"},s.createElement(pr,{id:"table-cell-msg-icon",tip:this.props.messageInfo.text,direction:"bottom",className:"properties-tooltips"},t)):null,n=dt("properties-validation-message",this.props.messageInfo.type,{hide:this.props.state===bt.HIDDEN||this.props.state===bt.DISABLED,inTable:this.props.inTable});return s.createElement("div",{className:n},r,e)}}]),i}(s.Component),Js=Ys,Qs={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 Zs(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 el(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",Qs.Y)).replace("y",Qs.y)).replace("m",Qs.m)).replace("n",Qs.n)).replace("d",Qs.d)).replace("j",Qs.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 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(o){n(l,o);var i=tl(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){D(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!==u.CUSTOM){var t=Xs(this.props.value,this.props.controlOpts.values);D(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=v(e,this.props.control):Array.isArray(e)?e=e.join(", "):"boolean"==typeof e&&(e=e.toString()),e=ao(e),this.props.control.controlType===u.CUSTOM)e=this.props.controller.getCustomControl(this.props.propertyId,this.props.control,{table:!0,editStyle:"summary"});else if(this.props.control.controlType===u.TIMESTAMP||this.props.control.valueDef&&this.props.control.valueDef.propType===At.TIMESTAMP){var n=new Date(e);e=yr(n)?this.props.tableControl?s.createElement(mr,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}):s.createElement(mr,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",weekday:"long"}):""}else if(this.props.control.controlType===u.DATEPICKER)e=e?Zs(e,this.props.control.dateFormat):"";else if(this.props.control.controlType===u.DATEPICKERRANGE){e=[this.props.value&&this.props.value[0]?Zs(this.props.value[0],this.props.control.dateFormat):"",this.props.value&&this.props.value[1]?Zs(this.props.value[1],this.props.control.dateFormat):""].toString()}var o=s.createElement("span",{className:"properties-field-type",disabled:this.props.state===bt.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(sr,{type:this.props.control.icon})),o)),i=s.createElement(Oe,{content:l,tooltipText:e,disabled:a})}return s.createElement("div",{className:dt("properties-readonly",{hide:this.props.state===bt.HIDDEN}),"data-id":ro(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,i,s.createElement(Js,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),l}(s.Component),nl=zt((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)(rl);function ol(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=ol(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=no(t.control,t.controller.getMaxLengthForSingleLineControls()),r.uuid=lr(),r.id=to(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=oo(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=io(t,", ");t=n.value,r=n.truncated}else r=0!==(t=ao(t)).length&&t.length!==this.props.value.length;var o=dt("properties-textfield","properties-input-control",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),i=null;if(r){var a={text:d(this.reactIntl,yt.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:vt}),type:gt.ERROR,validation_id:this.props.control.name};i=s.createElement("div",{className:"properties-textinput-readonly"},this.props.tableControl?null:this.props.controlItem,s.createElement(nl,{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(Js,{inTable:this.props.tableControl,state:"",messageInfo:a}))}else{var l=so(this.props.messageInfo,this.props.tableControl);i=s.createElement(Ge,Ct({},l,{autoComplete:!0===this.props.tableControl?"off":"on",id:this.id,disabled:this.props.state===bt.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 u=!0;t&&this.props.state!==bt.DISABLED&&(u=!1),p=s.createElement(Oe,Ct({},c,{content:i,tooltipText:t,disabled:u}))}return s.createElement("div",{className:o,"data-id":ro(this.props.propertyId)},p,s.createElement(Js,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),al=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(il);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 ll=function(r){n(i,r);var o=sl(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(Er,{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(Ve,{kind:r,size:"small",onClick:this.onClick.bind(this),renderIcon:this.renderIcon.bind(this),iconDescription:d(this.reactIntl,yt.TOGGLETEXT_ICON_DESCRIPTION,{toggletext_label:this.props.value}),disabled:this.props.state===bt.DISABLED},e));var n=dt("properties-toggletext",{hide:this.props.state===bt.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===bt.DISABLED,"data-id":ro(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,t,s.createElement(Js,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),pl=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(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)).reactIntl=t.controller.getReactIntl(),r.charLimit=no(t.control,t.controller.getMaxLengthForMultiLineControls()),r.uuid=lr(),r.id=to(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=oo(t,"\n")),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=io(e,"\n");e=t.value;var r=t.truncated,n=null,o=so(this.props.messageInfo,this.props.tableControl),i=!1;if(o.warn&&(i=!0,o={}),r){var a={text:d(this.reactIntl,yt.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:vt}),type:gt.ERROR,validation_id:this.props.control.name};o=so(a,this.props.tableControl),n=s.createElement("div",null,s.createElement(We,Ct({},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(Js,{inTable:this.props.tableControl,tableOnly:!i,state:"",messageInfo:a}))}else n=s.createElement(We,Ct({},o,{id:this.id,disabled:this.props.state===bt.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!==bt.DISABLED&&(p=!1);var c=s.createElement("div",{className:"properties-tooltips"},String(e));l=s.createElement(pr,{id:"tooltip-column-textarea",tip:c,direction:"bottom",className:"properties-tooltips",disable:p},n)}var u=dt("properties-textarea",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:u,"data-id":ro(this.props.propertyId)},l,s.createElement(Js,{inTable:this.props.tableControl,tableOnly:!i,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),dl=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(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=function(r){n(i,r);var o=hl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).onDirection=r.onDirection.bind(a(r)),r.generateNumber=r.generateNumber.bind(a(r)),r.id=to(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:"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:d(this.reactIntl,yt.INVALID_NUMBER_ERROR),propertyId:this.props.propertyId,validation_id:"invalid_number"};this.props.controller.updateErrorMessage(this.props.propertyId,r)}}else{null!==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===bt.DISABLED,o=this.props.state===bt.HIDDEN;le(this.props.control,"label.numberGenerator")&&(r=s.createElement(Ve,{className:dt("properties-number-generator",{hide:o}),onClick:this.generateNumber,disabled:n,kind:"tertiary",renderIcon:Wt,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:this.props.control.label.numberGenerator.text,hasIconOnly:!0}));var i=dt("properties-numberfield",{"numberfield-with-number-generator":le(this.props.control,"label.numberGenerator")?this.props.control.label.numberGenerator:null},{hide:o},this.props.messageInfo?this.props.messageInfo.type:null),a=so(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:i,"data-id":ro(this.props.propertyId)},s.createElement($e,Ct({},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===u.NUMBERFIELD})),r,s.createElement(Js,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),ml=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(fl),vl=Sr,yl=1/0;var gl=function(e){return e?(e=vl(e))===yl||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var bl=function(e){var t=gl(e),r=t%1;return t==t?r?t-r:t:0},El=Ee,Il=Pe,Sl=bl,Cl=Math.max;var Rl=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:Sl(r);return o<0&&(o=Cl(n+o,0)),El(e,Il(t),o)};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 _l=function(r){n(i,r);var o=Tl(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===bt.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(Cr,{config:e,instanceId:0,size:"sm",toolbarActionHandler:this.customButtonOnClick}))}}]),i}(s.Component);function kl(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 wl=function(r){n(i,r);var o=kl(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=K(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=d(this.props.controller.getReactIntl(),yt.SUBPANEL_BUTTON_TOOLTIP),n=d(this.props.controller.getReactIntl(),yt.APPLYBUTTON_LABEL),o=d(this.props.controller.getReactIntl(),yt.REJECTBUTTON_LABEL);return s.createElement(bo,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:n,rejectLabel:o,controller:this.props.controller},s.createElement(pr,{id:"tooltip-subpanel-cell",tip:r,direction:"left",className:"properties-tooltips icon-tooltip"},s.createElement(Ve,{className:"properties-subpanel-button",kind:"ghost",renderIcon:$t,onClick:this.showSubPanel,disabled:t,iconDescription:r,hasIconOnly:!0})))}}]),i}(s.Component);function Ll(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 Al(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 Al(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 Al(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 Dl(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 Ol=function(r){n(i,r);var o=Dl(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=lr(),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,Dt.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=b(t,(function(e){return e[r]})),e.direction===Ot.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=Ll(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]=O(o[i],a,this.props.controller))}else"column"===this.props.control.role&&"structure"===this.props.control.valueDef.propType&&(r[n]=O(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===u.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=K(r)}}},{key:"isSelectSummaryEdit",value:function(e){return this.props.control.rowSelection===Pt.MULTIPLE&&e.length>1}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===u.READONLYTABLE}},{key:"indexOfColumn",value:function(e){return Rl(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===Pt.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&&!D(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===u.ONEOFSELECT&&e.props.controller.updatePropertyValue({name:e.selectSummaryPropertyName,row:0,col:n},null)}})),this.selectedSummaryRowValue=K(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=K(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 y=this.props.controller.getDatasetMetadataFields(),g=v(this.props.controller.getPropertyValue(c),e,!0);f.icon=P(y,g,e.dmImage)}return this.isReadonlyTable()?u=s.createElement("div",{className:dt("properties-table-cell-control",m)},s.createElement(nl,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})):e.editStyle===T.SUBPANEL||e.editStyle===T.ON_PANEL?a?u=s.createElement("div",null):(u=s.createElement("div",{className:dt("properties-table-cell-control",m)},s.createElement(nl,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})),e.editStyle===T.ON_PANEL&&this.onPanelContainer[n].push(s.createElement("div",{key:o},s.createElement("br",null),h.createControlItem(e,c)))):(d.editStyle=T.INLINE,u=s.createElement("div",{className:dt("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===u.CUSTOM&&(n.editStyle="summary",o=this.props.controller.getCustomControl(e,t,n)),o}},{key:"_getDisabledStatus",value:function(e,t){return void 0!==t&&t===bt.DISABLED||this.props.controller.getControlState(e)===bt.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=Ll(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=d(this.props.controller.getReactIntl(),yt.MULTI_SELECTED_ROW_LABEL),r=d(this.props.controller.getReactIntl(),yt.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(Ne,{showHeader:!1,columns:i,data:o,rows:0,scrollKey:this.selectSummaryPropertyName,tableLabel:l,summaryTable:!0,rowSelection:Pt.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:d(this.props.controller.getReactIntl(),yt.STRUCTURETABLE_REMOVEBUTTON_LABEL),o=!this.state.enableRemoveIcon||e===bt.DISABLED,i=!1;this.addOnClickCallback=t&&t.addButtonFunction?t.addButtonFunction:this.props.openFieldPicker;var a=t&&t.addButtonLabel?t.addButtonLabel:d(this.props.controller.getReactIntl(),yt.STRUCTURETABLE_ADDBUTTON_LABEL);return e===bt.DISABLED&&(i=!0,this.addOnClickCallback=null),s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(Ve,{className:"properties-remove-fields-button",disabled:o,onClick:r,size:"small",kind:"ghost",renderIcon:Xt},n),s.createElement(Ve,{className:"properties-add-fields-button",disabled:i,onClick:this.addOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:Gt},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(Ve,{className:"properties-edit-button",onClick:this.editOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:Kt},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(_l,{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)!==bt.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)!==bt.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=Ll(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===Pt.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===Pt.SINGLE||(h=this.props.control.rowSelection===Pt.SINGLE?this.handleRowClick:this.updateRowSelections);var m=s.createElement(Ne,{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===bt.DISABLED||i===bt.HIDDEN,l=o.controlType===u.CHECKBOX?s.createElement(Xe,{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!==u.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:Nt,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===T.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=K(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(wl,{label:a.props.label,title:a.props.title,panel:a.props.panel,disabled:r===bt.DISABLED,controller:this.props.controller,propertyId:this.props.propertyId,rightFlyout:this.props.rightFlyout}));return{column:"subpanel",width:Nt,content:l}}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=0!==e.selectedRows.length;return t.enableRemoveIcon!==r?{enableRemoveIcon:r}:{}}}]),i}(s.Component);function Pl(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)}}Ol.defaultProps={addRemoveRows:!0,hideEditButton:!1};var Nl=function(r){n(i,r);var o=Pl(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=d(this.props.controller.getReactIntl(),yt.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===u.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(Ve,{className:"properties-empty-table-button",kind:"tertiary",size:"small",renderIcon:this.isReadonlyTable()?Kt:Gt,onClick:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled},this.props.emptyTableButtonLabel))}}]),i}(s.Component),xl=Nl;function Bl(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 Ml=function(r){n(i,r);var o=Bl(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:dt("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=d(this.props.controller.getReactIntl(),yt.MOVEABLE_TABLE_BUTTON_TOP_DESCRIPTION),a=d(this.props.controller.getReactIntl(),yt.MOVEABLE_TABLE_BUTTON_UP_DESCRIPTION),l=s.createElement("div",{key:"topImages"},s.createElement(Ve,{className:"table-row-move-button",onClick:this.topMoveRow,disabled:!r,kind:"ghost",renderIcon:Yt,iconDescription:i,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(Ve,{className:"table-row-move-button",onClick:this.upMoveRow,disabled:!r,kind:"ghost",renderIcon:Jt,iconDescription:a,tooltipPosition:"left",hasIconOnly:!0})),p=d(this.props.controller.getReactIntl(),yt.MOVEABLE_TABLE_BUTTON_DOWN_DESCRIPTION),c=d(this.props.controller.getReactIntl(),yt.MOVEABLE_TABLE_BUTTON_BOTTOM_DESCRIPTION);return[l,s.createElement("div",{key:"bottomImages"},s.createElement(Ve,{className:"table-row-move-button",onClick:this.downMoveRow,disabled:!n,kind:"ghost",renderIcon:Qt,iconDescription:p,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(Ve,{className:"table-row-move-button",onClick:this.bottomMoveRow,disabled:!n,kind:"ghost",renderIcon:Zt,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(xl,{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);Ml.defaultProps={addRemoveRows:!0};var Fl=zt((function(e,t){return{disableRowMoveButtons:t.controller.isDisableRowMoveButtons(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(Ml);function Vl(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=[f.INTEGER,f.DOUBLE,f.LONG],Hl=function(r){n(i,Ol);var o=Vl(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=Ul.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 Ul.indexOf(r)>-1?s.createElement("div",{className:"properties-table-cell-control"},s.createElement(ml,{control:e,propertyId:t,controller:this.props.controller,controlItem:n,tableControl:!0})):s.createElement("div",{className:"properties-table-cell-control"},s.createElement(al,{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:d(this.reactIntl,yt.LIST_TABLE_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={addButtonLabel:d(this.props.controller.getReactIntl(),yt.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:d(this.props.controller.getReactIntl(),yt.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(Ne,{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(Js,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":ro(this.props.propertyId),className:"properties-list-control"},this.props.controlItem,s.createElement(Fl,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===bt.DISABLED,isEmptyTable:se(this.props.value),emptyTableButtonLabel:r.addButtonLabel,emptyTableButtonClickHandler:this.addRow}))}}]),i}();Hl.propTypes={control:Ir.object.isRequired,propertyId:Ir.object.isRequired,controller:Ir.object.isRequired,controlItem:Ir.element,selectedRows:Ir.array,state:Ir.string,value:Ir.array,messageInfo:Ir.object,addRemoveRows:Ir.bool,tableButtons:Ir.object};var jl=zt((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)}}))(Hl);function zl(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=new RegExp("[0-9- _$]","g"),Gl=function(r){n(i,r);var o=zl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=lr(),r.reactIntl=t.controller.getReactIntl(),r.valueColumn=d(r.reactIntl,yt.EXPRESSION_VALUE_COLUMN),r.valueColumnDesc=d(r.reactIntl,yt.EXPRESSION_VALUE_COLUMN_DESCRIPTION),r.recentUseCat=d(r.reactIntl,yt.EXPRESSION_RECENTLY_USED),r.recentUseCatInfo={id:r.recentUseCat,locLabel:r.recentUseCat,field_columns:{field_column_info:{locLabel:d(r.reactIntl,yt.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=pe(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=b(e,(function(e){return e.columns[r].value}));return t.direction===Ot.DESC&&i.reverse(),i}return e}},{key:"shouldQuoteField",value:function(e){return null!==e.match(ql)}},{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(Oe,{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=d(this.reactIntl,yt.EXPRESSION_FIELD_COLUMN),i=d(this.reactIntl,yt.EXPRESSION_FIELD_COLUMN_DESCRIPTION),a=d(this.reactIntl,yt.EXPRESSION_STORAGE_COLUMN),s={id:"fields",locLabel:d(this.reactIntl,yt.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 u=[],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),u.push({columns:v,rowKey:f}),f===this.state.fieldSelected&&(h=this._makeValuesContent(m,h)))}var y=this.state.fieldSelected;null!==this.state.fieldTableSortSpec&&(y=(u=this.sortTableRows(u,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=d(this.reactIntl,yt.EXPRESSION_FIELDS_TABLE_LABEL),E=d(this.reactIntl,yt.EXPRESSION_VALUES_TABLE_LABEL),I=pe(this.resources,yt.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL,d(this.reactIntl,yt.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL)),S=pe(this.resources,yt.EXPRESSION_VALUES_EMPTY_TABLE_LABEL,d(this.reactIntl,yt.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(Ne,{columns:r,data:u,sortable:o,filterable:["fieldName"],onFilter:this.onFieldFilter,rows:xt,tableLabel:b,rowSelection:Pt.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(Ne,{columns:n,data:h,sortable:["values"],filterable:["values"],onFilter:this.onValueFilter,rows:xt,tableLabel:E,rowSelection:Pt.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=d(this.reactIntl,yt.EXPRESSION_MIN_LABEL),n=d(this.reactIntl,yt.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=d(this.reactIntl,yt.TABLE_SEARCH_HEADER),l={"close.menu":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-function-select"},s.createElement(Ke,{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=d(this.reactIntl,yt.TABLE_SEARCH_HEADER),l={"close.menu":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-field-select"},s.createElement(Ke,{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=d(this.reactIntl,yt.EXPRESSION_FUNCTION_COLUMN),o=d(this.reactIntl,yt.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=d(this.reactIntl,yt.EXPRESSION_FUNCTIONS_TABLE_LABEL),c=pe(this.resources,yt.EXPRESSION_NO_FUNCTIONS,d(this.reactIntl,yt.EXPRESSION_NO_FUNCTIONS));return s.createElement("div",{className:"properties-functions-table-container"},s.createElement("div",{className:"properties-functions-table"},s.createElement(Ne,{columns:r,data:a,sortable:["function","return"],filterable:["function"],onFilter:this.onFunctionFilter,rows:xt,tableLabel:p,rowSelection:Pt.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=d(this.reactIntl,yt.EXPRESSION_FIELD_TAB),n=d(this.reactIntl,yt.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(Ye,{onChange:this.onSwitch.bind(this),selectedIndex:this.state.selectedIndex},s.createElement(Je,{key:0,name:"expresson-builder-fields-tab",className:"expresson-builder-fields-tab",text:r}),s.createElement(Je,{key:1,name:"expresson-builder-function-tab",className:"expresson-builder-function-tab",text:n}))),o)}}]),i}(s.Component);function Wl(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 $l=function(r){n(i,r);var o=Wl(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(pr,{id:o,tip:i,direction:"bottom",className:"properties-tooltips"},s.createElement(Ve,{className:dt("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 Xl(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=function(r){n(i,r);var o=Xl(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=s.createElement(Gl,{controller:this.props.controller,onChange:this.props.onChange,functionList:this.props.functionList,language:this.props.language}),t=s.createElement($l,{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 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 Jl=function(r){n(i,r);var o=Yl(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);D(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=d(this.props.controller.getReactIntl(),yt.EXPRESSION_BUILDER_LABEL);return s.createElement("div",{className:"properties-expression-builder"},s.createElement(Sp,{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(Kl,{controller:this.props.controller,onChange:this.onChange,functionList:this.expressionInfo.functionCategories,operatorList:this.expressionInfo.operators,language:this.props.control.language})))}}]),i}(s.Component);function Ql(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 Zl,ep=vr(function(r){n(i,r);var o=Ql(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(Ve,{className:"maximize",type:"button",size:"small",kind:"ghost",renderIcon:er,hasIconOnly:!0,iconDescription:d(this.reactIntl,yt.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(Ve,{type:"button",className:"minimize",size:"small",kind:"ghost",hasIconOnly:!0,renderIcon:tr,iconDescription:d(this.reactIntl,yt.EXPRESSION_MINIMIZE_LABEL),onClick:function(){return e.props.controller.clearActiveTearsheet()}})))}}]),i}(s.Component));function tp(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function rp(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){tp(ap,o),tp(ip,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:Zl.Pos(o.line,i.start),to:Zl.Pos(o.line,i.end)}}function np(e){return rp(e,0,(function(e,t){return e.getTokenAt(t)}))}var op,ip="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(" "),ap="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 sp(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function lp(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){sp(dp,o),sp(up,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:op.Pos(o.line,i.start),to:op.Pos(o.line,i.end)}}function pp(e){return lp(e,0,(function(e,t){return e.getTokenAt(t)}))}var cp,up="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("|"),dp="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 hp="@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 fp(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=cp.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:mp(i,t),from:cp.Pos(o.line,i.start),to:cp.Pos(o.line,i.end)}}(e,hp,(function(e,t){return e.getTokenAt(t)}))}function mp(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 vp(){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 yp(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 gp(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 gp(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 gp(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 bp(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 Ep=null;"undefined"!=typeof window&&void 0!==window.navigator&&(Ep=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){(Zl=e).registerHelper("hint","python",np)}(Ep),function(e){(op=e).registerHelper("hint","r",pp)}(Ep),function(e){(cp=e).registerHelper("hint","CLEM",fp),cp.defineMode("CLEM",vp),cp.defineMIME("text/x-CLEM","CLEM")}(Ep));var Ip=function(r){n(i,r);var o=bp(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,wt))},r}return t(i,[{key:"componentDidUpdate",value:function(e){var t=this;this.props.selectionRange&&this.props.selectionRange.length>0&&!D(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&&Ep&&Ep.registerHelper("hint",this.props.control.language,this.origHint)}},{key:"getDatasetFields",value:function(){var e,t=[],r=yp(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"}Ep&&Ep.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:gt.INFO;r===gt.SUCCESS&&(t=null);var n=this.props.state===bt.DISABLED?"disabled":r,o=this.props.controller.getReactIntl(),i=this._showBuilderButton()?s.createElement(Ve,{kind:"ghost",size:"small",className:"properties-expression-button",disabled:this.props.state===bt.DISABLED,onClick:this.showExpressionBuilder,renderIcon:rr,iconDescription:d(o,yt.EXPRESSION_BUILDER_ICON_DESCRIPTION),tooltipPosition:"right",hasIconOnly:!0}):null,a=null;this.state.validateIcon&&(a=s.createElement("div",{className:"icon validateIcon"},s.createElement(sr,{type:this.state.validateIcon,className:"properties-validation-icon-".concat(this.state.validateIcon)})));var l=this.state.validationInProgress?d(o,yt.EXPRESSION_VALIDATING_LABEL):d(o,yt.EXPRESSION_VALIDATE_LABEL),p=this.hasValidate()&&this.props.validateLink?s.createElement("div",{className:"properties-expression-validate",disabled:this.props.state===bt.DISABLED},s.createElement(Ve,{className:"validateLink",kind:"ghost",onClick:this.handleValidate,disabled:this.props.state===bt.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===bt.DISABLED&&"nocursor",extraKeys:{"Ctrl-Space":"autocomplete"},autoRefresh:!0,lineNumbers:!0},u=d(o,yt.APPLYBUTTON_LABEL),h=d(o,yt.REJECTBUTTON_LABEL),f=d(o,yt.EXPRESSION_BUILDER_TITLE),m=this.state.showExpressionBuilder?s.createElement(eo,{cancelHandler:this.cancelExpressionBuilder,okHandler:this.hideExpressionBuilder,show:this.state.showExpressionBuilder,applyLabel:u,rejectLabel:h,title:f,light:this.props.controller.getLight()&&this.props.control.light},s.createElement("div",null,s.createElement(Jl,{control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId}))):null,v=dt("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()===pe(this,"props.control.data.tearsheet_ref");b=s.createElement(ep,{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":ro(this.props.propertyId),className:v},s.createElement(Rr,{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(Js,{state:this.props.state,messageInfo:t,inTable:this.props.tableControl}))))}}]),i}(s.Component);Ip.defaultProps={builder:!0,validateLink:!0};var Sp=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ip);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)).id=to(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=d(this.reactIntl,yt.SHOW_PASSWORD_TOOLTIP),n=d(this.reactIntl,yt.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=dt("properties-pwdfield","properties-input-control",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),p=so(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:l,"data-id":ro(this.props.propertyId)},s.createElement(Qe,null,s.createElement(Ze,Ct({},p,{autoComplete:"off",id:this.id,disabled:this.props.state===bt.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(Js,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Tp=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Rp);function _p(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 kp=function(r){n(i,r);var o=_p(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=to(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=gr(r.value,ft,new Date);yr(n)&&(r.value=br(n,r.getDateFormat()))}else r.value="";return r}return t(i,[{key:"getDateFormat",value:function(){var e=this.props.control.dateFormat||ft;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=gr(e.target.value,this.getDateFormat(),new Date);t=yr(r)?br(r,ft):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=dt("properties-datefield","properties-input-control",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=so(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":ro(this.props.propertyId)},s.createElement(Ge,Ct({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===bt.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(Js,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),wp=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(kp);function Lp(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 Ap=function(r){n(i,r);var o=Lp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=to(t.propertyId),r.locale=t.controller.getLocale(),r.dateFormat=lo(t.control),r.state={value:t.value?Zs(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=el(e[0]),r=Zs(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=dt("properties-datepicker","properties-input-control",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),r=so(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:t,"data-id":ro(this.props.propertyId)},s.createElement(et,{className:"properties-datepicker-wrapper-parent",datePickerType:Bt.SINGLE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleChange.bind(this),locale:this.locale},s.createElement(tt,Ct({},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===bt.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputChange.bind(this),value:this.state.value,helperText:!this.props.tableControl&&e}))),s.createElement(Js,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Dp=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ap);function Op(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 Pp=function(r){n(i,r);var o=Op(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.id=to(r.props.propertyId),r.locale=t.controller.getLocale(),r.uuid=lr(),r.dateFormat=lo(t.control),r.state={valueStart:t.value&&t.value[0]?Zs(t.value[0],r.dateFormat):"",valueEnd:t.value&&t.value[1]?Zs(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=el(e.target.value,this.dateFormat),r=el(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"onEndBlur",value:function(e){var t=el(e.target.value,this.dateFormat),r=el(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=el(e[0]),r=Zs(e[0],this.dateFormat),n="",o="";e[1]&&(n=el(e[1]),o=Zs(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(pr,{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===bt.DISABLED,showToolTipOnClick:!0},s.createElement(sr,{type:Et.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=d(this.reactIntl,yt.DATEPICKER_RANGE_START_LABEL),l=d(this.reactIntl,yt.DATEPICKER_RANGE_END_LABEL),p=this.props.controller.getResource(e,a),c=this.props.controller.getResource(t,null),u=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=dt("properties-datepicker-range","properties-input-control",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),y=so(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:v,"data-id":ro(this.props.propertyId)},s.createElement(et,{datePickerType:Bt.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(tt,Ct({},y,{id:"".concat(this.id,"-start"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&p,disabled:this.props.state===bt.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputStartChange.bind(this),value:this.state.valueStart,onBlur:this.onStartBlur.bind(this),helperText:!this.props.tableControl&&u})),s.createElement(tt,Ct({},y,{id:"".concat(this.id,"-end"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&h,disabled:this.props.state===bt.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(Js,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Np=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Pp);function xp(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=xp(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=to(t.propertyId),r.value=t.value,r.value){var n=gr(r.value,"HH:mm:ss:xxx",new Date);yr(n)&&(r.value=br(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||mt}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=gr(e.target.value,this.getTimeFormat(),new Date);t=yr(r)?br(r,"HH:mm:ss:xxx"):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=dt("properties-timefield","properties-input-control",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=so(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":ro(this.props.propertyId)},s.createElement(Ge,Ct({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===bt.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(Js,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Mp=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Bp);function Fp(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=Fp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=to(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!==bt.DISABLED&&this.props.state!==bt.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=se(r)?"":s.createElement(pr,{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(sr,{type:Et.INFORMATION,className:"properties-control-description-icon-info"})),o=s.createElement("span",{className:"properties-checkbox-label"},e);return s.createElement("div",{className:dt("properties-checkbox",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),"data-id":ro(this.props.propertyId)},s.createElement(Xe,{disabled:this.props.state===bt.DISABLED,id:this.id,labelText:o,onChange:this.handleChange.bind(this),checked:Boolean(this.props.value),hideLabel:this.props.tableControl}),n,s.createElement(Js,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId)}))}}]),i}(s.Component),Up=zt((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 Hp(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 jp=function(r){n(i,r);var o=Hp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=to(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=d(this.reactIntl,yt.TOGGLE_ON_LABEL),n=d(this.reactIntl,yt.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(rt,{id:this.id,size:a,disabled:this.props.state===bt.DISABLED,toggled:Boolean(this.props.value),labelB:o,labelA:i,onToggle:this.handleChange.bind(this),labelText:this.props.tableControl?null:this.props.controlItem}),p=dt("properties-toggle",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:p,"data-id":ro(this.props.propertyId)},l,s.createElement(Js,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),zp=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(jp);function qp(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 Gp=function(r){n(i,r);var o=qp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=lr(),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){D(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)){var t=Xs(this.props.value,this.props.controlOpts.values);D(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===bt.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===bt.DISABLED||!this.props.controlOpts.values.includes(o),a=null;if(Array.isArray(this.props.control.valueDescs)&&!se(this.props.control.valueDescs[n])&&!this.props.tableControl){var l=s.createElement("span",null,this.props.control.valueDescs[n]);a=s.createElement(pr,{id:"tooltip-".concat(n),tip:l,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:e||i},s.createElement(nr,{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:to(p,this.uuid)},s.createElement(Xe,{disabled:i,id:to(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:dt("properties-checkboxset",{hide:this.props.state===bt.HIDDEN}),"data-id":ro(this.props.propertyId)},s.createElement("div",{className:dt("properties-checkboxset-container",this.props.messageInfo?this.props.messageInfo.type:null)},r),s.createElement(Js,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo})))}}]),i}(s.Component),Wp=zt((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)(Gp);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 Xp(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 Xp(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 Xp(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 Kp(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 Yp=function(r){n(i,r);var o=Kp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=lr(),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,Dt.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){D(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];Cs(r,{name:o},t.values[n]===e?bt.ENABLED:bt.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]});Ns(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===bt.DISABLED}},{key:"handleCheckedDisabled",value:function(e,t){if(null!=e&&t&&this.props.state!==bt.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=$p(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===bt.DISABLED,t=this.props.state===bt.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)&&!se(this.props.control.valueDescs[o])&&!this.props.tableControl){var a=s.createElement("span",null,this.props.control.valueDescs[o]);i=s.createElement(pr,{id:"tooltip-".concat(o),tip:a,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:t||e},s.createElement(nr,{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(nt,{key:o,id:to(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":ro(this.props.control,this.props.propertyId),className:dt("properties-radioset ",{hide:this.props.state===bt.HIDDEN})},s.createElement("div",{className:dt("properties-radio-button-group",this.props.messageInfo?this.props.messageInfo.type:null,{horizontal:this.props.control.orientation!==w.VERTICAL}),disabled:this.props.state===bt.DISABLED},r),s.createElement(Js,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Jp=zt((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)(Yp);function Qp(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 Zp(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 Zp(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 Zp(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 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,r);var o=ec(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.emptyLabel="...",r.disableEmptyListDropdown=!1,se(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=to(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,Dt.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){D(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"getSelectedOption",value:function(e,t){var r=v(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=Qp(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=Qp(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===u.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===u.SELECTCOLUMN&&(t=O(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===u.SELECTCOLUMN&&(t=O(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleOnInputChange",value:function(e){if(null!==e){var t=e;this.props.controller.updatePropertyValue(this.props.propertyId,t)}}},{key:"render",value:function(){var e;e=this.props.control.controlType===u.SELECTSCHEMA?this.genSchemaSelectOptions(this.props.value):this.props.control.controlType===u.SELECTCOLUMN?this.genFieldSelectOptions(this.props.value):this.genSelectOptions(this.props.value);var t={"close.menu":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_OPENMENU),"clear.selection":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_CLEARSELECTION)},r=null,n=so(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(ot,{text:this.emptyLabel,key:this.id,value:""}));var a,l=Qp(e.options);try{for(l.s();!(a=l.n()).done;){var p=a.value;o.push(s.createElement(ot,{text:p.label,key:this.id+"-"+p.value,value:p.value}))}}catch(e){l.e(e)}finally{l.f()}r=s.createElement(it,{id:this.id,hideLabel:!0,inline:!0,labelText:this.props.control.label?this.props.control.label.text:"",disabled:this.props.state===bt.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(at,Ct({},n,{ariaLabel:this.props.control.label?this.props.control.label.text:"",id:"".concat(ro(this.props.propertyId),"-dropdown"),disabled:this.props.state===bt.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(Ke,Ct({},n,{id:"".concat(ro(this.props.propertyId),"-dropdown"),disabled:this.props.state===bt.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":ro(this.props.propertyId),className:dt("properties-dropdown",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},r,s.createElement(Js,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl,tableOnly:!0}))}}]),i}(s.Component),rc=zt((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===u.SELECTSCHEMA?r.controlOpts=t.controller.getDatasetMetadataSchemas():t.control.controlType===u.SELECTCOLUMN?r.controlOpts=t.controller.getFilteredDatasetMetadata(t.propertyId):r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),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,r);var o=nc(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){D(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),this.setShouldRender(e)}},{key:"setShouldRender",value:function(e){!D(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=v(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=Xs(this.props.value,this.props.controlOpts.values);D(t,this.props.value)||(se(t)&&this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&(t=Xs(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":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_OPENMENU),"clear.all":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_CLEARALL),"clear.selection":d(this.reactIntl,yt.DROPDOWN_TOOLTIP_CLEARSELECTION)},r="".concat(this.props.control.name,".multiselect.dropdown.empty.label"),n=d(this.reactIntl,yt.MULTISELECT_DROPDOWN_EMPTY_LABEL),o="".concat(this.props.control.name,".multiselect.dropdown.options.selected.label"),i=d(this.reactIntl,yt.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=so(this.props.messageInfo,this.props.tableControl),p=null;return p=this.props.control.filterable?s.createElement(st,Ct({},l,{id:"".concat(ro(this.props.propertyId),"-multiselect-filterable"),disabled:this.props.state===bt.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(lt,Ct({},l,{id:"".concat(ro(this.props.propertyId),"-multiselect"),disabled:this.props.state===bt.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":ro(this.props.propertyId),className:dt("properties-dropdown",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},p,s.createElement(Js,{state:this.props.state,tableOnly:!0,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),ic=zt((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)(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)).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,Dt.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){D(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e,t){var r=Xs(this.props.value,this.props.controlOpts.values);D(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===bt.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":ro(this.props.control,this.props.propertyId),className:dt("properties-someofselect ",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},this.props.controlItem,s.createElement(Ne,{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(Js,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),lc=zt((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)(sc);function pc(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 cc=function(r){n(i,Ol);var o=pc(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=d(r.reactIntl,yt.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=v(this.props.controller.getPropertyValue(a),l,!0),u=P(p,c,l.dmImage);l.icon=u}var d=s.createElement("div",{className:"properties-table-cell-control"},s.createElement(nl,{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:d(this.reactIntl,yt.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(Ne,{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(Js,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":ro(this.props.propertyId),className:"properties-column-select"},this.props.controlItem,s.createElement(Fl,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===bt.DISABLED,isEmptyTable:se(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler}))}}]),i}();cc.propTypes={control:Ir.object.isRequired,propertyId:Ir.object.isRequired,controller:Ir.object.isRequired,controlItem:Ir.element,openFieldPicker:Ir.func.isRequired,selectedRows:Ir.array,state:Ir.string,value:Ir.array,messageInfo:Ir.object,addRemoveRows:Ir.bool,tableButtons:Ir.object};var uc=zt((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)(cc);function dc(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 hc=function(r){n(i,r);var o=dc(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).controlFactory=new Fc(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=K(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=K(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":ro(this.props.control,this.props.propertyId),className:dt("properties-structureeditor ",{hide:this.props.state===bt.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},e,s.createElement(Js,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:!1}))}}]),i}(s.Component),fc=zt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(hc),mc=N;var vc=Ie,yc=function(e,t){var r=[];return mc(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r},gc=Pe,bc=Se,Ec=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 Ic=function(e,t){return(bc(e)?vc:yc)(e,Ec(gc(t)))};function Sc(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 Cc(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 Cc(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 Cc(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 Rc(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,Ol);var o=Rc(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=d(r.reactIntl,yt.STRUCTURETABLE_ADDBUTTON_LABEL),r}return t(i,[{key:"indexOfRow",value:function(e){var t=this.props.control.keyIndex;return Rl(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=K(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=Ic(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=I(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===m.COLUMN)t.push(e);else if(i.role===m.NEW_COLUMN)t.push(v(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===f.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=Sc(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(Js,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":ro(this.props.control,this.props.propertyId),className:"properties-column-structure-wrapper"},s.createElement("div",{className:"properties-column-structure"},s.createElement(Fl,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===bt.DISABLED,isEmptyTable:se(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler})),s.createElement("div",null,o))}}]),i}();Tc.propTypes={buildUIItem:Ir.func,control:Ir.object.isRequired,propertyId:Ir.object.isRequired,controller:Ir.object.isRequired,openFieldPicker:Ir.func.isRequired,rightFlyout:Ir.bool,selectedRows:Ir.array,state:Ir.string,value:Ir.array,messageInfo:Ir.object,addRemoveRows:Ir.bool,tableButtons:Ir.object};var _c=zt((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 kc(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 wc=function(r){n(i,Ol);var o=kc(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:d(this.props.controller.getReactIntl(),yt.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:d(this.props.controller.getReactIntl(),yt.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(Js,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":ro(this.props.control,this.props.propertyId),className:"properties-sle-wrapper"},s.createElement("div",{"data-id":ro(this.props.control,this.props.propertyId),className:"properties-sle-container"},s.createElement(Fl,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===bt.DISABLED,isEmptyTable:se(this.props.value),emptyTableButtonLabel:e.addButtonLabel,emptyTableButtonClickHandler:this.addRow})),s.createElement("div",null,o))}}]),i}();wc.propTypes={buildUIItem:Ir.func,control:Ir.object.isRequired,propertyId:Ir.object.isRequired,controller:Ir.object.isRequired,rightFlyout:Ir.bool,selectedRows:Ir.array,state:Ir.string,value:Ir.array,messageInfo:Ir.object,addRemoveRows:Ir.bool,tableButtons:Ir.object};var Lc=zt((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)(wc);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 Dc=function(r){n(i,Ol);var o=Ac(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=d(this.reactIntl,yt.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(Js,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":ro(this.props.control,this.props.propertyId),className:"properties-readonly-table-wrapper"},this.props.controlItem,s.createElement("div",{className:"properties-readonly-table"},s.createElement(Fl,{tableContainer:a,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===bt.DISABLED,isEmptyTable:se(this.props.value),emptyTableButtonLabel:r,emptyTableButtonClickHandler:this.editCallback})))}}]),i}();Dc.propTypes={buildUIItem:Ir.func,control:Ir.object.isRequired,propertyId:Ir.object.isRequired,controller:Ir.object.isRequired,controlItem:Ir.element,rightFlyout:Ir.bool,selectedRows:Ir.array,state:Ir.string,value:Ir.array,messageInfo:Ir.object,addRemoveRows:Ir.bool,tableButtons:Ir.object,hideEditButton:Ir.bool};var Oc=zt((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)(Dc);function Pc(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 Nc=function(r){n(i,r);var o=Pc(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).actionFactory=new zo(r.props.controller),r.showRequiredIndicator=!t.controller||pe(t.controller.getPropertiesConfig(),"showRequiredIndicator",!0),r}return t(i,[{key:"render",value:function(){if(this.props.control.controlType===u.HIDDEN)return null;var e,t,r,n,o=this.props.state===bt.HIDDEN,i=this.props.state===bt.DISABLED;this.props.control.label&&!1!==this.props.control.labelVisible&&(this.props.control.description&&!se(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(pr,{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(sr,{type:Et.INFORMATION,className:"properties-control-description-icon-info"})))),this.showRequiredIndicator&&this.props.control.required?n=s.createElement("span",{className:"properties-indicator"},d(this.props.controller.getReactIntl(),yt.LABEL_INDICATOR_REQUIRED)):this.showRequiredIndicator||"required"in this.props.control||(n=s.createElement("span",{className:"properties-indicator"},d(this.props.controller.getReactIntl(),yt.LABEL_INDICATOR_OPTIONAL))),e=s.createElement("div",{className:dt("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=dt("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),xc=zt((function(e,t){return{state:t.controller.getControlState(t.propertyId)}}),null)(Nc),Bc=[u.CHECKBOXSET,u.HIDDEN,u.DATEFIELD,u.DATEPICKER,u.DATEPICKERRANGE,u.NUMBERFIELD,u.SPINNER,u.PASSWORDFIELD,u.TEXTAREA,u.TEXTFIELD,u.TIMEFIELD,u.TOGGLETEXT,u.LIST,u.TOGGLE,u.SOMEOFSELECT,u.SELECTCOLUMNS,u.READONLY,u.READONLYTABLE,u.TIMESTAMP,u.EXPRESSION,u.CODE,u.ONEOFSELECT,u.MULTISELECT,u.SELECTSCHEMA,u.SELECTCOLUMN],Mc=[u.LIST,u.READONLYTABLE,u.SOMEOFSELECT,u.SELECTCOLUMNS,u.STRUCTURETABLE,u.STRUCTURELISTEDITOR],Fc=function(){function r(t){e(this,r),this.rightFlyout=!!t&&pe(t.getPropertiesConfig(),"rightFlyout",!1),this.controller=t,this.actionFactory=new zo(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)===bt.HIDDEN)return null;var n=this.createControl(e,t,r),o=e.className?e.className:"";return Bc.includes(e.controlType)?n:s.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:dt("properties-ctrl-wrapper",o)},s.createElement(xc,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,controlObj:n,accessibleControls:Bc,tableControl:Mc.includes(e.controlType)}))}},{key:"createControl",value:function(e,t,r){if(!e||!t)return null;var n,o=ro(t),i=this.controller.getControlState(t)===bt.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(xc,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,accessibleControls:Bc,tableControl:Mc.includes(e.controlType)}),r&&(l.tableControl=r.table),e.controlType){case u.HIDDEN:return null;case u.TEXTFIELD:n=s.createElement(al,l);break;case u.READONLY:case u.TIMESTAMP:n=s.createElement(nl,l);break;case u.TEXTAREA:n=s.createElement(dl,l);break;case u.TOGGLE:n=s.createElement(zp,l);break;case u.LIST:n=s.createElement(jl,l);break;case u.EXPRESSION:n=s.createElement(Sp,Ct({},l,{rightFlyout:this.rightFlyout}));break;case u.CODE:n=s.createElement(Sp,Ct({},l,{builder:!1,validateLink:!1,rightFlyout:this.rightFlyout}));break;case u.TOGGLETEXT:n=s.createElement(pl,l);break;case u.PASSWORDFIELD:n=s.createElement(Tp,l);break;case u.NUMBERFIELD:case u.SPINNER:n=s.createElement(ml,l);break;case u.DATEFIELD:n=s.createElement(wp,l);break;case u.DATEPICKER:n=s.createElement(Dp,l);break;case u.DATEPICKERRANGE:n=s.createElement(Np,l);break;case u.TIMEFIELD:n=s.createElement(Mp,l);break;case u.CHECKBOX:n=s.createElement(Up,l);break;case u.CHECKBOXSET:n=r?s.createElement(nl,l):s.createElement(Wp,l);break;case u.RADIOSET:n=s.createElement(Jp,l);break;case u.ONEOFSELECT:case u.SELECTSCHEMA:n=s.createElement(rc,Ct({},l,{rightFlyout:this.rightFlyout}));break;case u.MULTISELECT:n=s.createElement(ic,l);break;case u.SELECTCOLUMN:n=!r||r&&r.allowColumnControls?s.createElement(rc,Ct({},l,{rightFlyout:this.rightFlyout})):s.createElement(nl,l);break;case u.SOMEOFSELECT:n=r?s.createElement(nl,l):s.createElement(lc,l);break;case u.SELECTCOLUMNS:n=r?s.createElement(nl,l):s.createElement(uc,Ct({},l,{openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case u.STRUCTURETABLE:n=r?s.createElement(nl,l):s.createElement(_c,Ct({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case u.STRUCTURELISTEDITOR:n=r?s.createElement(nl,l):s.createElement(Lc,Ct({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case u.READONLYTABLE:n=r?s.createElement(nl,l):s.createElement(Oc,Ct({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case u.CUSTOM:n=s.createElement("div",{className:"properties-custom-ctrl",key:o},this.controller.getCustomControl(t,e,r));break;case u.STRUCTUREEDITOR:n=s.createElement(fc,Ct({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;default:n=s.createElement(nl,l)}if(Bc.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:dt("properties-ctrl-wrapper",{hide:i,action:le(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]:Tt.CUSTOM;if(!e)return null;var o=Ri.makePropertyDef(null,e.parameters,e.complex_types,e.uihints);if(o&&o.parameterMetadata){var i,a=new Qo(e.resources),s=o.parameterMetadata.getParameter(t);s.propType()===f.STRUCTURE&&o.structureMetadata&&(i=o.structureMetadata.getStructure(s.baseType()));var l={light:r,containerType:n};return ji(o.parameterMetadata,t,null,i,a,null,null,null,l)}return null}}]),r}();function Vc(e,t,r,n){if(["structuretable","structureeditor","structurelisteditor"].indexOf(e.control.controlType)>=0){var o=h(e.value);return"undefined"!==o&&"null"!==o&&String(e.value).length>0}return y.warn("Ignoring unsupported condition operation 'cellNotEmpty' for control type "+e.control.controlType),!0}function Uc(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 Hc(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 Hc(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 Hc(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 jc(e,t,r,n){if(["textfield"].indexOf(e.control.controlType)>=0){var o=n.getDatasetMetadataFields();if(!o)return!0;var i,a=!0,s=Uc(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===m.COLUMN&&r.push(n))}))}return r}(e,n),u=Uc(c);try{for(u.s();!(p=u.n()).done;){var d=p.value;if(D(e.value,d)){a=!0;break}}}catch(e){u.e(e)}finally{u.f()}}return a}return y.warn("Ignoring unsupported condition operation 'colNotExists' for control type "+e.control.controlType),!0}function zc(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!==qc(o,e)})),a}return!0}return void 0!==qc(o,e.value);default:return y.warn("Ignoring unsupported condition operation 'colDoesExists' for control type "+i),!0}}function qc(e,t){return!(null!=t&&!se(t))||e.find((function(e){return B(t,e)}))}var Gc=ae;var Wc=function(e,t){return Gc(t,(function(t){return e[t]}))},$c=he;var Xc=Ce,Kc=ue,Yc=M,Jc=bl,Qc=function(e){return null==e?[]:Wc(e,$c(e))},Zc=Math.max;var eu=function(e,t,r,n){e=Kc(e)?e:Qc(e),r=r&&!n?Jc(r):0;var o=e.length;return r<0&&(r=Zc(o+r,0)),Yc(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Xc(e,t,r)>-1};function tu(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 eu(e.value,t.value);default:return y.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 eu(e.value,n);default:return y.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 y.warn("Ignoring unsupported condition operation 'contains' for control type "+e.control.controlType),!0}function ru(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 y.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 y.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 y.warn("Ignoring unsupported condition operation 'equals' for control type "+e.control.controlType),!0}function nu(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.controlType===u.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 y.warn("Ignoring condition operation 'greaterThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function ou(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.controlType===u.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 y.warn("Ignoring condition operation 'isEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function iu(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.controlType===u.DATEPICKERRANGE?""!==e.value[0].trim()||""!==e.value[1].trim():null!==e.value&&0!==e.value.length;default:return y.warn("Ignoring condition operation 'isNotEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function au(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.controlType===u.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 y.warn("Ignoring condition operation 'lessThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function su(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return y.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):(y.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" with input data type "+i),!0)}function lu(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!eu(e.value,t.value);default:return y.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!eu(e.value,n);default:return y.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 y.warn("Ignoring unsupported condition operation 'notContains' for control type "+e.control.controlType),!0}function pu(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 y.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 y.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 y.warn("Ignoring unsupported condition operation 'notEquals' for control type "+e.control.controlType),!0}function cu(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return y.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):(y.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" with input data type "+i),!0)}function uu(e,t,r,n){if(e.value){if(e.control.controlType!==u.DATEPICKER&&e.control.controlType!==u.DATEPICKERRANGE){var o="time"===r?"HH:mm:ss:xxx":ft,i=gr(e.value,o,new Date);return yr(i)}return!0}return!0}function du(e,t,n,o){"column"!==e.control.role&&y.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=qs(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)?qs(e,i,"type")===a:(void 0!==e.value&&y.warn("dmTypeEquals cannot handle the given type: "+r(e.value)),!1))}function hu(e,t,n,o){"column"!==e.control.role&&y.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=qs(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)?qs(e,i,"type")!==a:(void 0!==e.value&&y.warn("dmTypeNotEquals cannot handle the given type: "+r(e.value)),!1))}function fu(e,t,n,o){"column"!==e.control.role&&y.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=qs(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)?qs(e,i,"measure")===a:(void 0!==e.value&&y.warn("dmMeasurementEquals cannot handle the given type: "+r(e.value)),!1))}function mu(e,t,n,o){"column"!==e.control.role&&y.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=qs(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)?qs(e,i,"measure")!==a:(void 0!==e.value&&y.warn("dmMeasurementNotEquals cannot handle the given type: "+r(e.value)),!1))}function vu(e,t,n,o){"column"!==e.control.role&&y.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=qs(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)?qs(e,i,"modeling_role")===a:(void 0!==e.value&&y.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function yu(e,t,n,o){"column"!==e.control.role&&y.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=qs(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)?qs(e,i,"modeling_role")!==a:(void 0!==e.value&&y.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function gu(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:(y.warn("Ignoring condition operation 'lengthEquals' for parameter_ref "+e.param),!0)}function bu(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:(y.warn("Ignoring condition operation 'lengthLessThan' for parameter_ref "+e.param),!0)}function Eu(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:(y.warn("Ignoring condition operation 'lengthGreaterThan' for parameter_ref "+e.param),!0)}function Iu(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 Su(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 Su(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 Su(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 Cu(e){var t={};if(t.cellNotEmpty=Vc,t.colNotExists=jc,t.colDoesExists=zc,t.contains=tu,t.equals=ru,t.greaterThan=nu,t.isEmpty=ou,t.isNotEmpty=iu,t.lessThan=au,t.matches=su,t.notContains=lu,t.notEquals=pu,t.notMatches=cu,t.isDateTime=uu,t.dmTypeEquals=du,t.dmTypeNotEquals=hu,t.dmMeasurementEquals=fu,t.dmMeasurementNotEquals=mu,t.dmRoleEquals=vu,t.dmRoleNotEquals=yu,t.lengthEquals=gu,t.lengthLessThan=bu,t.lengthGreaterThan=Eu,Array.isArray(e)){var r,n=Iu(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:y.warn("Custom operator missing require function of `op` or `evaluate`")}}catch(e){n.e(e)}finally{n.f()}}return t}function Ru(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 Tu(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 Tu(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 Tu(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 _u=function(){function r(){e(this,r),this.propertiesStore=new ka,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.controls={},this.actions={},this.customControls=[],this.summaryPanelControls={},this.controllerHandlerCalled=!1,this.commandStack=new fr,this.custPropSumPanelValues={},this.controlFactory=new Fc(this),this.sharedCtrlInfo=[],this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this.conditionOps=Cu(),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 pe(this.propertiesConfig,"locale",Ft)}},{key:"isTearsheetContainer",value:function(){return"Tearsheet"===this.propertiesConfig.containerType}},{key:"setParamDef",value:function(e){var t=pe(this.getPropertiesConfig(),"containerType"),r=pe(this.getPropertiesConfig(),"convertTypes"),n=Ji.makeForm(e,t,r);this.setForm(n)}},{key:"setForm",value:function(e,t){if(this.form=e,this.reactIntl=t,this.form){this.controls={},this.setControlStates({}),this.setErrorMessages({}),this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this._parseUiConditions();var r,n=[];!function(e,t,r){if(r.uiItems){var n,o=La(r.uiItems);try{for(o.s();!(n=o.n()).done;)Pa(e,t,n.value)}catch(e){o.e(e)}finally{o.f()}}}(n,this.actions,this.form),this.saveControls(n),this._parseSummaryControls(n),this.parsePanelTree(),_s(this.controls,this.validationDefinitions,this.requiredDefinitionsIds,t);var o={};if(this.form.data&&(r=this.form.data.datasetMetadata,o=this.form.data.uiCurrentParameters?ca({},this.form.data.currentParameters,this.form.data.uiCurrentParameters):this.form.data.currentParameters),this.setDatasetMetadata(r),this.setPropertyValues(o,!0),this._addToControlValues(),this._addToControlValues(!0),this.setInitialAddRemoveRows(),this.setInitialTableButtonState(),this.uiItems=this.form.uiItems,!se(this.uiItems)&&!se(this.uiItems[0].tabs)){var i=this.uiItems[0].tabs.filter((function(e){return e.content.itemType!==E.TEARSHEET}));i.length&&this.propertiesStore.setActiveTab(i[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=Ru(this.form.conditions);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.visible?Na(this.visibleDefinitions,r,_t.VISIBLE):r.enabled?Na(this.enabledDefinitions,r,_t.ENABLED):r.validation?Na(this.validationDefinitions,r,_t.VALIDATION):r.filter?Na(this.filterDefinitions,r,_t.FILTER):r.enum_filter?Na(this.filteredEnumDefinitions,r,_t.FILTEREDENUM):r.allow_change?Na(this.allowChangeDefinitions,r,_t.ALLOWCHANGE):r.default_value?Na(this.conditionalDefaultDefinitions,r,_t.CONDITIONALDEFAULT):y.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 _t.VISIBLE:n=this.visibleDefinitions[r];break;case _t.ENABLED:n=this.enabledDefinitions[r];break;case _t.FILTEREDENUM:n=this.filteredEnumDefinitions[r];break;case _t.ALLOWCHANGE:n=this.allowChangeDefinitions[r];break;case _t.CONDITIONALDEFAULT:n=this.conditionalDefaultDefinitions[r];break;case _t.VALIDATION:n=this.validationDefinitions[r]}var o=[];for(var i in n)if(le(n,i)){var a=Ts(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[Lt]={controls:[],panels:[],actions:[]},function(e,t,r){if(t.uiItems){var n,o=Fa(t.uiItems);try{for(o.s();!(n=o.n()).done;)Ua(e,n.value,r)}catch(e){o.e(e)}finally{o.f()}}}(this.panelTree,this.form,Lt)}},{key:"_addToControlValues",value:function(e){for(var t in this.controls)if(le(this.controls,t)){var r=this.controls[t],n={name:r.name},o=this.getPropertyValue(n);e?null!=o&&void 0!==o.parameterRef&&(o=this.getPropertyValue({name:o.parameterRef}),this.updatePropertyValue(n,o,!0,Dt.INITIAL_LOAD)):"structuretable"===r.controlType&&!1===r.addRemoveRows&&!0===r.includeAllFields?(o=this._populateFieldData(o,r),this.updatePropertyValue(n,o,!0,Dt.INITIAL_LOAD)):void 0!==r.valueDef&&void 0!==r.valueDef.defaultValue&&void 0===o?(o=r.valueDef.defaultValue,F(r)&&(o=V(r.valueDef.isList,r.subControls,o)),this.updatePropertyValue(n,o,!0,Dt.INITIAL_LOAD)):"structureeditor"===r.controlType&&(!o||Array.isArray(o)&&0===o.length)&&Array.isArray(r.defaultRow)&&this.updatePropertyValue(n,r.defaultRow,!0,Dt.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===m.COLUMN&&e.valueDef.propType===f.STRUCTURE)return!0;if("array"===h(e.subControls))for(var t in e.subControls)if(le(e.subControls,t)){var r=e.subControls[t];if(r.role===m.COLUMN&&r.valueDef.propType===f.STRUCTURE)return!0}return!1}},{key:"_canHaveMultipleSchemas",value:function(){for(var e in this.controls)if(le(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"!==h(i.dmDefault)?o=x(i,t,r):"undefined"!==h(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=Cu(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=us(e,t[e.name][a].definition,r,o)}catch(t){y.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=Ru(this.sharedCtrlInfo);try{for(i.s();!(r=i.n()).done;){var a,s=r.value,l=Ru(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=Ru(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=Ru(l);try{for(c.s();!(p=c.n()).done;){var u=p.value;if(Array.isArray(u)){var d=I(s);d>=0&&d<u.length&&o.push(v(u[d],s))}else o.push(v(u,s))}}catch(e){c.e(e)}finally{c.f()}}else o.push(v(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){y.warn("Error filtering shared controls "+e)}return e}},{key:"setDatasetMetadata",value:function(e){var t=[],r=[];if(e){var n=K(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=Ru(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=Ru(n);try{for(p.s();!(l=p.n()).done;){var c=l.value;if(t.push(c.name),c.fields){var u,d=Ru(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=Ru(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){bs(e,this,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"validatePropertiesValues",value:function(){ys(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 D(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=Ba(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 y.warn("Control not found for "+e.name),r;var n=t.getDefinitions(e,_t.ALLOWCHANGE,kt.CONTROLS);if(n.length>0)try{var o,i=ms(n);try{for(i.s();!(o=i.n()).done;)if(!(r=cs(o.value.definition,e,t)))return r}catch(e){i.e(e)}finally{i.f()}}catch(e){y.warn("Error thrown in validation: "+e)}return r}(e,this)){if(Es(e,this),r||bs(e,this,!0),this.handlers.propertyListener){var a=this._convertObjectStructure(o,t),s={action:Mt.UPDATE_PROPERTY,property:o,value:a};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===bt.DISABLED&&s||p===bt.HIDDEN&&a||c===u.HIDDEN&&l)return i;if(i=A(o),Array.isArray(i))for(var d=0;d<i.length;d++){var h=i[d];if(Array.isArray(h))for(var f=0;f<h.length;f++){var m={name:n.name,row:d,col:f},v=this.getControlState(m),y=this.getControlType(m);(v===bt.DISABLED&&s||v===bt.HIDDEN&&a||y===u.HIDDEN&&l)&&(i[d][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(le(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(le(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=K(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}})),pe(this.getPropertiesConfig(),"convertValueDataTypes")&&(n=H(n,o))}if(this.propertiesStore.setPropertyValues(n),t){var i={};se(n)||(Object.keys(n).forEach((function(e){!function(e,t,r){if(!t.getControl(e))return y.warn("Control not found for "+e.name),null;var n=t.getDefinitions(e,_t.CONDITIONALDEFAULT,kt.CONTROLS);if(n.length>0)try{var o,i=ms(n);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a.definition.default_value.parameter_ref;s in r||cs(a.definition,e,t)&&(r[s]=a.definition.default_value.value)}}catch(e){i.e(e)}finally{i.f()}}catch(e){y.warn("Error thrown in validation: "+e)}}({name:e},r,i)})),se(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])}})))}gs(this),this.handlers.propertyListener&&this.handlers.propertyListener({action:Mt.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===bt.DISABLED||i===bt.HIDDEN||a===u.HIDDEN)return null}var s=this.propertiesStore.getErrorMessage(o,this.reactIntl);return r&&s&&s.type===gt.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(le(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!==bt.HIDDEN&&n!==bt.DISABLED&&o!==u.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(le(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(le(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?(!le(t.controls,e.name)||le(t.controls,e.name)&&e.controlType!==u.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}))):y.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===bt.DISABLED||t===bt.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=pe(this.getPropertiesConfig(),"containerType"),o=this.controlFactory.createFormControl(t,r,this.getLight(),n),i=[];return Oa(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=Ru(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 y.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===f.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}(),ku={$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}}},wu={$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"]},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"]}]}}},Lu={$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"]}}},Au={$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 Du(e){var t=function(){var e=new Tr,t="https://api.dataplatform.ibm.com/schemas/common-canvas/",r="https://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(ku,t+"parameter-defs/pipeline-flow-v3-schema.json"),e.addSchema(wu,r+"operators/uihints-v3-schema.json"),e.addSchema(Lu,r+"operators/conditions-v3-schema.json"),e.addSchema(Au,r+"operators/operator-v3-schema.json"),e.addSchema(Ae,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,ku,0,t)}function Ou(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 Pu=function(o){n(p,l);var i=Ou(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=d(t.controller.getReactIntl(),yt.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,t=d(this.props.controller.getReactIntl(),yt.TITLE_EDITOR_LABEL),r=d(this.props.controller.getReactIntl(),yt.TITLE_EDITOR_HELPBUTTON_LABEL),n=d(this.props.controller.getReactIntl(),yt.PROPERTIESEDIT_CLOSEBUTTON_LABEL),o=[gt.ERROR,gt.WARNING],i=pe(this.state.titleValidation,"type",null)===gt.WARNING,a=pe(this.state.titleValidation,"type",null)===gt.ERROR,l=!1===this.props.labelEditable||this.state.focused?s.createElement("div",null):s.createElement(Ve,{kind:"ghost",className:"properties-title-editor-btn edit","data-id":"edit",onClick:this.editTitleClickHandler,tooltipPosition:"bottom",tooltipAlignment:"end",renderIcon:Kt,size:"small",iconDescription:t,hasIconOnly:!0}),p=this.props.help?s.createElement(Ve,{kind:"ghost",className:"properties-title-editor-btn help","data-id":"help",onClick:this.helpClickHandler,tooltipPosition:"bottom",renderIcon:or,size:"small",iconDescription:r,hasIconOnly:!0}):null,c=this.props.closeHandler?s.createElement("div",{className:"properties-close-button"},s.createElement(Ve,{kind:"ghost",size:"small","data-id":"close",onClick:this.props.closeHandler,tooltipPosition:"left",renderIcon:ir,iconDescription:n,hasIconOnly:!0})):null,u=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(Er,{className:"properties-title-heading-icon",src:this.props.icon}):null;(h||f)&&(u=s.createElement("div",{className:"properties-title-heading"},f,h,p))}return s.createElement("div",{className:dt("properties-title-editor",{"properties-title-with-heading":this.headingEnabled})},c,u,s.createElement("div",{className:dt("properties-title-editor-input",{"properties-title-editor-with-help":this.props.help&&!this.headingEnabled&&!o.includes(pe(this.state.titleValidation,"type")),"properties-title-editor-with-warning":i,"properties-title-editor-with-error":a})},s.createElement(Ge,Ct({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:pe(this.state.titleValidation,"message"),warn:i,warnText:pe(this.state.titleValidation,"message")},this.state.focused&&{className:"properties-title-editor-focused"})),o.includes(pe(this.state.titleValidation,"type"))?null:l),this.headingEnabled||o.includes(pe(this.state.titleValidation,"type"))?null:p)}}]),p}(),Nu=zt((function(e,t){return{title:e.componentMetadataReducer.title}}),(function(e,t){return{setTitle:function(t){e($n(t))}}}))(Pu),xu='/*\n * Copyright 2017-2022 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 Bu(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 Mu=parseInt(xu.flyoutWidthSmall,10),Fu=parseInt(xu.flyoutWidthMedium,10),Vu=parseInt(xu.flyoutWidthLarge,10),Uu=parseInt(xu.flyoutWidthMax,10),Hu=function(r){n(i,r);var o=Bu(i);function i(t){var r;e(this,i),(r=o.call(this,t)).propertiesController=new _u,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),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:Mt.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&&(!D(Object.keys(e.propertiesInfo),Object.keys(this.props.propertiesInfo))||e.propertiesInfo.formData&&!D(e.propertiesInfo.formData,this.props.propertiesInfo.formData)||e.propertiesInfo.parameterDef&&!D(e.propertiesInfo.parameterDef,this.props.propertiesInfo.parameterDef)||e.propertiesInfo.appData&&!D(e.propertiesInfo.appData,this.props.propertiesInfo.appData))){this.setForm(e.propertiesInfo);var t=this.propertiesController.getForm().editorSize;this.state.editorSize!==t&&this.setState({editorSize: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&&!D(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){var t=null;e.formData&&0!==Object.keys(e.formData).length?t=e.formData:e.parameterDef&&(this.props.propertiesConfig.schemaValidation&&Du(e.parameterDef),t=Ji.makeForm(e.parameterDef,this.props.propertiesConfig.containerType)),t&&t.data&&t.data.inputDataModel&&!t.data.datasetMetadata&&(t.data.datasetMetadata=q(t.data.inputDataModel)),this.propertiesController.setForm(t,this.props.intl),t&&(this.originalTitle=t.label),this.initialValueInfo={additionalInfo:{messages:[]},undoInfo:{}},this.uiParameterKeys=this._getUiOnlyKeys(),this.initialValueInfo=this._setValueInforProperties(this.initialValueInfo),e.messages&&(this.initialValueInfo.additionalInfo.messages=K(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:d(this.props.intl,yt.PROPERTIESEDIT_APPLYBUTTON_LABEL)}},{key:"getRejectButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.secondary?this.props.propertiesConfig.buttonLabels.secondary:d(this.props.intl,yt.PROPERTIESEDIT_REJECTBUTTON_LABEL)}},{key:"getPropertiesActionLabel",value:function(){if(this.props.callbacks.propertiesActionLabelHandler){var e=this.props.callbacks.propertiesActionLabelHandler();if(e)return e}return d(this.props.intl,yt.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(sr,{type:Et.CHEVRONARROWS.LEFT,className:"properties-resize-caret-left"});return this.propertiesController.getForm().editorSize===p.SMALL?this.state.editorSize===p.MEDIUM&&(e=s.createElement(sr,{type:Et.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.MEDIUM?this.state.editorSize===p.LARGE&&(e=s.createElement(sr,{type:Et.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.LARGE&&this.state.editorSize===p.MAX&&(e=s.createElement(sr,{type:Et.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 y.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>=Fu)return y.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+Fu),!1;if(!e.min&&e.max&&e.max<=Mu)return y.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+Mu),!1;if(e.min>=e.max)return y.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>=Vu)return y.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+Vu),!1;if(!e.min&&e.max&&e.max<=Fu)return y.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+Fu),!1;if(e.min>=e.max)return y.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>=Uu)return y.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<=Vu)return y.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+Vu),!1;if(e.min>=e.max)return y.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&&(y.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===Vt.NULL,o=this.propertiesController.getPropertyValues({filterHiddenDisabled:n,applyProperties:r,valueFilters:this.props.propertiesConfig.returnValueFiltering});return this.uiParameterKeys.length>0?(e.properties=ln(o,this.uiParameterKeys),e.uiProperties=Mr(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(le(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 ea(r,this.initialValueInfo,this.props.propertiesInfo.appData,this.props.callbacks.applyPropertyChanges,o);this.propertiesController.getCommandStack().do(i),this.currentParameters=this.propertiesController.getPropertyValues(),this.initialValueInfo=K(r),this.previousErrorMessages=this.propertiesController.getAllErrorMessages()}e&&this.cancelHandler(Ut)}},{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,Ht);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),u=null,h=!1;if(this.props.propertiesConfig.rightFlyout&&(p=s.createElement(Nu,{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}),h=this.props.propertiesConfig.heading&&(a.icon||a.heading),c=s.createElement(En,{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?d(this.props.intl,yt.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL):d(this.props.intl,yt.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);u=s.createElement(Ve,{kind:"ghost",className:"properties-btn-resize",onClick:this.resize.bind(this),"aria-label":m},f)}var v=s.createElement(Ko,{key:"editor-form-key",controller:this.propertiesController,additionalComponents:this.props.propertiesInfo.additionalComponents,showPropertiesButtons:this.showPropertiesButtons,customPanels:this.props.customPanels,rightFlyout:this.props.propertiesConfig.rightFlyout});l="Editing"===this.props.propertiesConfig.containerType?s.createElement(fn,{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:dt("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(yn,{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(un,{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=dt("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(qt,{store:this.propertiesController.getStore()},s.createElement("aside",{"aria-label":d(this.props.intl,yt.PROPERTIES_LABEL,{label:i}),role:"complementary",ref:function(t){return e.commonProperties=t},className:y,onBlur:this.onBlur,style:b},u,p,l,c))}return s.createElement("div",null)}}]),i}(s.Component),ju=vr(Hu,{forwardRef:!0});function zu(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 qu=function(r){n(i,r);var o=zu(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(ju,{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:d(this.props.intl,yt.PROPERTIES_UNEXPECTED_MESSAGE),type:"error"},n=s.createElement("div",{className:"properties-error-heading"},s.createElement(Js,{messageInfo:r})),o=d(this.props.intl,yt.PROPERTIES_SUPPORT_MESSAGE),i=d(this.props.intl,yt.PROPERTIESEDIT_CLOSEBUTTON_LABEL),a=this.props.callbacks.closePropertiesDialog,l=d(this.props.intl,yt.PROPERTIESEDIT_REVERTBUTTON_LABEL),p=this.revertState,u=d(this.props.intl,yt.PROPERTIES_ERROR_LABEL);return"Custom"===this.props.propertiesConfig.containerType?(!0===this.propertiesMainHasMounted?(e=d(this.props.intl,yt.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=d(this.props.intl,yt.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":u,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":u,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=d(this.props.intl,yt.PROPERTIES_REVERT_MESSAGE),t=s.createElement(un,{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=d(this.props.intl,yt.PROPERTIES_CLOSE_MESSAGE),t=s.createElement("div",{className:"properties-modal-error"},s.createElement(un,{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);qu.defaultProps={propertiesConfig:{containerType:"Custom",rightFlyout:!0,applyOnBlur:!1,trimSpaces:!0,disableSaveOnRequiredErrors:!1,enableResize:!0,conditionReturnValueHandling:"value",schemaValidation:!1,applyPropertiesWithoutEdit:!1,maxLengthForMultiLineControls:1024,maxLengthForSingleLineControls:128,convertValueDataTypes:!1,showRequiredIndicator:!0,locale:Ft},callbacks:{},light:!0};var Gu=vr(qu,{forwardRef:!0});export{Ji as F,_u as P,Gu as c};
2
- //# sourceMappingURL=common-properties-21c4c338.js.map