@elyra/canvas 13.41.0 → 13.41.1

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 (44) hide show
  1. package/dist/{common-canvas-faa1c8f9.js → common-canvas-614f599a.js} +2 -2
  2. package/dist/{common-canvas-faa1c8f9.js.map → common-canvas-614f599a.js.map} +1 -1
  3. package/dist/{common-canvas-91cd796c.js → common-canvas-63cf169d.js} +2 -2
  4. package/dist/{common-canvas-91cd796c.js.map → common-canvas-63cf169d.js.map} +1 -1
  5. package/dist/common-canvas.es.js +1 -1
  6. package/dist/common-canvas.js +1 -1
  7. package/dist/common-properties-9cf649aa.js +2 -0
  8. package/dist/common-properties-9cf649aa.js.map +1 -0
  9. package/dist/common-properties-dcfb5ebe.js +2 -0
  10. package/dist/common-properties-dcfb5ebe.js.map +1 -0
  11. package/dist/flexible-table-4463a683.js +2 -0
  12. package/dist/flexible-table-4463a683.js.map +1 -0
  13. package/dist/{flexible-table-2cf782bc.js → flexible-table-e75a6d5b.js} +2 -2
  14. package/dist/flexible-table-e75a6d5b.js.map +1 -0
  15. package/dist/{index-0b2515f9.js → index-355fd3e1.js} +2 -2
  16. package/dist/{index-0b2515f9.js.map → index-355fd3e1.js.map} +1 -1
  17. package/dist/{index-27371669.js → index-4f11af02.js} +2 -2
  18. package/dist/{index-27371669.js.map → index-4f11af02.js.map} +1 -1
  19. package/dist/lib/canvas.es.js +1 -1
  20. package/dist/lib/canvas.js +1 -1
  21. package/dist/lib/properties/field-picker.es.js +1 -1
  22. package/dist/lib/properties/field-picker.js +1 -1
  23. package/dist/lib/properties/flexible-table.es.js +1 -1
  24. package/dist/lib/properties/flexible-table.js +1 -1
  25. package/dist/lib/properties.es.js +1 -1
  26. package/dist/lib/properties.js +1 -1
  27. package/dist/styles/common-canvas.min.css +1 -1
  28. package/dist/{toolbar-cd90b048.js → toolbar-23100028.js} +2 -2
  29. package/dist/{toolbar-cd90b048.js.map → toolbar-23100028.js.map} +1 -1
  30. package/dist/{toolbar-43e63291.js → toolbar-9f98432a.js} +2 -2
  31. package/dist/{toolbar-43e63291.js.map → toolbar-9f98432a.js.map} +1 -1
  32. package/package.json +2 -2
  33. package/src/command-actions/commonPropertiesAction.js +10 -4
  34. package/src/common-properties/components/virtualized-grid/virtualized-grid.jsx +16 -8
  35. package/src/toolbar/toolbar-sub-menu-item.jsx +11 -13
  36. package/src/toolbar/toolbar.scss +1 -1
  37. package/stats.html +1 -1
  38. package/dist/common-properties-02756e6a.js +0 -2
  39. package/dist/common-properties-02756e6a.js.map +0 -1
  40. package/dist/common-properties-d054dfb5.js +0 -2
  41. package/dist/common-properties-d054dfb5.js.map +0 -1
  42. package/dist/flexible-table-1cf1378f.js +0 -2
  43. package/dist/flexible-table-1cf1378f.js.map +0 -1
  44. package/dist/flexible-table-2cf782bc.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{_ as e,a as t,b as r}from"./createClass-a140e270.js";import{_ as o,a as n,b as i}from"./inherits-860188e5.js";import a,{Component as s}from"react";import{S as l,P as p,f as c,_ as u,C as d,t as h,T as f,a as m,s as v,l as y,e as g,A as b,b as E,I,g as S,c as C,F as k,G as T,E as w,d as R,h as _,O as A,i as L,j as O,k as D,m as N,n as P,o as x,p as B,q as M,r as F,u as V,v as U,w as H,x as j}from"./index-4f11af02.js";import{T as z,U as q,M as G,a as W,H as $,d as X}from"./toolbar-23100028.js";import{c as K,_ as Y,k as J,a as Q,b as Z,d as ee,e as te}from"./en-ba70b655.js";import{_ as re,a as oe,b as ne,i as ie,h as ae,g as se,c as le,e as pe,d as ce,f as ue,j as de,k as he,s as fe,l as me}from"./common-canvas-utils-99c8d7d1.js";import{h as ve,C as ye,a as ge,b as be,c as Ee,M as Ie,_ as Se,D as Ce,d as ke,e as Te,T as we,f as Re,S as _e,g as Ae,i as Le,j as Oe,k as De,l as Ne,R as Pe,m as xe,n as Be,o as Me,p as Fe,P as Ve,q as Ue,t as He,U as je,r as ze,s as qe,E as Ge,u as We,I as $e,A as Xe,v as Ke,w as Ye,x as Je,y as Qe}from"./toInteger-78279fd2.js";import{_ as Ze,A as et,i as tt,a as rt,b as ot,u as nt,d as it,o as at}from"./datarecord-metadata-v3-schema-e5869fb9.js";import{Modal as st,ComposedModal as lt,ModalHeader as pt,ModalBody as ct,Button as ut,Accordion as dt,AccordionItem as ht,Tab as ft,TabPanel as mt,Tabs as vt,TabList as yt,TabPanels as gt,Link as bt,TextInput as Et,TextArea as It,NumberInput as St,Checkbox as Ct,Layer as kt,Dropdown as Tt,ContentSwitcher as wt,Switch as Rt,PasswordInput as _t,DatePicker as At,DatePickerInput as Lt,Toggle as Ot,CheckboxGroup as Dt,RadioButton as Nt,RadioButtonGroup as Pt,SelectItem as xt,Select as Bt,ComboBox as Mt,FilterableMultiSelect as Ft,MultiSelect as Vt,Slider as Ut,ToggletipActions as Ht,Toggletip as jt,ToggletipButton as zt,ToggletipContent as qt}from"@carbon/react";import{Portal as Gt}from"react-portal";import{injectIntl as Wt,FormattedDate as $t}from"react-intl";import{connect as Xt,Provider as Kt}from"react-redux";import{_ as Yt,i as Jt,a as Qt,b as Zt,c as er,d as tr,e as rr,f as or,g as nr,h as ir,j as ar,k as sr,l as lr,m as pr,n as cr,o as ur,p as dr,q as hr,r as fr,s as mr,t as vr}from"./isArrayLikeObject-78364f29.js";import{I as yr,A as gr,S as br,E as Er,T as Ir,D as Sr,C as Cr}from"./icon-4638ded0.js";import{v4 as kr}from"uuid";import Tr from"./lib/tooltip.es.js";import{T as wr,d as Rr,_ as _r,F as Ar,i as Lr}from"./flexible-table-4463a683.js";import Or from"react-inlinesvg";import{_ as Dr}from"./defineProperty-f3298a15.js";import{combineReducers as Nr,createStore as Pr}from"redux";import xr from"seedrandom";import Br from"./lib/command-stack.es.js";import{isValid as Mr,parse as Fr,format as Vr}from"date-fns";import Ur from"prop-types";import{C as Hr,a as jr,b as zr}from"./bucket-3-3853f4ad.js";import{EditorView as qr,Decoration as Gr,hoverTooltip as Wr,showPanel as $r,getPanel as Xr,ViewPlugin as Kr,logException as Yr,WidgetType as Jr,keymap as Qr,lineNumbers as Zr,highlightActiveLineGutter as eo,highlightSpecialChars as to,drawSelection as ro,dropCursor as oo,rectangularSelection as no,crosshairCursor as io,highlightActiveLine as ao,placeholder as so}from"@codemirror/view";import{insertNewline as lo,indentWithTab as po,defaultKeymap as co,history as uo,historyKeymap as ho}from"@codemirror/commands";import{highlightSelectionMatches as fo,searchKeymap as mo}from"@codemirror/search";import{completeFromList as vo,closeBrackets as yo,autocompletion as go,closeBracketsKeymap as bo,completionKeymap as Eo}from"@codemirror/autocomplete";import{StateEffect as Io,StateField as So,Facet as Co,combineConfig as ko,RangeSetBuilder as To,EditorState as wo,Compartment as Ro}from"@codemirror/state";import{StreamLanguage as _o,LanguageSupport as Ao,HighlightStyle as Lo,syntaxHighlighting as Oo,foldGutter as Do,indentOnInput as No,bracketMatching as Po,foldKeymap as xo}from"@codemirror/language";import{python as Bo}from"@codemirror/lang-python";import{sql as Mo}from"@codemirror/lang-sql";import{javascript as Fo}from"@codemirror/lang-javascript";import{json as Vo,jsonParseLinter as Uo}from"@codemirror/lang-json";import{getPythonHints as Ho}from"./lib/properties/getPythonHints.es.js";import{clem as jo}from"./lib/properties/clem.es.js";import{Validator as zo}from"jsonschema";var qo=re,Go=oe,Wo=ne;var $o=function(e,t,r){for(var o=-1,n=t.length,i={};++o<n;){var a=t[o],s=qo(e,a);r(s,a)&&Go(i,Wo(a,e),s)}return i},Xo=ve;var Ko=function(e,t){return $o(e,t,function(t,r){return Xo(e,r)})},Yo=Ze(function(e,t){return null==e?{}:Ko(e,t)});function Jo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jo=function(){return!!e})()}var Qo=function(){function r(){return t(this,r),function(e,t,r){return t=n(t),i(e,Jo()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,arguments)}return o(r,s),e(r,[{key:"getCarbonModalSize",value:function(){switch(this.props.bsSize){case l.SMALL:return be;case l.LARGE:case l.MAX:return ge;case l.MEDIUM:default:return ye}}},{key:"render",value:function(){var e=this.getCarbonModalSize();return a.createElement(Gt,null,a.createElement(st,{className:Ee("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},a.createElement("div",{className:"properties-modal-children"},this.props.children)))}}])}(),Zo=Qo;function en(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(en=function(){return!!e})()}var tn=function(){function r(){return t(this,r),function(e,t,r){return t=n(t),i(e,en()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,arguments)}return o(r,s),e(r,[{key:"render",value:function(){var e="properties-editing properties-"+(void 0===this.props.bsSize?"large":this.props.bsSize),t=a.createElement(p,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return a.createElement("div",{className:e},a.createElement("h2",null,this.props.title),a.createElement("div",{className:"properties-body"},this.props.children),t)}}])}(),rn=tn;function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(on=function(){return!!e})()}var nn=function(){function r(){return t(this,r),function(e,t,r){return t=n(t),i(e,on()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,arguments)}return o(r,s),e(r,[{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 a.createElement(p,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons,applyButtonEnabled:e})}}])}();nn.defaultProps={saveButtonEnabled:!0};var an=Xt(function(e,t){var r,o;return{saveButtonEnabled:!(null!==(r=t.controller)&&void 0!==r&&r.getSaveButtonDisable()),requiredErrorMessages:null===(o=t.controller)||void 0===o?void 0:o.getRequiredErrorMessages()}},null)(nn);function sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sn=function(){return!!e})()}var ln=function(){function r(){return t(this,r),function(e,t,r){return t=n(t),i(e,sn()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,arguments)}return o(r,s),e(r,[{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,o=this.props.showPropertiesButtons&&!this.props.applyOnBlur,n=!Array.isArray(r),i=this.props.applyOnBlur?null:a.createElement(an,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons,controller:this.props.controller,disableSaveOnRequiredErrors:this.props.disableSaveOnRequiredErrors});return a.createElement(Gt,null,a.createElement(lt,{className:Ee("properties-tearsheet-panel",{"properties-tearsheet-stacked":this.props.stacked}),open:this.props.open,size:"lg","aria-label":c(this.props.intl,Ie.PROPERTIES_LABEL,{label:e}),preventCloseOnClickOutside:!0,onClose:this.props.cancelHandler},null===e?null:a.createElement(pt,{className:Ee("properties-tearsheet-header",{"with-buttons":o},{"with-tabs":n},{"hide-close-button":"function"!=typeof this.props.onCloseCallback}),title:e,buttonOnClick:this.props.onCloseCallback},t?a.createElement("p",null,t):null),a.createElement(ct,{className:Ee("properties-tearsheet-body",{"with-buttons":o},{"with-tabs":n})},r),i))}}])}();ln.defaultProps={open:!1,showPropertiesButtons:!1,applyOnBlur:!1,stacked:!1};var pn=Wt(ln),cn=u;var un=function(e,t){var r=[];return cn(e,function(e,o,n){t(e,o,n)&&r.push(e)}),r},dn=Yt,hn=un,fn=Se,mn=ie;var vn=function(e,t){return(mn(e)?dn:hn)(e,fn(t))},yn="SET_PROPERTY_VALUES",gn="UPDATE_PROPERTY_VALUE",bn="REMOVE_PROPERTY_VALUE",En="SET_CONTROL_STATES",In="UPDATE_CONTROL_STATE",Sn="SET_PANEL_STATES",Cn="UPDATE_PANEL_STATE",kn="SET_ACTION_STATES",Tn="UPDATE_ACTION_STATE",wn="SET_ERROR_MESSAGES",Rn="UPDATE_ERROR_MESSAGE",_n="CLEAR_ERROR_MESSAGE",An="SET_DATASET_METADATA",Ln="UPDATE_SELECTED_ROWS",On="CLEAR_SELECTED_ROWS",Dn="SET_TITLE",Nn="SET_ACTIVE_TAB",Pn="DISABLE_ROW_MOVE_BUTTONS",xn="SET_SAVE_BUTTON_DISABLE",Bn="SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED",Mn="SET_ADD_REMOVE_ROWS",Fn="UPDATE_STATIC_ROWS",Vn="CLEAR_STATIC_ROWS",Un="SET_TABLE_BUTTON_ENABLED",Hn="SET_HIDE_EDIT_BUTTON",jn="SET_ACTIVE_TEARSHEET";function zn(e){return{type:Dn,title:e}}function qn(e){return{type:Nn,activeTab:e}}function Gn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gn=function(){return!!e})()}var Wn=function(r){function s(){return t(this,s),function(e,t,r){return t=n(t),i(e,Gn()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,arguments)}return o(s,r),e(s,[{key:"render",value:function(){var e=this.props.panel;return void 0===e&&(e=a.createElement("div",{className:"properties-control-panel"})),e}}])}(a.Component),$n=Xt(function(e,t){return{panel:t.panels[t.controller.getPropertyValue({name:t.dependsOn})]}},null)(Wn);function Xn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xn=function(){return!!e})()}var Kn=function(){function r(e){var o;return t(this,r),o=function(e,t,r){return t=n(t),i(e,Xn()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,[e]),o.modalRef=a.createRef(),o.state={style:{height:0}},o.updateDimensions=o.updateDimensions.bind(o),o.handleTabKey=o.handleTabKey.bind(o),o}return o(r,s),e(r,[{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions),document.addEventListener("keydown",this.handleTabKey),this.focusOnFirstFocusable()}},{key:"componentDidUpdate",value:function(e){var t=this.getActiveModal();if(!e.show&&this.props.show&&t)this.focusOnFirstFocusable();else if(this.props.show&&t){var r=document.activeElement;r!==document.body&&t.contains(r)||this.focusOnFirstFocusable()}}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions),document.removeEventListener("keydown",this.handleTabKey)}},{key:"getFocusables",value:function(){var e=this.getActiveModal();return e?Array.from(e.querySelectorAll("button, a[href], input, select, textarea, [tabindex]:not([tabindex='-1'])")).filter(function(e){return null!==e.offsetParent}):[]}},{key:"getActiveModal",value:function(){var e=Array.from(document.querySelectorAll("div[role='dialog'].properties-wf-content.show"));return e.length>0?e[e.length-1]:null}},{key:"focusOnFirstFocusable",value:function(){var e=this.getFocusables();e.length>0&&e[0].focus()}},{key:"updateDimensions",value:function(){if(this.wideFlyout&&(this.commonPropertiesParent||(this.commonPropertiesParent=this.findPropertyWrapper(this.wideFlyout)),this.commonPropertiesParent)){var e=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:"handleTabKey",value:function(e){if("Tab"===e.key){var t=this.getActiveModal();if(t&&this.props.show){var r=this.getFocusables();if(0!==r.length){var o=r[0],n=r[r.length-1],i=document.activeElement;if(this.props.show&&(!t.contains(i)||i===document.body))return e.preventDefault(),void(e.shiftKey?n:o).focus();e.shiftKey?i===o&&(e.preventDefault(),n.focus()):i===n&&(e.preventDefault(),o.focus())}}}}},{key:"render",value:function(){var e,t,r,o=this,n=a.createElement("div",{className:Ee("properties-wf-overlay",{show:this.props.show})});return this.props.show&&(this.props.title&&(e=a.createElement("div",{className:"properties-wf-title"},this.props.title)),t=a.createElement(p,{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=a.createElement("div",{className:"properties-wf-children"}," ",this.props.children," ")),a.createElement("div",{className:"properties-wf-modal",ref:function(e){return o.wideFlyout=e}},a.createElement(Gt,{node:this.commonPropertiesParent},n,a.createElement("div",{ref:this.modalRef,role:"dialog",className:Ee("properties-wf-content",{show:this.props.show,"properties-light-disabled":!this.props.light}),style:this.state.style},e,r,t)))}}])}();Kn.defaultProps={show:!1,okButtonEnabled:!0};var Yn=Kn;function Jn(e,t){var r=t||kr();return"".concat(Qn(e),"-").concat(r)}function Qn(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 Zn(e,t){var r=t;return e.charLimit&&(r=e.charLimit),r}function ei(e,t){if(e.length>0){var r=e.split(t);return Array.isArray(r)?r:[r]}return[]}function ti(e,t){var r=!1;if(Array.isArray(e)){if(0===e.length)return{value:"",truncated:r};var o="";return e.forEach(function(n,i){var a=ri(n),s=i===e.length-1?"":t;o+=a+s,r||(r=a.length!==n.length)}),{value:o,truncated:r}}return{value:e,truncated:r}}function ri(e){return e.length>we?e.substring(0,we)+"...":e}function oi(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 ni(e){return e.controlType===d.DATEPICKER||e.controlType===d.DATEPICKERRANGE?e.dateFormat?e.dateFormat:Ce:e.controlType===d.DATEFIELD?e.dateFormat?e.dateFormat:ke:e.timeFormat?e.timeFormat:Te}function ii(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ai(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ai(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function si(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(si=function(){return!!e})()}var li=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,si()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.state={showWideFlyout:!1},r.handleLinkClicked=r.handleLinkClicked.bind(r),r.hideWideFlyout=r.hideWideFlyout.bind(r),r.cancelWideFlyout=r.cancelWideFlyout.bind(r),r._getSummaryTables=r._getSummaryTables.bind(r),r}return o(s,r),e(s,[{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,o=ii(t);try{for(o.s();!(r=o.n()).done;){var n=r.value,i={name:n},s=this.props.controller.getControl(i),l=this.props.controller.getPropertyValue(i,{filterHiddenDisabled:!0}),p=this.props.controller.getCustPropSumPanelValue(i),u=!1;null!=p&&(l=p.value,s.summaryLabel=p.label,u=!0);var d=[];if(Array.isArray(l)){var h=0;if(s.subControls)for(var f=0;f<s.subControls.length;f++){var m={name:i.name,col:f};(this.props.controller.isSummary(m)||u)&&h++}else s.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)||u){var S=this._getSummaryDisplayValue(g[E],I),C=void 0===S?"":JSON.stringify(S).replace('"',"").replace(new RegExp('"',"g"),"")+" ";b.push(a.createElement("td",{key:"summary-table-data-"+E,className:"properties-summary-row-data ",style:{width:v}},a.createElement(wr,{content:a.createElement("span",null,C),tooltipText:C,disabled:!1})))}}else if(this.props.controller.isSummary(i)||u){var k=this._getSummaryDisplayValue(g,i);b.push(a.createElement("td",{key:"summary-table-row-data-"+y,className:"properties-summary-row-data "},a.createElement(wr,{content:a.createElement("span",null,k),tooltipText:k,disabled:!1})))}b.length>0&&d.push(a.createElement("tr",{key:"summary-table-row-"+y,className:"properties-summary-row"},b))}}else if(l&&(this.props.controller.isSummary(i)||u)){var T=this._getSummaryDisplayValue(l,i);d.push(a.createElement("tr",{key:"summary-row-"+n,className:"properties-summary-row"},a.createElement("td",{key:"summary-table-row-data-"+n,className:"properties-summary-rows-data"},T)))}if(d.length>0){var w=a.createElement("table",{role:"presentation",key:"summary-table-"+n,className:"properties-summary-table"},a.createElement("tbody",{key:"summary-body-"+n},d));if(d.length>10){var R=c(this.props.controller.getReactIntl(),Ie.LONG_TABLE_SUMMARY_PLACEHOLDER);w=a.createElement("div",{className:"properties-summary-table"},a.createElement("span",null,R))}e.push(a.createElement("div",{key:"summary-container-"+n,className:"properties-summary-values"},a.createElement("span",{key:"summary-text-"+n,className:"properties-summary-label"},s.summaryLabel),w))}}}catch(e){o.e(e)}finally{o.f()}return e}},{key:"_getSummaryDisplayValue",value:function(e,t){var r=e,o=this.props.controller.getControl(t);if(o.values&&o.valueLabels){var n=o.values.indexOf(e);n>-1&&o.valueLabels[n]&&(r=o.valueLabels[n])}return"object"===h(r)&&(r=o.valueDef.propType===f.STRUCTURE&&o.role===m.COLUMN?v(e,o):JSON.stringify(r)),r}},{key:"_getSummaryIconState",value:function(){var e=this,t=this.props.controller.getSummaryPanelControls(this.props.panel.id),r={},o=0,n=0;if(Array.isArray(t)&&t.forEach(function(t){var i=e.props.controller.getErrorMessage({name:t},!0);Jt(i)||(i.type===Re.WARNING&&(n+=1),i.type===Re.ERROR&&(o+=1)),Jt(i)||Jt(r)&&"error"===r.type||(r=i)}),!Jt(r)){var i="";return o>0&&0===n?i=c(this.props.controller.getReactIntl(),Ie.CONTROL_SUMMARY_ERROR,{errorMsgCount:o}):o>0&&n>0?i=c(this.props.controller.getReactIntl(),Ie.CONTROL_SUMMARY_ERROR_WARNING,{errorMsgCount:o,warningMsgCount:n}):0===o&&n>0&&(i=c(this.props.controller.getReactIntl(),Ie.CONTROL_SUMMARY_WARNING,{warningMsgCount:n})),a.createElement(Tr,{id:"summary-icon",tip:i,className:"properties-tooltips"},a.createElement(yr,{type:r.type,className:"properties-summary-link-icon ".concat(r.type)}))}return null}},{key:"render",value:function(){var e=this._getSummaryIconState(),t=a.createElement("div",{className:"properties-summary-link-container"},a.createElement(ut,{className:"properties-summary-link-button",onClick:this.handleLinkClicked,size:"sm",kind:"ghost",renderIcon:gr},this.props.panel.label),e),r=c(this.props.controller.getReactIntl(),Ie.APPLYBUTTON_LABEL),o=c(this.props.controller.getReactIntl(),Ie.REJECTBUTTON_LABEL),n=this.state.showWideFlyout?a.createElement(Yn,{cancelHandler:this.cancelWideFlyout,okHandler:this.hideWideFlyout,show:!0,applyLabel:r,rejectLabel:o,title:this.props.panel.label,light:this.props.controller.getLight(),okButtonEnabled:this.props.okButtonEnabled},a.createElement("div",null,this.props.children)):a.createElement("div",null),i=this.props.panel.className?this.props.panel.className:"",s=Ee("properties-summary-panel","properties-control-panel",{hide:this.props.panelState===_e.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},i);return a.createElement("div",{className:s,disabled:this.props.panelState===_e.DISABLED,"data-id":Qn({name:this.props.panel.id})},n,t,this._getSummaryTables())}}])}(a.Component),pi=Xt(function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),okButtonEnabled:!t.controller.getWideFlyoutPrimaryButtonDisabled({name:t.panel.id})}},null)(li);function ci(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ci=function(){return!!e})()}var ui=function(r){function s(e){var r,o;return t(this,s),o=function(e,t,r){return t=n(t),i(e,ci()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),o.panelTitleHandler=null!==(r=e.controller.getHandlers().panelTitleHandler)&&void 0!==r?r:null,o}return o(s,r),e(s,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===_e.DISABLED,o=(null===(e=this.panelTitleHandler)||void 0===e?void 0:e.call(this,{panelId:this.props.panel.id,label:this.props.panel.label}))||this.props.panel.label;return a.createElement("div",{className:Ee("properties-twisty-panel",{hide:this.props.panelState===_e.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},{"properties-twisty-custom-title":this.props.panel.label!==o},t),"data-id":Qn({name:this.props.panel.id})},a.createElement(dt,{disabled:r},a.createElement(ht,{disabled:r,open:this.props.panel.open,title:o,className:"properties-twisty-accordion-item"},this.props.children)))}}])}(a.Component),di=Xt(function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}},null)(ui);function hi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hi=function(){return!!e})()}var fi=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,hi()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.state={panel:null,title:null,hideHandler:null,subPanelVisible:!1},r.showSubDialog=r.showSubDialog.bind(r),r.hideSubDialog=r.hideSubDialog.bind(r),r}return o(s,r),e(s,[{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=a.createElement(Zo,{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=a.createElement(Yn,{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()},a.createElement("div",null,this.state.panel)));return a.createElement(a.Fragment,null,e,this.props.children)}}])}(a.Component);function mi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mi=function(){return!!e})()}fi.defaultProps={rightFlyout:!1};var vi=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,mi()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.showSubPanel=r.showSubPanel.bind(r),r.onSubPanelHidden=r.onSubPanelHidden.bind(r),r}return o(s,r),e(s,[{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=c(this.props.controller.getReactIntl(),Ie.APPLYBUTTON_LABEL),r=c(this.props.controller.getReactIntl(),Ie.REJECTBUTTON_LABEL),o=a.createElement(ut,{className:"properties-subpanel-button",type:"button",size:"sm",kind:"secondary",onClick:this.showSubPanel},this.props.label||"");return a.createElement(fi,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:t,rejectLabel:r,controller:this.props.controller},o)}}])}(a.Component);function yi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yi=function(){return!!e})()}var gi=function(r){function s(e){var r;t(this,s),r=function(e,t,r){return t=n(t),i(e,yi()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]);var o="";return e.children.forEach(function(e,t){0===t?o="1fr":o+=" 1fr"}),r.style={gridTemplateColumns:o},r}return o(s,r),e(s,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return a.createElement("div",{className:Ee("properties-column-panel",{hide:this.props.panelState===_e.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===_e.DISABLED,"data-id":Qn({name:this.props.panel.id}),style:this.style},this.props.children)}}])}(a.Component),bi=Xt(function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}},null)(gi);function Ei(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ei=function(){return!!e})()}var Ii=function(r){function s(){return t(this,s),function(e,t,r){return t=n(t),i(e,Ei()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,arguments)}return o(s,r),e(s,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return this.props.children.length>0?a.createElement("div",{className:Ee("properties-control-panel",{hide:this.props.panelState===_e.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},{"tearsheet-container":this.props.controller.isTearsheetContainer()},e),disabled:this.props.panelState===_e.DISABLED,"data-id":Qn({name:this.props.panel.id})},this.props.children):null}}])}(a.Component),Si=Xt(function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}},null)(Ii);function Ci(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ci=function(){return!!e})()}var ki=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Ci()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.state={activeTabId:""},r.uuid=kr(),r}return o(s,r),e(s,[{key:"onClick",value:function(e){this.setState({activeTabId:e})}},{key:"render",value:function(){for(var e=[],t=[],r=0,o=0,n=this.props.className?this.props.className:"",i=c(this.props.controller.getReactIntl(),Ie.SUBTABS_TABLIST_LABEL),s=0;s<this.props.tabs.length;s++){var l=this.props.tabs[s],p=this.props.controller.getPanelState({name:l.group});if(p!==_e.HIDDEN){var u=this.props.genUIItem(s,l.content);this.state.activeTabId===l.group&&p!==_e.DISABLED&&(r=o),e.push(a.createElement(ft,{key:"subtabs.tab.".concat(s,"-").concat(this.uuid),disabled:p===_e.DISABLED,className:Ee("properties-subtab",{"properties-leftnav-subtab-item":this.props.leftnav}),title:l.text,onClick:this.onClick.bind(this,l.group),"data-id":Qn({name:l.group})},l.text)),t.push(a.createElement(mt,{key:"subtabs.tab.".concat(s,"-").concat(this.uuid),className:"properties-subtab-panel"},u)),o++}}return a.createElement("div",{className:Ee("properties-sub-tab-container",{vertical:!this.props.rightFlyout},{"properties-control-nested-panel":this.props.nestedPanel},{"properties-leftnav-container":this.props.leftnav},n)},a.createElement(vt,{selectedIndex:r},a.createElement(yt,{className:Ee("properties-subtabs",{"properties-leftnav-subtabs":this.props.leftnav}),"aria-label":i},e),a.createElement(gt,null,t)))}}])}(a.Component);ki.defaultProps={leftnav:!1};var Ti=ki;function wi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wi=function(){return!!e})()}var Ri=function(){function r(){return t(this,r),function(e,t,r){return t=n(t),i(e,wi()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,arguments)}return o(r,s),e(r,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===_e.HIDDEN,o=this.props.panelState===_e.DISABLED,n=this.props.panel.label?a.createElement("div",{className:"panel-label"},this.props.panel.label):null;if(this.props.panel.description&&!Jt(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 s=a.createElement(Tr,{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||o,showToolTipOnClick:!0},a.createElement(yr,{type:Ae.INFORMATION,className:"properties-control-description-icon-info"}));n=a.createElement("div",{className:Ee("properties-label-container")},n,s)}else e=a.createElement("div",{className:"panel-description","aria-disabled":o},i)}return a.createElement("div",{className:Ee("properties-text-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),disabled:o},n,e)}}])}(),_i=Xt(function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),propertyValues:t.controller.getPropertyValues()}},null)(Ri);function Ai(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ai=function(){return!!e})()}var Li=function(){function r(){return t(this,r),function(e,t,r){return t=n(t),i(e,Ai()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,arguments)}return o(r,s),e(r,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===_e.HIDDEN,o=this.props.panelState===_e.DISABLED;if(this.props.panel.label){var n;if(this.props.panel.description&&!Jt(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}),n=a.createElement(Tr,{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||o,showToolTipOnClick:!0},a.createElement(yr,{type:Ae.INFORMATION,className:"properties-control-description-icon-info"}))}e=a.createElement("div",{className:Ee("properties-label-container")},a.createElement("label",{className:"properties-control-label"},this.props.panel.label),n)}return a.createElement("div",{className:Ee("properties-action-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),"data-id":Qn({name:this.props.panel.id}),disabled:o},e,this.props.children)}}])}(),Oi=Xt(function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}},null)(Li);function Di(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Di=function(){return!!e})()}var Ni=function(r){function s(e){var r;t(this,s),r=function(e,t,r){return t=n(t),i(e,Di()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.icon=null;var o=r.props,l=o.controller,p=o.action,c=l.getHandlers().buttonIconHandler;c&&p&&c({type:"actionButtonIcon",buttonId:p.name,data:p.data},function(e){r.icon=a.isValidElement(e)?e.type:e});return r.applyAction=r.applyAction.bind(r),r}return o(s,r),e(s,[{key:"getActionButtonKind",value:function(){if(!ae(this.props,"action.button.kind"))return Le.TERTIARY;switch(this.props.action.button.kind){case Le.PRIMARY:return Le.PRIMARY;case Le.SECONDARY:return Le.SECONDARY;case Le.TERTIARY:return Le.TERTIARY;case Le.GHOST:return Le.GHOST;case Le.DANGER:return Le.DANGER;case Le.DANGER_TERTIARY:return Le.DANGER_TERTIARY;case Le.DANGER_GHOST:return Le.DANGER_GHOST;default:return Le.TERTIARY}}},{key:"getActionButtonSize",value:function(){if(!ae(this.props,"action.button.size"))return Oe.SMALL;switch(this.props.action.button.size){case Oe.SMALL:return Oe.SMALL;case Oe.MEDIUM:return Oe.MEDIUM;case Oe.LARGE:return Oe.LARGE;case Oe.EXTRA_LARGE:return Oe.EXTRA_LARGE;default:return Oe.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,t=this.props.action.className?this.props.action.className:"",r=Ee("properties-action-button",{hide:this.props.state===_e.HIDDEN},t),o=this.props.state===_e.DISABLED,n=this.getActionButtonKind(),i=this.getActionButtonSize(),s=(null===(e=this.props.action)||void 0===e||null===(e=e.description)||void 0===e?void 0:e.text)||this.props.intl.formatMessage({id:"action.button.icon",defaultMessage:Rr["action.button.icon"]}),l={};this.icon&&(l.renderIcon=this.icon,l.iconDescription=s);var p=a.createElement(ut,_r({type:"button",size:i,kind:n,onClick:this.applyAction,disabled:o,title:this.props.action.label.text},l),this.props.action.label.text),c=p;if(this.props.action.description){var u,d="tooltip-action-"+this.props.action.name,h=a.createElement("div",{className:"properties-tooltips"},this.props.action.description.text);c=a.createElement(Tr,{id:d,tip:h,direction:(null===(u=this.props.action.data)||void 0===u?void 0:u.tooltipDirection)||"bottom",className:"properties-tooltips",disable:o},p)}return a.createElement("div",{className:r,"data-id":this.props.action.name},c)}}])}(a.Component),Pi=Xt(function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}},null)(Wt(Ni));function xi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xi=function(){return!!e})()}var Bi=function(r){function s(e){var r,o;return t(this,s),o=function(e,t,r){return t=n(t),i(e,xi()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),o.state={},o.applyAction=o.applyAction.bind(o),o.renderIcon=o.renderIcon.bind(o),o.getIcon=o.getIcon.bind(o),o.imageDimensions=null!==(r=o.props.action)&&void 0!==r&&null!==(r=r.image)&&void 0!==r&&r.size?{height:"".concat(o.props.action.image.size.height,"px"),width:"".concat(o.props.action.image.size.width,"px")}:{},o}return o(s,r),e(s,[{key:"getIcon",value:function(e){return"svg"===e.split(".").pop().toLowerCase()?a.createElement(Or,_r({src:e,"aria-label":this.props.action.name},this.imageDimensions)):a.createElement("img",_r({src:e,"aria-label":this.props.action.name},this.imageDimensions))}},{key:"applyAction",value:function(){if(this.props.state!==_e.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:"renderIcon",value:function(){return this.getIcon(this.props.action.image.url)}},{key:"render",value:function(){var e,t,r=this.props.state===_e.DISABLED,o=this.props.action.className?this.props.action.className:"",n=Ee("properties-action-image",{left:"left"===this.props.action.image.placement},{right:"right"===this.props.action.image.placement},{hide:this.props.state===_e.HIDDEN},{disabled:r},o),i=a.createElement(ut,{"data-id":this.props.action.name,renderIcon:this.renderIcon,className:"properties-action-image-button",onClick:this.applyAction,kind:"ghost",iconDescription:null===(e=this.props.action)||void 0===e||null===(e=e.description)||void 0===e?void 0:e.text,autoAlign:!0,style:this.imageDimensions,disabled:r,hasIconOnly:Boolean(null===(t=this.props.action.description)||void 0===t?void 0:t.text)});return a.createElement("div",{className:n},i)}}])}(a.Component),Mi=Xt(function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}},null)(Bi),Fi=function(){return e(function e(r){t(this,e),this.controller=r},[{key:"generateAction",value:function(e,t){if(t){if(t.actionType===b.BUTTON)return a.createElement(Pi,{key:"action."+e,action:t,controller:this.controller});if(t.actionType===b.IMAGE)return a.createElement(Mi,{key:"action."+e,action:t,controller:this.controller});if(t.actionType===b.CUSTOM){var r=this.controller.convertPropertyId(t.name);return a.createElement("div",{className:Ee("properties-custom-action",t.className),"data-id":Qn(r)},this.controller.getCustomAction(t))}}return null}}])}();function Vi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ui(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ui(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Hi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hi=function(){return!!e})()}var ji="alertMsgs",zi=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Hi()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.state={showFieldPicker:!1},r.genPanel=r.genPanel.bind(r),r.genUIContent=r.genUIContent.bind(r),r.genUIItem=r.genUIItem.bind(r),r._getGroupedMessages=r._getGroupedMessages.bind(r),r.closeFieldPicker=r.closeFieldPicker.bind(r),r.openFieldPicker=r.openFieldPicker.bind(r),r.generateSharedControlNames=r.generateSharedControlNames.bind(r),r.messages=r._getGroupedMessages(e.messages),r.ControlFactory=e.controller.getControlFactory(),r.ControlFactory.setFunctions(r.openFieldPicker,r.genUIItem),r.ControlFactory.setRightFlyout(e.rightFlyout),r.actionFactory=new Fi(r.props.controller),r.FIRST_TEARSHEET_ID=null,r.TEARSHEETS={},r.visibleTearsheet=null,r.defaultOpenTab=e.activeTab,r.alertOpenTab=null,r.scrollToAlert=!1,r}return o(s,r),e(s,[{key:"shouldComponentUpdate",value:function(e,t){return this.props.controller.isSummaryPanelShowing()||this.props.controller.isSubPanelsShowing()||(this.messages=this._getGroupedMessages(e.messages)),!0}},{key:"componentDidUpdate",value:function(e){if(this.scrollToAlert||e.activeTab!==this.props.activeTab){var t=this.props.activeTab,r=document.getElementsByClassName("".concat(t));t&&r.length>0&&r[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}),this.scrollToAlert=!1}}},{key:"_getMessageCountForCategory",value:function(e){var t=this;if(!this.props.showAlertsTab)return null;if(e.group===ji)return" ("+this.messages.length+")";var r=0;return this.messages.forEach(function(o){var n=t.props.controller.getControl({name:o.id_ref});n&&n.parentCategoryId===e.group&&r++}),r>0?" ("+r+")":null}},{key:"_getGroupedMessages",value:function(e){return Jt(e)?[]:E(e,["type"])}},{key:"_getTabId",value:function(e){return e.group}},{key:"_showCategoryPanel",value:function(e){var t=e;this.props.activeTab===e&&(t=""),this.alertOpenTab===e&&(this.alertOpenTab=null),this.defaultOpenTab===e&&(this.defaultOpenTab=null),this.props.setActiveTab(t)}},{key:"_handleMessageClick",value:function(e,t){var r=this.props.controller.getControl(e);this.alertOpenTab=r.parentCategoryId,this.defaultOpenTab===this.alertOpenTab&&(this.defaultOpenTab=null),this.scrollToAlert=!0,this.props.setActiveTab(r.parentCategoryId)}},{key:"_modalTabsOnClick",value:function(e){this.props.setActiveTab(e)}},{key:"genPrimaryTabs",value:function(e,t,r,o){for(var n=[],i=[],s=[],l=[],p=!1,u=0,d=0,h=t.filter(function(e){return e.content.itemType!==I.TEARSHEET}),f=t.filter(function(e){return e.content.itemType===I.TEARSHEET}),m=f.concat(h),v=c(this.props.controller.getReactIntl(),Ie.EDITORFORM_TABLIST_LABEL),y=0;y<m.length;y++){var g=m[y];if(this.props.controller.getPanelState({name:g.group})!==_e.HIDDEN){0===y&&g.group===ji&&(p=!0);var b=this.genUIItem(this._getContainerIndex(p,y),g.content,r,o),E=null;if(this.props.additionalComponents&&(E=this.props.additionalComponents[g.group]),1===m.length&&1===h.length)return a.createElement("div",{key:"cat."+e,className:"properties-single-category"},b,E);if(this.props.rightFlyout&&this.props.categoryView!==De.TABS){var S=!1;this.props.activeTab===g.group&&(S=!0),g.content.itemType!==I.TEARSHEET&&1===h.length?n.push(a.createElement("div",{key:"cat."+e,className:"properties-single-category"},b,E)):i.push(a.createElement("div",{key:this._getContainerIndex(p,y)+"-"+e,className:Ee("properties-category-container",{"properties-hidden-container":g.content.itemType===I.TEARSHEET})},a.createElement(ht,{title:"".concat(g.text).concat(this._getMessageCountForCategory(g)?this._getMessageCountForCategory(g):""),open:this.defaultOpenTab===g.group||this.alertOpenTab===g.group,onHeadingClick:this._showCategoryPanel.bind(this,g.group),className:"".concat(Ee("properties-category-content",{show:S},g.group))},b,E)))}else this.props.activeTab===g.group&&(u=y-d),s.push(a.createElement(ft,{key:g.group,title:vn([g.text,this._getMessageCountForCategory(g)]).join(""),className:Ee({"properties-hidden-container":g.content.itemType===I.TEARSHEET}),onClick:this._modalTabsOnClick.bind(this,g.group)},vn([g.text,this._getMessageCountForCategory(g)]).join(""))),l.push(a.createElement(mt,{key:g.group,className:Ee("properties-primary-tab-panel",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===De.TABS})},b,E))}else d++}return this.props.rightFlyout&&this.props.categoryView!==De.TABS?a.createElement(a.Fragment,{key:"tabContent."+e},n.length?a.createElement("div",{key:"cat."+e,className:"properties-categories"},n):null,i.length?a.createElement(dt,{size:"lg"},a.createElement("div",{key:"cat."+e,className:"properties-categories"},i)):null):a.createElement(vt,{key:"tab."+e,selectedIndex:u},a.createElement(yt,{className:"properties-primaryTabs","aria-label":v},s),a.createElement(gt,null,l))}},{key:"_getContainerIndex",value:function(e,t){return e&&0===t?"alerts":e?t-1:t}},{key:"genPanelSelector",value:function(e,t,r,o,n,i,s){var l=this.generateAdditionalPanels(t,e,o,n,!1,s);return a.createElement($n,{key:"selectorPanel"+e,panels:l,dependsOn:r,controller:this.props.controller})}},{key:"generateAdditionalPanels",value:function(e,t,r,o,n,i){for(var s={},l=0;l<e.length;l++){var p=e[l],c="properties-control-panel";p.content&&"textPanel"===p.content.itemType&&(c=""),n&&(c+=" properties-control-nested-panel"),s[p.group]=a.createElement("div",{className:Ee(c,i),key:p.group+t},this.genUIItem(l,p.content,r,o))}return s}},{key:"genUIContent",value:function(e,t,r){for(var o=[],n=0;n<e.length;n++)o.push(this.genUIItem(n,e[n],t,r));return o}},{key:"genUIItem",value:function(e,t,r,o){var n="",i=null,s="";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,o,!0));var l={name:t.control.name};if(r){var p=K(r);return this.props.controller.updateLastChildPropertyId(p,{col:o(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,o);return a.createElement(vi,{key:"sub-panel-button."+e,label:t.text,title:t.secondaryText,panel:c,controller:this.props.controller,rightFlyout:this.props.rightFlyout});case"staticText":return n=Ee("properties-static-text",t.textType),i="info"===t.textType?a.createElement("div",null,a.createElement(yr,{type:Ae.INFORMATION,className:"properties-static-text-icon-info"})):null,s=a.createElement("div",{className:n},g(t.text,this.props.controller)),a.createElement("div",{key:"static-text."+e,className:"properties-static-text-container"},i,s);case"linkText":return n=Ee("properties-link-text-container",t.textType),"warning"===t.textType?i=a.createElement(yr,{type:Re.WARNING}):"error"===t.textType&&(i=a.createElement(yr,{type:Re.ERROR})),s=a.createElement(bt,{className:"properties-link-text",onClick:this._handleMessageClick.bind(this,t.controlId)},g(t.text,this.props.controller)),a.createElement("div",{key:"link-text."+e,className:n},a.createElement("div",{className:"properties-alerts-icon"},i),s);case"hSeparator":return a.createElement("hr",{key:"h-separator."+e,className:"properties-h-separator"});case"panel":case"tearsheet":case"checkboxSelector":return this.genPanel(e,t.panel,r,o);case"subTabs":return a.createElement(Ti,{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,o);case"panelSelector":return this.genPanelSelector(e,t.tabs,t.dependsOn,r,o,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?a.createElement(_i,{key:"text-panel-"+e,panel:t.panel,controller:this.props.controller}):a.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType);default:return a.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType)}}},{key:"generateCustomPanel",value:function(e,t){if(this.props.customPanels){var r,o=Vi(this.props.customPanels);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(n.id()===t.id)try{return a.createElement("div",{className:Ee("properties-custom-panel",{"properties-control-nested-panel":se(t,"nestedPanel",!1)}),key:"custom."+e},new n(t.parameters,this.props.controller,t.data).renderPanel())}catch(e){return y.warn("Error thrown creating custom panel: "+e),null}}}catch(e){o.e(e)}finally{o.f()}}return a.createElement("div",{key:"custom."+e},"Panel Not Found: ",t.id)}},{key:"generateSharedControlNames",value:function(e){var t,r=Vi(this.props.controller.getSharedCtrlInfo());try{for(r.s();!(t=r.n()).done;){var o=t.value;if(void 0!==o.id&&o.id===e.id)return}}catch(e){r.e(e)}finally{r.f()}var n,i=[],a=Vi(e.uiItems);try{for(a.s();!(n=a.n()).done;){var s=n.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,o){var n=this,i=this.genUIContent(t.uiItems,r,o),s="panel."+e;switch(t.panelType){case"columnSelection":return this.generateSharedControlNames(t),i=this.genUIContent(t.uiItems,r,o),a.createElement(Si,{key:s,controller:this.props.controller,panel:t},i);case"summary":return this.props.rightFlyout?a.createElement(pi,{key:"summary-panel-"+s,controller:this.props.controller,panel:t},i):i;case"actionPanel":return a.createElement(Oi,{key:"action-panel-"+e,controller:this.props.controller,panel:t},i);case"twisty":return a.createElement(di,{key:s,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;var l=function(){n.props.controller.clearActiveTearsheet()};return a.createElement(pn,{open:null!==this.props.controller.getActiveTearsheet(),onCloseCallback:l,cancelHandler:l,key:t.id,tearsheet:this.visibleTearsheet})}return null;case"column":return a.createElement(bi,{key:s,controller:this.props.controller,panel:t},i);default:return a.createElement(Si,{key:s,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),o=this.props.controller.getFilteredDatasetMetadata(this.fieldPickerPropertyId),n=this.props.controller.getControl(this.fieldPickerPropertyId),i=S(n),s=n.subControls;-1!==i&&(t=s?s[i].dmImage:n.dmImage);var l=C(n,r);return a.createElement("div",{className:"properties-fp-table"},a.createElement(k,{key:"field-picker-control",controller:this.props.controller,closeFieldPicker:this.closeFieldPicker,currentFields:l,fields:o,title:e,rightFlyout:this.props.rightFlyout,dmIcon:t}))}return a.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:c(this.props.controller.getReactIntl(),Ie.ALERTS_TAB_TITLE),group:ji,content:{itemType:"panel",panel:{id:"alerts-panel",panelType:"general",uiItems:t}}}}},{key:"render",value:function(){var e=this.props.controller.getUiItems();this.props.showAlertsTab&&!Jt(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),o=a.createElement("div",null),n=this.props.controller.getForm(),i=c(this.props.controller.getReactIntl(),Ie.FIELDPICKER_SAVEBUTTON_LABEL)+" "+n.label;return this.state.showFieldPicker&&(this.props.rightFlyout?o=a.createElement(Yn,{showPropertiesButtons:!1,show:!0,title:i,light:this.props.controller.getLight()},this.fieldPicker(i)):this.props.controller.isTearsheetContainer()?t=a.createElement(pn,{open:!0,stacked:!0,cancelHandler:this.closeFieldPicker,tearsheet:{title:i,content:this.fieldPicker()}}):r=this.fieldPicker(i)),a.createElement("div",{className:Ee("properties-editor-form",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===De.TABS},{"field-picker":this.state.showFieldPicker})},r,o,t)}}])}(a.Component),qi=Xt(function(e,t){return{activeTab:e.componentMetadataReducer.activeTab,messages:t.controller.getErrorMessages(!0,!0,!0)}},function(e,t){return{setActiveTab:function(t){e(qn(t))}}})(zi),Gi=re;var Wi=function(e){return function(t){return null==e?void 0:Gi(e,t)}},$i=function(){function r(e){t(this,r),this.actions=e.action_refs||[]}return e(r,[{key:"actionIds",value:function(){return this.actions}}],[{key:"makeTitle",value:function(e){return e?new r(Wi(e)("action_refs")):null}}])}(),Xi=function(){function r(e){t(this,r),this.Title=e}return e(r,null,[{key:"makeTitleMetadata",value:function(e){return e?new r(new $i(e)):null}}])}(),Ki=function(){return e(function e(r){t(this,e),this.resources=r},[{key:"l10n",value:function(e,t){if(this.resources){var r=Wi(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",o=this.l10n(r,t);return o!==t?o:null}}])}(),Yi=function(){function r(){t(this,r)}return e(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}}])}();function Ji(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Qi(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var Zi=function(){function r(e,o,n,i,a,s,l,p,c,u,d,h,f){t(this,r),this.name=e,this.parameters=o,this.actions=n,this.type=i,this.label=Yi.make(a),this.dependsOn=s,this.insertPanels=l,this.nestedPanel=p,this.subGroups=c,this.description=Yi.make(u),this.data=d,this.className=h,this.open=f}return e(r,[{key:"parameterNames",value:function(){return this.parameters}},{key:"actionIds",value:function(){return this.actions}},{key:"groupType",value:function(){return this.type?this.type:T.CONTROLS}}],[{key:"makeGroup",value:function(e){if(e){var t;if(ae(e,"group_info")){t=[];var o,n=Ji(e.group_info);try{for(n.s();!(o=n.n()).done;){var i=o.value,a=r.makeGroup(i);null!==a&&t.push(a)}}catch(e){n.e(e)}finally{n.f()}}return new r(Wi(e)("id"),Wi(e)("parameter_refs"),Wi(e)("action_refs"),Wi(e)("type"),Wi(e)("label"),Wi(e)("depends_on_ref"),Wi(e)("insert_panels"),Wi(e)("nested_panel"),t,Wi(e)("description"),Wi(e)("data"),Wi(e)("class_name"),Wi(e)("open"))}return null}}])}(),ea=function(){function r(e){t(this,r),this.groups=e}return e(r,null,[{key:"makeGroupMetadata",value:function(e,t){var o=[];if(e){var n,i=Ji(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=Zi.makeGroup(a);null!==s&&o.push(s)}}catch(e){i.e(e)}finally{i.f()}}else o.push(new Zi(kr(),t,null,T.CONTROLS));return new r(o)}}])}();function ta(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ra(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ra(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 ra(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var oa=e(function e(r,o,n,i,a,s,l,p,c){t(this,e),this.name=r,this.label=o,this.description=n,this.actionType=i,this.data=a,this.image=s,this.button=l,this.className=p,this.customActionId=c}),na=function(){function r(){t(this,r)}return e(r,null,[{key:"makeActionDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=Yi.make(e.label),t.description=Yi.make(e.description),t.control=e.control,t.data=e.data,t.image=e.image,t.button=e.button,t.className=e.class_name,t.customActionId=e.custom_action_id,t}return null}}])}(),ia=function(){function r(e){t(this,r),this.actionDefs=e}return e(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,o=[],n=ta(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=na.makeActionDef(i);a&&o.push(a)}}catch(e){n.e(e)}finally{n.f()}return new r(o)}return null}}])}();function aa(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return sa(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var la=function(){function r(e){t(this,r),e.id&&(this.name=e.id),e.label&&(this.label=Yi.make(e.label)),e.description&&(this.description=Yi.make(e.description)),e.type&&(this.type=e.type),e.role&&(this.role=e.role),e.valueRestriction&&(this.valueRestriction=e.valueRestriction),null!==e.defaultValue&&"undefined"!==h(e.defaultValue)?e.defaultValue.parameter_ref?(this.defaultValue={},this.defaultValue.parameterRef=e.defaultValue.parameter_ref):this.defaultValue=e.defaultValue:void 0===e.defaultValue&&(this.isList()||this.isMapValue())&&(this.defaultValue=[]),"boolean"==typeof e.labelVisible&&(this.labelVisible=e.labelVisible),e.control&&(this.control=e.control),e.orientation&&(this.orientation=e.orientation),e.width&&(this.width=e.width),e.charLimit&&(this.charLimit=e.charLimit),e.minValue&&(this.minValue=e.minValue),e.maxValue&&(this.maxValue=e.maxValue),e.placeHolderText&&(this.placeHolderText=Yi.make(e.placeHolderText)),e.separator&&(this.separator=e.separator),e.resource_key&&(this.resource_key=e.resource_key),"boolean"===h(e.visible)?this.visible=e.visible:this.visible=!0,e.valueIcons&&(this.valueIcons=e.valueIcons),"boolean"===h(e.sortable)&&(this.sortable=e.sortable),"boolean"===h(e.filterable)&&(this.filterable=e.filterable),"boolean"===h(e.resizable)&&(this.resizable=e.resizable),e.editStyle&&(this.editStyle=e.editStyle),"boolean"===h(e.required)&&(this.required=e.required),e.numberGenerator&&(e.numberGenerator.label=Yi.make(e.numberGenerator.label),this.numberGenerator=e.numberGenerator),e.isKey&&(this.isKey=e.isKey),e.dmDefault&&(this.dmDefault=e.dmDefault),e.dmImage&&(this.dmImage=e.dmImage),e.language&&(this.language=e.language),e.enableMaximize&&(this.enableMaximize=e.enableMaximize),"boolean"===h(e.summary)&&(this.summary=e.summary),e.increment&&(this.increment=e.increment),e.textAfter&&(this.textAfter=Yi.make(e.textAfter)),e.textBefore&&(this.textBefore=Yi.make(e.textBefore)),"boolean"===h(e.moveableRows)&&(this.moveableRows=e.moveableRows),e.generatedValues&&(this.generatedValues=e.generatedValues),e.dateFormat&&(this.dateFormat=e.dateFormat),e.timeFormat&&(this.timeFormat=e.timeFormat),e.customControlId&&(this.customControlId=e.customControlId),e.data&&(this.data=e.data),e.rows&&(this.rows=e.rows),e.displayChars&&(this.displayChars=e.displayChars),e.uionly&&(this.uionly=e.uionly),e.actionRef&&(this.actionRef=e.actionRef),"boolean"===h(e.customValueAllowed)&&(this.customValueAllowed=e.customValueAllowed),"boolean"===h(e.shouldFilterItem)&&(this.shouldFilterItem=e.shouldFilterItem),e.className&&(this.className=e.className),e.helperText&&(this.helperText=Yi.make(e.helperText)),e.readOnly&&(this.readOnly=e.readOnly)}return e(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===w.SUBPANEL}},{key:"isInlineEdit",value:function(){return(this.editStyle===w.INLINE||void 0===this.editStyle)&&this.control!==d.READONLY}},{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:"getAdditionalHelperText",value:function(e){return e.l10nResource(this.helperText)}},{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===R.AFTER}},{key:"separatorBefore",value:function(){return this.separator===R.BEFORE}}],[{key:"makeParameterDef",value:function(e,t,o){return e?new r({id:Wi(e)("id"),enableMaximize:Wi(t)("enable_maximize"),label:Wi(t)("label"),description:Wi(t)("description"),type:Wi(e)("type"),role:Wi(e)("role"),valueRestriction:Wi(e)("enum"),defaultValue:Wi(e)("default"),labelVisible:Wi(t)("label_visible"),control:Wi(t)("control"),orientation:Wi(t)("orientation"),width:Wi(t)("width"),charLimit:Wi(t)("char_limit"),minValue:Wi(t)("min_value"),maxValue:Wi(t)("max_value"),placeHolderText:Wi(t)("place_holder_text"),separator:Wi(t)("separator"),resource_key:Wi(t)("resource_key"),visible:Wi(t)("visible"),valueIcons:Wi(t)("value_icons"),sortable:Wi(t)("sortable"),filterable:Wi(t)("filterable"),resizable:Wi(t)("resizable"),editStyle:Wi(t)("edit_style"),required:Wi(e)("required"),numberGenerator:Wi(t)("number_generator"),isKey:o,dmDefault:Wi(t)("dm_default"),dmImage:Wi(t)("dm_image"),language:Wi(t)("language"),summary:Wi(t)("summary"),increment:Wi(t)("increment"),textAfter:Wi(t)("text_after"),textBefore:Wi(t)("text_before"),moveableRows:Wi(t)("moveable_rows"),generatedValues:Wi(t)("generated_values"),dateFormat:Wi(t)("date_format"),timeFormat:Wi(t)("time_format"),customControlId:Wi(t)("custom_control_id"),data:Wi(t)("data"),rows:Wi(t)("rows"),displayChars:Wi(t)("display_chars"),uionly:Wi(e)("uionly"),actionRef:Wi(t)("action_ref"),customValueAllowed:Wi(t)("custom_value_allowed"),shouldFilterItem:Wi(t)("should_filter_item"),className:Wi(t)("class_name"),helperText:Wi(t)("helper_text"),readOnly:Wi(t)("read_only")}):null}}])}();function pa(e,t){if(t){var r,o=aa(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e===n.parameter_ref)return n}}catch(e){o.e(e)}finally{o.f()}}return null}var ca=function(){function r(e){t(this,r),this.paramDefs=e}return e(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,o){var n=[];if(Array.isArray(e)){var i,a=aa(e);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=la.makeParameterDef(s,pa(s.id,t));l&&n.push(l)}}catch(e){a.e(e)}finally{a.f()}}if(Array.isArray(o)){var p,c=aa(o);try{for(c.s();!(p=c.n()).done;){var u=p.value,d=la.makeParameterDef(u,pa(u.id,t));d&&(d.uionly=!0,n.push(d))}}catch(e){c.e(e)}finally{c.f()}}return new r(n)}}])}();function ua(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return da(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?da(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 da(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var ha=e(function e(r,o,n,i,a,s,l,p){t(this,e),this.id=r,this.label=o,this.description=n,this.icon=i,this.carbonIcon=a,this.enabled=s,this.kind=l,this.divider=p}),fa=function(){function r(){t(this,r)}return e(r,null,[{key:"makeButtonDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=Yi.make(e.label),t.description=Yi.make(e.description),t.icon=e.icon,t.carbonIcon=e.carbon_icon,t.enabled=e.enabled,t.kind=e.kind,t.divider=e.divider,t}return null}}])}(),ma=function(){function r(e){t(this,r),this.buttonDefs=e}return e(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,o=[],n=ua(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=fa.makeButtonDef(i);a&&o.push(a)}}catch(e){n.e(e)}finally{n.f()}return new r(o)}return null}}])}();function va(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ya(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ya(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var ga=function(){function r(e,o,n,i,a,s,l,p,c,u,d,h){t(this,r),this.name=e,this.keyDefinition=o,this.parameterMetadata=n,this.moveableRows=i,this.label=Yi.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 e(r,[{key:"parameterNames",value:function(){var e=[];if(this.parameterMetadata){var t,r=va(this.parameterMetadata.paramDefs);try{for(r.s();!(t=r.n()).done;){var o=t.value;e.push(o.name)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"hasSubPanel",value:function(){if(this.parameterMetadata){var e,t=va(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:"hasInlinePanel",value:function(){if(this.parameterMetadata){var e,t=va(this.parameterMetadata.paramDefs);try{for(t.s();!(e=t.n()).done;){if(e.value.isInlineEdit())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(Wi(e)("id"),la.makeParameterDef(Wi(e)("key_definition"),Wi(t)("key_definition"),!0),ca.makeParameterMetadata(Wi(e)("parameters"),Wi(t)("parameters")),Wi(t)("moveable_rows"),Wi(t)("label"),Wi(t)("row_selection"),Wi(t)("add_remove_rows"),Wi(t)("header"),Wi(t)("include_all_fields"),Wi(t)("layout"),ma.makeButtonMetadata(Wi(t)("buttons")),Wi(e)("type")):null}}])}();function ba(e,t){if(t){var r,o=va(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e===n.complex_type_ref)return n}}catch(e){o.e(e)}finally{o.f()}}return null}var Ea=function(){function r(e){t(this,r),this.structures=e}return e(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 o,n=[],i=va(e);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=ga.makeStructure(a,ba(a.id,t));null!==s&&n.push(s)}}catch(e){i.e(e)}finally{i.f()}return new r(n)}return null}}])}(),Ia=function(){function r(e,o,n,i,a,s,l,p,c,u,d,h,f,m){t(this,r),this.name=e,this.icon=o,this.editorSize=n,this.pixelWidth=i,this.label=a,this.labelEditable=s,this.help=l,this.description=Yi.make(p),this.structureMetadata=c,this.parameterMetadata=u,this.groupMetadata=d,this.actionMetadata=h,this.heading=f,this.titleMetadata=m}return e(r,[{key:"editorSizeHint",value:function(e){return this.editorSize?this.editorSize:e||l.SMALL}}],[{key:"makePropertyDef",value:function(e,t,o,n){var i=Ea.makeStructureMetadata(o,Wi(n)("complex_type_info")),a=ca.makeParameterMetadata(t,Wi(n)("parameter_info"),Wi(n)("ui_parameters")),s=ia.makeActionMetadata(Wi(n)("action_info")),l=ea.makeGroupMetadata(Wi(n)("group_info"),a.getParameters()),p=Xi.makeTitleMetadata(Wi(n)("title_info")),c=e&&e.title?e.title:null,u=e&&void 0!==e.editable?e.editable:Ne;return new r(Wi(n)("id"),Wi(n)("icon"),Wi(n)("editor_size"),Wi(n)("pixel_width"),c,u,Wi(n)("help"),Wi(n)("description"),i,a,l,s,Wi(n)("label"),p)}}])}(),Sa=e(function e(r){var o;t(this,e),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.minValue&&(this.minValue=r.minValue),r.maxValue&&(this.maxValue=r.maxValue),r.generatedValues&&(this.generatedValues={},r.generatedValues.operation&&(this.generatedValues.operation=r.generatedValues.operation),isFinite(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.multiSelectEditChildItem&&(this.multiSelectEditChildItem=r.multiSelectEditChildItem),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||!isNaN(parseInt(r.width,10))&&null!==(o=r.width)&&void 0!==o&&o.endsWith("px"))&&(this.width=r.width),r.editStyle?this.editStyle=r.editStyle:r.isKeyField||void 0===r.structureType||(this.editStyle=w.INLINE),r.dmDefault&&(this.dmDefault=r.dmDefault),r.dmImage&&(this.dmImage=r.dmImage),r.customValueAllowed&&(this.customValueAllowed=r.customValueAllowed),r.shouldFilterItem&&(this.shouldFilterItem=r.shouldFilterItem),r.className&&(this.className=r.className),r.buttons&&(this.buttons=r.buttons),r.helperText&&(this.helperText=r.helperText),r.readOnly&&(this.readOnly=r.readOnly),this.light=se(r,"light",!0)});function Ca(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function ka(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ca(Object(r),!0).forEach(function(t){Dr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ca(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Ta=function(){function r(e){t(this,r),this.id=Wi(e)("id"),this.itemType=Wi(e)("itemType"),this.tabs=Wi(e)("tabs"),this.panel=Wi(e)("panel"),this.control=Wi(e)("control"),this.text=Wi(e)("text"),this.textType=Wi(e)("textType"),this.secondaryText=Wi(e)("secondaryText"),this.dependsOn=Wi(e)("dependsOn"),this.action=Wi(e)("action"),this.className=Wi(e)("className"),this.nestedPanel=Wi(e)("nestedPanel")}return e(r,null,[{key:"makePrimaryTabs",value:function(e){return new r({itemType:I.PRIMARY_TABS,tabs:e})}},{key:"makeSubTabs",value:function(e,t,o){return new r({itemType:I.SUB_TABS,tabs:e,className:t,nestedPanel:o})}},{key:"makePanelSelector",value:function(e,t,o,n){return new r({id:e,itemType:I.PANEL_SELECTOR,tabs:t,dependsOn:o,className:n})}},{key:"makePanel",value:function(e){return new r({itemType:I.PANEL,panel:e})}},{key:"makeAdditionalLink",value:function(e,t,o){return new r({itemType:I.ADDITIONAL_LINK,panel:o,text:e,secondaryText:t})}},{key:"makeControl",value:function(e){return new r({itemType:I.CONTROL,control:e})}},{key:"makeAction",value:function(e){return new r({itemType:I.ACTION,action:e})}},{key:"makeHSeparator",value:function(){return new r({itemType:I.HORIZONTAL_SEPARATOR})}},{key:"makeStaticText",value:function(e,t){return new r({itemType:I.STATIC_TEXT,text:e,textType:t})}},{key:"makeTextPanel",value:function(e,t,o,n,i){return new r({itemType:I.TEXT_PANEL,panel:{id:e,label:t,description:o,className:n,nestedPanel:i}})}},{key:"makeCustomPanel",value:function(e,t){return new r({itemType:I.CUSTOM_PANEL,panel:e,className:t})}},{key:"makeTearsheetPanel",value:function(e,t){return new r({itemType:I.TEARSHEET,panel:ka(ka({},e),{},{description:t})})}}])}(),wa=e(function e(r,o,n){t(this,e),this.text=r,this.group=o,this.content=n}),Ra=function(){function r(e,o,n,i){t(this,r),this.propType=e===f.OBJECT?f.STRUCTURE:e,this.isList=o,this.isMap=n,this.defaultValue=i}return e(r,null,[{key:"make",value:function(e){return new r(e.propType(),e.isList(),e.isMapValue(),e.defaultValue)}}])}(),_a=e(function e(r,o){t(this,e),this.text=r,o&&(this.numberGenerator=o)}),Aa=e(function e(r,o,n){t(this,e),this.text=r,o&&(this.placement=o),n&&(this.link=n)}),La=e(function e(r,o,n,i,a,s){var l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];t(this,e),this.id=r,this.panelType=o,this.nestedPanel=i,this.uiItems=a,this.open=l,s&&(this.label=s),n&&(this.className=n)}),Oa=e(function e(r,o,n,i,a,s,l){t(this,e),this.id=r,this.panelType=o,this.nestedPanel=i,this.uiItems=a,n&&(this.className=n),s&&(this.label=s),l&&(this.description=l)}),Da=e(function e(r,o,n,i,a,s){t(this,e),this.id=r,this.panelType=o,this.nestedPanel=i,this.parameters=a,this.data=s,n&&(this.className=n)}),Na=e(function e(r,o){t(this,e),this.text=r,o.range&&(this.range=o.range)});function Pa(e,t,r,o){var n=r.l10nLabel(t,t.name),i={light:!0,containerType:o};return new wa(n,t.name,xa(e.parameterMetadata,e.actionMetadata,t,e.structureMetadata,r,i))}function xa(e,t,r,o,n,i){var a=r.name,s=null,l=null,p=r.className,c=se(r,"nestedPanel",!1);switch(r.groupType()){case T.CONTROLS:return Ta.makePanel(new La(a,_.GENERAL,p,c,Ba(e,t,r,o,n,i,w.SUBPANEL)));case T.COLUMN_SELECTION:return Ta.makePanel(new La(a,_.COLUMN_SELECTION,p,c,Ba(e,t,r,o,n,i,w.SUBPANEL)));case T.ADDITIONAL:var u=new La(a,_.GENERAL,p,c,Ba(e,t,r,o,n,i,w.SUBPANEL));return l=n.l10nLabel(r,r.name),Ta.makeAdditionalLink(l,l,u);case T.SUB_TABS:var d=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach(function(r){var a=r.name;s=xa(e,t,r,o,n,i),l=n.l10nLabel(r,r.name),d.push(new wa(l,a,s))}),Ta.makeSubTabs(d,p,c);case T.PANEL_SELECTOR:var h=Ma(r,e,t,o,n,i);return Ta.makePanelSelector(a,h,r.dependsOn,p);case T.PANELS:var f=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach(function(r){s=xa(e,t,r,o,n,i),f.push(s)}),Ta.makePanel(new La(a,_.GENERAL,p,c,f));case T.COLUMN_PANEL:var m=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach(function(r){s=xa(e,t,r,o,n,i),m.push(s)}),Ta.makePanel(new La(a,_.COLUMN_PANEL,p,c,m));case T.CUSTOM_PANEL:return Ta.makeCustomPanel(new Da(a,_.CUSTOM,p,c,r.parameterNames(),r.data));case T.SUMMARY_PANEL:l=n.l10nLabel(r,r.name);var v=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach(function(r){s=xa(e,t,r,o,n,i),v.push(s)}),Ta.makePanel(new La(a,_.SUMMARY,p,c,v,l));case T.ACTION_PANEL:var g;return l=n.l10nResource(r.label),r.description&&(g=new Aa(n.l10nResource(r.description),null,r.description?r.description.link:null)),Ta.makePanel(new Oa(a,_.ACTION_PANEL,p,c,ja(e,t,r,o,n),l,g));case T.TEXT_PANEL:var b;return l=n.l10nResource(r.label),r.description&&(b=new Aa(n.l10nResource(r.description),r.description?r.description.placement:null,r.description?r.description.link:null)),Ta.makeTextPanel(a,l,b,p,c);case T.TWISTY_PANEL:l=n.l10nLabel(r,r.name);var E=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach(function(r){s=xa(e,t,r,o,n,i),E.push(s)}),Ta.makePanel(new La(a,_.TWISTY_PANEL,p,c,E,l,r.open));case T.TEARSHEET_PANEL:var I;l=n.l10nLabel(r,r.name),r.description&&(I=new Aa(n.l10nResource(r.description)));var S=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach(function(r){var a=Object.assign({},i,{light:!1});s=xa(e,t,r,o,n,a),S.push(s)}),Ta.makeTearsheetPanel(new La(a,_.TEARSHEET,p,c,S,l,!1),I);default:return y.warn("(Unknown group type '"+r.groupType()+"')"),null}}function Ba(e,t,r,o,n,i,a){var s=[],l=[];return Array.isArray(r.parameterNames())?(r.parameterNames().forEach(function(p){var c,u=e.getParameter(p),h=a===w.SUBPANEL?u.isSubPanelEdit():u.isInlineEdit();if(u.propType()===f.STRUCTURE&&o&&(c=o.getStructure(u.baseType())),!(r instanceof ga)||r instanceof ga&&h){var m=Va(e,p,r,c,n,t,o,null,i),v=Ta.makeControl(m);if(u.separatorBefore()&&s.push(Ta.makeHSeparator()),u.textBefore&&s.push(Ta.makeStaticText(u.getTextBefore(n),u.getTextBeforeType())),s.push(v),u.textAfter&&s.push(Ta.makeStaticText(u.getTextAfter(n),u.getTextAfterType())),u.separatorAfter()&&s.push(Ta.makeHSeparator()),r.subGroups&&r.subGroups.length>0)for(var y=0;y<r.subGroups.length;y++)v.control.controlType===d.RADIOSET&&v.control.orientation===A.VERTICAL&&r.subGroups[y].type===T.PANEL_SELECTOR&&!0===r.subGroups[y].insertPanels&&r.subGroups[y].dependsOn===v.control.name&&(l.push(r.subGroups[y].dependsOn),v.additionalItems=Ma(r.subGroups[y],e,t,o,n,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}(l,r.dependsOn)){var a=xa(e,t,r,o,n,i);s.push(a)}}),s):s}function Ma(e,t,r,o,n,i){var a=[];return Array.isArray(e.subGroups)&&e.subGroups.forEach(function(e){var s=e.name,l=xa(t,r,e,o,n,i),p=n.l10nLabel(e,e.name);a.push(new wa(p,s,l))}),a}function Fa(e,t){var r,o=e.getRole();if(e.isList()){var n=function(e){var t={};switch(e.getRole()){case m.TEXT:t.controlType=d.TEXTAREA;break;case m.ENUM:e.getValidValueCount()<5?t.controlType=d.CHECKBOXSET:t.controlType=d.SOMEOFSELECT;break;case m.COLUMN:t.role=m.COLUMN,t.controlType=d.SELECTCOLUMNS;break;default:t.controlType=d.TEXTAREA}return t}(e);r=n.controlType,n.role&&(o=n.role)}else switch(e.getRole()){case m.TEXT:r=d.TEXTAREA;break;case m.ENUM:r=e.getValidValueCount()>4||t&&!Ha(e)?d.ONEOFSELECT:d.RADIOSET;break;case m.COLUMN:o=m.COLUMN,r=t&&function(e){if(e.isList()||e.isMapValue())return Ha(e);return!1}(e)?d.SELECTCOLUMNS:d.SELECTCOLUMN;break;case m.EXPRESSION:r=d.EXPRESSION;break;case m.EMAIL:o=m.EMAIL,r=d.TEXTFIELD;break;case m.URL:o=m.URL,r=d.TEXTFIELD;break;case m.COLOR:o=m.COLOR,r=d.TEXTFIELD;break;default:r=d.TEXTFIELD}return{controlType:r,role:o}}function Va(e,t,r,o,n,i,a,s,l){var p=void 0!==s&&s,c=p?s:e.getParameter(t),u=c.getAdditionalText(n),h=c.getAdditionalHelperText(n),v=c.orientation,g=c.required;c.numberGenerator&&(c.numberGenerator=new Na(n.l10nLabel(c.numberGenerator,c.name),c.numberGenerator));var b,E=new _a(n.l10nLabel(c,c.name),c.numberGenerator);c.description&&(b=new Aa(n.l10nDesc(c,c.name),c.description?c.description.placement:null,c.description?c.description.link:null));var I,S,C,k,R,A,L,O,D,N,P,x,B,M,F,V,U=!0,H=c.moveableRows,j=c.structureType;if(p||c.getRole()!==m.CUSTOM)switch(c.propType()){case f.STRING:var z=Fa(c,p);S=z.controlType,I=z.role;break;case f.PASSWORD:S=d.PASSWORDFIELD;break;case f.BOOLEAN:c.control&&c.control!==d.CHECKBOX||(U=!1,S=d.CHECKBOX);break;case f.INTEGER:case f.LONG:case f.DOUBLE:S=c.isList()?d.TEXTAREA:d.NUMBERFIELD;break;case f.DATE:I=f.DATE,S=c.control===d.DATEPICKER?d.DATEPICKER:c.control===d.DATEPICKERRANGE?d.DATEPICKERRANGE:c.isList()?d.TEXTAREA:d.DATEFIELD;break;case f.TIME:I=f.TIME,S=c.isList()?d.TEXTAREA:d.TIMEFIELD;break;case f.TIMESTAMP:S=d.TIMESTAMP;break;case f.STRUCTURE:var q=p&&a?a.getStructure(c.baseType()):o;if(q){if(q.hasSubPanel()&&(A=function(e,t,r,o){var n=new La(e.name,_.GENERAL,"properties-editstyle-sub-panel",!1,Ba(e.parameterMetadata,e.actionMetadata,e,r,t,o,w.SUBPANEL)),i=t.l10nLabel(e,e.name);return Ta.makeAdditionalLink("...",i,n)}(q,n,a,l)),q.rowSelection===Pe.MULTIPLE&&q.hasInlinePanel()&&(L=function(e,t,r,o){var n=new La(e.name,_.GENERAL,"properties-editstyle-inline",!1,Ba(e.parameterMetadata,e.actionMetadata,e,r,t,o,w.INLINE)),i=t.l10nLabel(e,e.name);return Ta.makeAdditionalLink("...",i,n)}(q,n,a,l)),k=q.keyAttributeIndex(),R=q.defaultStructure(),C=[],q.parameterMetadata&&Array.isArray(q.parameterMetadata.paramDefs)&&q.parameterMetadata.paramDefs.forEach(function(e){var t=Ua(e,n,a,l);C.push(t)}),(c.isMapValue()||c.isList())&&q.keyDefinition){var G=Ua(q.keyDefinition,n,a,l);C.unshift(G)}c.isList()||c.isMapValue()?(!p&&r&&void 0!==r.groupType&&r.groupType()===T.COLUMN_SELECTION||c.control===d.STRUCTURETABLE||c.getRole()===m.COLUMN?(S=d.STRUCTURETABLE,H=q.moveableRows,O=q.rowSelection,D=q.addRemoveRows,N=q.header,P=q.includeAllFields):(S=d.STRUCTURELISTEDITOR,H=q.moveableRows,O=q.rowSelection,D=q.addRemoveRows,N=q.header),q.buttons&&(B=function(e,t){var r=[];return e.buttonDefs.forEach(function(o){r.push(function(e,t){var r,o;e.label&&(r=new _a(t.l10nLabel(e,e.id)));e.description&&(o=new Aa(t.l10nDesc(e,e.description)));return new ha(e.id,r,o,e.icon,e.carbonIcon,e.enabled,e.kind,e.divider)}(e.getButton(o.id),t))}),r}(q.buttons,n))):(S=d.STRUCTUREEDITOR,q.layout&&(x=q.layout)),j=q.type}else S=d.TEXTFIELD;break;case f.OBJECT:if(p)(I=c.getRole())===m.COLUMN?S=d.SELECTCOLUMN:(y.warn("Complex subControl type that is not a field! Name: "+c.name),S=d.READONLY);else if(c.isCompoundField()){var W=Fa(c,p);S=W.controlType,I=W.role}else y.warn("Complex parameter type that is not a field! Name: "+c.name),S=d.READONLY;break;default:I="???"+c.propType()+"???",S=d.TEXTAREA}else S=d.CUSTOM;c.getRole()===m.ENUM&&(M=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var o=[];return e.getValidValues().forEach(function(e){o.push(t.l10nValueLabel(r,String(e)))}),o}return[]}(c,n)),c.getRole()===m.ENUM&&(F=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var o=[];return e.getValidValues().forEach(function(e){o.push(t.l10nValueDesc(r,String(e)))}),o}return[]}(c,n)),!p&&c.actionRef&&(V=za(i.getAction(c.actionRef),n));var $,X,K,Y={};return Y.name=c.name,Y.label=E,Y.description=b,Y.labelVisible="boolean"==typeof c.labelVisible?c.labelVisible:U,Y.controlType=c.getControl(S),Y.valueDef=Ra.make(c),Y.structureType=j,Y.role=I,Y.additionalText=u,Y.orientation=v,Y.values=c.getValidValues(),Y.valueLabels=M,Y.valueDescs=F,Y.valueIcons=c.valueIcons,Y.sortable=c.sortable,Y.filterable=c.filterable,Y.resizable=c.resizable,Y.charLimit=c.charLimit,Y.subControls=C,Y.keyIndex=k,Y.defaultRow=R,Y.childItem=A,Y.multiSelectEditChildItem=L,Y.moveableRows=H,Y.required=g,Y.language=c.language,Y.enableMaximize=c.enableMaximize,Y.summary=c.summary,Y.increment=c.increment,Y.minValue=c.minValue,Y.maxValue=c.maxValue,Y.rowSelection=O,Y.generatedValues=c.generatedValues,Y.addRemoveRows=D,Y.dateFormat=c.dateFormat,Y.timeFormat=c.timeFormat,Y.customControlId=c.customControlId,Y.data=c.data,Y.rows=c.rows,Y.displayChars=c.displayChars,Y.header=N,Y.uionly=c.uionly,Y.includeAllFields=P,Y.layout=x,Y.dmImage=c.dmImage,Y.action=V,Y.customValueAllowed=c.customValueAllowed,Y.shouldFilterItem=c.shouldFilterItem,Y.className=c.className,Y.buttons=B,Y.helperText=h,Y.readOnly=c.readOnly,Y.light=($=l.light,X=l.containerType,K=c.isSubPanelEdit(),$&&(X!==xe.TEARSHEET||X===xe.TEARSHEET&&K)),Y.editStyle=c.editStyle,p&&(Y.visible=c.visible,Y.width=c.columns(8),Y.isKeyField=c.isKey,Y.dmDefault=c.dmDefault),new Sa(Y)}function Ua(e,t,r,o){return Va(null,null,null,e.propType()===f.STRUCTURE&&r?r.getStructure(e.baseType()):null,t,null,r,e,o)}function Ha(e){return"on_panel"===e.editStyle||"subpanel"===e.editStyle}function ja(e,t,r,o,n){var i=[];return Array.isArray(r.actionIds())&&r.actionIds().forEach(function(e){var r=Ta.makeAction(za(t.getAction(e),n));i.push(r)}),i}function za(e,t){var r,o=new _a(t.l10nLabel(e,e.id));return e.description&&(r=new Aa(t.l10nDesc(e,e.id))),new oa(e.id,o,r,e.control,e.data,e.image,e.button,e.className,e.customActionId)}function qa(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ga(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ga(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Wa(e,t){for(var o in e)ae(e,o)&&"object"===r(e[o])&&null!==e[o]&&(e[o].message?e[o].message.default=t.l10nResource(e[o].message):Wa(e[o],t))}function $a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Xa(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var Ka=function(){function r(e,o,n,i,a,s,l,p,c,u,d,h,f,m,v,y){t(this,r),this.componentId=e,this.label=o,this.labelEditable=n,this.help=i,this.description=a,this.editorSize=s,this.pixelWidth=l,this.uiItems=p,this.buttons=c,this.data=u,this.conditions=d,this.resources=h,this.icon=f,this.heading=m,v&&(this.title=v),(null==y?void 0:y.length)>0&&(this.titleUiItems=y)}return e(r,null,[{key:"makeForm",value:function(e,t){var o,n,i=Ia.makePropertyDef(Wi(e)("titleDefinition"),Wi(e)("parameters"),Wi(e)("complex_types"),Wi(e)("uihints")),a=Wi(e)("resources"),s=Wi(e)("conditions");if(i){var p=new Ki(a),c=[];if(i.groupMetadata&&i.groupMetadata.groups){var u,d=$a(i.groupMetadata.groups);try{for(d.s();!(u=d.n()).done;){var h=u.value;c.push(Pa(i,h,p,t))}}catch(e){d.e(e)}finally{d.f()}}var f=[];i.titleMetadata&&i.actionMetadata&&(f=ja(0,i.actionMetadata,i.titleMetadata.Title,0,p));var m={currentParameters:Wi(e)("current_parameters"),uiCurrentParameters:Wi(e)("current_ui_parameters"),datasetMetadata:Wi(e)("dataset_metadata")},v=t===xe.TEARSHEET||t===xe.MODAL?l.LARGE:l.SMALL;return new r(i.name,i.label,i.labelEditable,i.help,p.l10nResource(i.description),i.editorSizeHint(v),i.pixelWidth,[Ta.makePrimaryTabs(c)],(o=new Ya("ok","OK",!0,""),n=new Ya("cancel","Cancel",!1,""),[o,n]),m,function(e,t){if(e&&Array.isArray(e)){var r,o=qa(e);try{for(o.s();!(r=o.n()).done;)Wa(r.value,t)}catch(e){o.e(e)}finally{o.f()}}return e}(s,p),a,i.icon,p.l10nResource(i.heading),i.titleMetadata,f)}return null}}])}();var Ya=e(function e(r,o,n,i){t(this,e),this.id=r,this.text=o,this.isPrimary=n,this.url=i});function Ja(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ja=function(){return!!e})()}var Qa=function(){function r(e,o,a,s,l){var p;return t(this,r),p=function(e,t,r){return t=n(t),i(e,Ja()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,[e]),p.newValues=e,p.initialValues=o,p.appData=a,p.applyPropertyChanges=s,p.propertiesActionLabel=l,p}return o(r,et),e(r,[{key:"do",value:function(){this.applyPropertyChanges&&this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"undo",value:function(){this.applyPropertyChanges&&this.applyPropertyChanges(this.initialValues.properties,this.appData,this.initialValues.additionalInfo,this.initialValues.undoInfo,this.initialValues.uiProperties)}},{key:"redo",value:function(){this.applyPropertyChanges&&this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"getLabel",value:function(){return this.propertiesActionLabel}}])}(),Za=le,es=pe;var ts=function(e,t,r){(void 0!==r&&!es(e[t],r)||void 0===r&&!(t in e))&&Za(e,t,r)};var rs=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},os=Y,ns=J;var is=function(e){return os(e,ns(e))},as=ts,ss=Q.exports,ls=Z,ps=ee,cs=te,us=ce,ds=ie,hs=Qt,fs=Zt.exports,ms=ue,vs=de,ys=tt,gs=er,bs=rs,Es=is;var Is=tr,Ss=ts,Cs=rr,ks=function(e,t,r,o,n,i,a){var s=bs(e,r),l=bs(t,r),p=a.get(l);if(p)as(e,r,p);else{var c=i?i(s,l,r+"",e,t,a):void 0,u=void 0===c;if(u){var d=ds(l),h=!d&&fs(l),f=!d&&!h&&gs(l);c=l,d||h||f?ds(s)?c=s:hs(s)?c=ps(s):h?(u=!1,c=ss(l,!0)):f?(u=!1,c=ls(l,!0)):c=[]:ys(l)||us(l)?(c=s,us(s)?c=Es(s):vs(s)&&!ms(s)||(c=cs(l))):u=!1}u&&(a.set(l,c),n(c,l,o,i,a),a.delete(l)),as(e,r,c)}},Ts=de,ws=J,Rs=rs;var _s=function e(t,r,o,n,i){t!==r&&Cs(r,function(a,s){if(i||(i=new Is),Ts(a))ks(t,r,s,o,e,n,i);else{var l=n?n(Rs(t,s),a,s+"",t,r,i):void 0;void 0===l&&(l=a),Ss(t,s,l)}},ws)},As=or,Ls=L;var Os=function(e){return As(function(t,r){var o=-1,n=r.length,i=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(n--,i):void 0,a&&Ls(r[0],r[1],a)&&(i=n<3?void 0:i,n=1),t=Object(t);++o<n;){var s=r[o];s&&e(t,s,o,i)}return t})},Ds=_s,Ns=Os(function(e,t,r){Ds(e,t,r)}),Ps=nr,xs=ir,Bs=Qt,Ms=or(function(e,t){return Bs(e)?Ps(e,xs(t,1,Bs,!0)):[]}),Fs=he,Vs=Y,Us=Os,Hs=ar,js=sr,zs=lr,qs=Object.prototype.hasOwnProperty,Gs=Us(function(e,t){if(js(t)||Hs(t))Vs(t,zs(t),e);else for(var r in t)qs.call(t,r)&&Fs(e,r,t[r])});function Ws(){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 gn:if(null===r)return e;var o=e;return void 0!==r.row?(void 0===o[r.name]&&(o[r.name]=[]),void 0!==r.col?(void 0===o[r.name][r.row]&&(o[r.name][r.row]=[]),void 0!==r.propertyId?$s(r.propertyId,o[r.name][r.row][r.col],t.property.value):o[r.name][r.row][r.col]=t.property.value):void 0!==r.propertyId?$s(r.propertyId,o[r.name][r.row],t.property.value):o[r.name][r.row]=t.property.value):o[r.name]=t.property.value,Object.assign({},e,o);case yn:return Object.assign({},t.properties);case bn:var n=e;return null!==r&&void 0!==r.name&&delete n[r.name],Object.assign({},e,n);default:return e}}function $s(e,t,r){void 0!==e.row&&(void 0!==e.col?(void 0===t[e.row]&&(t[e.row]=[]),void 0!==e.propertyId?$s(e.propertyId,t[e.row][e.col],r):t[e.row][e.col]=r):t[e.row]=r)}function Xs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case In:var r=e,o=t.state.propertyId;if(void 0===r[o.name]&&(r[o.name]={}),void 0!==o.row){var n=o.row.toString();if(void 0===r[o.name][n]&&(r[o.name][n]={}),void 0!==o.col){var i=o.col.toString();void 0===r[o.name][n][i]&&(r[o.name][n][i]={}),r[o.name][n][i]={value:t.state.value}}else r[o.name][n]={value:t.state.value}}else r[o.name]={value:t.state.value};return Object.assign({},e,r);case En:return Object.assign({},t.states);default:return e}}function Ks(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Cn:var r=e;return r[t.state.panelId.name]={value:t.state.value},Object.assign({},e,r);case Sn:return Object.assign({},t.states);default:return e}}function Ys(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Tn:var r=e;return r[t.state.actionId.name]={value:t.state.value},Object.assign({},e,r);case kn:return Object.assign({},t.states);default:return e}}function Js(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Rn:var r=e,o=t.message.propertyId;if(void 0===r[o.name]&&(r[o.name]={}),void 0!==o.row){var n=o.row.toString();if(void 0===r[o.name][n]&&(r[o.name][n]={}),void 0!==o.col){var i=o.col.toString();void 0===r[o.name][n][i]&&(r[o.name][n][i]={}),r[o.name][n][i]=t.message.value}else r[o.name][n]=Object.assign({},t.message.value)}else r[o.name]=Object.assign({},t.message.value);return Object.assign({},e,r);case _n: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,Jt(a[t.message.propertyId.name])&&delete a[t.message.propertyId.name])),Object.assign({},e,a);case wn:return Object.assign({},t.messages);default:return e}}function Qs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===An?Object.assign({},e,t.datasetMetadata):e}function Zs(){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,o=t.info.propertyId;if(r[o.name]||(r[o.name]={}),Number.isInteger(o.row)){var n=String(o.row);if(r[o.name][n]||(r[o.name][n]={}),Number.isInteger(o.col)){var i=String(o.col);r[o.name][n][i]||(r[o.name][n][i]={}),r[o.name][n][i].selectedRows=t.info.selectedRows}else r[o.name][n].selectedRows=t.info.selectedRows}else r[o.name].selectedRows=t.info.selectedRows;return Object.assign({},e,r);case On: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 el(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Fn:var r=e,o=t.info.propertyId;if(r[o.name]||(r[o.name]={}),Number.isInteger(o.row)){var n=String(o.row);if(r[o.name][n]||(r[o.name][n]={}),Number.isInteger(o.col)){var i=String(o.col);r[o.name][n][i]||(r[o.name][n][i]={}),r[o.name][n][i].staticRows=t.info.staticRows}else r[o.name][n].staticRows=t.info.staticRows}else r[o.name].staticRows=t.info.staticRows;return Object.assign({},e,r);case Vn:var a=e,s=t.info.propertyId;if(t.info.propertyId){if(a[s.name])if(Number.isInteger(s.row)&&a[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&a[s.name][l][String(s.col)]?a[s.name][l][String(s.col)].staticRows=[]:a[s.name][l].staticRows=[]}else a[s.name].staticRows=[];return Object.assign({},e,a)}return{};default:return e}}function tl(){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;return r.title=t.title,Object.assign({},e,r);case Nn:var o=e;return o.activeTab=t.activeTab,Object.assign({},e,o);default:return e}}function rl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===Pn){var r=e;return r.propertyIds=t.propertyIds,Object.assign({},e,r)}return e}function ol(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===xn){var r=e;return r.disable=t.disableState,Object.assign({},e,r)}return e}function nl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===Bn){var r=e;return r[t.info.panelId.name]=t.info.disableState,Object.assign({},e,r)}return e}function il(){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 Mn:if(null===r)return e;var o=e;return void 0===o[r.name]&&(o[r.name]={}),void 0!==r.row?al(r,o[r.name],"addRemoveRows",t.info.value):o[r.name].addRemoveRows=t.info.value,Object.assign({},e,o);case Un:if(null===r)return e;var n=e;return void 0===n[r.name]&&(n[r.name]={}),void 0!==r.row?al(r,n[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value):fe(n[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value),Object.assign({},e,n);case Hn:if(null===r)return e;var i=e;return void 0===i[r.name]&&(i[r.name]={}),void 0!==r.row?al(r,i[r.name],"hideEditButton",t.info.value):i[r.name].hideEditButton=t.info.value,Object.assign({},e,i);default:return e}}function al(e,t,r,o){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?al(e.propertyId,t[e.row][e.col],r,o):fe(t[e.row][e.col],r,o)):void 0!==e.propertyId?al(e.propertyId,t[e.row],r,o):fe(t[e.row],r,o))}function sl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===jn?Object.assign({},e,t.tearsheetId):e}var ll=function(){return e(function e(){t(this,e),this.combinedReducer=Nr({propertiesReducer:Ws,controlStatesReducer:Xs,panelStatesReducer:Ks,errorMessagesReducer:Js,datasetMetadataReducer:Qs,rowSelectionsReducer:Zs,componentMetadataReducer:tl,disableRowMoveButtonsReducer:rl,actionStatesReducer:Ys,wideFlyoutPrimaryButtonDisableReducer:nl,tearsheetStatesReducer:sl,saveButtonDisableReducer:ol,propertiesSettingsReducer:il,rowFreezeReducer:el});var r=!1;"undefined"!=typeof window&&(r=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=Pr(this.combinedReducer,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 O(e.propertiesReducer)}},{key:"setPropertyValues",value:function(e){this.store.dispatch(function(e){return{type:yn,properties:e}}(e))}},{key:"updatePropertyValue",value:function(e,t){this.store.dispatch({type:gn,property:{propertyId:e,value:t}})}},{key:"removePropertyValue",value:function(e){this.store.dispatch({type:bn,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,o=void 0!==e.row?e.row.toString():null;return null!==r&&t&&t[r]&&(void 0!==t[r].value||t[r][o]&&(void 0!==t[r][o].value||void 0!==t[r][o].values))&&(t=t[r],null!==o&&t&&t[o]&&(void 0!==t[o].value||void 0!==t[o].values)&&(t=t[o])),t||null}},{key:"getControlStates",value:function(){var e=this.store.getState();return O(e.controlStatesReducer)}},{key:"setControlStates",value:function(e){D(this.getControlStates(),e)||this.store.dispatch(function(e){return{type:En,states:e}}(e))}},{key:"updateControlState",value:function(e,t){this.store.dispatch({type:In,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 O(e.panelStatesReducer)}},{key:"setPanelStates",value:function(e){D(this.getPanelStates(),e)||this.store.dispatch(function(e){return{type:Sn,states:e}}(e))}},{key:"updatePanelState",value:function(e,t){this.store.dispatch({type:Cn,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 O(e.actionStatesReducer)}},{key:"setActionStates",value:function(e){D(this.getActionStates(),e)||this.store.dispatch(function(e){return{type:kn,states:e}}(e))}},{key:"updateActionState",value:function(e,t){this.store.dispatch({type:Tn,state:{actionId:e,value:t}})}},{key:"setSaveButtonDisable",value:function(e){this.store.dispatch(function(e){return{type:xn,disableState:e}}(e))}},{key:"getSaveButtonDisable",value:function(){return this.store.getState().saveButtonDisableReducer.disable}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.store.dispatch({type:Bn,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 o=null,n=null;if(r&&r.text&&(o=r),r){var i=K(r);n=this._getTableCellErrors(i,t)}return null!==o&&null!==n?o.text=o.text+" "+n.text:null===o&&(o=n),o}},{key:"_getTableCellErrors",value:function(e,t){var r=null,o=0,n=0;for(var i in e)if(ae(e,i)&&"text"!==i){var a=e[i];if(a&&a.text&&(r=a,o+=a.type===Re.ERROR?1:0,n+=a.type===Re.WARNING?1:0),a)for(var s in a)if(ae(a,s)&&"text"!==s){var l=a[s];l&&l.text&&(r=l,o+=l.type===Re.ERROR?1:0,n+=l.type===Re.WARNING?1:0)}}return o+n!==1&&r&&(r.type=o>0?Re.ERROR:Re.WARNING,r.text=o>0?c(t,Ie.TABLE_SUMMARY_ERROR,{errorMsgCount:o}):"",r.text+=n>0?c(t,Ie.TABLE_SUMMARY_WARNING,{warningMsgCount:n}):""),r}},{key:"getErrorMessages",value:function(){var e=this.store.getState();return O(e.errorMessagesReducer)}},{key:"setErrorMessages",value:function(e){D(this.getErrorMessages(),e)||this.store.dispatch(function(e){return{type:wn,messages:e}}(e))}},{key:"updateErrorMessage",value:function(e,t){D(this.getErrorMessage(e),t)||this.store.dispatch({type:Rn,message:{propertyId:e,value:t}})}},{key:"clearErrorMessage",value:function(e){null!==this.getErrorMessage(e)&&this.store.dispatch({type:_n,message:{propertyId:e}})}},{key:"setDatasetMetadata",value:function(e){this.store.dispatch(function(e){return{type:An,datasetMetadata:e}}(e))}},{key:"getDatasetMetadata",value:function(){return this.store.getState().datasetMetadataReducer}},{key:"getSelectedRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowSelectionsReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.selectedRows?t.selectedRows:[]}},{key:"updateSelectedRows",value:function(e,t){this.store.dispatch({type:Ln,info:{propertyId:e,selectedRows:t}})}},{key:"clearSelectedRows",value:function(e){this.store.dispatch({type:On,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:Fn,info:{propertyId:e,staticRows:t}})}},{key:"clearStaticRows",value:function(e){this.store.dispatch({type:Vn,info:{propertyId:e}})}},{key:"setDisableRowMoveButtons",value:function(e){this.store.dispatch(function(e){return{type:Pn,propertyIds:e}}(e))}},{key:"getDisableRowMoveButtons",value:function(){return this.store.getState().disableRowMoveButtonsReducer.propertyIds}},{key:"setTitle",value:function(e){this.store.dispatch(zn(e))}},{key:"getTitle",value:function(){return this.store.getState().componentMetadataReducer.title}},{key:"setActiveTab",value:function(e){this.store.dispatch(qn(e))}},{key:"getActiveTab",value:function(){return this.store.getState().componentMetadataReducer.activeTab}},{key:"setAddRemoveRows",value:function(e,t){this.store.dispatch({type:Mn,info:{propertyId:e,value:t}})}},{key:"getAddRemoveRows",value:function(e){var t=this.store.getState(),r=!0;return t.propertiesSettingsReducer[e.name]?void 0!==e.row?pl(e,t.propertiesSettingsReducer[e.name],"addRemoveRows",r):t.propertiesSettingsReducer[e.name].addRemoveRows:r}},{key:"setTableButtonEnabled",value:function(e,t,r){this.store.dispatch({type:Un,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?pl(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(),o=!1;return r.propertiesSettingsReducer[e.name]?void 0!==e.row?pl(e,r.propertiesSettingsReducer[e.name],"tableButtons.".concat(t),o):r.propertiesSettingsReducer[e.name].tableButtons[t]:o}},{key:"setHideEditButton",value:function(e,t){this.store.dispatch({type:Hn,info:{propertyId:e,value:t}})}},{key:"getHideEditButton",value:function(e){var t=this.store.getState(),r=!1;return t.propertiesSettingsReducer[e.name]?void 0!==e.row?pl(e,t.propertiesSettingsReducer[e.name],"hideEditButton",r):t.propertiesSettingsReducer[e.name].hideEditButton:r}},{key:"setActiveTearsheetId",value:function(e){this.store.dispatch(function(e){return{type:jn,tearsheetId:e}}({tearsheetId:e}))}},{key:"getActiveTearsheetId",value:function(){var e=this.store.getState().tearsheetStatesReducer.tearsheetId;return void 0!==e?e:null}}])}();function pl(e,t,r,o){return void 0!==e.row&&t[e.row]?void 0!==e.col&&t[e.row][e.col]?void 0!==e.propertyId?pl(e.propertyId,t[e.row][e.col],r,o):se(t[e.row][e.col],r):void 0!==e.propertyId?pl(e.propertyId,t[e.row],r,o):se(t[e.row],r):o}function cl(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ul(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ul(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 ul(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function dl(e,t,r){if(e.or)!function(e,t,r){for(var o=0;o<e.length;o++)dl(e[o],t,r)}(e.or,t,r);else if(e.and)!function(e,t,r){for(var o=0;o<e.length;o++)dl(e[o],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 hl(e,t,r){if(r.uiItems){var o,n=cl(r.uiItems);try{for(n.s();!(o=n.n()).done;){ml(e,t,o.value)}}catch(e){n.e(e)}finally{n.f()}}}function fl(e,t,r){if(t.label&&(t.summaryLabel=t.label.text),r&&(t.parentCategoryId=r),e.push(t),t.subControls)for(var o=0;o<t.subControls.length;o++){var n=t.subControls[o];n.parameterName=t.name,n.columnIndex=o,r&&(n.parentCategoryId=r),e.push(n)}}function ml(e,t,r,o,n){switch(r.itemType){case I.CONTROL:var i=r.control;if(o&&(i.summaryPanelId=o),n&&(i.parentCategoryId=n),fl(e,i,n),r.additionalItems){var a,s=cl(r.additionalItems);try{for(s.s();!(a=s.n()).done;){ml(e,t,a.value.content,o,n)}}catch(e){s.e(e)}finally{s.f()}}break;case I.ADDITIONAL_LINK:case I.CHECKBOX_SELECTOR:case I.TEARSHEET:case I.PANEL:if(r.panel&&r.panel.uiItems){var l=o;r.panel.panelType===_.SUMMARY&&(l=r.panel.id);var p,c=cl(r.panel.uiItems);try{for(c.s();!(p=c.n()).done;){ml(e,t,p.value,l,n)}}catch(e){c.e(e)}finally{c.f()}}break;case I.PRIMARY_TABS:case I.PANEL_SELECTOR:case I.SUB_TABS:if(r.tabs){var u,d=cl(r.tabs);try{for(d.s();!(u=d.n()).done;){var h=u.value;ml(e,t,h.content,o,r.itemType===I.PANEL_SELECTOR||r.itemType===I.SUB_TABS?n:h.group)}}catch(e){d.e(e)}finally{d.f()}}break;case I.CUSTOM_PANEL:if(r.panel&&r.panel.parameters){var f,m=cl(r.panel.parameters);try{for(m.s();!(f=m.n()).done;){var v={name:f.value,controlType:"custom"};o&&(v.summaryPanelId=o),n&&(v.parentCategoryId=n),e.push(v)}}catch(e){m.e(e)}finally{m.f()}}break;case I.ACTION:r.action&&r.action.name&&(t[r.action.name]=r.action);break;case I.STATIC_TEXT:case I.TEXT_PANEL:case I.HORIZONTAL_SEPARATOR:break;default:y.warn("Unknown UiItem type when parsing ui conditions: "+r.itemType)}return e}function vl(e,t,r){try{var o=function(e){var t=e;if(t.evaluate){var r=[];t.parameter_refs?dl(t.evaluate,r,t.parameter_refs):dl(t.evaluate,r,t.parameter_ref);var o=Array.from(new Set(r));return o.length>1?o:o[0]}throw new Error("Invalid validation schema")}(t[r]),n={params:o,definition:t};yl(e.controls,o,n);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&&yl(e.refs,i,n)}catch(e){y.info("Error parsing ui conditions: "+e)}return e}function yl(e,t,r){if(!0===Array.isArray(t))for(var o=0;o<t.length;o++)void 0===e[t[o]]&&(e[t[o]]=[]),e[t[o]].push(r);else void 0===e[t]&&(e[t]=[]),e[t].push(r)}function gl(e){var t={};if(e&&e.functions){var r=new Ki(Wi(e)("resources")),o=K(e.functions);if(Array.isArray(o.function_info)&&Array.isArray(o.function_categories)){var n=o.parmsSet?o.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 o=Yi.make(r.return_type_label);r.locReturnType=t.l10nResource(o)}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,o){var n=o>0?", ":"";r.locLabel+=n+t.l10nLabel(e,e.id),r.value+=n+"?"}),r.locLabel+=")",r.value+=")")),r})}(o.function_info,r);o.parmsSet=!0,t.functionCategories=[],o.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 o=bl(r,n);o&&t.functionCategories[e.id].functionList.push(o)})}),t.operators=[],o.operator_refs&&o.operator_refs.forEach(function(e){var r=bl(e,n);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 o=r.l10nDesc(e.field_columns.field_column_info,e.id+".field_column_info");o!==e.id+".field_column_info"&&(e.field_columns.field_column_info.descLabel=o);var n=r.l10nDesc(e.field_columns.value_column_info,e.id+".value_column_info");n!==e.id+".value_column_info"&&(e.field_columns.value_column_info.descLabel=n),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 bl(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 El(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Il(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Il(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Il(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Sl(e,t,r){switch(t.itemType){case I.PRIMARY_TABS:case I.SUB_TABS:if(t.tabs){var o,n=El(t.tabs);try{for(n.s();!(o=n.n()).done;){Sl(e,o.value.content,r)}}catch(e){n.e(e)}finally{n.f()}}break;case I.TEXT_PANEL:case I.PANEL:case I.CUSTOM_PANEL:case I.ADDITIONAL_LINK:case I.TEARSHEET:case I.CHECKBOX_SELECTOR:if(t.panel&&t.panel.id&&(e[r].panels.push(t.panel.id),Cl(e,t.panel.id),t.panel.uiItems)){var i,a=El(t.panel.uiItems);try{for(a.s();!(i=a.n()).done;){Sl(e,i.value,t.panel.id)}}catch(e){a.e(e)}finally{a.f()}}break;case I.CONTROL:if(e[r].controls.push(t.control.name),t.control.action&&e[r].actions.push(t.control.action.name),t.control.additionalItems){var s,l=El(t.control.additionalItems);try{for(l.s();!(s=l.n()).done;){Sl(e,s.value.content,r)}}catch(e){l.e(e)}finally{l.f()}}break;case I.PANEL_SELECTOR:if(e[r].panels.push(t.id),Cl(e,t.id),t.dependsOn&&e[t.id].controls.push(t.dependsOn),t.tabs){var p,c=El(t.tabs);try{for(c.s();!(p=c.n()).done;){Sl(e,p.value.content,t.id)}}catch(e){c.e(e)}finally{c.f()}}break;case I.ACTION:e[r].actions.push(t.action.name);break;case I.STATIC_TEXT:case I.HORIZONTAL_SEPARATOR:break;default:y.warn("Unknown UiItem type when parsing ui conditions: "+t.itemType)}}function Cl(e,t){ae(e,t)&&y.warn("Duplicate panel ids, each panel id must be unique. Panel id = "+t),e[t]={controls:[],panels:[],actions:[]}}var kl=ir,Tl=rt,wl=Qt,Rl=pr,_l=or(function(e){var t=Rl(e);return t="function"==typeof t?t:void 0,Tl(kl(e,1,wl,!0),void 0,t)}),Al=cr,Ll=hr,Ol=fr,Dl=me,Nl=ur,Pl=dr,xl=Math.min;var Bl=function(e,t,r){for(var o=r?Ol:Ll,n=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,p=[];a--;){var c=e[a];a&&t&&(c=Dl(c,Nl(t))),l=xl(c.length,l),s[a]=!r&&(t||n>=120&&c.length>=120)?new Al(a&&c):void 0}c=e[0];var u=-1,d=s[0];e:for(;++u<n&&p.length<l;){var h=c[u],f=t?t(h):h;if(h=r||0!==h?h:0,!(d?Pl(d,f):o(p,f,r))){for(a=i;--a;){var m=s[a];if(!(m?Pl(m,f):o(e[a],f,r)))continue e}d&&d.push(f),p.push(h)}}return p},Ml=Qt;var Fl=function(e){return Ml(e)?e:[]},Vl=me,Ul=Bl,Hl=Fl,jl=pr,zl=or(function(e){var t=jl(e),r=Vl(e,Hl);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?Ul(r,void 0,t):[]});function ql(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Gl(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Gl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Wl(e,t,o){var n=e;if(n.validation)return function(e,t,o){if(e.fail_message&&e.evaluate){var n=e.evaluate;n.isValidation=!0;var i=Xl(n,t,o);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")}(n.validation,t,o);if(n.enabled)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Xl(e.evaluate,t,r);throw new Error("Invalid enabled schema")}(n.enabled,t,o);if(n.visible)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Xl(e.evaluate,t,r);throw new Error("Invalid visible schema")}(n.visible,t,o);if(n.enum_filter)return function(e,t,r){if(e.target&&e.evaluate)return Xl(e.evaluate,t,r);throw new Error("Invalid filteredEnum schema")}(n.enum_filter,t,o);if(n.allow_change)return function(e,t,r){if((e.parameter_refs||e.group_refs)&&e.evaluate)return Xl(e.evaluate,t,r);throw new Error("Invalid allow change schema")}(n.allow_change,t,o);if(n.default_value)return function(e,t,r){if(e.parameter_ref&&e.value&&e.evaluate)return Xl(e.evaluate,t,r);throw new Error("Invalid conditional default schema")}(n.default_value,t,o);throw new Error("Invalid user input validation definition schema")}function $l(e,t,r,o){return t&&t.filter&&t.filter.evaluate?Kl(e,t.filter,t.filter.evaluate,r,o):o}function Xl(e,t,o){if(e.or)return function(e,t,r){for(var o=0;o<e.length;o++){if(!0===Xl(e[o],t,r))return!0}return!1}(e.or,t,o);if(e.and)return function(e,t,o){for(var n=0;n<e.length;n++){var i=Xl(e[n],t,o);if(!1===i)return!1;if("object"===r(i))return i}return!0}(e.and,t,o);if(e.condition)return function(e,t,r,o){var n=e.op,i=e.parameter_ref,a=e.parameter_2_ref,s=e.value,l={},p=r.getPropertiesConfig();o||"null"!==p.conditionDisabledPropertyHandling||(l.filterDisabled=!0);o||"null"!==p.conditionHiddenPropertyHandling||(l.filterHidden=!0);var c,u={param:i,id:Yl(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:Yl(t,a)}).value=r.getPropertyValue(c.id,l,null),c.control=r.getControl(c.id));var d=r.getConditionOp(n);if(d)return d(u,c,s,r);return y.warn("Ignoring unknown condition operation '"+n+"' for parameter_ref "+i),!0}(e.condition,t,o,e.isValidation);throw new Error("Failed to parse definition")}function Kl(e,t,r,o,n){if(r.or)return function(e,t,r,o,n){var i,a=[],s=ql(r);try{for(s.s();!(i=s.n()).done;){var l=Kl(e,t,i.value,o,n);a=_l(a,l,D)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.or,o,n);if(r.and)return function(e,t,r,o,n){var i,a=K(n),s=ql(r);try{for(s.s();!(i=s.n()).done;){var l=Kl(e,t,i.value,o,a);a=zl(a,l,D)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.and,o,n);if(r.condition)return function(e,t,r,o,n){var i=r.op,a=[];void 0!==r.value&&null!==r.value?a.push(r.value):Array.isArray(r.values)&&a.push.apply(a,ot(r.values));switch(i){case"dmMeasurement":return function(e,t){var r=K(e);r&&(r=r.filter(function(e){var r,o=ql(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e.metadata&&e.metadata.measure===n)return!0}}catch(e){o.e(e)}finally{o.f()}return!1}));return r}(n,a);case"dmType":return function(e,t){var r=K(e);r&&(r=r.filter(function(e){var r,o=ql(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e.type===n)return!0}}catch(e){o.e(e)}finally{o.f()}return!1}));return r}(n,a);case"dmModelingRole":return function(e,t){var r=K(e);r&&(r=r.filter(function(e){var r,o=ql(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e.metadata&&e.metadata.modeling_role===n)return!0}}catch(e){o.e(e)}finally{o.f()}return!1}));return r}(n,a);case"dmSharedFields":return function(e,t,r,o){var n=o;t.parameter_refs&&(n=r.filterFieldsFromSharedProps(o,t.parameter_refs,e.name));return n}(e,t,o,n);default:var s=o.getConditionOp(i);return s&&e.name===t.parameter_ref?s(e,r,o,n):(y.warn("Ignoring unknown condition operation '"+i+"'"),n)}}(e,t,r.condition,o,n);throw new Error("Failed to parse filter definition")}function Yl(e,t){var r={},o=t.indexOf("[");return o>-1?((r=K(e)).name=t.substring(0,o),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 Jl(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ql(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ql(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Zl(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 o in t)if(ae(t,o)){var n=t[o];if(!n.parameterName)tp(n.name?{name:n.name}:{name:n},e,r)}}(e,r,t)}function ep(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 o in t)if(ae(t,o)){var n=t[o];if(!n.parameterName){var i=n.name?{name:n.name}:{name:n},a=e.getPropertyValue(i);if(n.subControls)if(n.valueDef.isList||n.valueDef.isMap){if(up(i,r,e),Array.isArray(a))for(var s=0;s<a.length;s++)for(var l=0;l<n.subControls.length;l++)i.row=s,i.col=l,up(i,r,e)}else for(var p={name:i.name},c=0;c<n.subControls.length;c++)p.col=c,up(p,r,e);else up(i,r,e)}}}(e,r,t),pp(e.panelTree,t,Ve);var o=np(e);e.setControlStates(t.controls),e.setPanelStates(t.panels),e.setActionStates(t.actions);var n,i=Jl(op(o,np(e)));try{for(i.s();!(n=i.n()).done;){rp(n.value,e,1)}}catch(e){i.e(e)}finally{i.f()}}function tp(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=t.getControl(e);if(o){var n=K(e),i=t.getPropertyValue(n);if(Array.isArray(i)){if(cp(n,t,o,r),o.subControls)if(o.valueDef.isList||o.valueDef.isMap)for(var a=0;a<i.length;a++)for(var s=0;s<o.subControls.length;s++)n.row=a,n.col=s,cp(n,t,o.subControls[s],r);else for(var l=0;l<o.subControls.length;l++){cp({name:e.name,col:l},t,o.subControls[l],r)}else if(void 0===n.row)for(var p=0;p<i.length;p++)n.row=p,n.col=0,cp(n,t,o,r)}else cp(n,t,o,r)}else y.warn("Control not found for "+e.name)}function rp(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=t.getControl(e);if(o){var n={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},i=K(e),a=t.getPropertyValue(i);if(Array.isArray(a)&&o.subControls)if(o.valueDef.isList||o.valueDef.isMap){up(i,n,t);for(var s=0;s<a.length;s++)for(var l=0;l<o.subControls.length;l++)i.row=s,i.col=l,up(i,n,t)}else for(var p=0;p<o.subControls.length;p++)i.col=p,up(i,n,t);else up(i,n,t);var c=np(t);t.setControlStates(n.controls),t.setPanelStates(n.panels),t.setActionStates(n.actions);var u,d=Jl(op(c,np(t),r));try{for(d.s();!(u=d.n()).done;){rp(u.value,t,r+1)}}catch(e){d.e(e)}finally{d.f()}r>0&&pp(t.panelTree,n,Ve)}else y.warn("Control not found for "+e.name)}function op(e,t,r){var o=[];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 n,i=Jl(nt(Object.keys(e),Object.keys(t)));try{for(i.s();!(n=i.n()).done;){var a=n.value,s=e[a],l=t[a];D(s,l)||o.push({name:a})}}catch(e){i.e(e)}finally{i.f()}return o}function np(e){var t=e.getPropertiesConfig(),r={};return"null"===t.conditionDisabledPropertyHandling&&(r.filterDisabled=!0),"null"===t.conditionHiddenPropertyHandling&&(r.filterHidden=!0),Jt(r)?{}:e.getPropertyValues(r)}function ip(e,t,r,o){var n=e[t.name];n||(n={});var i=Object.assign({},n);if(!(void 0===t.row&&void 0===t.col)||i.value!==_e.HIDDEN||r!==_e.DISABLED&&r!==_e.ENABLED?i.value=r:i.value=_e.HIDDEN,void 0!==t.col){var a=t.col.toString();if(n[a]||(n[a]={}),void 0!==t.row){var s=t.row.toString();n[a][s]||(n[a][s]={}),n[a][s].value=i.value}else{n[a].value=i.value;var l="hidden"===r,p=o.getColumnVisibility(t,t.col)!==!l;void 0!==o&&p&&o.toggleColumnVisibility(t,t.col,!l)}}else n.value=i.value;e[t.name]=n}function ap(e,t,r,o){var n=e[t.name];n||(n={}),n.values||(n.values={}),n.values[r]||(n.values[r]={});var i=Object.assign({},n);if(!(void 0===t.row&&void 0===t.col)||i.values[r].value!==_e.HIDDEN||o!==_e.DISABLED&&o!==_e.ENABLED?i.values[r].value=o:i.values[r].value=_e.HIDDEN,void 0!==t.col){var a=t.col.toString();if(n[a]||(n[a]={}),void 0!==t.row){var s=t.row.toString();n[a][s]||(n[a][s]={}),n[a][s].values||(n[a][s].values={}),n[a][s].values[r]||(n[a][s].values[r]={}),n[a][s].values[r].value=i.values[r].value}else n[a].values||(n[a].values={}),n[a].values[r]||(n[a].values[r]={}),n[a].values[r].value=i.values[r].value}else n.values[r]=i.values[r];e[t.name]=n}function sp(e,t){var r={name:e},o=e.indexOf("[");return o>-1&&(r.name=e.substring(0,o),r.col=parseInt(e.substring(o+1,e.indexOf("]")),10)),t&&(r.row=t.row),r}function lp(e,t,r,o){for(var n in e)if(ae(e,n)){var i=e[n],a=1e3*xr(n)();if(!0===i.required&&Cp(i,t,r,n,a,o),"date"!==i.role&&"time"!==i.role||kp(i,t,n,a,o),"column"===i.role){var s=n;i.valueDef.isList&&(s+="[0]"),Tp(i,t,s,a,o)}if(i.subControls){for(var l={},p=0;p<i.subControls.length;p++){l[n+"["+p+"]"]=i.subControls[p]}lp(l,t,r,o)}}}function pp(e,t,r,o){var n=t.panels[r],i=o?n&&n.value===_e.DISABLED:n&&(n.value===_e.HIDDEN||n.value===_e.DISABLED);if(i&&e[r]){if(e[r].controls){var a,s=Jl(e[r].controls);try{for(s.s();!(a=s.n()).done;){var l=a.value;o?t.controls[l].value!==_e.HIDDEN&&ip(t.controls,{name:l},n.value):ip(t.controls,{name:l},n.value)}}catch(e){s.e(e)}finally{s.f()}}if(e[r].actions){var p,c=Jl(e[r].actions);try{for(c.s();!(p=c.n()).done;){var u=p.value;o?t.actions[u].value!==_e.HIDDEN&&ip(t.actions,{name:u},n.value):ip(t.actions,{name:u},n.value)}}catch(e){c.e(e)}finally{c.f()}}}if(e[r]&&e[r].panels){var d,h=Jl(e[r].panels);try{for(h.s();!(d=h.n()).done;){var f=d.value;i&&(o?t.panels[f].value!==_e.HIDDEN&&ip(t.panels,{name:f},n.value):ip(t.panels,{name:f},n.value)),pp(e,t,f,o)}}catch(e){h.e(e)}finally{h.f()}}}function cp(e,t,o,n){var i=!1,a=t.getDefinitions(e,Be.VALIDATION,Me.CONTROLS);if(a.length>0){var s=t.getRequiredDefinitionIds();try{var l,p=!1,c=Jl(a);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=Fe;p=Wl(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=sp(u.definition.validation.fail_message.focus_parameter_ref,f)),void 0!==f.col&&void 0===o.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,n||u.alwaysShow||(d.displayError=!1),t.getErrorMessage(f,!0,!0,!1)||(i=!1),void 0!==f.row||void 0!==f.col){var m=t.convertPropertyId(f.name);null!==t.getErrorMessage(m)&&t.updateErrorMessage(m,null)}if(h&&!i)t.updateErrorMessage(f,d),h&&(i=!0);else if(!h&&!i||!h&&i){var v=t.getErrorMessage(f,!1,!1,!1);Jt(v)||v.validation_id!==d.validation_id||t.updateErrorMessage(f,Fe)}}}catch(e){c.e(e)}finally{c.f()}}catch(e){y.warn("Error thrown in validation: "+e)}}}function up(e,t,r){dp(e,t,r,Be.VISIBLE),dp(e,t,r,Be.ENABLED),dp(e,t,r,Be.FILTEREDENUM)}function dp(e,t,r,o){hp(r.getDefinitions(e,o,Me.CONTROLS),e,t,r,o)}function hp(e,t,r,o,n){if(e.length>0)try{e.forEach(function(i,a){var s=Wl(i.definition,t,o);switch(n){case Be.VISIBLE:fp(s,i.definition.visible,t,r,o,!0);break;case Be.ENABLED:fp(s,i.definition.enabled,t,r,o,!1);break;case Be.FILTEREDENUM:var l=function(e,t){var r=e[t],o=r.definition.enum_filter.target.parameter_ref,n=!0;return e.forEach(function(e,r){r>t&&e.definition.enum_filter.target.parameter_ref===o&&(n=!1)}),n}(e,a);!function(e,t,r,o,n){if(e.enum_filter.target&&e.enum_filter.target.parameter_ref){var i=r.controls,a=sp(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=Ip(e,o,s[l][p].enumFilter,s[l][p].enumFilterApplied,n);s[l][p].enumFilter=c.values,s[l][p].enumFilterApplied=c.filterApplied}else{var u=Ip(e,o,s[l].enumFilter,s[l].enumFilterApplied,n);s[l].enumFilter=u.values,s[l].enumFilterApplied=u.filterApplied}}else{var d=Ip(e,o,s.enumFilter,s.enumFilterApplied,n);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 fp(e,t,r,o,n,i){t.parameter_refs&&mp(e,t,r,o,n,i,t.parameter_refs,"control"),t.action_refs&&mp(e,t,r,o,n,i,t.action_refs,"action"),t.group_refs&&function(e,t,r,o,n,i){var a,s=i?_e.VISIBLE:_e.ENABLED,l=i?_e.HIDDEN:_e.DISABLED,p=i?_e.ENABLED:_e.HIDDEN,c=Jl(t.group_refs);try{for(c.s();!(a=c.n()).done;){var u=sp(a.value),d=Sp(o.panels,u);if(!0===e){if(u&&d!==s&&d!==p)bp(o,u,s,n)&&vp(o,u,s,n)}else if(u&&(i||!i&&d!==p)){bp(o,u,l,n)&&vp(o,u,l,n)}}}catch(e){c.e(e)}finally{c.f()}}(e,t,0,o,n,i)}function mp(e,t,r,o,n,i,a,s){var l,p=i?_e.VISIBLE:_e.ENABLED,c=i?_e.HIDDEN:_e.DISABLED,u=i?_e.ENABLED:_e.HIDDEN,d="control"===s?o.controls:o.actions,h=Jl(a);try{for(h.s();!(l=h.n()).done;){var f=sp(l.value,r),m=Sp(d,f);if(Array.isArray(t.values)){var v,y=Jl(t.values);try{for(y.s();!(v=y.n()).done;){var g=v.value;ap(d,f,g,!0===e?p:c)}}catch(e){y.e(e)}finally{y.f()}}else!0===e?f&&m!==p&&m!==u&&ip(d,f,p,n):f&&(i||!i&&m!==u)&&Ep(o,f,c,d,n)}}catch(e){h.e(e)}finally{h.f()}}function vp(e,t,r,o){if(o.panelTree[t.name]){var n,i=o.panelTree[t.name],a=Jl(i.panels);try{for(a.s();!(n=a.n()).done;){var s={name:n.value};ip(e.panels,s,r),vp(e,s,r,o),r===_e.ENABLED?gp(s,o,Be.ENABLED,e):r===_e.VISIBLE&&(e.panels[t.name].disabled&&pp(o.panelTree,e,t.name,!0),gp(s,o,Be.ENABLED,e),gp(s,o,Be.VISIBLE,e))}}catch(e){a.e(e)}finally{a.f()}var l,p=Jl(i.controls);try{for(p.s();!(l=p.n()).done;){yp(e,t,r,o,{name:l.value},e.controls)}}catch(e){p.e(e)}finally{p.f()}var c,u=Jl(i.actions);try{for(u.s();!(c=u.n()).done;){yp(e,t,r,o,{name:c.value},e.actions)}}catch(e){u.e(e)}finally{u.f()}}}function yp(e,t,r,o,n,i){ip(i,n,r),r===_e.ENABLED?(gp(n,o,Be.ENABLED,e),gp(n,o,Be.VISIBLE,e)):r===_e.VISIBLE&&(dp(n,e,o,Be.VISIBLE),gp(n,o,Be.VISIBLE,e),e.panels[t.name].value===_e.DISABLED?ip(i,n,_e.DISABLED):gp(n,o,Be.ENABLED,e))}function gp(e,t,r,o){var n=t.getDefinitions(e,r,Me.REFS);n.length>0&&hp(n,e,o,t,r)}function bp(e,t,r,o,n){var i=t.name;if(!e.panels[i])return ip(e.panels,t,r),!0;var a=e.panels[i].value;return((a===_e.ENABLED||a===_e.VISIBLE)&&(r===_e.DISABLED||r===_e.HIDDEN)||a===_e.DISABLED&&r===_e.ENABLED||a===_e.HIDDEN&&r===_e.VISIBLE)&&(ip(e.panels,t,r),!0)}function Ep(e,t,r,o,n){var i=t.name;if(o[i]){var a=o[i].value;void 0!==t.col&&(o[i][t.col]&&void 0!==t.row&&o[i][t.col][t.row]?a=o[i][t.col][t.row].value:ip(o,t,r,n)),((a===_e.ENABLED||a===_e.VISIBLE)&&(r===_e.DISABLED||r===_e.HIDDEN)||a===_e.DISABLED&&r===_e.ENABLED||a===_e.DISABLED&&r===_e.HIDDEN||a===_e.HIDDEN&&r===_e.VISIBLE)&&ip(o,t,r,n)}else ip(o,t,r,n)}function Ip(e,t,r,o,n){var i={values:r,filterApplied:!n&&(o||!0)},a=null;return t&&(a=e.enum_filter.target.values),!a&&o||(i.values=a,i.filterApplied=!0),n&&(i.filterApplied=!1),i}function Sp(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 Cp(e,t,r,o,n,i){var a=e.label&&e.label.text?e.label.text:o,s="required_"+o+"_"+n,l={params:o,definition:{validation:{id:s,fail_message:{type:"error",message:{default:c(i,Ie.REQUIRED_ERROR,{label:a})},focus_parameter_ref:o},evaluate:{condition:{parameter_ref:o,op:"isNotEmpty"}}}}};t.controls[o]?t.controls[o].push(l):t.controls[o]=[l],r.push(s)}function kp(e,t,r,o,n){var i=ni(e),a={params:r,definition:{validation:{id:"Format_"+r+"_"+o,fail_message:{type:"error",message:{default:c(n,Ie.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 Tp(e,t,r,o,n){var i=e.label&&e.label.text?e.label.text:r,a={params:r,definition:{validation:{id:"validField_"+r+"_"+o,fail_message:{type:"warning",message:{default:c(n,Ie.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 wp(e,t,o){if(e.value)if("string"==typeof e.value)for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e.value)return"type"===o?i.type:i.metadata[o]}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"===o?s.type:s.metadata[o]}return null}var Rp=me,_p=Bl,Ap=Fl,Lp=or(function(e){var t=Rp(e,Ap);return t.length&&t[0]===e[0]?_p(t):[]});function Op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Op=function(){return!!e})()}var Dp=function(r){function s(){return t(this,s),function(e,t,r){return t=n(t),i(e,Op()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,arguments)}return o(s,r),e(s,[{key:"render",value:function(){if(!this.props.messageInfo||this.props.tableOnly&&!this.props.inTable)return null;var e=this.props.inTable?null:a.createElement("span",null,this.props.messageInfo.text),t=a.createElement("div",{className:"icon"},a.createElement(yr,{type:this.props.messageInfo.type})),r=this.props.inTable?a.createElement("div",{className:"properties-tooltips-container table-cell-msg-icon"},a.createElement(Tr,{id:"table-cell-msg-icon",tip:this.props.messageInfo.text,direction:"bottom",className:"properties-tooltips"},t)):null,o=Ee("properties-validation-message",this.props.messageInfo.type,{hide:this.props.state===_e.HIDDEN||this.props.state===_e.DISABLED,inTable:this.props.inTable});return a.createElement("div",{className:o},r,e)}}])}(a.Component),Np=Dp,Pp="([1-9][0-9][0-9][0-9])",xp="([0-9][0-9])",Bp="([0][1-9]|[1][0-2])",Mp="([1-9]|[1-2][0-2])",Fp="([0][1-9]|[1-2][0-9]|3[01])",Vp="([1-9]|[1-2][0-9]|3[01])";function Up(e,t){var r=new Date(e);if(!isNaN(r)){var o=r.getFullYear().toString(),n=(r.getMonth()+1).toString();1===n.length&&(n="0"+n);var i=r.getDate().toString();1===i.length&&(i="0"+i);var a=t;return a=(a=(a=(a=(a=(a=a.replace("Y",o)).replace("y",o.substring(2))).replace("m",n)).replace("n",parseInt(n,10))).replace("d",i)).replace("j",parseInt(i,10))}return e}function Hp(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 o=function(e){var t=e;return"^"+(t=(t=(t=(t=(t=(t=(t=t.replace("Y",Pp)).replace("y",xp)).replace("m",Bp)).replace("n",Mp)).replace("d",Fp)).replace("j",Vp)).replaceAll(".","[.]"))+"$"}(t),n=function(e,t,r){var o="",n="",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":o=a[s],s++;break;case"m":case"n":n=a[s],s++;break;case"d":case"j":i=a[s],s++}}return{year:o,month:n,day:i}}return null}(e,o,t),i=n.year,a=n.month,s=n.day;return new Date("".concat(i,"-").concat(a,"-").concat(s,"T00:00:00.00")).toISOString()}}return e}function jp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jp=function(){return!!e})()}var zp=function(s){function l(e){var r;return t(this,l),r=function(e,t,r){return t=n(t),i(e,jp()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,l,[e]),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(r),r}return o(l,s),e(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!==d.CUSTOM){var t=Lp(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.state===_e.HIDDEN;if(e)return null;var t=this.props.value;if(this.props.control.values&&this.props.control.valueLabels){var o=this.props.control.values.indexOf(this.props.value);o>-1&&this.props.control.valueLabels[o]&&(t=this.props.control.valueLabels[o])}if(null==t?t="":"object"===r(t)&&t.link_ref?t=v(t,this.props.control):Array.isArray(t)?t=t.join(", "):"boolean"==typeof t&&(t=t.toString()),t=ri(t),this.props.control.controlType===d.CUSTOM)t=this.props.controller.getCustomControl(this.props.propertyId,this.props.control,{table:!0,editStyle:"summary"});else if(this.props.control.controlType===d.TIMESTAMP||this.props.control.valueDef&&this.props.control.valueDef.propType===Ue.TIMESTAMP){var n=new Date(t);t=Mr(n)?this.props.tableControl?a.createElement($t,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}):a.createElement($t,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",weekday:"long"}):""}else if(this.props.control.controlType===d.DATEPICKER)t=t?Up(t,this.props.control.dateFormat):"";else if(this.props.control.controlType===d.DATEPICKERRANGE){t=[this.props.value&&this.props.value[0]?Up(this.props.value[0],this.props.control.dateFormat):"",this.props.value&&this.props.value[1]?Up(this.props.value[1],this.props.control.dateFormat):""].toString()}var i=a.createElement("span",{className:"properties-field-type",disabled:this.props.state===_e.DISABLED,"aria-disabled":this.props.state===_e.DISABLED},t),s=i;if(this.props.tableControl&&t.length>0){var l=!0;t&&(l=!1);var p=i;this.props.control.icon&&(p=a.createElement("div",{className:"properties-field-readonly"},a.createElement("div",{className:"properties-field-type-icon"},a.createElement(yr,{type:this.props.control.icon})),i)),s=a.createElement(wr,{content:p,tooltipText:t,disabled:l})}return a.createElement("div",{className:Ee("properties-readonly",{hide:e}),"data-id":Qn(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,s,a.createElement(Np,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),qp=Xt(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)(zp);function Gp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gp=function(){return!!e})()}var Wp=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Gp()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.charLimit=Zn(e.control,e.controller.getMaxLengthForSingleLineControls()),r.uuid=kr(),r.id=Jn(e.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.textInputRef=a.createRef(),r}return o(s,r),e(s,[{key:"handleChange",value:function(e){var t=e.target.value;this.isList&&(t=ei(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.props.state===_e.HIDDEN;if(e)return null;var t=this.props.value?this.props.value:"",r=!1;if(this.isList){var o=ti(t,", ");t=o.value,r=o.truncated}else r=0!==(t=ri(t)).length&&t.length!==this.props.value.length;var n=Ee("properties-textfield","properties-input-control",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null),i=null;if(r){var s={text:c(this.reactIntl,Ie.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:we}),type:Re.ERROR,validation_id:this.props.control.name};i=a.createElement("div",{className:"properties-textinput-readonly"},this.props.tableControl?null:this.props.controlItem,a.createElement(qp,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,tableControl:this.props.tableControl}),a.createElement(Np,{inTable:this.props.tableControl,state:"",messageInfo:s}))}else{var l,p=oi(this.props.messageInfo,this.props.tableControl);i=a.createElement(Et,_r({},p,{autoComplete:!0===this.props.tableControl?"off":"on",id:this.id,disabled:this.props.state===_e.DISABLED,placeholder:this.props.control.additionalText,helperText:this.props.control.helperText,onChange:this.handleChange.bind(this),value:t,title:t,labelText:this.props.controlItem,hideLabel:this.props.tableControl,"aria-label":this.props.control.labelVisible?null:null===(l=this.props.control)||void 0===l||null===(l=l.label)||void 0===l?void 0:l.text,ref:this.textInputRef,readOnly:this.props.readOnly,enableCounter:-1!==this.charLimit,maxCount:this.charLimit}))}return a.createElement("div",{className:n,"data-id":Qn(this.props.propertyId)},i,a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),$p=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Wp);function Xp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xp=function(){return!!e})()}var Kp=function(r){function s(e){var r;t(this,s),r=function(e,t,r){return t=n(t),i(e,Xp()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.valuesMap={},r.iconsMap={};for(var o=0;o<e.control.values.length;++o)r.valuesMap[e.control.values[o]]=e.control.valueLabels[o],void 0!==e.control.valueIcons&&(r.iconsMap[e.control.values[o]]=e.control.valueIcons[o]);return r}return o(s,r),e(s,[{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(e){var t=null;if(void 0!==this.iconsMap[this.props.value]){var r=this.iconsMap[this.props.value];t="string"==typeof r&&".svg"===r.slice(r.length-4)?a.createElement(Or,{className:"cds--btn__icon",src:r,"aria-label":e}):a.createElement("img",{className:"cds--btn__icon",src:r,alt:""})}return t}},{key:"render",value:function(){var e=this.props.state===_e.HIDDEN;if(e)return null;var t=this.valuesMap[this.props.value];void 0===t&&(t=this.props.value);var r=null,o=this.props.tableControl?"ghost":"tertiary";void 0!==t&&(r=a.createElement(ut,{kind:o,size:"sm",onClick:this.onClick.bind(this),renderIcon:this.renderIcon.bind(this,t),iconDescription:c(this.reactIntl,Ie.TOGGLETEXT_ICON_DESCRIPTION,{toggletext_label:this.props.value}),disabled:this.props.state===_e.DISABLED},t));var n=Ee("properties-toggletext",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null);return a.createElement("div",{className:n,disabled:this.props.state===_e.DISABLED,"data-id":Qn(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,r,a.createElement(Np,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),Yp=Xt(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 Jp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jp=function(){return!!e})()}var Qp=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Jp()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.charLimit=Zn(e.control,e.controller.getMaxLengthForMultiLineControls()),r.uuid=kr(),r.id=Jn(r.props.propertyId,r.uuid),r}return o(s,r),e(s,[{key:"handleChange",value:function(e){var t=e.target.value;this.props.control.valueDef&&this.props.control.valueDef.isList&&(t=ei(t,"\n")),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.state===_e.HIDDEN;if(e)return null;var t=this.props.value?this.props.value:"",r=ti(t,"\n");t=r.value;var o=r.truncated,n=null,i=oi(this.props.messageInfo,this.props.tableControl),s=!1;if(i.warn&&(s=!0,i={}),o){var l,p={text:c(this.reactIntl,Ie.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:we}),type:Re.ERROR,validation_id:this.props.control.name};i=oi(p,this.props.tableControl),n=a.createElement("div",null,a.createElement(It,_r({},i,{id:this.id,disabled:!0,placeholder:this.props.control.additionalText,value:t,labelText:this.props.controlItem,hideLabel:this.props.tableControl,helperText:this.props.control.helperText,readOnly:this.props.readOnly,"aria-label":this.props.control.labelVisible?null:null===(l=this.props.control)||void 0===l||null===(l=l.label)||void 0===l?void 0:l.text,enableCounter:-1!==this.charLimit,maxCount:this.charLimit})),a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!s,state:"",messageInfo:p}))}else{var u;n=a.createElement(It,_r({},i,{id:this.id,disabled:this.props.state===_e.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:t,labelText:this.props.controlItem,hideLabel:this.props.tableControl,helperText:this.props.control.helperText,readOnly:this.props.readOnly,"aria-label":this.props.control.labelVisible?null:null===(u=this.props.control)||void 0===u||null===(u=u.label)||void 0===u?void 0:u.text,enableCounter:-1!==this.charLimit,maxCount:this.charLimit}))}var d=n;if(this.props.tableControl){var h=!0;t&&this.props.state!==_e.DISABLED&&(h=!1);var f=a.createElement("div",{className:"properties-tooltips"},String(t));d=a.createElement(Tr,{id:"tooltip-column-textarea",tip:f,direction:"bottom",className:"properties-tooltips",disable:h},n)}var m=Ee("properties-textarea",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null);return a.createElement("div",{className:m,"data-id":Qn(this.props.propertyId)},d,a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!s,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),Zp=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Qp);function ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ec=function(){return!!e})()}var tc=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,ec()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.state={invalidNumber:!1},r.numberInput=a.createRef(),r.onDirection=r.onDirection.bind(r),r.generateNumber=r.generateNumber.bind(r),r.onKeyUp=r.onKeyUp.bind(r),r.id=Jn(r.props.propertyId),r.reactIntl=e.controller.getReactIntl(),r}return o(s,r),e(s,[{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 o=this.props.control.increment.toString().split(".")[1],n="up"===e?Number(t)+this.props.control.increment:Number(t)-this.props.control.increment;if(o){var i=o.length;r&&(i=r.length>=o.length?r.length:o.length),this.props.controller.updatePropertyValue(this.props.propertyId,Number(n.toFixed(i)))}else this.props.controller.updatePropertyValue(this.props.propertyId,n)}},{key:"onKeyUp",value:function(e){e.target.validity&&e.target.validity.badInput||!isFinite(this.numberInput.current.value)?this.showInvalidNumberError():this.clearInvalidNumberError()}},{key:"handleChange",value:function(e,t){var r=t.value,o=t.direction;if("click"!==(null==e?void 0:e.type)||"string"!=typeof o)if(e.target.validity&&e.target.validity.badInput||!isFinite(r))this.showInvalidNumberError();else{this.clearInvalidNumberError();var n=r;null==n||""===n?this.props.controller.updatePropertyValue(this.props.propertyId,null):this.props.controller.updatePropertyValue(this.props.propertyId,Number(n))}else this.onDirection(o)}},{key:"showInvalidNumberError",value:function(){if(null===this.props.controller.getErrorMessage(this.props.propertyId)){var e={type:"error",text:c(this.reactIntl,Ie.INVALID_NUMBER_ERROR),propertyId:this.props.propertyId,validation_id:"invalid_number"};this.props.controller.updateErrorMessage(this.props.propertyId,e)}this.setState({invalidNumber:!0})}},{key:"clearInvalidNumberError",value:function(){this.state.invalidNumber&&this.setState({invalidNumber:!1}),this.props.controller.getErrorMessage(this.props.propertyId)&&"invalid_number"===this.props.controller.getErrorMessage(this.props.propertyId).validation_id&&this.props.controller.updateErrorMessage(this.props.propertyId,null)}},{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,o=Math.floor(Math.random()*(r-t+1)+t);this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"render",value:function(){var e,t=this.props.state===_e.HIDDEN;if(t)return null;var r="";null!==this.props.value&&void 0!==this.props.value&&(r=this.props.value);var o,n=this.props.state===_e.DISABLED;ae(this.props.control,"label.numberGenerator")&&(o=a.createElement(ut,{className:Ee("properties-number-generator",{hide:t}),onClick:this.generateNumber,disabled:n,kind:"tertiary",size:"md",renderIcon:br,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:this.props.control.label.numberGenerator.text,hasIconOnly:!0}));var i=Ee("properties-numberfield",{"numberfield-with-number-generator":ae(this.props.control,"label.numberGenerator")?this.props.control.label.numberGenerator:null},{hide:t},this.props.messageInfo?this.props.messageInfo.type:null),s=oi(this.props.messageInfo,this.props.tableControl);return a.createElement("div",{className:i,"data-id":Qn(this.props.propertyId)},a.createElement(St,_r({},s,{ref:this.numberInput,id:this.id,onChange:this.handleChange.bind(this),onKeyUp:this.onKeyUp,disabled:n,step:this.props.control.increment,value:r,placeholder:this.props.control.additionalText,label:this.props.controlItem,hideLabel:this.props.tableControl,allowEmpty:!0,hideSteppers:this.props.tableControl||this.props.control.controlType===d.NUMBERFIELD,helperText:this.props.control.helperText,readOnly:this.props.readOnly,disableWheel:!0,"aria-label":this.props.control.labelVisible?null:null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text})),o,a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),rc=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId,!0)}},null)(tc),oc=mr,nc=Se,ic=He,ac=Math.max;var sc=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var n=null==r?0:ic(r);return n<0&&(n=ac(o+n,0)),oc(e,nc(t),n)};function lc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lc=function(){return!!e})()}var pc=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,lc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=r.props.controller.getReactIntl(),r.getCustomButtonEnabled=r.getCustomButtonEnabled.bind(r),r.customButtonIconCallback=r.customButtonIconCallback.bind(r),r.customButtonOnClick=r.customButtonOnClick.bind(r),r.convertToolbarConfig=r.convertToolbarConfig.bind(r),r}return o(s,r),e(s,[{key:"getCustomButtonEnabled",value:function(e,t){var r=void 0!==e&&e===_e.DISABLED,o=this.props.customButtonsState&&void 0!==this.props.customButtonsState[t.id]?this.props.customButtonsState[t.id]:t.enabled||!1;return!r&&o}},{key:"customButtonIconCallback",value:function(e,t){var r,o=this.props.controller.getHandlers().buttonIconHandler;return o&&o({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(o){var n,i=t.getCustomButtonEnabled(e,o),a={action:o.id,enable:i};(o.icon?a.iconEnabled=o.icon:o.carbonIcon&&(a.iconEnabled=t.customButtonIconCallback(o.id,o.carbonIcon)),o.label)?(a.label=o.label.text,a.incLabelWithIcon="before",a.kind="ghost"):(a.label=null===(n=o.description)||void 0===n?void 0:n.text,a.incLabelWithIcon=null);o.kind&&(a.kind=o.kind),o.description&&(a.tooltip=o.description.text),o.divider&&"before"===o.divider&&r.push({divider:!0}),r.push(a),o.divider&&"after"===o.divider&&r.push({divider:!0})}),r}},{key:"render",value:function(){var e={leftBar:this.convertToolbarConfig(this.props.tableState,this.props.customButtons)};return a.createElement("div",{className:"properties-custom-table-buttons"},a.createElement(z,{config:e,instanceId:0,size:"sm",toolbarActionHandler:this.customButtonOnClick,additionalText:{overflowMenuLabel:this.props.toolbarOverflowLabel,ariaLabel:c(this.reactIntl,Ie.TABLE_TOOLBAR_LABEL,{table_label:this.props.tableLabel})}}))}}])}(a.Component),cc=pc;function uc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uc=function(){return!!e})()}var dc=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,uc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.showSubPanel=r.showSubPanel.bind(r),r.onSubPanelHidden=r.onSubPanelHidden.bind(r),r}return o(s,r),e(s,[{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=c(this.props.controller.getReactIntl(),Ie.SUBPANEL_BUTTON_TOOLTIP),o=c(this.props.controller.getReactIntl(),Ie.APPLYBUTTON_LABEL),n=c(this.props.controller.getReactIntl(),Ie.REJECTBUTTON_LABEL);return a.createElement(fi,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:o,rejectLabel:n,controller:this.props.controller},a.createElement(Tr,{id:"tooltip-subpanel-cell",tip:r,direction:"left",className:"properties-tooltips icon-tooltip"},a.createElement(ut,{className:"properties-subpanel-button",kind:"ghost",renderIcon:Er,onClick:this.showSubPanel,disabled:t,iconDescription:r,hasIconOnly:!0})))}}])}(a.Component);function hc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hc=function(){return!!e})()}var fc=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,hc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=r.props.controller.getReactIntl(),r.handleCancel=r.handleCancel.bind(r),r.showSubPanel=r.showSubPanel.bind(r),r.onSubPanelHidden=r.onSubPanelHidden.bind(r),r.getTableRowMoveButtons=r.getTableRowMoveButtons.bind(r),r.topMoveRow=r.topMoveRow.bind(r),r.upMoveRow=r.upMoveRow.bind(r),r.downMoveRow=r.downMoveRow.bind(r),r.bottomMoveRow=r.bottomMoveRow.bind(r),r.getLeastValue=r.getLeastValue.bind(r),r.getMaxValue=r.getMaxValue.bind(r),r.toolbarActionHandler=r.toolbarActionHandler.bind(r),r}return o(s,r),e(s,[{key:"onSubPanelHidden",value:function(e){var t;e||(this.props.controller.updatePropertyValue(null===(t=this.props)||void 0===t?void 0:t.multiSelectEditRowPropertyId,this.initialMultiSelectEditRowValue),this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates))}},{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:"getLeftBarConfig",value:function(){var e=c(this.reactIntl,Ie.TABLE_TOOLBAR_BUTTON_EDIT),t=c(this.reactIntl,Ie.TABLE_TOOLBAR_BUTTON_DELETE),r=c(this.reactIntl,Ie.TABLE_TOOLBAR_BUTTON_CANCEL),o={action:"multiSelectEdit",label:e,iconEnabled:a.createElement(Er,null),enable:!0,kind:"primary"},n=!this.props.addRemoveRows||this.props.isReadonlyTable||this.props.isSingleSelectTable?null:{action:"delete",label:t,iconEnabled:a.createElement(Ir,null),enable:!0,kind:"primary"},i={action:"cancel",label:r,enable:!0,incLabelWithIcon:"label-only",kind:"primary"};return[].concat(ot(this.props.moveableRows?this.getTableRowMoveButtons():[]),[n,this.props.multiSelectEdit?o:null,{divider:!0},i])}},{key:"getTableRowMoveButtons",value:function(){var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(),t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.props.tableState===_e.DISABLED,o=!this.props.disableRowMoveButtons&&0!==e.length&&0!==e[0]&&!r,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!r,i=this.props.controller.getStaticRows(this.props.propertyId).sort();e.length>0&&i.length>0&&i.includes(e[0])?(o=!1,n=!1):e[0]===i[i.length-1]+1?(o=!1,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!r):e[0]===i[0]-1&&(n=!1);var s=c(this.reactIntl,Ie.TABLE_TOOLBAR_BUTTON_TOP),l=c(this.reactIntl,Ie.TABLE_TOOLBAR_BUTTON_UP),p=c(this.reactIntl,Ie.TABLE_TOOLBAR_BUTTON_DOWN),u=c(this.reactIntl,Ie.TABLE_TOOLBAR_BUTTON_BOTTOM);return[{action:"topMoveRow",label:s,iconEnabled:a.createElement(q,null),enable:o,kind:"primary"},{action:"upMoveRow",label:l,iconEnabled:a.createElement(Hr,null),enable:o,kind:"primary"},{action:"downMoveRow",label:p,iconEnabled:a.createElement(jr,null),enable:n,kind:"primary"},{action:"bottomMoveRow",label:u,iconEnabled:a.createElement(Sr,null),enable:n,kind:"primary"}]}},{key:"getLeftTitleContents",value:function(){var e=this.props.smallFlyout?c(this.reactIntl,Ie.SINGLE_SELECTED_ROW_LABEL_SMALL_FLYOUT):c(this.reactIntl,Ie.SINGLE_SELECTED_ROW_LABEL),t=this.props.smallFlyout?c(this.reactIntl,Ie.MULTI_SELECTED_ROW_LABEL_SMALL_FLYOUT):c(this.reactIntl,Ie.MULTI_SELECTED_ROW_LABEL),r=1===this.props.selectedRows.length?"".concat(this.props.selectedRows.length," ").concat(e):"".concat(this.props.selectedRows.length," ").concat(t);return a.createElement("div",{className:"properties-batch-summary",role:"button","aria-roledescription":"text"},a.createElement("span",null,r))}},{key:"toolbarActionHandler",value:function(e){"topMoveRow"===e?this.topMoveRow():"upMoveRow"===e?this.upMoveRow():"downMoveRow"===e?this.downMoveRow():"bottomMoveRow"===e?this.bottomMoveRow():"cancel"===e?this.handleCancel():"delete"===e?this.props.removeSelectedRows():"multiSelectEdit"===e&&this.showSubPanel()}},{key:"topMoveRow",value:function(){for(var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(function(e,t){return e-t}),t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.getLeastValue(),o=this.props.controller.getStaticRows(this.props.propertyId).sort(),n=e[0];n>r;n--)for(var i=0;i<=e.length-1;i++)if(o.length>0&&e[0]>r+1||0===o.length){var a=e.shift(),s=t[a-1];t[a-1]=t[a],t[a]=s,e.push(a-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a-1)}e.length>0&&this.props.setScrollToRow(e[0]),this.props.setCurrentControlValueSelected(t,e)}},{key:"upMoveRow",value:function(){var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(function(e,t){return e-t}),t=this.getLeastValue(),r=this.props.controller.getStaticRows(this.props.propertyId).sort();if(0!==e.length&&e[0]>t){for(var o=this.props.controller.getPropertyValue(this.props.propertyId),n=0;n<=e.length-1;n++)if(r.length>0&&e[0]>t+1){var i=e.shift(),a=o[i-1];o[i-1]=o[i],o[i]=a,e.push(i-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,i,i-1)}else if(0===r.length){var s=e.shift();if(0!==s){var l=o[s-1];o[s-1]=o[s],o[s]=l,e.push(s-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,s,s-1)}}this.props.setScrollToRow(e[0]),this.props.setCurrentControlValueSelected(o,e)}}},{key:"downMoveRow",value:function(){var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(function(e,t){return e-t}),t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.getMaxValue();if(0!==e.length&&e[e.length-1]!==t.length-1){for(var o=e.length-1;o>=0;o--){var n=e.pop();if(n!==r){var i=t[n+1];t[n+1]=t[n],t[n]=i,e.unshift(n+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,n,n+1)}}e.length>1?this.props.setScrollToRow(e[e.length-1]):this.props.setScrollToRow(e[0]),this.props.setCurrentControlValueSelected(t,e)}}},{key:"bottomMoveRow",value:function(){for(var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(function(e,t){return e-t}),t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.getMaxValue(),o=e[e.length-1];o<r;o++)for(var n=e.length-1;n>=0;n--){var i=e.pop(),a=t[i+1];t[i+1]=t[i],t[i]=a,e.unshift(i+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,i,i+1)}e.length>0&&this.props.setScrollToRow(e[e.length-1]),this.props.setCurrentControlValueSelected(t,e)}},{key:"handleCancel",value:function(){this.props.controller.updateSelectedRows(this.props.propertyId,[])}},{key:"showSubPanel",value:function(){var e,t;this.initialMultiSelectEditRowValue=K(this.props.controller.getPropertyValue(null===(e=this.props)||void 0===e?void 0:e.multiSelectEditRowPropertyId)),this.initialControlValue=K(this.props.controller.getPropertyValue(this.props.propertyId)),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates();var r=c(this.reactIntl,Ie.MULTI_SELECT_EDIT_SUBPANEL_TITLE);this.subPanelInvoker.showSubDialog(r,null===(t=this.props)||void 0===t?void 0:t.multiSelectEditSubPanel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this;if((this.props.addRemoveRows||this.props.moveableRows||this.props.multiSelectEdit)&&this.props.selectedRows.length>0){var t={leftBar:this.getLeftBarConfig()},r=this.props.multiSelectEdit?a.createElement(fi,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:c(this.reactIntl,Ie.APPLYBUTTON_LABEL),rejectLabel:c(this.reactIntl,Ie.REJECTBUTTON_LABEL),controller:this.props.controller}):null;return a.createElement("div",{className:"properties-table-toolbar"},this.getLeftTitleContents(),r,a.createElement("div",{className:"properties-toolbar-items floating-toolbar"},a.createElement(z,{config:t,instanceId:0,size:"sm",toolbarActionHandler:this.toolbarActionHandler,additionalText:{overflowMenuLabel:c(this.reactIntl,Ie.TABLE_TOOLBAR_OVERFLOW_LABEL),ariaLabel:c(this.reactIntl,Ie.TABLE_TOOLBAR_LABEL,{table_label:this.props.tableLabel})},containingDivId:this.props.containingDivId})))}return null}}])}(a.Component),mc=Xt(function(e,t){return{disableRowMoveButtons:t.controller.isDisableRowMoveButtons(t.propertyId)}})(fc);function vc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return yc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function gc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gc=function(){return!!e})()}var bc=function(r){function s(e){var r,o;return t(this,s),o=function(e,t,r){return t=n(t),i(e,gc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),o.state={filterText:null},o.onPanelContainer=[],o.allowColumnControls=!1,o.isReadonlyTable=o.isReadonlyTable.bind(o),o.indexOfColumn=o.indexOfColumn.bind(o),o.setCurrentControlValueSelected=o.setCurrentControlValueSelected.bind(o),o.setReadOnlyColumnValue=o.setReadOnlyColumnValue.bind(o),o.removeSelected=o.removeSelected.bind(o),o.updateRowSelections=o.updateRowSelections.bind(o),o.handleRowClick=o.handleRowClick.bind(o),o.createTable=o.createTable.bind(o),o.onFilter=o.onFilter.bind(o),o.onSort=o.onSort.bind(o),o.setScrollToRow=o.setScrollToRow.bind(o),o.includeInFilter=o.includeInFilter.bind(o),o.makeAddButtonPanel=o.makeAddButtonPanel.bind(o),o.makeEditButtonPanel=o.makeEditButtonPanel.bind(o),o.makeCustomButtonsPanel=o.makeCustomButtonsPanel.bind(o),o.buildChildItem=o.buildChildItem.bind(o),o.buildMultiSelectEditChildItem=o.buildMultiSelectEditChildItem.bind(o),o.makeCells=o.makeCells.bind(o),o.areAllRowsChecked=o.areAllRowsChecked.bind(o),o.isLightTheme=o.isLightTheme.bind(o),e.selectedRows&&e.selectedRows.length>0&&(o.scrollToRow=e.selectedRows[e.selectedRows.length-1]),o.selectSummaryPropertyName="table-multi-select-edit-property-"+(null===(r=e.control)||void 0===r?void 0:r.name),e.controller.saveControls([{name:o.selectSummaryPropertyName}]),o.setSelectedSummaryRowValue(e.selectedRows),o.uuid=kr(),o}return o(s,r),e(s,[{key:"componentDidMount",value:function(){if(this.props.control.subControls){var e=this.setReadOnlyColumnValue();this.props.controller.updatePropertyValue(this.props.propertyId,e,!0,je.INITIAL_LOAD)}}},{key:"componentDidUpdate",value:function(){this.isSelectSummaryEdit(this.props.selectedRows)&&this.updateSelectedRowsValues()}},{key:"componentWillUnmount",value:function(){this.props.controller.removePropertyValue({name:this.selectSummaryPropertyName})}},{key:"onFilter",value:function(e){this.setState({filterText:e})}},{key:"onSort",value:function(e){for(var t=this.props.value,r=-1,o=0;o<this.props.control.subControls.length;o++)if(this.props.control.subControls[o].name===e.column){r=o;break}r>-1&&(t=E(t,function(e){return e[r]}),e.direction===ze.DESC&&t.reverse(),this.setCurrentControlValueSelected(t,[]))}},{key:"getOnPanelContainer",value:function(e){return 0===this.onPanelContainer.length||0===e.length||this.isSelectSummaryEdit(e)?a.createElement("div",null):a.createElement("div",{className:"properties-onpanel-container"},this.onPanelContainer[e[0]])}},{key:"getDefaultRow",value:function(){var e=[];if(this.props.control.defaultRow){var t,r=vc(this.props.control.defaultRow);try{for(r.s();!(t=r.n()).done;){var o=t.value;null!=o&&o.parameterRef?e.push(this.props.controller.getPropertyValue({name:o.parameterRef})):e.push(o)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"getTableToolbarOverflowLabel",value:function(){return c(this.props.controller.getReactIntl(),Ie.TABLE_TOOLBAR_OVERFLOW_LABEL)}},{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 o=0;o<r.length;o++){var n=r[o];if(Array.isArray(n))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[o][i]=N(n[i],a,this.props.controller))}else"column"===this.props.control.role&&"structure"===this.props.control.valueDef.propType&&(r[o]=N(n,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 o=0;o<this.props.control.subControls.length;o++){var n=this.props.control.subControls[o];if(n.controlType===d.READONLY&&n.generatedValues&&"index"===n.generatedValues.operation){var i=void 0!==n.generatedValues.startValue?n.generatedValues.startValue+r:r+1;t[r][o]=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===Pe.MULTIPLE&&e.length>1}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===d.READONLYTABLE||this.props.readOnly}},{key:"indexOfColumn",value:function(e){return sc(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===Pe.SINGLE)r=[e];else if(!0===t.metaKey||!0===t.ctrlKey){var o=r.indexOf(e);o>=0?r.splice(o,1):r=r.concat(e)}else if(!0===t.shiftKey){for(var n=r.length>0?r[0]:e,i=(n>e?n:e)+1,a=[],s=n>e?e:n;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}),o=this.props.controller.getPropertyValue(t);o&&Array.isArray(o)&&(o[0].forEach(function(t,o){if(!D(t,e.selectedSummaryRowValue[0][o])){var n=void 0===t?null:t;e.props.selectedRows.forEach(function(t){e.props.controller.updatePropertyValue({name:e.props.control.name,row:t,col:o},n,!0)}),r.subControls[o].controlType===d.ONEOFSELECT&&e.props.controller.updatePropertyValue({name:e.selectSummaryPropertyName,row:0,col:o},n)}}),this.selectedSummaryRowValue=K(o))}},{key:"updateRowSelections",value:function(e){this.props.controller.updateSelectedRows(this.props.propertyId,e),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,o,n,i,s){var l={name:r,row:o,col:n},p=K(this.props.propertyId),c=l;s||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=a.createElement("div",{className:Ee("properties-table-cell-control",m)},a.createElement(qp,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})):e.editStyle===w.SUBPANEL||e.editStyle===w.ON_PANEL?s?u=a.createElement("div",null):(u=a.createElement("div",{className:Ee("properties-table-cell-control",m)},a.createElement(qp,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})),e.editStyle===w.ON_PANEL&&this.onPanelContainer[o].push(a.createElement("div",{key:n},a.createElement("br",null),h.createControlItem(e,c)))):(d.editStyle=w.INLINE,u=a.createElement("div",{className:Ee("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,o){var n=r;return t.controlType===d.CUSTOM&&(o.editStyle="summary",n=this.props.controller.getCustomControl(e,t,o)),n}},{key:"_getDisabledStatus",value:function(e,t){return void 0!==t&&t===_e.DISABLED||this.props.controller.getControlState(e)===_e.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 o=0;o<this.props.control.subControls.length;o++){if(this.props.control.subControls[o].name===this.filterFields[r]){var n=t[e][o];if("string"==typeof n&&n.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=vc(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:"makeTableToolbar",value:function(e,t){var r,o=this.props.control.rowSelection===Pe.SINGLE;if((this.props.addRemoveRows&&!o||null!==(r=this.props.control)&&void 0!==r&&r.moveableRows||this.isSelectSummaryEdit(e))&&(null==e?void 0:e.length)>0){var n,i={name:this.selectSummaryPropertyName,row:0},s=null;return this.isSelectSummaryEdit(e)&&(s=this.buildMultiSelectEditChildItem(i)),a.createElement(a.Fragment,null,a.createElement(mc,{controller:this.props.controller,propertyId:this.props.propertyId,selectedRows:e,addRemoveRows:this.props.addRemoveRows,moveableRows:null===(n=this.props.control)||void 0===n?void 0:n.moveableRows,multiSelectEdit:this.isSelectSummaryEdit(e),removeSelectedRows:this.removeSelected,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,rightFlyout:this.props.rightFlyout,multiSelectEditSubPanel:s,multiSelectEditRowPropertyId:i,isReadonlyTable:this.isReadonlyTable(),isSingleSelectTable:o,smallFlyout:!1,tableLabel:t}))}return null}},{key:"makeAddButtonPanel",value:function(e,t){this.onFieldPickerCloseCallback=t&&t.fieldPickerCloseFunction?t.fieldPickerCloseFunction.bind(this):null;var r=!1;this.addOnClickCallback=t&&t.addButtonFunction?t.addButtonFunction:this.props.openFieldPicker;var o=t&&t.addButtonLabel?t.addButtonLabel:c(this.props.controller.getReactIntl(),Ie.STRUCTURETABLE_ADDBUTTON_LABEL);return e===_e.DISABLED&&(r=!0,this.addOnClickCallback=null),a.createElement("div",{className:"properties-at-buttons-container"},a.createElement(ut,{className:"properties-add-fields-button",disabled:r||this.props.readOnly,onClick:this.addOnClick.bind(this,this.props.propertyId),size:"sm",kind:"ghost",renderIcon:gr},o))}},{key:"makeEditButtonPanel",value:function(e,t){var r=null;return t&&t.editCallback&&(this.editOnClickCallback=t.editCallback,r=a.createElement("div",{className:"properties-at-buttons-container"},a.createElement(ut,{className:"properties-edit-button",onClick:this.editOnClick.bind(this,this.props.propertyId),size:"sm",kind:"ghost",renderIcon:Er,disabled:this.props.readOnly},t.label))),r}},{key:"makeCustomButtonsPanel",value:function(e,t,r){var o=null;return t&&(o=a.createElement("div",{className:"properties-at-buttons-container"},a.createElement(cc,{controller:this.props.controller,propertyId:this.props.propertyId,tableState:e,customButtons:t,customButtonsState:this.props.tableButtons,toolbarOverflowLabel:this.getTableToolbarOverflowLabel(),tableLabel:r}))),o}},{key:"editOnClick",value:function(e){this.editOnClickCallback&&this.editOnClickCallback(e)}},{key:"selectAllRows",value:function(e,t,r){var o=r.checked;r.id;var n=this.props.value;if(Array.isArray(n))for(var i=0;i<n.length;i++){var a={name:this.props.control.name,row:i,col:e};this.props.controller.getControlState(a)!==_e.DISABLED&&this.props.controller.getControlState(a)!==_e.HIDDEN&&this.props.controller.updatePropertyValue(a,o)}}},{key:"areAllRowsChecked",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 o={name:this.props.control.name,row:r,col:e};if(this.props.controller.getControlState(o)!==_e.DISABLED&&this.props.controller.getControlState(o)!==_e.HIDDEN&&!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,o=vc(t);try{for(o.s();!(r=o.n()).done;){if(!1===r.value[e])return!1}}catch(e){o.e(e)}finally{o.f()}return!0}},{key:"createTable",value:function(e,t,r){var o,n=[],i=[],s=[];this.filterFields=s;var l=this.makeHeader(i,s),p=!1!==this.props.control.header,c=this.props.value;this.makeCells(n,c,e);var u,d,h=(null===(o=this.props.control)||void 0===o||null===(o=o.label)||void 0===o?void 0:o.text)||"",f=this.makeTableToolbar(this.props.selectedRows,h),m=null;this.props.selectedRows.length>0&&f?m=f:r?m=this.makeCustomButtonsPanel(e,r,h):this.isReadonlyTable()?this.props.hideEditButton||(m=this.makeEditButtonPanel(e,t)):this.props.addRemoveRows&&(m=this.makeAddButtonPanel(e,t)),Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(u=this.scrollToRow,delete this.scrollToRow),this.isReadonlyTable()&&this.props.control.rowSelection===Pe.SINGLE||(d=this.props.control.rowSelection===Pe.SINGLE?this.handleRowClick:this.updateRowSelections);var v=a.createElement(Ar,{enableTanstackTable:this.props.controller.getPropertiesConfig().enableTanstackTable,sortable:i,filterable:s,columns:l,data:n,showHeader:p,scrollToRow:u,onFilter:this.onFilter,onSort:this.onSort,topRightPanel:m,scrollKey:this.props.control.name,tableState:e,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId),rows:this.props.control.rows,tableLabel:h,updateRowSelections:d,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText});return a.createElement("div",null,v)}},{key:"makeHeader",value:function(e,t){for(var r=[],o=0;o<this.props.control.subControls.length;o++){var n=this.props.control.subControls[o],i=this.props.controller.getControlState({name:this.props.control.name,col:o}),s=i===_e.DISABLED||i===_e.HIDDEN,l=n.controlType===d.CHECKBOX?a.createElement(Ct,{disabled:s,id:"properties-at-header-cb-".concat(this.uuid,"-").concat(this.props.control.name,"=").concat(o),checked:this.areAllRowsChecked(o),onChange:this.selectAllRows.bind(this,o),labelText:n.label.text}):n.label.text;n.visible&&n.controlType!==d.HIDDEN&&(n.sortable&&e.push(n.name),r.push({key:n.name,label:l,width:n.width,description:n.description?n.description.text:null,resizable:!!n.resizable&&n.resizable,operation:n.generatedValues&&n.generatedValues.operation?n.generatedValues.operation:null,disabled:s}),n.filterable&&t.push(n.name))}return this.props.control.childItem&&!this.isReadonlyTable()&&r.push({key:"subpanel",label:"",width:qe,staticWidth:!0}),this.props.control.rowSelection===Pe.SINGLE&&r.push({key:"deleteRow",label:"",width:qe,staticWidth:!0}),r}},{key:"makeCells",value:function(e,t,r,o,n){if(Array.isArray(t))for(var i=o||this.props.control.name,s=0;s<t.length;s++){var l=[];if(this.onPanelContainer[s]=[],this.includeInFilter(s)||n){for(var p=0;p<this.props.control.subControls.length;p++){var u=this.props.control.subControls[p];if(u.visible||u.editStyle===w.ON_PANEL){var d=this._makeCell(u,t,i,s,p,r,n);u.visible&&l.push(d)}}if(this.props.control.childItem&&!n&&!this.isReadonlyTable()){var h=this.buildChildItem(i,s,r);l.push(h)}if(this.props.control.rowSelection===Pe.SINGLE&&!this.isReadonlyTable()&&this.props.addRemoveRows){var f=c(this.reactIntl,Ie.TABLE_DELETEICON_TOOLTIP),m=a.createElement(Tr,{id:"tooltip-delete-row",tip:f,direction:"left",className:"properties-tooltips icon-tooltip"},a.createElement(ut,{kind:"ghost",size:"sm",className:"delete-button",hasIconOnly:!0,onClick:this.removeSelected,renderIcon:Ir,iconDescription:f})),v={column:"deleteRow",width:qe,content:m};l.push(v)}e.push({columns:l})}}}},{key:"buildChildItem",value:function(e,t,r){var o={name:e,row:t},n=K(this.props.propertyId),i=o;n.name!==o.name&&(i=this.props.controller.setChildPropertyId(n,o));var s=this.props.buildUIItem(t,this.props.control.childItem,i,this.indexOfColumn),l=r===_e.DISABLED||this.isSelectSummaryEdit(this.props.selectedRows)&&this.props.selectedRows.includes(t),p=a.createElement("div",{className:"properties-table-subcell"},a.createElement(dc,{label:s.props.label,title:s.props.title,panel:s.props.panel,disabled:l,controller:this.props.controller,propertyId:this.props.propertyId,rightFlyout:this.props.rightFlyout}));return{column:"subpanel",width:qe,content:p}}},{key:"buildMultiSelectEditChildItem",value:function(e){return this.props.buildUIItem(0,this.props.control.multiSelectEditChildItem,e,this.indexOfColumn).props.panel}}])}(a.Component);function Ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ec=function(){return!!e})()}bc.defaultProps={addRemoveRows:!0,hideEditButton:!1};var Ic=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Ec()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.getEmptyTableText=r.getEmptyTableText.bind(r),r.isReadonlyTable=r.isReadonlyTable.bind(r),r}return o(s,r),e(s,[{key:"getEmptyTableText",value:function(){var e="".concat(this.props.control.name,".empty.table.text"),t=c(this.props.controller.getReactIntl(),Ie.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===d.READONLYTABLE}},{key:"render",value:function(){var e=this.getEmptyTableText();return a.createElement("div",{className:"properties-empty-table",disabled:this.props.disabled},a.createElement("span",{"aria-disabled":this.props.disabled},e),a.createElement("br",null),a.createElement(ut,{className:"properties-empty-table-button",kind:"tertiary",size:"sm",renderIcon:this.isReadonlyTable()?Er:gr,onClick:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled},this.props.emptyTableButtonLabel))}}])}(a.Component);function Sc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sc=function(){return!!e})()}var Cc=[f.INTEGER,f.DOUBLE,f.LONG],kc=function(){function r(e){var o;return t(this,r),o=function(e,t,r){return t=n(t),i(e,Sc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,[e]),o.addRow=o.addRow.bind(o),o.reactIntl=e.controller.getReactIntl(),o}return o(r,bc),e(r,[{key:"addRow",value:function(){var e=this.props.controller.getControlPropType(this.props.propertyId),t=Cc.indexOf(e)>-1?null:"",r=this.props.controller.getPropertyValue(this.props.propertyId);void 0===r&&(r=[]);var o=r.concat([t]);this.setCurrentControlValueSelected(o)}},{key:"makeCell",value:function(e,t,r,o){return Cc.indexOf(r)>-1?a.createElement("div",{className:"properties-table-cell-control"},a.createElement(rc,{control:e,propertyId:t,controller:this.props.controller,controlItem:o,tableControl:!0,readOnly:this.props.readOnly})):a.createElement("div",{className:"properties-table-cell-control"},a.createElement($p,{control:e,propertyId:t,controller:this.props.controller,controlItem:o,tableControl:!0,readOnly:this.props.readOnly}))}},{key:"makeRows",value:function(e,t,r){var o=[];if(e)for(var n=0;n<e.length;n++){var i=[],a={name:this.props.control.name,row:n};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:n})}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:n+"-0-value",column:"value",content:c}),o.push({key:n,onClickCallback:this.handleRowClick.bind(this,n,!1),columns:i,className:"list-table-row"})}return o}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"value",label:c(this.reactIntl,Ie.LIST_TABLE_LABEL),description:null}),e}},{key:"makeTableToolbar",value:function(e){var t,r;return this.props.addRemoveRows||null!==(t=this.props.control)&&void 0!==t&&t.moveableRows?a.createElement(mc,{controller:this.props.controller,propertyId:this.props.propertyId,selectedRows:this.props.selectedRows,tableState:this.props.state,tableLabel:e,addRemoveRows:this.props.addRemoveRows,moveableRows:null===(r=this.props.control)||void 0===r?void 0:r.moveableRows,removeSelectedRows:this.removeSelected,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,isReadonlyTable:!1,isSingleSelectTable:!1,smallFlyout:this.props.rightFlyout&&"small"===this.props.controller.getEditorSize(),containingDivId:Qn(this.props.propertyId)}):null}},{key:"render",value:function(){var e;if(this.props.state===_e.HIDDEN)return null;var t,r=this.makeHeader(),o={addButtonLabel:c(this.props.controller.getReactIntl(),Ie.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),addButtonFunction:this.addRow},n=this.makeRows(this.props.value,this.props.state,r),i=(null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text)||"",s=this.makeTableToolbar(i),l=this.props.selectedRows.length>0&&s?s:this.makeAddButtonPanel(this.props.state,o);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(t=this.scrollToRow,delete this.scrollToRow);var p=Ee("properties-list-table",{disabled:this.props.state===_e.DISABLED}),u=a.createElement(Ar,{enableTanstackTable:this.props.controller.getPropertiesConfig().enableTanstackTable,columns:r,data:n,scrollToRow:t,topRightPanel:l,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,readOnly:this.props.readOnly}),d=a.createElement("div",null,a.createElement("div",{className:p},u),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo}));return a.createElement("div",{"data-id":Qn(this.props.propertyId),id:Qn(this.props.propertyId),className:"properties-list-control"},this.props.controlItem,Jt(this.props.value)&&this.props.addRemoveRows?a.createElement(Ic,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:o.addButtonLabel,emptyTableButtonClickHandler:this.addRow,disabled:this.props.state===_e.DISABLED}):d)}}])}();kc.propTypes={control:Ur.object.isRequired,propertyId:Ur.object.isRequired,controller:Ur.object.isRequired,controlItem:Ur.element,rightFlyout:Ur.bool,selectedRows:Ur.array,state:Ur.string,value:Ur.array,messageInfo:Ur.object,addRemoveRows:Ur.bool,tableButtons:Ur.object,readOnly:Ur.bool};var Tc=Xt(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)}})(kc),wc=vr,Rc=ir,_c=ee,Ac=ie;var Lc=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return wc(Ac(r)?_c(r):[r],Rc(t,1))};function Oc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oc=function(){return!!e})()}var Dc=new RegExp("[0-9- _$]","g"),Nc=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Oc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.uuid=kr(),r.reactIntl=e.controller.getReactIntl(),r.valueColumn=c(r.reactIntl,Ie.EXPRESSION_VALUE_COLUMN),r.valueColumnDesc=c(r.reactIntl,Ie.EXPRESSION_VALUE_COLUMN_DESCRIPTION),r.recentUseCat=c(r.reactIntl,Ie.EXPRESSION_RECENTLY_USED),r.recentUseCatInfo={id:r.recentUseCat,locLabel:r.recentUseCat,field_columns:{add_column_info:{locLabel:c(r.reactIntl,Ie.EXPRESSION_ADD_COLUMN)},field_column_info:{locLabel:c(r.reactIntl,Ie.EXPRESSION_RECENTLY_USED_COLUMN)},value_column_info:{locLabel:r.valueColumn,descLabel:r.valueColumnDesc}}},r.inCategories=Object.keys(e.functionList),r.fields=r._makeDatasetFields(e.controller.getDatasetMetadataFields(),e.controller.getExpressionInfo().fields),r.resources=se(e.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=e.controller,r.onFunctionCatChange=r.onFunctionCatChange.bind(r),r.onFieldCatChange=r.onFieldCatChange.bind(r),r.onFieldFilter=r.onFieldFilter.bind(r),r.onValueFilter=r.onValueFilter.bind(r),r.onFunctionFilter=r.onFunctionFilter.bind(r),r.language=e.language,r.onFieldTableClick=r.onFieldTableClick.bind(r),r.onAddFieldClick=r.onAddFieldClick.bind(r),r.onFunctionTableClick=r.onFunctionTableClick.bind(r),r.onAddFunctionClick=r.onAddFunctionClick.bind(r),r.onValueTableClick=r.onValueTableClick.bind(r),r.onAddValueClick=r.onAddValueClick.bind(r),r.sortTableRows=r.sortTableRows.bind(r),r.shouldQuoteField=r.shouldQuoteField.bind(r),r}return o(s,r),e(s,[{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:"onAddFieldClick",value:function(e,t,r){var o=this.state.currentFieldDataset[t],n=o.id;if(this.state.fieldCategory!==this.recentUseCat&&this.props.controller.updateExpressionFieldsRecentlyUsed(o),this.props.onChange){var i="CLEM"===this.language&&"globals"!==this.state.fieldCategory?"'":"";this.shouldQuoteField(o.id)&&(n=i+o.id+i),this.props.onChange(n)}}},{key:"onFieldFilter",value:function(e){this.setState({fieldFilterText:e})}},{key:"onValueTableClick",value:function(e,t,r){this.setState({valueSelected:r})}},{key:"onAddValueClick",value:function(e,t,r){if(this.props.onChange){var o=this.state.currentFieldDataset[this.state.fieldSelected],n='"';if(o.values){var i=o.values[t].value,a="string"==typeof i?n+i+n:i;this.props.onChange(a)}else if(o.range){var s="string"==typeof o.range.min.value?n+o.range.min.value+n:o.range.min.value,l="string"==typeof o.range.max.value?n+o.range.max.value+n:o.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:"onAddFunctionClick",value:function(e,t,r){var o;this.state.functionCategory===this.recentUseCat?o=this.props.controller.getExpressionRecentlyUsed()[t]:(o=this.props.functionList[this.state.functionCategory].functionList[t],this.props.controller.updateExpressionRecentlyUsed(o));var n=o.value;this.props.onChange&&this.props.onChange(n)}},{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 o=e[0].columns,n=0;n<o.length;n++)if(o[n].column===t.column){r=n;break}var i=E(e,function(e){return e.columns[r].value});return t.direction===ze.DESC&&i.reverse(),i}return e}},{key:"shouldQuoteField",value:function(e){return null!==e.match(Dc)}},{key:"createContentObject",value:function(e){var t=!0;e&&(t=!1);var r=a.createElement("span",{className:"properties-expr-table-cell"},e),o=a.createElement(wr,{content:r,tooltipText:e,disabled:t});return a.createElement("div",{className:"properties-table-cell-control"},o)}},{key:"createAddButtonContent",value:function(e,t){return a.createElement(ut,{className:"expression-add-field-button properties-expr-table-cell",onClick:this.handleAddButtonClick.bind(this,e,t),kind:"ghost",size:"sm"},a.createElement(gr,{className:"add-btn-svg","aria-label":c(this.reactIntl,Ie.EXPRESSION_ADD_COLUMN)}))}},{key:"handleAddButtonClick",value:function(e,t,r){switch(t){case"value":this.onAddValueClick(r,e);break;case"field":this.onAddFieldClick(r,e);break;case"function":this.onAddFunctionClick(r,e)}}},{key:"_makeDatasetFields",value:function(e,t){var r,o,n=c(this.reactIntl,Ie.EXPRESSION_ADD_COLUMN),i=c(this.reactIntl,Ie.EXPRESSION_FIELD_COLUMN),a=c(this.reactIntl,Ie.EXPRESSION_FIELD_COLUMN_DESCRIPTION),s=c(this.reactIntl,Ie.EXPRESSION_STORAGE_COLUMN),l={id:"fields",locLabel:c(this.reactIntl,Ie.EXPRESSION_FIELDS_DROPDOWN_TITLE),field_columns:{add_column_info:{locLabel:n},field_column_info:{locLabel:i,descLabel:a},value_column_info:{locLabel:this.valueColumn,descLabel:this.valueColumnDesc},additional_column_info:[{id:"storage",locLabel:s}]}},p={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})),p.field_value_groups.push(t)});for(var u=0;u<t.field_categories.length;u++)"fields"===t.field_categories[u].id&&(r=u);for(var d=0;d<t.field_table_info.length;d++)"fields"===t.field_table_info[d].id&&(o=d);return void 0!==r?t.field_categories[r]=l:t.field_categories.unshift(l),void 0!==o?t.field_table_info[o]=p:t.field_table_info.unshift(p),t}},{key:"_makeFieldAndValuesContent",value:function(){var e=this,t=this._makeFieldDropdown(),r=[],o=[],n=["fieldName"],i=null,s=null;if(this.state.fieldCategory===this.recentUseCat)i=this.recentUseCatInfo,s={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&&(s=this.fields.field_table_info[p])}if(i&&(r.push({key:"addColumn",label:c(this.reactIntl,Ie.EXPRESSION_ADD_COLUMN),width:"60px",staticWidth:!0},{key:"fieldName",label:i.field_columns.field_column_info.locLabel,description:i.field_columns.field_column_info.descLabel,resizable:!0}),o.push({key:"addColumn",label:c(this.reactIntl,Ie.EXPRESSION_ADD_COLUMN),width:"60px",staticWidth:!0},{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 u=0;u<i.field_columns.additional_column_info.length;u++)n.push(i.field_columns.additional_column_info[u].id),r.push({key:i.field_columns.additional_column_info[u].id,label:i.field_columns.additional_column_info[u].locLabel});var d=[],h=[];if(s&&s.field_value_groups)for(var f=0;f<s.field_value_groups.length;f++){var m=s.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:"addColumn",content:this.createAddButtonContent(f,"field"),value:m.id},{column:"fieldName",content:this.createContentObject(m.id),value:m.id}),m.additional_column_entries&&this._makeAdditionalColumnsContent(m,v),d.push({columns:v,rowKey:f}),f===this.state.fieldSelected&&(h=this._makeValuesContent(m,h)))}var y=this.state.fieldSelected;null!==this.state.fieldTableSortSpec&&(y=(d=this.sortTableRows(d,this.state.fieldTableSortSpec)).findIndex(function(t){return t.rowKey===e.state.fieldSelected}));var g=this.state.valueSelected;null!==this.state.valuesTableSortSpec&&(g=(h=this.sortTableRows(h,this.state.valuesTableSortSpec)).findIndex(function(t){return t.rowKey===e.state.valueSelected}));var b=c(this.reactIntl,Ie.EXPRESSION_FIELDS_TABLE_LABEL),E=c(this.reactIntl,Ie.EXPRESSION_VALUES_TABLE_LABEL),I=se(this.resources,Ie.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL,c(this.reactIntl,Ie.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL)),S=se(this.resources,Ie.EXPRESSION_VALUES_EMPTY_TABLE_LABEL,c(this.reactIntl,Ie.EXPRESSION_VALUES_EMPTY_TABLE_LABEL));return a.createElement("div",{className:"properties-field-and-values-table-container"},t,a.createElement("div",{className:"properties-field-table-container expression-builder-table"},a.createElement(Ar,{enableTanstackTable:this.props.controller.getPropertiesConfig().enableTanstackTable,columns:r,data:d,sortable:n,filterable:["fieldName"],onFilter:this.onFieldFilter,rows:Ge,tableLabel:b,rowSelection:Pe.SINGLE,updateRowSelections:this.onFieldTableClick,onRowDoubleClick:this.onAddFieldClick,selectedRows:[y],onSort:this.setSortColumn.bind(this,"fieldTable"),light:!this.props.controller.getLight(),emptyTablePlaceholder:I})),a.createElement("div",{className:"properties-value-table-container expression-builder-table"},a.createElement(Ar,{enableTanstackTable:this.props.controller.getPropertiesConfig().enableTanstackTable,columns:o,data:h,sortable:["values"],filterable:["values"],onFilter:this.onValueFilter,rows:Ge,tableLabel:E,rowSelection:Pe.SINGLE,updateRowSelections:this.onValueTableClick,onRowDoubleClick:this.onAddValueClick,selectedRows:[g],onSort:this.setSortColumn.bind(this,"valuesTable"),light:!this.props.controller.getLight(),emptyTablePlaceholder:S})))}},{key:"_makeValuesContent",value:function(e,t){var r=c(this.reactIntl,Ie.EXPRESSION_MIN_LABEL),o=c(this.reactIntl,Ie.EXPRESSION_MAX_LABEL);if(e.values)for(var n=0;n<e.values.length;n++)this._addValueRow(e.values[n].value,n,t);else e.range&&(e.range.min&&this._addValueRow(r+": "+e.range.min.value,0,t),e.range.max&&this._addValueRow(o+": "+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 o=[{column:"addColumn",content:this.createAddButtonContent(t,"value"),value:e},{column:"values",content:this.createContentObject(e),value:e}];r.push({columns:o,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 a.createElement("div",{className:"properties-expression-function-table-container"},t,r)}return a.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}}),o=r.slice(0,1),n=r.slice(1);r=o.concat({value:this.recentUseCat,label:this.recentUseCat},n);var i=this.state.functionCategory===this.recentUseCat?this.recentUseCat:this.props.functionList[this.state.functionCategory].locLabel,s=c(this.reactIntl,Ie.TABLE_SEARCH_HEADER),l={"close.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_OPENMENU)};return a.createElement("div",{className:"properties-expression-function-select"},a.createElement(kt,{level:this.props.controller.getLight()?1:0},a.createElement(Tt,{id:"properties-expression-function-select-dropdown-"+this.uuid,label:c(this.reactIntl,Ie.EXPRESSION_FUNCTIONS_DROPDOWN_TITLE),selectedItem:i,items:r,onChange:this.onFunctionCatChange,translateWithId:function(e){return l[e]},titleText:s})))}},{key:"_makeFieldDropdown",value:function(){var e=this,t=[],r="",o=this.fields.field_categories.find(function(t){return t.id===e.state.fieldCategory});o&&(r=o.locLabel);for(var n=0;n<this.fields.field_categories.length;n++)t.push({value:this.fields.field_categories[n].id,label:this.fields.field_categories[n].locLabel});var i=t.slice(0,1),s=t.slice(1),l=i.concat({value:this.recentUseCat,label:this.recentUseCat},s),p=this.state.fieldCategory===this.recentUseCat?this.recentUseCat:r,u=c(this.reactIntl,Ie.TABLE_SEARCH_HEADER),d={"close.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_OPENMENU)};return a.createElement("div",{className:"properties-expression-field-select"},a.createElement(kt,{level:this.props.controller.getLight()?1:0},a.createElement(Tt,{id:"properties-expression-field-select-dropdown-"+this.uuid,label:c(this.reactIntl,Ie.EXPRESSION_FIELDS_DROPDOWN_TITLE),selectedItem:p,items:l,onChange:this.onFieldCatChange,translateWithId:function(e){return d[e]},titleText:u})))}},{key:"_makeFunctionsTable",value:function(e){var t=this,r=[],o=c(this.reactIntl,Ie.EXPRESSION_FUNCTION_COLUMN),n=c(this.reactIntl,Ie.EXPRESSION_RETURN_COLUMN),i=c(this.reactIntl,Ie.EXPRESSION_ADD_COLUMN);r.push({key:"addColumn",label:i,width:"60px",staticWidth:!0}),r.push({key:"function",label:o,width:50,resizable:!0}),r.push({key:"return",label:n,width:30});var s=this._buildFunctionTable(this.state.functionCategory),l=s.rows,p=this.state.functionSelected;null!==this.state.functionTableSortSpec&&(p=(l=this.sortTableRows(l,this.state.functionTableSortSpec)).findIndex(function(e){return e.rowKey===t.state.functionSelected}));var u=c(this.reactIntl,Ie.EXPRESSION_FUNCTIONS_TABLE_LABEL),d=se(this.resources,Ie.EXPRESSION_NO_FUNCTIONS,c(this.reactIntl,Ie.EXPRESSION_NO_FUNCTIONS));return a.createElement("div",{className:"properties-functions-table-helper-container"},a.createElement("div",{className:"properties-functions-table-container expression-builder-table"},a.createElement("div",{className:"properties-functions-table"},a.createElement(Ar,{enableTanstackTable:this.props.controller.getPropertiesConfig().enableTanstackTable,columns:r,data:l,sortable:["function","return"],filterable:["function"],onFilter:this.onFunctionFilter,rows:Ge,tableLabel:u,rowSelection:Pe.SINGLE,updateRowSelections:this.onFunctionTableClick,onRowDoubleClick:this.onAddFunctionClick,selectedRows:[p],onSort:this.setSortColumn.bind(this,"functionTable"),light:!this.props.controller.getLight(),emptyTablePlaceholder:d}))),a.createElement("div",{className:"properties-help-table-container"},s.helpContainer))}},{key:"_buildFunctionTable",value:function(e){var t={rows:[],helpContainer:a.createElement("div",null)},r=e===this.recentUseCat?this.props.controller.getExpressionRecentlyUsed():this.props.functionList[e].functionList;if(r)for(var o=0;o<r.length;o++){var n=r[o],i=[];if(!this.state.functionFilterText||0===this.state.functionFilterText.length||n.locLabel.toLowerCase().indexOf(this.state.functionFilterText.toLowerCase())>-1){var s=n.locReturnType?n.locReturnType:n.return_type;i.push({column:"addColumn",content:this.createAddButtonContent(o,"function"),value:n.id}),i.push({column:"function",content:this.createContentObject(n.locLabel),value:n.locLabel}),i.push({column:"return",content:this.createContentObject(s),value:s}),t.rows.push({columns:i,rowKey:o}),o===this.state.functionSelected&&(t.helpContainer=a.createElement("div",{className:"properties-function-help-text"},a.createElement("span",{className:"properties-function-help-command"},n.locLabel,":"),a.createElement("br",null),a.createElement("br",null),a.createElement("span",null,n.help)))}}return t}},{key:"render",value:function(){var e=this._makeFieldAndValuesContent(),t=this._makeFunctionsContent(),r=c(this.reactIntl,Ie.EXPRESSION_FIELD_TAB),o=c(this.reactIntl,Ie.EXPRESSION_FUNCTIONS_TAB),n=null;return 0===this.state.selectedIndex?n=e:1===this.state.selectedIndex&&(n=t),a.createElement("div",{className:"properties-expression-selection-fieldOrFunction"},a.createElement("div",{className:"properties-expression-selection-content-switcher"},a.createElement(wt,{onChange:this.onSwitch.bind(this),selectedIndex:this.state.selectedIndex},a.createElement(Rt,{key:0,name:"expresson-builder-fields-tab",className:"expresson-builder-fields-tab",text:r}),a.createElement(Rt,{key:1,name:"expresson-builder-function-tab",className:"expresson-builder-function-tab",text:o}))),n)}}])}(a.Component);function Pc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pc=function(){return!!e})()}var xc=function(r){function s(){return t(this,s),function(e,t,r){return t=n(t),i(e,Pc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,arguments)}return o(s,r),e(s,[{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,o){var n="tooltip-expression-operator-".concat(o),i=a.createElement("div",{className:"properties-tooltips"},r.help);t.push(a.createElement("div",{className:"properties-operator-tooltip-container",key:"expression-operator-"+o},a.createElement(Tr,{id:n,tip:i,direction:"bottom",className:"properties-tooltips"},a.createElement(ut,{className:Ee("properties-operator-button",{first:o%2==0,second:!(o%2==0)}),size:"sm",kind:"tertiary",onClick:e.onOperatorClick.bind(e,r.value)},a.createElement("div",{className:"properties-operator-button-label"},r.locLabel)))))}),a.createElement("div",{className:"properties-operator-container"},t)}return a.createElement("div",null)}},{key:"render",value:function(){var e=this._makeOperatorContent();return a.createElement("div",{className:"properties-expression-selection-operator"},e)}}])}(a.Component);function Bc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bc=function(){return!!e})()}var Mc=function(r){function s(){return t(this,s),function(e,t,r){return t=n(t),i(e,Bc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,arguments)}return o(s,r),e(s,[{key:"render",value:function(){var e=a.createElement(Nc,{controller:this.props.controller,onChange:this.props.onChange,functionList:this.props.functionList,language:this.props.language}),t=a.createElement(xc,{controller:this.props.controller,onChange:this.props.onChange,operatorList:this.props.operatorList});return a.createElement("div",{className:"properties-expression-selection-container"},t,e)}}])}(a.Component);function Fc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fc=function(){return!!e})()}var Vc=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Fc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.selection=[],r.expressionInfo=e.controller.getExpressionInfo(),r.editorDidMount=r.editorDidMount.bind(r),r.onChange=r.onChange.bind(r),r.onBlur=r.onBlur.bind(r),r.onSelectionChange=r.onSelectionChange.bind(r),r.getCodemirrorState=r.getCodemirrorState.bind(r),r}return o(s,r),e(s,[{key:"onChange",value:function(e){var t,r,o,n,i,a="string"==typeof e?e:e.toString(),s=null===(t=this.getCodemirrorState())||void 0===t?void 0:t.selection.ranges.some(function(e){return!e.empty}),l=null===(r=this.getCodemirrorState())||void 0===r?void 0:r.selection.main.head;isNaN(l)&&!s&&(this.editor.dispatch({selection:{anchor:null===(n=this.getCodemirrorState())||void 0===n?void 0:n.doc.length}}),l=null===(i=this.getCodemirrorState())||void 0===i?void 0:i.selection.main.head,this.editor.focus());var p=1;if(s){var c;p=0,this.editor.dispatch(null===(c=this.getCodemirrorState())||void 0===c?void 0:c.replaceSelection(a),{scrollIntoView:!0}),this.editor.focus()}else{var u,d,h,f,m=" ",v=null===(u=this.getCodemirrorState())||void 0===u?void 0:u.doc.lineAt(null===(d=this.getCodemirrorState())||void 0===d?void 0:d.selection.main.head).number,y=null===(h=this.getCodemirrorState())||void 0===h?void 0:h.doc.line(v).text[l-1];-1!==["(","[","{"].indexOf(y)&&(m=""),this.editor.dispatch(null===(f=this.getCodemirrorState())||void 0===f?void 0:f.replaceSelection(m+a),{scrollIntoView:!0}),this.editor.focus()}this._setSelection(a,l,p);var g=null===(o=this.getCodemirrorState())||void 0===o?void 0:o.doc.toString();this.props.controller.updatePropertyValue(this.props.propertyId,g,!0)}},{key:"onSelectionChange",value:function(e){this.selection=e}},{key:"onBlur",value:function(e,t){var r,o=this.props.controller.getPropertyValue(this.props.propertyId),n=null==e||null===(r=e.viewState)||void 0===r||null===(r=r.state)||void 0===r?void 0:r.doc.toString(),i=this.expressionSelectionPanel&&t&&this.expressionSelectionPanel.contains(t.relatedTarget);D(o,n)&&i||this.props.controller.updatePropertyValue(this.props.propertyId,n,i)}},{key:"getCodemirrorState",value:function(){var e;return null===(e=this.editor)||void 0===e||null===(e=e.viewState)||void 0===e?void 0:e.state}},{key:"editorDidMount",value:function(e){this.editor=e}},{key:"_setSelection",value:function(e,t,r){var o,n,i;if("string"==typeof e){var a=e.indexOf("?");if(-1!==a){var s={anchor:t+a+r+1,head:t+a+r};return this.editor.dispatch({selection:s}),void this.onSelectionChange([s])}}for(var l=null===(o=this.getCodemirrorState())||void 0===o?void 0:o.doc.lines,p=0;p<l;p++){var c,u=(null===(c=this.getCodemirrorState())||void 0===c?void 0:c.doc.line(p+1).text).indexOf("?");if(-1!==u){var d={anchor:u+1,head:u};return this.editor.dispatch({selection:d}),void this.onSelectionChange([d])}}var h={anchor:null===(n=this.getCodemirrorState())||void 0===n?void 0:n.selection.main.anchor,head:null===(i=this.getCodemirrorState())||void 0===i?void 0:i.selection.main.head};this.onSelectionChange([h])}},{key:"render",value:function(){var e=this,t=c(this.props.controller.getReactIntl(),Ie.EXPRESSION_BUILDER_LABEL);return a.createElement("div",{className:"properties-expression-builder"},a.createElement(Pd,{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}),a.createElement("div",{ref:function(t){return e.expressionSelectionPanel=t}},a.createElement(Mc,{controller:this.props.controller,onChange:this.onChange,functionList:this.expressionInfo.functionCategories,operatorList:this.expressionInfo.operators,language:this.props.control.language})))}}])}(a.Component);function Uc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Uc=function(){return!!e})()}var Hc=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Uc()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.buttonHandler=e.controller.getHandlers().buttonHandler||function(){return null},r.reactIntl=e.controller.getReactIntl(),r}return o(s,r),e(s,[{key:"render",value:function(){var e=this;return a.createElement("div",{className:"properties-expression-toggle"},a.createElement("div",{className:"properties-expression-toggle-absolute"},this.props.enableMaximize?a.createElement(ut,{className:"maximize",type:"button",size:"sm",kind:"ghost",renderIcon:G,hasIconOnly:!0,iconDescription:c(this.reactIntl,Ie.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)}}):a.createElement(ut,{type:"button",className:"minimize",size:"sm",kind:"ghost",hasIconOnly:!0,renderIcon:W,iconDescription:c(this.reactIntl,Ie.EXPRESSION_MINIMIZE_LABEL),onClick:function(){return e.props.controller.clearActiveTearsheet()}})))}}])}(a.Component),jc=Wt(Hc);function zc(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,r=arguments[1];if(r&&"object"==typeof r&&null==r.nodeType&&!Array.isArray(r)){for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){var n=r[o];"string"==typeof n?e.setAttribute(o,n):null!=n&&(e[o]=n)}t++}for(;t<arguments.length;t++)qc(e,arguments[t]);return e}function qc(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var r=0;r<t.length;r++)qc(e,t[r])}}class Gc{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Wc{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let o=r.facet(iu).markerFilter;o&&(e=o(e,r));let n=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),i=new To,a=[],s=0,l=r.doc.iter(),p=0,c=r.doc.length;for(let e=0;;){let t,r,o=e==n.length?null:n[e];if(!o&&!a.length)break;if(a.length)t=s,r=a.reduce((e,t)=>Math.min(e,t.to),o&&o.from>t?o.from:1e8);else{if(t=o.from,t>c)break;r=o.to,a.push(o),e++}for(;e<n.length;){let o=n[e];if(o.from!=t||!(o.to>o.from||o.to==t)){r=Math.min(o.from,r);break}a.push(o),e++,r=Math.min(o.to,r)}r=Math.min(r,c);let u=!1;if(a.some(e=>e.from==t&&(e.to==r||r==c))&&(u=t==r,!u&&r-t<10)){let e=t-(p+l.value.length);e>0&&(l.next(e),p=t);for(let e=t;;){if(e>=r){u=!0;break}if(!l.lineBreak&&p+l.value.length>e)break;e=p+l.value.length,p+=l.value.length,l.next()}}let d=mu(a);if(u)i.add(t,t,Gr.widget({widget:new pu(d),diagnostics:a.slice()}));else{let e=a.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");i.add(t,r,Gr.mark({class:"cm-lintRange cm-lintRange-"+d+e,diagnostics:a.slice(),inclusiveEnd:a.some(e=>e.to>r)}))}if(s=r,s==c)break;for(let e=0;e<a.length;e++)a[e].to<=s&&a.splice(e--,1)}let u=i.finish();return new Wc(u,t,$c(u))}}function $c(e,t=null,r=0){let o=null;return e.between(r,1e9,(e,r,{spec:n})=>{if(!(t&&n.diagnostics.indexOf(t)<0))if(o){if(n.diagnostics.indexOf(o.diagnostic)<0)return!1;o=new Gc(o.from,r,o.diagnostic)}else o=new Gc(e,r,t||n.diagnostics[0])}),o}function Xc(e,t){return e.field(Qc,!1)?t:t.concat(Io.appendConfig.of(vu))}const Kc=Io.define(),Yc=Io.define(),Jc=Io.define(),Qc=So.define({create:()=>new Wc(Gr.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let r=e.diagnostics.map(t.changes),o=null,n=e.panel;if(e.selected){let n=t.changes.mapPos(e.selected.from,1);o=$c(r,e.selected.diagnostic,n)||$c(r,null,n)}!r.size&&n&&t.state.facet(iu).autoPanel&&(n=null),e=new Wc(r,n,o)}for(let r of t.effects)if(r.is(Kc)){let o=t.state.facet(iu).autoPanel?r.value.length?uu.open:null:e.panel;e=Wc.init(r.value,o,t.state)}else r.is(Yc)?e=new Wc(e.diagnostics,r.value?uu.open:null,e.selected):r.is(Jc)&&(e=new Wc(e.diagnostics,e.panel,r.value));return e},provide:e=>[$r.from(e,e=>e.panel),qr.decorations.from(e,e=>e.diagnostics)]}),Zc=Gr.mark({class:"cm-lintRange cm-lintRange-active"});function eu(e,t,r){let o,{diagnostics:n}=e.state.field(Qc),i=-1,a=-1;n.between(t-(r<0?1:0),t+(r>0?1:0),(e,n,{spec:s})=>{if(t>=e&&t<=n&&(e==n||(t>e||r>0)&&(t<n||r<0)))return o=s.diagnostics,i=e,a=n,!1});let s=e.state.facet(iu).tooltipFilter;return o&&s&&(o=s(o,e.state)),o?{pos:i,end:a,above:e.state.doc.lineAt(i).to<a,create:()=>({dom:tu(e,o)})}:null}function tu(e,t){return zc("ul",{class:"cm-tooltip-lint"},t.map(t=>lu(e,t,!1)))}const ru=e=>{let t=e.state.field(Qc,!1);return!(!t||!t.panel)&&(e.dispatch({effects:Yc.of(!1)}),!0)},ou=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(Qc,!1);t&&t.panel||e.dispatch({effects:Xc(e.state,[Yc.of(!0)])});let r=Xr(e,uu.open);return r&&r.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(Qc,!1);if(!t)return!1;let r=e.state.selection.main,o=$c(t.diagnostics,null,r.to+1);return!(!o&&(o=$c(t.diagnostics,null,0),!o||o.from==r.from&&o.to==r.to))&&(e.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),!0)}}],nu=Kr.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(iu);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){clearTimeout(this.timeout);let e=Date.now();if(e<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(iu);t.length&&function(e,t,r){let o=[],n=-1;for(let i of e)i.then(r=>{o.push(r),clearTimeout(n),o.length==e.length?t(o):n=setTimeout(()=>t(o),200)},r)}(t.map(e=>Promise.resolve(e(this.view))),t=>{this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:Xc(e,[Kc.of(t)])}}(this.view.state,t.reduce((e,t)=>e.concat(t))))},e=>{Yr(this.view.state,e)})}}update(e){let t=e.state.facet(iu);(e.docChanged||t!=e.startState.facet(iu)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});const iu=Co.define({combine:e=>({sources:e.map(e=>e.source).filter(e=>null!=e),...ko(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:au,tooltipFilter:au,needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t,hideOn:(e,t)=>e?t?(r,o,n)=>e(r,o,n)||t(r,o,n):e:t,autoPanel:(e,t)=>e||t})})});function au(e,t){return e?t?(r,o)=>t(e(r,o),o):e:t}function su(e){let t=[];if(e)e:for(let{name:r}of e){for(let e=0;e<r.length;e++){let o=r[e];if(/[a-zA-Z]/.test(o)&&!t.some(e=>e.toLowerCase()==o.toLowerCase())){t.push(o);continue e}}t.push("")}return t}function lu(e,t,r){var o;let n=r?su(t.actions):[];return zc("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},zc("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(o=t.actions)||void 0===o?void 0:o.map((r,o)=>{let i=!1,a=o=>{if(o.preventDefault(),i)return;i=!0;let n=$c(e.state.field(Qc).diagnostics,t);n&&r.apply(e,n.from,n.to)},{name:s}=r,l=n[o]?s.indexOf(n[o]):-1,p=l<0?s:[s.slice(0,l),zc("u",s.slice(l,l+1)),s.slice(l+1)];return zc("button",{type:"button",class:"cm-diagnosticAction"+(r.markClass?" "+r.markClass:""),onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${n[o]})"`}.`},p)}),t.source&&zc("div",{class:"cm-diagnosticSource"},t.source))}class pu extends Jr{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return zc("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class cu{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=lu(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class uu{constructor(e){this.view=e,this.items=[];this.list=zc("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(27==t.keyCode)ru(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:r}=this.items[this.selectedIndex],o=su(r.actions);for(let n=0;n<o.length;n++)if(o[n].toUpperCase().charCodeAt(0)==t.keyCode){let t=$c(this.view.state.field(Qc).diagnostics,r);t&&r.actions[n].apply(e,t.from,t.to)}}}t.preventDefault()}},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=zc("div",{class:"cm-panel-lint"},this.list,zc("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>ru(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Qc).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Qc),r=0,o=!1,n=null,i=new Set;for(e.between(0,this.view.state.doc.length,(e,a,{spec:s})=>{for(let e of s.diagnostics){if(i.has(e))continue;i.add(e);let a,s=-1;for(let t=r;t<this.items.length;t++)if(this.items[t].diagnostic==e){s=t;break}s<0?(a=new cu(this.view,e),this.items.splice(r,0,a),o=!0):(a=this.items[s],s>r&&(this.items.splice(r,s-r),o=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),n=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)o=!0,this.items.pop();0==this.items.length&&(this.items.push(new cu(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),o=!0),n?(this.list.setAttribute("aria-activedescendant",n.id),this.view.requestMeasure({key:this,read:()=>({sel:n.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let r=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/r:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/r)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=$c(this.view.state.field(Qc).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Jc.of(t)})}static open(e){return new uu(e)}}function du(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const hu=qr.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:du("#d11")},".cm-lintRange-warning":{backgroundImage:du("orange")},".cm-lintRange-info":{backgroundImage:du("#999")},".cm-lintRange-hint":{backgroundImage:du("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function fu(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function mu(e){let t="hint",r=1;for(let o of e){let e=fu(o.severity);e>r&&(r=e,t=o.severity)}return t}const vu=[Qc,qr.decorations.compute([Qc],e=>{let{selected:t,panel:r}=e.field(Qc);return t&&r&&t.from!=t.to?Gr.set([Zc.range(t.from,t.to)]):Gr.none}),Wr(eu,{hideOn:function(e,t){let r=t.pos,o=t.end||r,n=e.state.facet(iu).hideOn(e,r,o);if(null!=n)return n;let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some(e=>e.is(Kc))&&!e.changes.touchesRange(i.from,Math.max(i.to,o)))}}),hu],yu=1024;let gu=0;class bu{constructor(e={}){this.id=gu++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=Su.match(e)),t=>{let r=e(t);return void 0===r?null:[this,r]}}}bu.closedBy=new bu({deserialize:e=>e.split(" ")}),bu.openedBy=new bu({deserialize:e=>e.split(" ")}),bu.group=new bu({deserialize:e=>e.split(" ")}),bu.isolate=new bu({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),bu.contextHash=new bu({perNode:!0}),bu.lookAhead=new bu({perNode:!0}),bu.mounted=new bu({perNode:!0});class Eu{constructor(e,t,r,o=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=o}static get(e){return e&&e.props&&e.props[bu.mounted.id]}}const Iu=Object.create(null);class Su{constructor(e,t,r,o=0){this.name=e,this.props=t,this.id=r,this.flags=o}static define(e){let t=e.props&&e.props.length?Object.create(null):Iu,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),o=new Su(e.name||"",t,e.id,r);if(e.props)for(let r of e.props)if(Array.isArray(r)||(r=r(o)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}return o}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(bu.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let o of r.split(" "))t[o]=e[r];return e=>{for(let r=e.prop(bu.group),o=-1;o<(r?r.length:0);o++){let n=t[o<0?e.name:r[o]];if(n)return n}}}}Su.none=new Su("",Object.create(null),0,8);const Cu=new WeakMap,ku=new WeakMap;var Tu;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays",e[e.EnterBracketed=16]="EnterBracketed"}(Tu||(Tu={}));class wu{constructor(e,t,r,o,n){if(this.type=e,this.children=t,this.positions=r,this.length=o,this.props=null,n&&n.length){this.props=Object.create(null);for(let[e,t]of n)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=Eu.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let r=e.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Vu(this.topNode,e)}cursorAt(e,t=0,r=0){let o=Cu.get(this)||this.topNode,n=new Vu(o);return n.moveTo(e,t),Cu.set(this,n._tree),n}get topNode(){return new Du(this,0,0,null)}resolve(e,t=0){let r=Lu(Cu.get(this)||this.topNode,e,t,!1);return Cu.set(this,r),r}resolveInner(e,t=0){let r=Lu(ku.get(this)||this.topNode,e,t,!0);return ku.set(this,r),r}resolveStack(e,t=0){return function(e,t,r){let o=e.resolveInner(t,r),n=null;for(let e=o instanceof Du?o:o.context.parent;e;e=e.parent)if(e.index<0){let i=e.parent;(n||(n=[o])).push(i.resolve(t,r)),e=i}else{let i=Eu.get(e.tree);if(i&&i.overlay&&i.overlay[0].from<=t&&i.overlay[i.overlay.length-1].to>=t){let a=new Du(i.tree,i.overlay[0].from+e.from,-1,e);(n||(n=[o])).push(Lu(a,t,r,!1))}}return n?Mu(n):o}(this,e,t)}iterate(e){let{enter:t,leave:r,from:o=0,to:n=this.length}=e,i=e.mode||0,a=(i&Tu.IncludeAnonymous)>0;for(let e=this.cursor(i|Tu.IncludeAnonymous);;){let i=!1;if(e.from<=n&&e.to>=o&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&r&&(a||!e.type.isAnonymous)&&r(e),!e.nextSibling();){if(!e.parent())return;i=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:zu(Su.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,r)=>new wu(this.type,e,t,r,this.propValues),e.makeTree||((e,t,r)=>new wu(Su.none,e,t,r)))}static build(e){return function(e){var t;let{buffer:r,nodeSet:o,maxBufferLength:n=yu,reused:i=[],minRepeatType:a=o.types.length}=e,s=Array.isArray(r)?new Ru(r,r.length):r,l=o.types,p=0,c=0;function u(e,t,r,g,b,E){let{id:I,start:S,end:C,size:k}=s,T=c,w=p;if(k<0){if(s.next(),-1==k){let t=i[I];return r.push(t),void g.push(S-e)}if(-3==k)return void(p=I);if(-4==k)return void(c=I);throw new RangeError(`Unrecognized record size: ${k}`)}let R,_,A=l[I],L=S-e;if(C-S<=n&&(_=v(s.pos-t,b))){let t=new Uint16Array(_.size-_.skip),r=s.pos-_.size,n=t.length;for(;s.pos>r;)n=y(_.start,t,n);R=new _u(t,C-_.start,o),L=_.start-e}else{let e=s.pos-k;s.next();let t=[],r=[],o=I>=a?I:-1,i=0,l=C;for(;s.pos>e;)o>=0&&s.id==o&&s.size>=0?(s.end<=l-n&&(f(t,r,S,i,s.end,l,o,T,w),i=t.length,l=s.end),s.next()):E>2500?d(S,e,t,r):u(S,e,t,r,o,E+1);if(o>=0&&i>0&&i<t.length&&f(t,r,S,i,S,l,o,T,w),t.reverse(),r.reverse(),o>-1&&i>0){let e=h(A,w);R=zu(A,t,r,0,t.length,0,C-S,e,e)}else R=m(A,t,r,C-S,T-C,w)}r.push(R),g.push(L)}function d(e,t,r,i){let a=[],l=0,p=-1;for(;s.pos>t;){let{id:e,start:t,end:r,size:o}=s;if(o>4)s.next();else{if(p>-1&&t<p)break;p<0&&(p=r-n),a.push(e,t,r),l++,s.next()}}if(l){let t=new Uint16Array(4*l),n=a[a.length-2];for(let e=a.length-3,r=0;e>=0;e-=3)t[r++]=a[e],t[r++]=a[e+1]-n,t[r++]=a[e+2]-n,t[r++]=r;r.push(new _u(t,a[2]-n,o)),i.push(n-e)}}function h(e,t){return(r,o,n)=>{let i,a,s=0,l=r.length-1;if(l>=0&&(i=r[l])instanceof wu){if(!l&&i.type==e&&i.length==n)return i;(a=i.prop(bu.lookAhead))&&(s=o[l]+i.length+a)}return m(e,r,o,n,s,t)}}function f(e,t,r,n,i,a,s,l,p){let c=[],u=[];for(;e.length>n;)c.push(e.pop()),u.push(t.pop()+r-i);e.push(m(o.types[s],c,u,a-i,l-a,p)),t.push(i-r)}function m(e,t,r,o,n,i,a){if(i){let e=[bu.contextHash,i];a=a?[e].concat(a):[e]}if(n>25){let e=[bu.lookAhead,n];a=a?[e].concat(a):[e]}return new wu(e,t,r,o,a)}function v(e,t){let r=s.fork(),o=0,i=0,l=0,p=r.end-n,c={size:0,start:0,skip:0};e:for(let n=r.pos-e;r.pos>n;){let e=r.size;if(r.id==t&&e>=0){c.size=o,c.start=i,c.skip=l,l+=4,o+=4,r.next();continue}let s=r.pos-e;if(e<0||s<n||r.start<p)break;let u=r.id>=a?4:0,d=r.start;for(r.next();r.pos>s;){if(r.size<0){if(-3!=r.size&&-4!=r.size)break e;u+=4}else r.id>=a&&(u+=4);r.next()}i=d,o+=e,l+=u}return(t<0||o==e)&&(c.size=o,c.start=i,c.skip=l),c.size>4?c:void 0}function y(e,t,r){let{id:o,start:n,end:i,size:l}=s;if(s.next(),l>=0&&o<a){let a=r;if(l>4){let o=s.pos-(l-4);for(;s.pos>o;)r=y(e,t,r)}t[--r]=a,t[--r]=i-e,t[--r]=n-e,t[--r]=o}else-3==l?p=o:-4==l&&(c=o);return r}let g=[],b=[];for(;s.pos>0;)u(e.start||0,e.bufferStart||0,g,b,-1,0);let E=null!==(t=e.length)&&void 0!==t?t:g.length?b[0]+g[0].length:0;return new wu(l[e.topID],g.reverse(),b.reverse(),E)}(e)}}wu.empty=new wu(Su.none,[],[],0);class Ru{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Ru(this.buffer,this.index)}}class _u{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Su.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],o=this.set.types[t],n=o.name;if(/\W/.test(n)&&!o.isError&&(n=JSON.stringify(n)),r==(e+=4))return n;let i=[];for(;e<r;)i.push(this.childString(e)),e=this.buffer[e+3];return n+"("+i.join(",")+")"}findChild(e,t,r,o,n){let{buffer:i}=this,a=-1;for(let s=e;s!=t&&!(Au(n,o,i[s+1],i[s+2])&&(a=s,r>0));s=i[s+3]);return a}slice(e,t,r){let o=this.buffer,n=new Uint16Array(t-e),i=0;for(let a=e,s=0;a<t;){n[s++]=o[a++],n[s++]=o[a++]-r;let t=n[s++]=o[a++]-r;n[s++]=o[a++]-e,i=Math.max(i,t)}return new _u(n,i,this.set)}}function Au(e,t,r,o){switch(e){case-2:return r<t;case-1:return o>=t&&r<t;case 0:return r<t&&o>t;case 1:return r<=t&&o>t;case 2:return o>t;case 4:return!0}}function Lu(e,t,r,o){for(var n;e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t);){let t=!o&&e instanceof Du&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=o?0:Tu.IgnoreOverlays;if(o)for(let o=e,a=o.parent;a;o=a,a=o.parent)o instanceof Du&&o.index<0&&(null===(n=a.enter(t,r,i))||void 0===n?void 0:n.from)!=o.from&&(e=a);for(;;){let o=e.enter(t,r,i);if(!o)return e;e=o}}class Ou{cursor(e=0){return new Vu(this,e)}getChild(e,t=null,r=null){let o=Nu(this,e,t,r);return o.length?o[0]:null}getChildren(e,t=null,r=null){return Nu(this,e,t,r)}resolve(e,t=0){return Lu(this,e,t,!1)}resolveInner(e,t=0){return Lu(this,e,t,!0)}matchContext(e){return Pu(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(r=t,t=e.prevSibling):t=e}return r}get node(){return this}get next(){return this.parent}}class Du extends Ou{constructor(e,t,r,o){super(),this._tree=e,this.from=t,this.index=r,this._parent=o}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,o,n=0){for(let i=this;;){for(let{children:a,positions:s}=i._tree,l=t>0?a.length:-1;e!=l;e+=t){let l,p=a[e],c=s[e]+i.from;if(n&Tu.EnterBracketed&&p instanceof wu&&(l=Eu.get(p))&&!l.overlay&&l.bracketed&&r>=c&&r<=c+p.length||Au(o,r,c,c+p.length))if(p instanceof _u){if(n&Tu.ExcludeBuffers)continue;let a=p.findChild(0,p.buffer.length,t,r-c,o);if(a>-1)return new Bu(new xu(i,p,e,c),null,a)}else if(n&Tu.IncludeAnonymous||!p.type.isAnonymous||Uu(p)){let a;if(!(n&Tu.IgnoreMounts)&&(a=Eu.get(p))&&!a.overlay)return new Du(a.tree,c,e,i);let s=new Du(p,c,e,i);return n&Tu.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?p.children.length-1:0,t,r,o,n)}}if(n&Tu.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let o;if(!(r&Tu.IgnoreOverlays)&&(o=Eu.get(this._tree))&&o.overlay){let n=e-this.from,i=r&Tu.EnterBracketed&&o.bracketed;for(let{from:e,to:r}of o.overlay)if((t>0||i?e<=n:e<n)&&(t<0||i?r>=n:r>n))return new Du(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Nu(e,t,r,o){let n=e.cursor(),i=[];if(!n.firstChild())return i;if(null!=r)for(let e=!1;!e;)if(e=n.type.is(r),!n.nextSibling())return i;for(;;){if(null!=o&&n.type.is(o))return i;if(n.type.is(t)&&i.push(n.node),!n.nextSibling())return null==o?i:[]}}function Pu(e,t,r=t.length-1){for(let o=e;r>=0;o=o.parent){if(!o)return!1;if(!o.type.isAnonymous){if(t[r]&&t[r]!=o.name)return!1;r--}}return!0}class xu{constructor(e,t,r,o){this.parent=e,this.buffer=t,this.index=r,this.start=o}}class Bu extends Ou{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:o}=this.context,n=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.context.start,r);return n<0?null:new Bu(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&Tu.ExcludeBuffers)return null;let{buffer:o}=this.context,n=o.findChild(this.index+4,o.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return n<0?null:new Bu(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Bu(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Bu(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,o=this.index+4,n=r.buffer[this.index+3];if(n>o){let i=r.buffer[this.index+1];e.push(r.slice(o,n,i)),t.push(0)}return new wu(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Mu(e){if(!e.length)return null;let t=0,r=e[0];for(let o=1;o<e.length;o++){let n=e[o];(n.from>r.from||n.to<r.to)&&(r=n,t=o)}let o=r instanceof Du&&r.index<0?null:r.parent,n=e.slice();return o?n[t]=o:n.splice(t,1),new Fu(n,r)}class Fu{constructor(e,t){this.heads=e,this.node=t}get next(){return Mu(this.heads)}}class Vu{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Tu.EnterBracketed,e instanceof Du)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:r,buffer:o}=this.buffer;return this.type=t||o.set.types[o.buffer[e]],this.from=r+o.buffer[e+1],this.to=r+o.buffer[e+2],!0}yield(e){return!!e&&(e instanceof Du?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:o}=this.buffer,n=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.buffer.start,r);return!(n<0)&&(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?!(r&Tu.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Tu.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Tu.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let e=r<0?0:this.stack[r]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(e)}return r<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:o}=this;if(o){if(e>0){if(this.index<o.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(o.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:r}=o)}else({index:t,_parent:r}=this._tree);for(;r;({index:t,_parent:r}=r))if(t>-1)for(let o=t+e,n=e<0?-1:r._tree.children.length;o!=n;o+=e){let e=r._tree.children[o];if(this.mode&Tu.IncludeAnonymous||e instanceof _u||!e.type.isAnonymous||Uu(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let o=this.index,n=this.stack.length;n>=0;){for(let i=e;i;i=i._parent)if(i.index==o){if(o==this.index)return i;t=i,r=n+1;break e}o=this.stack[--n]}for(let e=r;e<this.stack.length;e++)t=new Bu(this.buffer,t,this.stack[e]);return this.bufferNode=new Bu(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let o=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){r++;continue}this.type.isAnonymous||(o=!0)}for(;;){if(o&&t&&t(this),o=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,o=!0}}}matchContext(e){if(!this.buffer)return Pu(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let o=e.length-1,n=this.stack.length-1;o>=0;n--){if(n<0)return Pu(this._tree,e,o);let i=r[t.buffer[this.stack[n]]];if(!i.isAnonymous){if(e[o]&&e[o]!=i.name)return!1;o--}}return!0}}function Uu(e){return e.children.some(e=>e instanceof _u||!e.type.isAnonymous||Uu(e))}const Hu=new WeakMap;function ju(e,t){if(!e.isAnonymous||t instanceof _u||t.type!=e)return 1;let r=Hu.get(t);if(null==r){r=1;for(let o of t.children){if(o.type!=e||!(o instanceof wu)){r=1;break}r+=ju(e,o)}Hu.set(t,r)}return r}function zu(e,t,r,o,n,i,a,s,l){let p=0;for(let r=o;r<n;r++)p+=ju(e,t[r]);let c=Math.ceil(1.5*p/8),u=[],d=[];return function t(r,o,n,a,s){for(let p=n;p<a;){let n=p,h=o[p],f=ju(e,r[p]);for(p++;p<a;p++){let t=ju(e,r[p]);if(f+t>=c)break;f+=t}if(p==n+1){if(f>c){let e=r[n];t(e.children,e.positions,0,e.children.length,o[n]+s);continue}u.push(r[n])}else{let t=o[p-1]+r[p-1].length-h;u.push(zu(e,r,o,n,p,h,t,null,l))}d.push(h+s-i)}}(t,r,o,n,0),(s||l)(u,d,a)}new bu({perNode:!0});let qu=0;class Gu{constructor(e,t,r,o){this.name=e,this.set=t,this.base=r,this.modified=o,this.id=qu++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r="string"==typeof e?e:"?";if(e instanceof Gu&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let o=new Gu(r,[],null,[]);if(o.set.push(o),t)for(let e of t.set)o.set.push(e);return o}static defineModifier(e){let t=new $u(e);return e=>e.modified.indexOf(t)>-1?e:$u.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let Wu=0;class $u{constructor(e){this.name=e,this.instances=[],this.id=Wu++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(r=>{return r.base==e&&(o=t,n=r.modified,o.length==n.length&&o.every((e,t)=>e==n[t]));var o,n});if(r)return r;let o=[],n=new Gu(e.name,o,e,t);for(let e of t)e.instances.push(n);let i=function(e){let t=[[]];for(let r=0;r<e.length;r++)for(let o=0,n=t.length;o<n;o++)t.push(t[o].concat(e[r]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of i)o.push($u.get(t,e));return n}}new bu({combine(e,t){let r,o,n;for(;e||t;){if(!e||t&&e.depth>=t.depth?(n=t,t=t.next):(n=e,e=e.next),r&&r.mode==n.mode&&!n.context&&!r.context)continue;let i=new Xu(n.tags,n.mode,n.context);r?r.next=i:o=i,r=i}return o}});class Xu{constructor(e,t,r,o){this.tags=e,this.mode=t,this.context=r,this.next=o}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Xu.empty=new Xu([],2,null);const Ku=Gu.define,Yu=Ku(),Ju=Ku(),Qu=Ku(Ju),Zu=Ku(Ju),ed=Ku(),td=Ku(ed),rd=Ku(ed),od=Ku(),nd=Ku(od),id=Ku(),ad=Ku(),sd=Ku(),ld=Ku(sd),pd=Ku(),cd={comment:Yu,lineComment:Ku(Yu),blockComment:Ku(Yu),docComment:Ku(Yu),name:Ju,variableName:Ku(Ju),typeName:Qu,tagName:Ku(Qu),propertyName:Zu,attributeName:Ku(Zu),className:Ku(Ju),labelName:Ku(Ju),namespace:Ku(Ju),macroName:Ku(Ju),literal:ed,string:td,docString:Ku(td),character:Ku(td),attributeValue:Ku(td),number:rd,integer:Ku(rd),float:Ku(rd),bool:Ku(ed),regexp:Ku(ed),escape:Ku(ed),color:Ku(ed),url:Ku(ed),keyword:id,self:Ku(id),null:Ku(id),atom:Ku(id),unit:Ku(id),modifier:Ku(id),operatorKeyword:Ku(id),controlKeyword:Ku(id),definitionKeyword:Ku(id),moduleKeyword:Ku(id),operator:ad,derefOperator:Ku(ad),arithmeticOperator:Ku(ad),logicOperator:Ku(ad),bitwiseOperator:Ku(ad),compareOperator:Ku(ad),updateOperator:Ku(ad),definitionOperator:Ku(ad),typeOperator:Ku(ad),controlOperator:Ku(ad),punctuation:sd,separator:Ku(sd),bracket:ld,angleBracket:Ku(ld),squareBracket:Ku(ld),paren:Ku(ld),brace:Ku(ld),content:od,heading:nd,heading1:Ku(nd),heading2:Ku(nd),heading3:Ku(nd),heading4:Ku(nd),heading5:Ku(nd),heading6:Ku(nd),contentSeparator:Ku(od),list:Ku(od),quote:Ku(od),emphasis:Ku(od),strong:Ku(od),link:Ku(od),monospace:Ku(od),strikethrough:Ku(od),inserted:Ku(),deleted:Ku(),changed:Ku(),invalid:Ku(),meta:pd,documentMeta:Ku(pd),annotation:Ku(pd),processingInstruction:Ku(pd),definition:Gu.defineModifier("definition"),constant:Gu.defineModifier("constant"),function:Gu.defineModifier("function"),standard:Gu.defineModifier("standard"),local:Gu.defineModifier("local"),special:Gu.defineModifier("special")};for(let e in cd){let t=cd[e];t instanceof Gu&&(t.name=e)}function ud(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}!function(e,t){let r=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)r[e.id]=t.class;else r[t.tag.id]=t.class;let{scope:o,all:n=null}=t||{}}([{tag:cd.link,class:"tok-link"},{tag:cd.heading,class:"tok-heading"},{tag:cd.emphasis,class:"tok-emphasis"},{tag:cd.strong,class:"tok-strong"},{tag:cd.keyword,class:"tok-keyword"},{tag:cd.atom,class:"tok-atom"},{tag:cd.bool,class:"tok-bool"},{tag:cd.url,class:"tok-url"},{tag:cd.labelName,class:"tok-labelName"},{tag:cd.inserted,class:"tok-inserted"},{tag:cd.deleted,class:"tok-deleted"},{tag:cd.literal,class:"tok-literal"},{tag:cd.string,class:"tok-string"},{tag:cd.number,class:"tok-number"},{tag:[cd.regexp,cd.escape,cd.special(cd.string)],class:"tok-string2"},{tag:cd.variableName,class:"tok-variableName"},{tag:cd.local(cd.variableName),class:"tok-variableName tok-local"},{tag:cd.definition(cd.variableName),class:"tok-variableName tok-definition"},{tag:cd.special(cd.variableName),class:"tok-variableName2"},{tag:cd.definition(cd.propertyName),class:"tok-propertyName tok-definition"},{tag:cd.typeName,class:"tok-typeName"},{tag:cd.namespace,class:"tok-namespace"},{tag:cd.className,class:"tok-className"},{tag:cd.macroName,class:"tok-macroName"},{tag:cd.propertyName,class:"tok-propertyName"},{tag:cd.operator,class:"tok-operator"},{tag:cd.comment,class:"tok-comment"},{tag:cd.meta,class:"tok-meta"},{tag:cd.invalid,class:"tok-invalid"},{tag:cd.punctuation,class:"tok-punctuation"}]);var dd,hd=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],fd=["list","quote","bquote","eval","return","call","parse","deparse"],md=["if","else","repeat","while","function","for","in","next","break"],vd=ud(hd),yd=ud(fd),gd=ud(md),bd=ud(["if","else","repeat","while","function","for"]),Ed=/[+\-*\/^<>=!&|~$:]/;function Id(e,t){dd=null;var r,o=e.next();if("#"==o)return e.skipToEnd(),"comment";if("0"==o&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if("."==o&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(o))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==o||'"'==o)return t.tokenize=(r=o,function(e,t){if(e.eat("\\")){var o=e.next();return"x"==o?e.match(/^[a-f0-9]{2}/i):("u"==o||"U"==o)&&e.eat("{")&&e.skipTo("}")?e.next():"u"==o?e.match(/^[a-f0-9]{4}/i):"U"==o?e.match(/^[a-f0-9]{8}/i):/[0-7]/.test(o)&&e.match(/^[0-7]{1,2}/),"string.special"}for(var n;null!=(n=e.next());){if(n==r){t.tokenize=Id;break}if("\\"==n){e.backUp(1);break}}return"string"}),"string";if("`"==o)return e.match(/[^`]+`/),"string.special";if("."==o&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(o)){e.eatWhile(/[\w\.]/);var n=e.current();return vd.propertyIsEnumerable(n)?"atom":gd.propertyIsEnumerable(n)?(bd.propertyIsEnumerable(n)&&!e.match(/\s*if(\s+|$)/,!1)&&(dd="block"),"keyword"):yd.propertyIsEnumerable(n)?"builtin":"variable"}return"%"==o?(e.skipTo("%")&&e.next(),"variableName.special"):"<"==o&&e.eat("-")||"<"==o&&e.match("<-")||"-"==o&&e.match(/>>?/)||"="==o&&t.ctx.argList?"operator":Ed.test(o)?("$"==o||e.eatWhile(Ed),"operator"):/[\(\){}\[\];]/.test(o)?(dd=o,";"==o?"punctuation":null):null}function Sd(e,t,r){e.ctx={type:t,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function Cd(e,t){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|t,column:r.column,prev:r.prev}}function kd(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}const Td={name:"r",startState:function(e){return{tokenize:Id,ctx:{type:"top",indent:-e,flags:2},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(3&t.ctx.flags||(t.ctx.flags|=2),4&t.ctx.flags&&kd(t),t.indent=e.indentation()),e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==r||2&t.ctx.flags||Cd(t,1),";"!=dd&&"{"!=dd&&"}"!=dd||"block"!=t.ctx.type||kd(t),"{"==dd?Sd(t,"}",e):"("==dd?(Sd(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==dd?Sd(t,"]",e):"block"==dd?Sd(t,"block",e):dd==t.ctx.type?kd(t):"block"==t.ctx.type&&"comment"!=r&&Cd(t,4),t.afterIdent="variable"==r||"keyword"==r,r},indent:function(e,t,r){if(e.tokenize!=Id)return 0;var o=t&&t.charAt(0),n=e.ctx,i=o==n.type;return 4&n.flags&&(n=n.prev),"block"==n.type?n.indent+("{"==o?0:r.unit):1&n.flags?n.column+(i?0:1):n.indent+(i?0:r.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:hd.concat(fd,md)}};var wd="zapsmall xzfile xtfrm xor writeLines writeChar writeBin write withVisible withRestarts within withCallingHandlers withAutoprint with while which weekdays warnings warning version Vectorize vector vapply validUTF8 validEnc utf8ToInt UseMethod url unz untracemem untrace unsplit unserialize unname unlockBinding unloadNamespace unlist unlink unique union undebug unclass typeof tryCatch try truncate trunc trimws trigamma transform tracingState tracemem traceback trace toupper toString topenv tolower textConnectionValue textConnection testPlatformEquivalence tempfile tempdir tcrossprod taskCallbackManager tapply tanpi tanh tan tabulate table T t system2 system switch sweep svd suspendInterrupts suppressWarnings suppressPackageStartupMessages suppressMessages summary sum substring substr substitute subset sub strwrap structure strtrim strtoi strsplit strrep strptime strftime stopifnot stop stdout stdin stderr startsWith standardGeneric srcref srcfilecopy srcfilealias srcfile sQuote sqrt sprintf split source sort solve socketSelect socketConnection sinpi sink sinh single sin simplify2array simpleWarning simpleMessage simpleError simpleCondition signif signalCondition sign shQuote showConnections setwd setTimeLimit setSessionTimeLimit setNamespaceInfo setHook setequal setdiff serialize sequence seq_len seq_along seq seek searchpaths search scan scale saveRDS save sapply sample rowSums rowsum rownames rowMeans row round RNGversion length lchoose lbeta lazyLoadDBfetch lazyLoadDBexec RNGkind rm rle rev returnValue return retracemem restartFormals restartDescription requireNamespace require replicate replace repeat rep_len rep removeTaskCallback remove regmatches registerS3methods registerS3method regexpr regexec Reduce Recall readRenviron readRDS readLines readline readChar readBin Re rcond rbind rawToChar rawToBits rawShift rawConnectionValue rawConnection raw rapply rank range R_system_version quote quit quarters qr q pushBackLength pushBack psigamma provideDimnames prod prmatrix print prettyNum pretty Position polyroot pmin pmax pmatch pipe pi pcre_config paste0 paste parseNamespaceFile parse packBits packageStartupMessage packageHasNamespace packageEvent package_version outer ordered order options open OlsonNames oldClass objects nzchar numeric_version numeric NROW nrow normalizePath norm noquote nlevels ngettext NextMethod next Negate NCOL ncol nchar nargs namespaceImportMethods namespaceImportFrom namespaceImportClasses namespaceImport namespaceExport months mode Mod missing min mget message merge memDecompress memCompress mean max matrix match mapply Map makeActiveBinding ls logical logb log2 log1p log10 log lockEnvironment lockBinding local loadNamespace loadingNamespaceInfo loadedNamespaces load list2env list license licence library libcurlVersion lgamma lfactorial levels LETTERS letters lengths lazyLoad lapply labels La_version La_library l10n_info kronecker kappa julian jitter isTRUE isSymmetric isSeekable isS4 isRestart isOpen ISOdatetime ISOdate isNamespaceLoaded isNamespace isIncomplete isFALSE isdebugged isBaseNamespace isatty invokeRestartInteractively invokeRestart invisible intToUtf8 intToBits intersect acosh acos abs abbreviate interactive interaction integer inherits importIntoEnv Im ifelse if identity identical icuSetCollate icuGetCollate iconvlist iconv I gzfile gzcon gsub grouping grepRaw grepl grep gregexpr globalenv gl getwd gettextf gettext getTaskCallbackNames getSrcLines getRversion getOption getNativeSymbolInfo getNamespaceVersion getNamespaceUsers getNamespaceName getNamespaceInfo getNamespaceImports getNamespaceExports getNamespace getLoadedDLLs getHook getExportedValue geterrmessage getElement getDLLRegisteredRoutines getConnection getCallingDLLe getCallingDLL getAllConnections get0 get gctorture2 gctorture gcinfo gc gamma function forwardsolve formatDL formatC format formals forceAndCall force for flush floor findRestart findPackageEnv findInterval Find Filter file fifo factorial factor F extSoftVersion expression expm1 exp exists evalq eval environmentName environmentIsLocked environment enquote endsWith Encoding encodeString enc2utf8 enc2native emptyenv eigen eapply dynGet duplicated dump droplevels drop dQuote dput double dontCheck dirname dir digamma difftime diff dget determinant detach det deparse delayedAssign asNamespace asinh asin debugonce debuggingState debug date cut curlGetHeaders cumsum cumprod cummin cummax Cstack_info crossprod cospi cosh cos contributors Conj conflicts conditionMessage conditionCall computeRestarts complex comment commandArgs colSums colnames colMeans col closeAllConnections close clearPushBack class choose chol2inv chol chkDots check_tzones chartr charToRaw charmatch character ceiling cbind cat casefold capabilities callCC call c bzfile by builtins browserText browserSetDebug browserCondition browser break bquote body bitwXor bitwShiftR bitwShiftL bitwOr bitwNot bitwAnd bindtextdomain bindingIsLocked bindingIsActive beta besselY besselK besselJ besselI basename baseenv backsolve autoloader autoload attributes attr attachNamespace attach atanh atan2 atan assign asS4 asS3 arrayInd array args Arg apply append aperm anyNA anyDuplicated any allowInterrupts all alist agrepl agrep addTaskCallback addNA".split(" ");var Rd,_d=_o.define(Td),Ad=_d.data.of({autocomplete:vo((Rd=[],wd.forEach(function(e){return Rd.push({label:e,type:"keyword"})}),Rd))});function Ld(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Od(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Od(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Od(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Dd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dd=function(){return!!e})()}var Nd=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Dd()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.state={showExpressionBuilder:!1,validationInProgress:!1,expressionEditorHeight:0},r.editable=new Ro,r.editorRef=a.createRef(),r.origHint=[],r.expressionInfo=r.props.controller.getExpressionInfo(),r.handleValidate=r.handleValidate.bind(r),r.hasValidate=r.hasValidate.bind(r),r.cancelExpressionBuilder=r.cancelExpressionBuilder.bind(r),r.hideExpressionBuilder=r.hideExpressionBuilder.bind(r),r.showExpressionBuilder=r.showExpressionBuilder.bind(r),r.addonHints=r.addonHints.bind(r),r.getDatasetFields=r.getDatasetFields.bind(r),r.handleBlur=r.handleBlur.bind(r),r.createCodeMirrorEditor=r.createCodeMirrorEditor.bind(r),r.events=r.events.bind(r),r.handleUpdate=r.handleUpdate.bind(r),r.setCodeMirrorEditable=r.setCodeMirrorEditable.bind(r),r.getCodemirrorState=r.getCodemirrorState.bind(r),r.focusSet=!1,r}return o(s,r),e(s,[{key:"componentDidMount",value:function(){this.createCodeMirrorEditor()}},{key:"componentDidUpdate",value:function(e){var t=this;if(D(e.state,this.props.state)||(e.state===_e.HIDDEN&&this.createCodeMirrorEditor(),this.setCodeMirrorEditable(!(this.props.state===_e.DISABLED&&this.props.readOnly))),this.props.selectionRange&&this.props.selectionRange.length>0&&!D(e.selectionRange,this.props.selectionRange)&&this.editor&&this.props.selectionRange.forEach(function(e){t.editor.dispatch({selection:e})}),!D(e.value,this.props.value)){var r,o=this.editor.state.selection.main;this.editor.dispatch({changes:{from:0,to:null===(r=this.getCodemirrorState())||void 0===r||null===(r=r.doc)||void 0===r?void 0:r.length,insert:this.props.value},selection:{anchor:o.anchor,head:o.head}})}}},{key:"getCodemirrorState",value:function(){var e;return null===(e=this.editor)||void 0===e||null===(e=e.viewState)||void 0===e?void 0:e.state}},{key:"setCodeMirrorEditable",value:function(e){this.editor.dispatch({effects:this.editable.reconfigure(qr.editable.of(e))})}},{key:"getDatasetFields",value:function(){var e,t=[],r=Ld(this.props.controller.getDatasetMetadataFields());try{for(r.s();!(e=r.n()).done;){var o=e.value;t.push({label:o.name,type:"variable"})}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"addonHints",value:function(e){var t=e.matchBefore(/\w*/);return t.from!==t.to||e.explicit?{from:t.from,options:Lc(this.origHint,this.getDatasetFields())}:null}},{key:"createCodeMirrorEditor",value:function(){var e,t=this,r=this.expressionEditorDiv?this.expressionEditorDiv.clientWidth:0,o=r>0?r/8.5:30,n=this.props.control.charLimit?Math.min(this.props.control.charLimit/o*26,390):104;n=this.props.control.rows?26*this.props.control.rows:n,n=this.props.height?this.props.height:n,this.setState({expressionEditorHeight:Math.max(Math.floor(n),104)});var i=this.props.control.language;switch(this.props.control.language){case"text/x-hive":i=Mo();break;case"text/x-python":i=Bo(),this.origHint=Ho();break;case"text/x-rsrc":i=new Ao(_d,[Ad]);break;case"javascript":i=Fo();break;case"json":i=Vo();break;default:i=jo()}var a=i.language.data.of({autocomplete:this.addonHints}),s=Lo.define([{tag:cd.keyword,class:"cm-keyword"},{tag:cd.number,class:"cm-number"},{tag:cd.definition(cd.name),class:"cm-def"},{tag:cd.comment,class:"cm-comment"},{tag:cd.variableName,class:"cm-variable"},{tag:cd.punctuation,class:"cm-punctuation"},{tag:cd.propertyName,class:"cm-property"},{tag:cd.operator,class:"cm-operator"},{tag:cd.string,class:"cm-string"},{tag:cd.meta,class:"cm-meta"}]),l="json"===this.props.control.language?function(e,t={}){return[iu.of({source:e,config:t}),nu,vu]}(Uo()):[];this.editor=new qr({doc:this.props.value,extensions:[Qr.of([{key:"Enter",run:lo},po,co]),a,Oo(s),Zr(),eo(),to(),uo(),Do(),ro(),oo(),wo.allowMultipleSelections.of(!0),No(),Po(),yo(),go(),no(),io(),ao(),fo(),l,Qr.of([].concat(ot(bo),ot(co),ot(mo),ot(ho),ot(xo),ot(Eo),ot(ou))),this.events(),i,so(this.props.control.additionalText),this.handleUpdate(),this.editable.of(qr.editable.of(!(this.props.state===_e.DISABLED||this.props.readOnly))),qr.contentAttributes.of({"aria-label":null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text})],parent:this.editorRef.current}),this.props.editorDidMount&&(this.props.editorDidMount(this.editor),this.focusSet||this.props.state===_e.DISABLED||this.props.readOnly||(this.focusSet=!0,setTimeout(function(){t.editor.focus()},0)))}},{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})})}},{key:"hasValidate",value:function(){return"function"==typeof this.props.controller.getHandlers().validationHandler}},{key:"events",value:function(){var e=this;return qr.domEventHandlers({blur:function(t,r){e.handleBlur(r,t)}})}},{key:"handleBlur",value:function(e,t){var r=t&&t.relatedTarget&&t.relatedTarget.classList.contains("properties-cancel-button");if(this.props.onBlur&&!r)this.props.onBlur(e,t);else{var o,n=null==e||null===(o=e.viewState)||void 0===o||null===(o=o.state)||void 0===o?void 0:o.doc.toString(),i=t&&t.relatedTarget&&t.relatedTarget.classList.contains("properties-expression-button");this.props.controller.updatePropertyValue(this.props.propertyId,n,i)}}},{key:"handleUpdate",value:function(){var e=this;return qr.updateListener.of(function(t){if(t.docChanged){if(Array.isArray(t.changedRanges)&&1===t.changedRanges.length&&1===Math.abs(t.changes.newLength-t.changes.length)&&e.props.onSelectionChange){var r=t.changedRanges[0].toB;e.props.onSelectionChange([{anchor:r,head:r}])}e.state.validateIcon&&(e.setState({validateIcon:null}),e.props.controller.updateErrorMessage(e.props.propertyId,Fe))}})}},{key:"_showBuilderButton",value:function(){return this.props.builder&&this.props.rightFlyout&&this.expressionInfo.functionCategories&&Object.keys(this.expressionInfo.functionCategories).length>0}},{key:"_getCodeHeader",value:function(){var e=this.props.controller.getHandlers().customHeaderHandler,t=null;return e&&void 0!==e(this.props.propertyId)&&(t=e(this.props.propertyId)),t}},{key:"render",value:function(){var e=this;if(this.props.state===_e.HIDDEN)return null;var t=this.props.messageInfo,r=t?t.type:Re.INFO;r===Re.SUCCESS&&(t=null);var o=this.props.controller.getReactIntl(),n=this._showBuilderButton()?a.createElement(ut,{kind:"ghost",size:"sm",className:"properties-expression-button",disabled:this.props.state===_e.DISABLED||this.props.readOnly,onClick:this.showExpressionBuilder,renderIcon:Cr,iconDescription:c(o,Ie.EXPRESSION_BUILDER_ICON_DESCRIPTION),tooltipPosition:"right",hasIconOnly:!0}):null,i=this._getCodeHeader(),s=null;this.state.validateIcon&&(s=a.createElement("div",{className:"icon validateIcon"},a.createElement(yr,{type:this.state.validateIcon,className:"properties-validation-icon-".concat(this.state.validateIcon)})));var l=this.state.validationInProgress?c(o,Ie.EXPRESSION_VALIDATING_LABEL):c(o,Ie.EXPRESSION_VALIDATE_LABEL),p=this.hasValidate()&&this.props.validateLink?a.createElement("div",{className:"properties-expression-validate",disabled:this.props.state===_e.DISABLED},a.createElement(ut,{className:"validateLink",kind:"ghost",onClick:this.handleValidate,disabled:this.props.state===_e.DISABLED||this.state.validationInProgress||this.props.readOnly},l),s):null,u=c(o,Ie.APPLYBUTTON_LABEL),h=c(o,Ie.REJECTBUTTON_LABEL),f=c(o,Ie.EXPRESSION_BUILDER_TITLE),m=a.createElement("div",null,a.createElement(Vc,{control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId})),v=this.state.showExpressionBuilder?a.createElement(pn,{open:!0,onCloseCallback:this.cancelExpressionBuilder,okHandler:this.hideExpressionBuilder,cancelHandler:this.cancelExpressionBuilder,showPropertiesButtons:!0,applyLabel:u,rejectLabel:h,tearsheet:{title:f,content:m}}):null,y=Ee("properties-expression-editor ".concat(r),{"properties-light-disabled":!this.props.control.light||!this.props.controller.getLight()}),g=a.createElement("div",{className:"properties-expression-link-container"},n,p),b=null!==this._getCodeHeader()?a.createElement("div",{className:"properties-code-header"},i):null,E=this.props.control.controlType===d.CODE?b:g;this.props.expressionLabel&&(E=a.createElement("div",{className:"properties-expression-header"},a.createElement("div",{className:"properties-expression-title"},this.props.expressionLabel),g));var I=null;if(this.props.control.enableMaximize){var S=this.props.controller.getActiveTearsheet()===se(this,"props.control.data.tearsheet_ref");I=a.createElement(jc,{control:this.props.control,controller:this.props.controller,enableMaximize:!S})}var C=Ee("elyra-CodeMirror ".concat(r," ").concat(this.props.state));return a.createElement("div",{className:"properties-expression-editor-wrapper"},this.props.controlItem,v,a.createElement("div",{className:"properties-editor-container"},E,I,a.createElement("div",{ref:function(t){return e.expressionEditorDiv=t},"data-id":Qn(this.props.propertyId),className:y},a.createElement("div",{className:C,ref:this.editorRef,style:{height:this.state.expressionEditorHeight,minHeight:104},"aria-disabled":this.props.state===_e.DISABLED||!this.props.readOnly}),a.createElement(Np,{state:this.props.state,messageInfo:t,inTable:this.props.tableControl}))))}}])}(a.Component);Nd.defaultProps={builder:!0,validateLink:!0};var Pd=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Nd);function xd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xd=function(){return!!e})()}var Bd=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,xd()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.id=Jn(r.props.propertyId),r}return o(s,r),e(s,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e.target.value)}},{key:"render",value:function(){var e,t=this.props.state===_e.HIDDEN;if(t)return null;var r="".concat(this.props.control.name,".passwordShow.tooltip"),o="".concat(this.props.control.name,".passwordHide.tooltip"),n=c(this.reactIntl,Ie.SHOW_PASSWORD_TOOLTIP),i=c(this.reactIntl,Ie.HIDE_PASSWORD_TOOLTIP),s=this.props.controller.getResource(r,n),l=this.props.controller.getResource(o,i),p=this.props.value?this.props.value:"",u=Ee("properties-pwdfield","properties-input-control",{hide:t},this.props.messageInfo?this.props.messageInfo.type:null),d=oi(this.props.messageInfo,this.props.tableControl);return a.createElement("div",{className:u,"data-id":Qn(this.props.propertyId)},a.createElement(_t,_r({},d,{autoComplete:"off",id:this.id,disabled:this.props.state===_e.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:p,labelText:this.props.controlItem,hideLabel:this.props.tableControl,tooltipAlignment:"end",showPasswordLabel:s,hidePasswordLabel:l,helperText:this.props.control.helperText,"aria-label":this.props.control.labelVisible?null:null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text})),a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),Md=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Bd);function Fd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fd=function(){return!!e})()}var Vd=function(r){function s(e){var r;if(t(this,s),r=function(e,t,r){return t=n(t),i(e,Fd()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.id=Jn(r.props.propertyId),r.getDateFormat=r.getDateFormat.bind(r),r.handleChange=r.handleChange.bind(r),r.value=e.value,r.value){var o=Fr(r.value,ke,new Date);Mr(o)&&(r.value=Vr(o,r.getDateFormat()))}else r.value="";return r}return o(s,r),e(s,[{key:"getDateFormat",value:function(){var e=this.props.control.dateFormat||ke;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=Fr(e.target.value,this.getDateFormat(),new Date);t=Mr(r)?Vr(r,ke):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e,t=this.props.state===_e.HIDDEN;if(t)return null;var r=Ee("properties-datefield","properties-input-control",{hide:t},this.props.messageInfo?this.props.messageInfo.type:null),o=oi(this.props.messageInfo,this.props.tableControl);return a.createElement("div",{className:r,"data-id":Qn(this.props.propertyId)},a.createElement(Et,_r({},o,{autoComplete:"off",id:this.id,disabled:this.props.state===_e.DISABLED,placeholder:this.props.control.additionalText,helperText:this.props.control.helperText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,readOnly:this.props.readOnly,"aria-label":this.props.control.labelVisible?null:null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text})),a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),Ud=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Vd);function Hd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hd=function(){return!!e})()}var jd=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Hd()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.id=Jn(e.propertyId),r.locale=e.controller.getLocale(),r.dateFormat=ni(e.control),r.state={value:e.value?Up(e.value,r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(r),r}return o(s,r),e(s,[{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleChange",value:function(e){if(e.length>0){var t=Hp(e[0]),r=Up(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.state===_e.HIDDEN;if(e)return null;var t=this.props.controller.getResource("".concat(this.props.control.name,".helper"),null),r=Ee("properties-datepicker","properties-input-control",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null),o=oi(this.props.messageInfo,this.props.tableControl);return a.createElement("div",{className:r,"data-id":Qn(this.props.propertyId)},a.createElement(At,{className:"properties-datepicker-wrapper-parent",datePickerType:We.SINGLE,dateFormat:this.dateFormat,onChange:this.handleChange.bind(this),locale:this.locale,readOnly:this.props.readOnly,value:this.state.value},a.createElement(Lt,_r({},o,{id:this.id,className:"properties-datepicker-wrapper-input",placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&this.props.controlItem,disabled:this.props.state===_e.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputChange.bind(this),value:this.state.value,helperText:!this.props.tableControl&&t||this.props.control.helperText}))),a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),zd=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(jd);function qd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qd=function(){return!!e})()}var Gd=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,qd()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.id=Jn(r.props.propertyId),r.locale=e.controller.getLocale(),r.uuid=kr(),r.dateFormat=ni(e.control),r.state={valueStart:e.value&&e.value[0]?Up(e.value[0],r.dateFormat):"",valueEnd:e.value&&e.value[1]?Up(e.value[1],r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(r),r.createInfoDesc=r.createInfoDesc.bind(r),r}return o(s,r),e(s,[{key:"onStartBlur",value:function(e){var t=Hp(e.target.value,this.dateFormat),r=Hp(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"onEndBlur",value:function(e){var t=Hp(e.target.value,this.dateFormat),r=Hp(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=Hp(e[0]),r=Up(e[0],this.dateFormat),o="",n="";e[1]&&(o=Hp(e[1]),n=Up(e[1],this.dateFormat)),this.props.controller.updatePropertyValue(this.props.propertyId,[t,o]),this.setState({valueStart:r,valueEnd:n})}}},{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?a.createElement("div",{className:"properties-label-container"},e,a.createElement(Tr,{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===_e.DISABLED,showToolTipOnClick:!0},a.createElement(yr,{type:Ae.INFORMATION,className:"properties-control-description-icon-info"}))):e}},{key:"render",value:function(){var e=this.props.state===_e.HIDDEN;if(e)return null;var t="".concat(this.props.control.name,".range.start.label"),r="".concat(this.props.control.name,".range.start.desc"),o="".concat(this.props.control.name,".range.start.helper"),n="".concat(this.props.control.name,".range.end.label"),i="".concat(this.props.control.name,".range.end.desc"),s="".concat(this.props.control.name,".range.end.helper"),l=c(this.reactIntl,Ie.DATEPICKER_RANGE_START_LABEL),p=c(this.reactIntl,Ie.DATEPICKER_RANGE_END_LABEL),u=this.props.controller.getResource(t,l),d=this.props.controller.getResource(r,null),h=this.props.controller.getResource(o,null),f=this.props.controller.getResource(n,p),m=this.props.controller.getResource(i,null),v=this.props.controller.getResource(s,null);u=this.createInfoDesc(u,d,"start"),f=this.createInfoDesc(f,m,"end");var y=Ee("properties-datepicker-range","properties-input-control",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null),g=oi(this.props.messageInfo,this.props.tableControl);return a.createElement("div",{className:y,"data-id":Qn(this.props.propertyId)},a.createElement(At,{datePickerType:We.RANGE,dateFormat:this.dateFormat,onChange:this.handleDateRangeChange.bind(this),locale:this.locale,allowInput:!0,readOnly:this.props.readOnly},a.createElement(Lt,_r({},g,{id:"".concat(this.id,"-start"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&u,disabled:this.props.state===_e.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputStartChange.bind(this),value:this.state.valueStart,onBlur:this.onStartBlur.bind(this),helperText:!this.props.tableControl&&h})),a.createElement(Lt,_r({},g,{id:"".concat(this.id,"-end"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&f,disabled:this.props.state===_e.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputEndChange.bind(this),value:this.state.valueEnd,onBlur:this.onEndBlur.bind(this),helperText:!this.props.tableControl&&v}))),a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),Wd=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Gd);function $d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($d=function(){return!!e})()}var Xd=function(r){function s(e){var r;if(t(this,s),r=function(e,t,r){return t=n(t),i(e,$d()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.id=Jn(e.propertyId),r.value=e.value,r.value){var o=Fr(r.value,"HH:mm:ss:xxx",new Date);Mr(o)&&(r.value=Vr(o,r.getTimeFormat()))}else r.value="";return r.getTimeFormat=r.getTimeFormat.bind(r),r.handleChange=r.handleChange.bind(r),r}return o(s,r),e(s,[{key:"getTimeFormat",value:function(){return this.props.control.timeFormat||Te}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=Fr(e.target.value,this.getTimeFormat(),new Date);t=Mr(r)?Vr(r,"HH:mm:ss:xxx"):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e,t=this.props.state===_e.HIDDEN;if(t)return null;var r=Ee("properties-timefield","properties-input-control",{hide:t},this.props.messageInfo?this.props.messageInfo.type:null),o=oi(this.props.messageInfo,this.props.tableControl);return a.createElement("div",{className:r,"data-id":Qn(this.props.propertyId)},a.createElement(Et,_r({},o,{autoComplete:"off",id:this.id,disabled:this.props.state===_e.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,helperText:this.props.control.helperText,readOnly:this.props.readOnly,"aria-label":this.props.control.labelVisible?null:null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text})),a.createElement(Np,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),Kd=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Xd);function Yd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yd=function(){return!!e})()}var Jd=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Yd()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.id=Jn(r.props.propertyId),r}return o(s,r),e(s,[{key:"handleChange",value:function(e,t){var r=t.checked;t.id,this.props.controller.updatePropertyValue(this.props.propertyId,r)}},{key:"render",value:function(){var e,t=this.props.state===_e.HIDDEN;if(t)return null;var r=this.props.control.label?this.props.control.label.text:"",o="tooltip-"+this.props.control.name,n="";!this.props.control.description||this.props.state===_e.DISABLED||t||this.props.tableControl||(n=a.createElement("span",null,this.props.control.description.text),this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId));var i=Jt(n)?"":a.createElement(Tr,{id:o,tip:n,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},a.createElement(yr,{type:Ae.INFORMATION,className:"properties-control-description-icon-info"})),s=a.createElement("span",{className:"properties-checkbox-label"},r);return a.createElement("div",{"data-id":Qn(this.props.propertyId)},a.createElement("div",{className:Ee("properties-checkbox",{hide:t},this.props.messageInfo?this.props.messageInfo.type:null)},a.createElement(Ct,{disabled:this.props.state===_e.DISABLED,id:this.id,labelText:s,onChange:this.handleChange.bind(this),checked:Boolean(this.props.value),hideLabel:this.props.tableControl,helperText:this.props.control.helperText,readOnly:this.props.readOnly,"aria-label":this.props.control.labelVisible?null:null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text}),i),a.createElement(Np,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId)}))}}])}(a.Component),Qd=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Jd);function Zd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zd=function(){return!!e})()}var eh=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Zd()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.id=Jn(r.props.propertyId),r}return o(s,r),e(s,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e,t,r=this.props.state===_e.HIDDEN;if(r)return null;var o="".concat(this.props.control.name,".toggle.on.label"),n="".concat(this.props.control.name,".toggle.off.label"),i=c(this.reactIntl,Ie.TOGGLE_ON_LABEL),s=c(this.reactIntl,Ie.TOGGLE_OFF_LABEL),l=this.props.controller.getResource(o,i),p=this.props.controller.getResource(n,s),u=this.props.tableControl?"sm":"md",d=a.createElement(Ot,{id:this.id,size:u,disabled:this.props.state===_e.DISABLED,toggled:Boolean(this.props.value),labelB:l,labelA:p,onToggle:this.handleChange.bind(this),"aria-labelledby":"".concat(null===(e=this.props.propertyId)||void 0===e?void 0:e.name,"-toggle-label"),readOnly:this.props.readOnly}),h=Ee("properties-toggle",{hide:r},this.props.messageInfo?this.props.messageInfo.type:null);return a.createElement("div",{className:h,"data-id":Qn(this.props.propertyId)},this.props.tableControl?null:a.createElement("div",{id:"".concat(null===(t=this.props.propertyId)||void 0===t?void 0:t.name,"-toggle-label"),className:"properties-toggle-label"},this.props.tableControl?null:this.props.controlItem),d,a.createElement(Np,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),th=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(eh);function rh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rh=function(){return!!e})()}var oh=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,rh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.uuid=kr(),r.handleChange=r.handleChange.bind(r),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(r),r}return o(s,r),e(s,[{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=Lp(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,r){var o=r.checked;r.id;var n=this.props.controller.getPropertyValue(this.props.propertyId);null==n&&(n=[]);var i=n.indexOf(e);o&&i<0&&(n=n.concat([e])),!o&&i>=0&&n.splice(i,1);var a=n.concat();this.props.controller.updatePropertyValue(this.props.propertyId,a)}},{key:"render",value:function(){var e,t=this.props.state===_e.HIDDEN;if(t)return null;var r=this.props.value;null==r&&(r=[]);for(var o=[],n=0;n<this.props.control.values.length;n++){var i=this.props.control.values[n],s=this.props.state===_e.DISABLED||!this.props.controlOpts.values.includes(i),l=null;if(Array.isArray(this.props.control.valueDescs)&&!Jt(this.props.control.valueDescs[n])&&!this.props.tableControl){var p=a.createElement("span",null,this.props.control.valueDescs[n]);l=a.createElement(Tr,{id:"tooltip-".concat(n),tip:p,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:t||s},a.createElement($e,{disabled:s,className:"properties-control-description-icon-info"}))}var c={name:this.props.propertyId.name,row:n},u=r.indexOf(i)>=0;o.push(a.createElement("div",{className:"properties-checkbox-tooltip-container",key:Jn(c,this.uuid)},a.createElement(Ct,{disabled:s,id:Jn(c,this.uuid),key:i+n,labelText:this.props.control.valueLabels[n],onChange:this.handleChange.bind(this,i),checked:u,readOnly:this.props.readOnly}),l))}return a.createElement("div",{className:Ee("properties-checkboxset",{hide:t}),"data-id":Qn(this.props.propertyId)},a.createElement(Dt,{legendText:this.props.controlItem,helperText:this.props.control.helperText,readOnly:this.props.readOnly,"aria-label":this.props.control.labelVisible?null:null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text},a.createElement("div",{className:Ee("properties-checkboxset-container",this.props.messageInfo?this.props.messageInfo.type:null)},o)),a.createElement(Np,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}])}(a.Component),nh=Xt(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)(oh);function ih(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ah(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ah(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 ah(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function sh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sh=function(){return!!e})()}var lh=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,sh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.uuid=kr(),r.handleChange=r.handleChange.bind(r),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(r),r}return o(s,r),e(s,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,je.INITIAL_LOAD);var e=this.props.controller.getPropertyValue(this.props.propertyId);this.setEnabledStateOfOptionalPanels(e),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"componentDidUpdate",value:function(e){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 o=0;o<t.values.length;o++){var n=t.values[o];ip(r,{name:n},t.values[o]===e?_e.ENABLED:_e.DISABLED,n)}this.props.controller.setPanelStates(r),function(e,t){for(var r={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},o=0;o<e.length;o++){var n=t.getPanelState({name:e[o]});vp(r,{name:e[o]},n,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){if(!this.props.readOnly){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===_e.DISABLED}},{key:"handleCheckedDisabled",value:function(e,t){if(null!=e&&t&&this.props.state!==_e.DISABLED){var r,o=this.props.controller.getControl(this.props.propertyId),n=this.props.control.valueDef.defaultValue;if(n&&!this.isRadioButtonDisabled(n))r=n;else{var i,a=ih(o.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===_e.DISABLED,t=this.props.state===_e.HIDDEN;if(t)return null;this.props.control.values||"radioset"!==this.props.control.controlType||(this.props.control.values=[!0,!1],this.props.control.valueLabels=["true","false"]);for(var r=[],o=this.props.controlOpts,n=0;n<o.values.length;n++){var i=null;if(Array.isArray(this.props.control.valueDescs)&&!Jt(this.props.control.valueDescs[n])&&!this.props.tableControl){var s=a.createElement("span",null,this.props.control.valueDescs[n]);i=a.createElement(Tr,{id:"tooltip-".concat(n),tip:s,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:t||e},a.createElement($e,{disabled:e,className:"properties-control-description-icon-info"}))}var l=o.values[n]===this.props.value,p="boolean"===this.props.control.valueDef.propType?String(o.values[n]):o.values[n],u=this.isRadioButtonDisabled(p),d=this.getOptionalPanel(p),h={name:this.props.propertyId.name,row:n},f=a.createElement("div",{className:"label-tooltip-container"},o.valueLabels[n],i);r.push(a.createElement("div",{key:n,className:"properties-radioset-panel"},a.createElement("div",{className:"properties-radioset-tooltip"},a.createElement(Nt,{key:n,id:Jn(h,this.uuid),disabled:e||u,labelText:f,value:p,onChange:this.handleChange,checked:l})),d))}var m=c(this.props.controller.getReactIntl(),Ie.RADIO_BUTTON_GROUP_ARIA_LABEL);return a.createElement("div",{"data-id":Qn(this.props.control,this.props.propertyId),className:Ee("properties-radioset ",{hide:t})},a.createElement(Pt,{className:Ee("properties-radio-button-group",this.props.messageInfo?this.props.messageInfo.type:null),disabled:e,name:"radio-button-group",orientation:this.props.control.orientation,helperText:this.props.control.helperText,readOnly:this.props.readOnly,"aria-label":"".concat(m," (").concat(Qn(this.props.control,this.props.propertyId),")")},r),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}])}(a.Component),ph=Xt(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)(lh);function ch(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return uh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uh(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 uh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function dh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dh=function(){return!!e})()}var hh=function(r){function s(e){var r;if(t(this,s),r=function(e,t,r){return t=n(t),i(e,dh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.emptyLabel="...",r.disableEmptyListDropdown=!1,Jt(e.controlOpts)){var o="".concat(r.props.control.name,".emptyList.placeholder"),a=e.controller.getResource(o);a&&(r.emptyLabel=a,r.disableEmptyListDropdown=!0)}else e.control.additionalText&&(r.emptyLabel=e.control.additionalText);return r.id=Jn(r.props.propertyId),r.handleChange=r.handleChange.bind(r),r.handleComboOnChange=r.handleComboOnChange.bind(r),r.handleOnInputChange=r.handleOnInputChange.bind(r),r.genSchemaSelectOptions=r.genSchemaSelectOptions.bind(r),r.genSelectOptions=r.genSelectOptions.bind(r),r.genFieldSelectOptions=r.genFieldSelectOptions.bind(r),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(r),r.getItemIcon=r.getItemIcon.bind(r),r.renderItem=r.renderItem.bind(r),r.filterItems=r.filterItems.bind(r),r}return o(s,r),e(s,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,je.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),o=e.find(function(e){return e.value===r});return(null===(o=void 0===o?null:o)&&r||this.props.control.customValueAllowed)&&(o={value:r,label:r}),o}},{key:"getItemIcon",value:function(e){var t,r=this.props.controller.getHandlers().propertyIconHandler;return r&&r({propertyId:this.props.propertyId,enumValue:e},function(e){t=e}),t}},{key:"genSchemaSelectOptions",value:function(e){var t=[];if(t.push({value:"",label:this.emptyLabel}),Array.isArray(this.props.controlOpts)){var r,o=ch(this.props.controlOpts);try{for(o.s();!(r=o.n()).done;){var n=r.value;t.push({value:n,label:n})}}catch(e){o.e(e)}finally{o.f()}}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genFieldSelectOptions",value:function(e){var t=[];t.push({value:"",label:this.emptyLabel});var r,o=ch(this.props.controlOpts);try{for(o.s();!(r=o.n()).done;){var n=r.value;t.push({value:n.name,label:n.name})}}catch(e){o.e(e)}finally{o.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===d.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===d.SELECTCOLUMN&&(t=N(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:e.selectedItem;this.props.control.controlType===d.SELECTCOLUMN&&(t=N(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleOnInputChange",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId);if(null!=r||""!==e){var o=e;if(this.props.control.customValueAllowed)null!==e&&e!==r&&this.props.controller.updatePropertyValue(this.props.propertyId,o);else t.some(function(t){return t.label===e})&&null!==e&&e!==r&&this.props.controller.updatePropertyValue(this.props.propertyId,o)}}},{key:"filterItems",value:function(e){var t,r,o=this.props.controller.getHandlers().filterItemsHandler;return o?o({type:"customFilterItems",propertyId:this.props.propertyId},e):null==e||null===(t=e.item)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.toLowerCase().includes(null==e||null===(r=e.inputValue)||void 0===r?void 0:r.toLowerCase())}},{key:"renderItem",value:function(e){return e?a.createElement("div",{className:"properties-dropdown-label"},a.createElement("div",{className:"custom-icon-label"},e.label),this.getItemIcon(e.value)):""}},{key:"render",value:function(){var e,t=this,r=this.props.state===_e.HIDDEN;if(r)return null;e=this.props.control.controlType===d.SELECTSCHEMA?this.genSchemaSelectOptions(this.props.value):this.props.control.controlType===d.SELECTCOLUMN?this.genFieldSelectOptions(this.props.value):this.genSelectOptions(this.props.value);var o={"close.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_OPENMENU),"clear.selection":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_CLEARSELECTION)},n=null,i=oi(this.props.messageInfo,this.props.tableControl);if(this.props.tableControl){var s,l=[],p=e.selectedOption&&e.selectedOption.value?e.selectedOption.value:"";e.selectedOption||l.push(a.createElement(xt,{text:this.emptyLabel,key:this.id,value:""}));var u,h=ch(e.options);try{for(h.s();!(u=h.n()).done;){var f=u.value;l.push(a.createElement(xt,{text:f.label,key:this.id+"-"+f.value,value:f.value}))}}catch(e){h.e(e)}finally{h.f()}n=a.createElement(Bt,{id:this.id,hideLabel:!0,inline:!0,labelText:this.props.control.label?this.props.control.label.text:"",disabled:this.props.state===_e.DISABLED||this.disableEmptyListDropdown,onChange:this.handleChange,value:p,helperText:this.props.control.helperText,readOnly:this.props.readOnly,size:"sm","aria-label":this.props.control.labelVisible?null:null===(s=this.props.control)||void 0===s||null===(s=s.label)||void 0===s?void 0:s.text},l)}else if(this.props.control.customValueAllowed||this.props.control.shouldFilterItem){var m,v,y=!0===this.props.control.shouldFilterItem?{shouldFilterItem:this.filterItems}:{};n=a.createElement(Mt,_r({},i,{"aria-label":this.props.control.label?this.props.control.label.text:"",id:"".concat(Qn(this.props.propertyId),"-dropdown"),disabled:this.props.state===_e.DISABLED||this.disableEmptyListDropdown,placeholder:null===(m=e.selectedOption)||void 0===m?void 0:m.label,selectedItem:null===(v=e.selectedOption)||void 0===v?void 0:v.label,items:e.options,onChange:this.handleComboOnChange,onInputChange:function(r){return t.handleOnInputChange(r,e.options)},translateWithId:function(e){return o[e]},titleText:this.props.controlItem,helperText:this.props.control.helperText,allowCustomValue:this.props.control.customValueAllowed},y))}else{var g;n=a.createElement(Tt,_r({},i,{id:"".concat(Qn(this.props.propertyId),"-dropdown"),disabled:this.props.state===_e.DISABLED||this.disableEmptyListDropdown,type:"default",items:e.options,itemToString:function(e){return e?e.label:""},itemToElement:this.renderItem,renderSelectedItem:this.renderItem,onChange:this.handleChange,selectedItem:e.selectedOption,label:this.emptyLabel,translateWithId:function(e){return o[e]},titleText:this.props.controlItem,helperText:this.props.control.helperText,readOnly:this.props.readOnly,"aria-label":this.props.control.labelVisible?null:null===(g=this.props.control)||void 0===g||null===(g=g.label)||void 0===g?void 0:g.text}))}return a.createElement("div",{"data-id":Qn(this.props.propertyId),className:Ee("properties-dropdown",{hide:r},this.props.messageInfo?this.props.messageInfo.type:null)},n,a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl,tableOnly:!0}))}}])}(a.Component),fh=Xt(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===d.SELECTSCHEMA?r.controlOpts=t.controller.getDatasetMetadataSchemas():t.control.controlType===d.SELECTCOLUMN?r.controlOpts=t.controller.getFilteredDatasetMetadata(t.propertyId):r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r},null)(hh);function mh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mh=function(){return!!e})()}var vh=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,mh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.getSelectedOption=r.getSelectedOption.bind(r),r.genSelectOptions=r.genSelectOptions.bind(r),r.handleOnChange=r.handleOnChange.bind(r),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(r),r.setShouldRender=r.setShouldRender.bind(r),r.state={shouldRender:!0},r.multiSelectDropdown=r.genSelectOptions(e.value),r.selectedOptions=e.value,r}return o(s,r),e(s,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){D(this.props.value,e.value)||(this.multiSelectDropdown=this.genSelectOptions(this.props.value)),D(this.props.controlOpts,e.controlOpts)||(this.multiSelectDropdown=this.genSelectOptions(this.props.value),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),o=[];return r&&r.forEach(function(t){return o.push(e.find(function(e){return e.id===t}))}),o}},{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=Lp(this.props.value,this.props.controlOpts.values);D(t,this.props.value)||(Jt(t)&&this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&(t=Lp(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<(null==e||null===(o=e.selectedItems)||void 0===o?void 0:o.length);r++){var o;t.push(e.selectedItems[r].id)}D(this.selectedOptions,t)||(this.selectedOptions=t,this.multiSelectDropdown=this.genSelectOptions(t)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.state===_e.HIDDEN;if(e)return null;if(!this.state.shouldRender)return null;var t={"close.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_OPENMENU),"clear.all":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_CLEARALL),"clear.selection":c(this.reactIntl,Ie.DROPDOWN_TOOLTIP_CLEARSELECTION)},r="".concat(this.props.control.name,".multiselect.dropdown.empty.label"),o=c(this.reactIntl,Ie.MULTISELECT_DROPDOWN_EMPTY_LABEL),n="".concat(this.props.control.name,".multiselect.dropdown.options.selected.label"),i=c(this.reactIntl,Ie.MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL),s="";s=0===this.multiSelectDropdown.selectedOptions.length?this.props.controller.getResource(r,o):this.props.controller.getResource(n,i);var l=oi(this.props.messageInfo,this.props.tableControl),p=null;return p=this.props.control.filterable?a.createElement(Ft,_r({},l,{id:"".concat(Qn(this.props.propertyId),"-multiselect-filterable"),disabled:this.props.state===_e.DISABLED,translateWithId:function(e){return t[e]},items:this.multiSelectDropdown.options,initialSelectedItems:this.multiSelectDropdown.selectedOptions,onChange:this.handleOnChange,placeholder:s,titleText:this.props.tableControl?null:this.props.controlItem,helperText:this.props.control.helperText,readOnly:this.props.readOnly})):a.createElement(Vt,_r({},l,{id:"".concat(Qn(this.props.propertyId),"-multiselect"),disabled:this.props.state===_e.DISABLED,translateWithId:function(e){return t[e]},items:this.multiSelectDropdown.options,selectedItems:this.multiSelectDropdown.selectedOptions,onChange:this.handleOnChange,label:s,titleText:this.props.tableControl?null:this.props.controlItem,helperText:this.props.control.helperText,readOnly:this.props.readOnly})),a.createElement("div",{"data-id":Qn(this.props.propertyId),className:Ee("properties-dropdown",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null)},p,a.createElement(Np,{state:this.props.state,tableOnly:!0,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}])}(a.Component),yh=Xt(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)(vh);function gh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gh=function(){return!!e})()}var bh=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,gh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.genSelectOptions=r.genSelectOptions.bind(r),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(r),r.updateSelections=r.updateSelections.bind(r),r}return o(s,r),e(s,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,je.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){D(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e,t){var r=Lp(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 o=this.props.controlOpts.values[e[r]];t.push(o)}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 o=[];o.push({column:"someofselect",state:this.props.state,content:this.props.controlOpts.valueLabels[r]}),t.options.push({className:"table-row",columns:o,disabled:this.props.state===_e.DISABLED})}return t}},{key:"render",value:function(){var e=this.props.state===_e.HIDDEN;if(e)return null;var t=this.props.value;null==t&&(t=[]);var r=this.genSelectOptions(t),o=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 a.createElement("div",{"data-id":Qn(this.props.control,this.props.propertyId),className:Ee("properties-someofselect ",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null)},this.props.controlItem,a.createElement(Ar,{enableTanstackTable:this.props.controller.getPropertiesConfig().enableTanstackTable,columns:[{key:"someofselect",label:""}],rows:o,data:r.options,scrollKey:this.props.control.name,tableLabel:n,selectedRows:r.selected,updateRowSelections:this.updateSelections,selectable:!0,showHeader:!1,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText,readOnly:this.props.readOnly}),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}])}(a.Component),Eh=Xt(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)(bh);function Ih(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ih=function(){return!!e})()}var Sh=function(){function r(e){var o;return t(this,r),o=function(e,t,r){return t=n(t),i(e,Ih()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,[e]),o.reactIntl=e.controller.getReactIntl(),o.emptyTableButtonClickHandler=o.addOnClick.bind(o,o.props.propertyId),o.emptyTableButtonLabel=c(o.reactIntl,Ie.STRUCTURETABLE_ADDBUTTON_LABEL),o}return o(r,bc),e(r,[{key:"makeRows",value:function(e,t){var r=[];if(e)for(var o=0;o<e.length;o++){var n=[],i=void 0!==this.props.propertyId.row?{row:this.props.propertyId.row,index:o}:{row:o},s=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(s),l,!0),u=P(p,c,l.dmImage);l.icon=u}var d=a.createElement("div",{className:"properties-table-cell-control"},a.createElement(qp,{control:l,propertyId:s,controller:this.props.controller,tableControl:!0}));n.push({key:o+"-0-field",column:"field",content:d}),r.push({key:o,onClickCallback:this.handleRowClick.bind(this,o,!1),columns:n,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:c(this.reactIntl,Ie.FIELDPICKER_FIELDCOLUMN_LABEL),description:null}),e}},{key:"makeTableToolbar",value:function(e){var t,r;return this.props.addRemoveRows||null!==(t=this.props.control)&&void 0!==t&&t.moveableRows?a.createElement(mc,{controller:this.props.controller,propertyId:this.props.propertyId,selectedRows:this.props.selectedRows,tableState:this.props.state,tableLabel:e,addRemoveRows:this.props.addRemoveRows,moveableRows:null===(r=this.props.control)||void 0===r?void 0:r.moveableRows,removeSelectedRows:this.removeSelected,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,isReadonlyTable:!1,isSingleSelectTable:!1,smallFlyout:!1}):null}},{key:"render",value:function(){var e;if(this.props.state===_e.HIDDEN)return null;var t,r=this.makeHeader(),o={fieldPickerCloseFunction:this.onFieldPickerClose},n=this.makeRows(this.props.value,this.props.state),i=(null===(e=this.props.control)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.text)||"",s=this.makeTableToolbar(i),l=this.props.selectedRows.length>0&&s?s:this.makeAddButtonPanel(this.props.state,o);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(t=this.scrollToRow,delete this.scrollToRow);var p=Ee("properties-column-select-table",{disabled:this.props.state===_e.DISABLED}),c=a.createElement(Ar,{enableTanstackTable:this.props.controller.getPropertiesConfig().enableTanstackTable,columns:r,data:n,scrollToRow:t,topRightPanel:l,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}),u=a.createElement("div",null,a.createElement("div",{className:p},c),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo}));return a.createElement("div",{"data-id":Qn(this.props.propertyId),className:"properties-column-select"},this.props.controlItem,Jt(this.props.value)&&this.props.addRemoveRows?a.createElement(Ic,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler,disabled:this.props.state===_e.DISABLED}):u)}}])}();Sh.propTypes={control:Ur.object.isRequired,propertyId:Ur.object.isRequired,controller:Ur.object.isRequired,controlItem:Ur.element,openFieldPicker:Ur.func.isRequired,selectedRows:Ur.array,state:Ur.string,value:Ur.array,messageInfo:Ur.object,addRemoveRows:Ur.bool,tableButtons:Ur.object};var Ch=Xt(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)(Sh);function kh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kh=function(){return!!e})()}var Th=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,kh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.controlFactory=new Qh(r.props.controller),r.controlFactory.setFunctions(r.props.openFieldPicker,r.props.buildUIItem),r}return o(s,r),e(s,[{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 o=this._getSubControlDef(e[r]);if(o&&o.visible){var n={name:this.props.control.name,col:this._getColumnIndex(e[r])},i=K(this.props.propertyId),a=n;i.name!==n.name&&(a=this.props.controller.setChildPropertyId(i,n));var s=this.props.readOnly;t.push(this.controlFactory.createControlItem(o,a,null,s))}}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 o=0;o<this.props.control.subControls.length;o++)if(this.props.control.subControls[o].visible){var n={name:this.props.control.name,col:this._getColumnIndex(this.props.control.subControls[o].name)},i=K(this.props.propertyId),a=n;i.name!==n.name&&(a=this.props.controller.setChildPropertyId(i,n)),e.push([this.controlFactory.createControlItem(this.props.control.subControls[o],a)])}return e}},{key:"_makeControlTable",value:function(e){for(var t=[],r=0;r<e.length;r++){for(var o=[],n=0;n<e[r].length;n++)o.push(a.createElement("td",{key:(1+r)*n,className:"properties-structureeditor-cell"},a.createElement("div",null,e[r][n])));t.push(a.createElement("tr",{key:1+r},o))}return a.createElement("table",{role:"presentation"},a.createElement("tbody",null,t))}},{key:"render",value:function(){var e=this.props.state===_e.HIDDEN;if(e)return null;var t=this._makeControlTable(this._makeControls());return a.createElement("div",{"data-id":Qn(this.props.control,this.props.propertyId),className:Ee("properties-structureeditor ",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null)},t,a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:!1}))}}])}(a.Component),wh=Xt(function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}},null)(Th);var Rh=Yt,_h=un,Ah=Se,Lh=ie,Oh=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 Dh=function(e,t){return(Lh(e)?Rh:_h)(e,Oh(Ah(t)))};function Nh(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ph(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ph(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Ph(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function xh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xh=function(){return!!e})()}var Bh=function(){function r(e){var o;return t(this,r),o=function(e,t,r){return t=n(t),i(e,xh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,[e]),o.reactIntl=e.controller.getReactIntl(),o.addColumns=o.addColumns.bind(o),o.removeColumns=o.removeColumns.bind(o),o.getDefaultRow=o.getDefaultRow.bind(o),o.indexOfRow=o.indexOfRow.bind(o),o.emptyTableButtonClickHandler=o.addOnClick.bind(o,o.props.propertyId),o.emptyTableButtonLabel=c(o.reactIntl,Ie.STRUCTURETABLE_ADDBUTTON_LABEL),o}return o(r,bc),e(r,[{key:"indexOfRow",value:function(e){var t=this.props.control.keyIndex;return sc(this.props.controller.getPropertyValue(this.props.propertyId),function(r){return r[t]===e})}},{key:"addColumns",value:function(e,t){for(var r=[],o=this.props.control.valueDef.isMap,n=0;n<e.length;n++){var i=e[n];if(this.indexOfRow(i)<0){var a=K(this.props.control.defaultRow);o?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),o=this.props.control.keyIndex,n=Dh(r,function(t){return e.indexOf(t[o])>=0});this.setCurrentControlValueSelected(n)}},{key:"getDefaultRow",value:function(e){var t=[];if(this.props.value&&e)for(var r=S(this.props.control),o=0;o<this.props.value.length;o++){if(this.props.value[o][r]===e||this.props.value[o]===e)return this.props.value[o]}for(var n=0;n<this.props.control.subControls.length;n++){var i=this.props.control.subControls[n];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=n;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,o=[],n=Nh(e);try{for(n.s();!(r=n.n()).done;){var i=r.value;o.push(this.getDefaultRow(i))}}catch(e){n.e(e)}finally{n.f()}this.setCurrentControlValueSelected(o,t);var a=t[t.length-1];this.setScrollToRow(a)}}},{key:"render",value:function(){if(this.props.state===_e.HIDDEN)return null;var e={fieldPickerCloseFunction:this.onFieldPickerClose},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),o=Ee("properties-st properties-st-buttons",{disabled:this.props.state===_e.DISABLED}),n=a.createElement("div",null,a.createElement("div",{className:o},r),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo})),i=this.getOnPanelContainer(this.props.selectedRows);return a.createElement("div",{"data-id":Qn(this.props.control,this.props.propertyId),className:"properties-column-structure-wrapper"},a.createElement("div",{className:"properties-column-structure"},Jt(this.props.value)&&this.props.addRemoveRows?a.createElement(Ic,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler,disabled:this.props.state===_e.DISABLED}):n),a.createElement("div",null,i))}}])}();Bh.propTypes={buildUIItem:Ur.func,control:Ur.object.isRequired,propertyId:Ur.object.isRequired,controller:Ur.object.isRequired,openFieldPicker:Ur.func.isRequired,rightFlyout:Ur.bool,selectedRows:Ur.array,state:Ur.string,value:Ur.array,messageInfo:Ur.object,addRemoveRows:Ur.bool,tableButtons:Ur.object};var Mh=Xt(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)(Bh);function Fh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fh=function(){return!!e})()}var Vh=function(){function r(e){var o;return t(this,r),o=function(e,t,r){return t=n(t),i(e,Fh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,[e]),o.addRow=o.addRow.bind(o),o.allowColumnControls=!0,o}return o(r,bc),e(r,[{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(){if(this.props.state===_e.HIDDEN)return null;var e={addButtonLabel:c(this.props.controller.getReactIntl(),Ie.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),addButtonFunction:this.addRow},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),o=Ee("properties-sle properties-sle-buttons",{disabled:this.props.state===_e.DISABLED}),n=a.createElement("div",null,a.createElement("div",{className:o},r),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo})),i=this.getOnPanelContainer(this.props.selectedRows);return a.createElement("div",{"data-id":Qn(this.props.control,this.props.propertyId),className:"properties-sle-wrapper"},a.createElement("div",{"data-id":Qn(this.props.control,this.props.propertyId),className:"properties-sle-container"},Jt(this.props.value)&&this.props.addRemoveRows?a.createElement(Ic,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:e.addButtonLabel,emptyTableButtonClickHandler:this.addRow,disabled:this.props.state===_e.DISABLED}):n),a.createElement("div",null,i))}}])}();Vh.propTypes={buildUIItem:Ur.func,control:Ur.object.isRequired,propertyId:Ur.object.isRequired,controller:Ur.object.isRequired,rightFlyout:Ur.bool,selectedRows:Ur.array,state:Ur.string,value:Ur.array,messageInfo:Ur.object,addRemoveRows:Ur.bool,tableButtons:Ur.object};var Uh=Xt(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)(Vh);function Hh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hh=function(){return!!e})()}var jh=function(){function r(e){var o;return t(this,r),o=function(e,t,r){return t=n(t),i(e,Hh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,r,[e]),o.reactIntl=e.controller.getReactIntl(),o.editCallback=o.editCallback.bind(o),o.buttonHandler=o.props.controller.getHandlers().buttonHandler,o}return o(r,bc),e(r,[{key:"editCallback",value:function(){this.buttonHandler&&this.buttonHandler({type:"edit",propertyId:this.props.propertyId})}},{key:"render",value:function(){if(this.props.state===_e.HIDDEN)return null;var e="".concat(this.props.control.name,".edit.button.label"),t=c(this.reactIntl,Ie.READONLYTABLE_EDIT_BUTTON_LABEL),r=this.props.controller.getResource(e,t),o=this.buttonHandler?{editCallback:this.editCallback,label:r}:null,n=this.props.control&&this.props.control.buttons,i=this.createTable(this.props.state,o,n),s=Ee("properties-rt properties-rt-buttons",{disabled:this.props.state===_e.DISABLED}),l=a.createElement("div",null,a.createElement("div",{className:s},i),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo}));return a.createElement("div",{"data-id":Qn(this.props.control,this.props.propertyId),className:"properties-readonly-table-wrapper"},this.props.controlItem,a.createElement("div",{className:"properties-readonly-table"},Jt(this.props.value)&&this.props.addRemoveRows?a.createElement(Ic,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:r,emptyTableButtonClickHandler:this.editCallback,disabled:this.props.state===_e.DISABLED}):l))}}])}();jh.propTypes={buildUIItem:Ur.func,control:Ur.object.isRequired,propertyId:Ur.object.isRequired,controller:Ur.object.isRequired,controlItem:Ur.element,rightFlyout:Ur.bool,selectedRows:Ur.array,state:Ur.string,value:Ur.array,messageInfo:Ur.object,addRemoveRows:Ur.bool,tableButtons:Ur.object,hideEditButton:Ur.bool};var zh=Xt(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)(jh);function qh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qh=function(){return!!e})()}var Gh=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,qh()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.reactIntl=e.controller.getReactIntl(),r.handleChange=r.handleChange.bind(r),r.uuid=kr(),r}return o(s,r),e(s,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e.value)}},{key:"render",value:function(){var e=this.props.state===_e.HIDDEN;if(e)return null;var t=this.props.controller.getResource("".concat(this.props.control.name,".min.label"),null),r=this.props.controller.getResource("".concat(this.props.control.name,".max.label"),null),o=this.props.control.minValue?this.props.control.minValue:0,n=this.props.control.maxValue?this.props.control.maxValue:10,i=this.props.control.increment?this.props.control.increment:1;return a.createElement("div",{className:Ee("properties-slider ",{hide:e},this.props.messageInfo?this.props.messageInfo.type:null),"data-id":Qn(this.props.propertyId)},a.createElement(Ut,{value:null!==this.props.value&&void 0!==this.props.value?this.props.value:o,min:o,max:n,minLabel:t,maxLabel:r,step:i,labelText:this.props.controlItem,onChange:this.handleChange,disabled:this.props.state===_e.DISABLED,ariaLabelInput:c(this.reactIntl,Ie.SLIDER_NUMBER_INPUT_LABEL),formatLabel:function(e,t){return t||e},readOnly:this.props.readOnly}),a.createElement(Np,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}])}(a.Component),Wh=Xt(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)(Gh);function $h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($h=function(){return!!e})()}var Xh=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,$h()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.actionFactory=new Fi(r.props.controller),r.showRequiredIndicator=!e.controller||se(e.controller.getPropertiesConfig(),"showRequiredIndicator",!0),r}return o(s,r),e(s,[{key:"render",value:function(){if(this.props.control.controlType===d.HIDDEN)return null;var e=this.props.state===_e.HIDDEN;if(e)return null;var t,r,o,n,i,s=this.props.state===_e.DISABLED;this.props.control.label&&!1!==this.props.control.labelVisible?(this.props.control.description&&!Jt(this.props.control.description.text)&&("on_panel"===this.props.control.description.placement?r=a.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),o=a.createElement(Tr,{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:e||s,showToolTipOnClick:!0},a.createElement(yr,{type:Ae.INFORMATION,className:"properties-control-description-icon-info"})))),this.showRequiredIndicator&&this.props.control.required?n=a.createElement("span",{className:"properties-indicator","aria-disabled":s},c(this.props.controller.getReactIntl(),Ie.LABEL_INDICATOR_REQUIRED)):this.showRequiredIndicator||"required"in this.props.control||(n=a.createElement("span",{className:"properties-indicator","aria-disabled":s},c(this.props.controller.getReactIntl(),Ie.LABEL_INDICATOR_OPTIONAL))),t=a.createElement("div",{className:Ee("properties-label-container",{"table-control":!0===this.props.tableControl})},a.createElement("label",{className:"properties-control-label","aria-disabled":s},this.props.control.label.text),n,o)):t=a.createElement("div",{className:Ee("properties-label-container-hidden")},a.createElement("label",{className:"properties-control-label-hidden"},null===(i=this.props.control)||void 0===i||null===(i=i.label)||void 0===i?void 0:i.text));var l=this.actionFactory.generateAction(0,this.props.control.action),p=Ee("properties-control-item",{hide:e},{"properties-ci-action-item image":l&&this.props.control.action.actionType===b.IMAGE});return this.props.accessibleControls.includes(this.props.control.controlType)?a.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:p,disabled:s},t,r):a.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:p,disabled:s},a.createElement("div",{className:"properties-ci-content-container"},t,r,this.props.controlObj),l)}}])}(a.Component),Kh=Xt(function(e,t){return{state:t.controller.getControlState(t.propertyId)}},null)(Xh),Yh=[d.CHECKBOXSET,d.CODE,d.DATEFIELD,d.DATEPICKER,d.DATEPICKERRANGE,d.EXPRESSION,d.HIDDEN,d.LIST,d.MULTISELECT,d.NUMBERFIELD,d.ONEOFSELECT,d.PASSWORDFIELD,d.READONLY,d.READONLYTABLE,d.SELECTCOLUMN,d.SELECTCOLUMNS,d.SELECTSCHEMA,d.SLIDER,d.SOMEOFSELECT,d.SPINNER,d.TEXTAREA,d.TEXTFIELD,d.TIMEFIELD,d.TIMESTAMP,d.TOGGLE,d.TOGGLETEXT],Jh=[d.LIST,d.READONLYTABLE,d.SOMEOFSELECT,d.SELECTCOLUMNS,d.STRUCTURETABLE,d.STRUCTURELISTEDITOR],Qh=function(){return e(function e(r){t(this,e),this.rightFlyout=!!r&&se(r.getPropertiesConfig(),"rightFlyout",!1),this.controller=r,this.actionFactory=new Fi(this.controller)},[{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){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=this.createControl(e,t,r,o),i=e.className?e.className:"";if(Yh.includes(e.controlType))return n;var s=this.controller.getControlState(t)===_e.HIDDEN&&e.editStyle!==w.SUBPANEL;return a.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:Ee("properties-ctrl-wrapper",{hide:s},i)},a.createElement(Kh,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,controlObj:n,accessibleControls:Yh,tableControl:Jh.includes(e.controlType)}))}},{key:"createControl",value:function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||!t)return null;var n,i=Qn(t),s=this.controller.getControlState(t)===_e.HIDDEN&&e.editStyle!==w.SUBPANEL,l=this.actionFactory.generateAction(0,e.action),p={};switch(p.key=i,p.control=e,p.controller=this.controller,p.propertyId=t,p.readOnly=o||e.readOnly,p.controlItem=a.createElement(Kh,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,accessibleControls:Yh,tableControl:Jh.includes(e.controlType)}),r&&(p.tableControl=r.table),e.controlType){case d.HIDDEN:return null;case d.TEXTFIELD:n=a.createElement($p,p);break;case d.READONLY:case d.TIMESTAMP:n=a.createElement(qp,p);break;case d.TEXTAREA:n=a.createElement(Zp,p);break;case d.TOGGLE:n=a.createElement(th,p);break;case d.LIST:n=a.createElement(Tc,_r({},p,{rightFlyout:this.rightFlyout}));break;case d.EXPRESSION:n=a.createElement(Pd,_r({},p,{rightFlyout:this.rightFlyout}));break;case d.CODE:n=a.createElement(Pd,_r({},p,{builder:!1,validateLink:!1,rightFlyout:this.rightFlyout}));break;case d.TOGGLETEXT:n=a.createElement(Yp,p);break;case d.PASSWORDFIELD:n=a.createElement(Md,p);break;case d.NUMBERFIELD:case d.SPINNER:n=a.createElement(rc,p);break;case d.DATEFIELD:n=a.createElement(Ud,p);break;case d.DATEPICKER:n=a.createElement(zd,p);break;case d.DATEPICKERRANGE:n=a.createElement(Wd,p);break;case d.TIMEFIELD:n=a.createElement(Kd,p);break;case d.CHECKBOX:n=a.createElement(Qd,p);break;case d.CHECKBOXSET:n=r?a.createElement(qp,p):a.createElement(nh,p);break;case d.RADIOSET:n=a.createElement(ph,p);break;case d.ONEOFSELECT:case d.SELECTSCHEMA:n=a.createElement(fh,_r({},p,{rightFlyout:this.rightFlyout}));break;case d.MULTISELECT:n=a.createElement(yh,p);break;case d.SELECTCOLUMN:n=!r||r&&r.allowColumnControls?a.createElement(fh,_r({},p,{rightFlyout:this.rightFlyout})):a.createElement(qp,p);break;case d.SOMEOFSELECT:n=r?a.createElement(qp,p):a.createElement(Eh,p);break;case d.SELECTCOLUMNS:n=r?a.createElement(qp,p):a.createElement(Ch,_r({},p,{openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case d.STRUCTURETABLE:n=r?a.createElement(qp,p):a.createElement(Mh,_r({},p,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case d.STRUCTURELISTEDITOR:n=r?a.createElement(qp,p):a.createElement(Uh,_r({},p,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case d.READONLYTABLE:n=r?a.createElement(qp,p):a.createElement(zh,_r({},p,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case d.CUSTOM:n=a.createElement("div",{className:"properties-custom-ctrl",key:i},this.controller.getCustomControl(t,e,r));break;case d.STRUCTUREEDITOR:n=a.createElement(wh,_r({},p,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case d.SLIDER:n=a.createElement(Wh,p);break;default:n=a.createElement(qp,p)}var c=a.createElement(kt,{level:this.controller.getLight()&&e.light?1:0,className:"properties-control-layer"},n);if(Yh.includes(e.controlType)){var u;if(r)return n;var h=e.className?e.className:"";return a.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:Ee("properties-ctrl-wrapper",{hide:s,action:ae(e,"action.image.placement")||!B(null==e||null===(u=e.action)||void 0===u?void 0:u.customActionId)},h)},c,l)}return c}},{key:"createFormControl",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xe.CUSTOM;if(!e)return null;var n=Ia.makePropertyDef(null,e.parameters,e.complex_types,e.uihints);if(n&&n.parameterMetadata){var i,a=new Ki(e.resources),s=n.parameterMetadata.getParameter(t);s.propType()===f.STRUCTURE&&n.structureMetadata&&(i=n.structureMetadata.getStructure(s.baseType()));var l={light:r,containerType:o};return Va(n.parameterMetadata,t,null,i,a,null,null,null,l)}return null}}])}();function Zh(e,t,r,o){if(["structuretable","structureeditor","structurelisteditor"].indexOf(e.control.controlType)>=0){var n=h(e.value);return"undefined"!==n&&"null"!==n&&String(e.value).length>0}return y.warn("Ignoring unsupported condition operation 'cellNotEmpty' for control type "+e.control.controlType),!0}function ef(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 tf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function rf(e,t,r,o){if(["textfield"].indexOf(e.control.controlType)>=0){var n=o.getDatasetMetadataFields();if(!n)return!0;var i,a=!0,s=ef(n);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(M(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 o=t.getPropertyValue({name:e.id.name,row:e.id.row});Array.isArray(o)&&o.forEach(function(o,n){n!==e.control.columnIndex&&(t.getControl({name:e.id.name,col:n}).role===m.COLUMN&&r.push(o))})}return r}(e,o),u=ef(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 of(e,t,r,o){var n=o.getDatasetMetadataFields();if(!n)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!==nf(n,e)}),a}return!0}return void 0!==nf(n,e.value);default:return y.warn("Ignoring unsupported condition operation 'colDoesExists' for control type "+i),!0}}function nf(e,t){return!(null!=t&&!Jt(t))||e.find(function(e){return M(t,e)})}function af(e,t,o,n){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 Lr(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!==o)switch(i){case"undefined":return!1;case"string":case"object":return Lr(e.value,o);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 sf(e,t,o,n){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!==o){if(null===e.value||null===o)return e.value===o;switch(i){case"undefined":case"boolean":case"number":return e.value===o;case"string":return e.value.trim()===o.toString().trim();case"object":return JSON.stringify(e.value)===JSON.stringify(o);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 lf(e,t,o,n){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!==o)return null===o||e.value>o;throw new Error("Insufficient parameter for condition operation 'greaterThan'");case"object":return null===e.value||null===t.value||null===o;case"string":if(e.control&&e.control.controlType===d.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)&&o){var l=new Date(o);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 pf(e,t,o,n){var i=n.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!0;case"boolean":return!1;case"string":return i.trimSpaces?0===e.value.trim().length:0===e.value.length;case"number":return null===e.value;case"object":if(e.control&&e.control.controlType===d.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 cf(e,t,o,n){var i=n.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!1;case"boolean":return!0;case"string":return i.trimSpaces?0!==e.value.trim().length:0!==e.value.length;case"number":return null!==e.value;case"object":return e.control&&e.control.controlType===d.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 uf(e,t,o,n){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!==o)return null===o||e.value<o;throw new Error("Insufficient parameter for condition operation 'lessThan'");case"object":return null===e.value||null===t.value||null===o;case"string":if(e.control&&e.control.controlType===d.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)&&o){var l=new Date(o);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 df(e,t,o,n){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==o)return y.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=o}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 hf(e,t,o,n){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!Lr(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!==o)switch(i){case"undefined":return!0;case"string":case"object":return!Lr(e.value,o);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 ff(e,t,o,n){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!==o){if(null===e.value||null===o)return e.value!==o;switch(i){case"undefined":case"boolean":case"number":return e.value!==o;case"string":return e.value.trim()!==o.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(o);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 mf(e,t,o,n){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==o)return y.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=o}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 vf(e,t,r,o){if(e.value){if(e.control&&e.control.controlType!==d.DATEPICKER&&e.control.controlType!==d.DATEPICKERRANGE){var n="time"===r?"HH:mm:ss:xxx":ke,i=Fr(e.value,n,new Date);return Mr(i)}return!0}return!0}function yf(e,t,o,n){"column"!==e.control.role&&y.warn("Condition Operator dmTypeEquals only intended for use on columns");var i=n.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=wp(t,i,"type")),null===a&&(a=t.value);else{if(null==o)return!1;a=o}return!!i&&("string"==typeof e.value||"object"===r(e.value)?wp(e,i,"type")===a:(void 0!==e.value&&y.warn("dmTypeEquals cannot handle the given type: "+r(e.value)),!1))}function gf(e,t,o,n){"column"!==e.control.role&&y.warn("Condition Operator dmTypeNotEquals only intended for use on columns");var i=n.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=wp(t,i,"type")),null===a&&(a=t.value);else{if(null==o)return!1;a=o}return!!i&&("string"==typeof e.value||"object"===r(e.value)?wp(e,i,"type")!==a:(void 0!==e.value&&y.warn("dmTypeNotEquals cannot handle the given type: "+r(e.value)),!1))}function bf(e,t,o,n){"column"!==e.control.role&&y.warn("Condition Operator dmMeasurementEquals only intended for use on columns");var i=n.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=wp(t,i,"measure")),null===a&&(a=t.value);else{if(null==o)return!1;a=o}return!!i&&("string"==typeof e.value||"object"===r(e.value)?wp(e,i,"measure")===a:(void 0!==e.value&&y.warn("dmMeasurementEquals cannot handle the given type: "+r(e.value)),!1))}function Ef(e,t,o,n){"column"!==e.control.role&&y.warn("Condition Operator dmMeasurementNotEquals only intended for use on columns");var i=n.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=wp(t,i,"measure")),null===a&&(a=t.value);else{if(null==o)return!1;a=o}return!!i&&("string"==typeof e.value||"object"===r(e.value)?wp(e,i,"measure")!==a:(void 0!==e.value&&y.warn("dmMeasurementNotEquals cannot handle the given type: "+r(e.value)),!1))}function If(e,t,o,n){"column"!==e.control.role&&y.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=n.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=wp(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==o)return!1;a=o}return!!i&&("string"==typeof e.value||"object"===r(e.value)?wp(e,i,"modeling_role")===a:(void 0!==e.value&&y.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function Sf(e,t,o,n){"column"!==e.control.role&&y.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=n.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=wp(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==o)return!1;a=o}return!!i&&("string"==typeof e.value||"object"===r(e.value)?wp(e,i,"modeling_role")!==a:(void 0!==e.value&&y.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function Cf(e,t,r,o){var n,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?n=e.value.length:void 0!==e.value&&null!==e.value||(n=0),"number"==typeof i&&"number"==typeof n?n===i:(y.warn("Ignoring condition operation 'lengthEquals' for parameter_ref "+e.param),!0)}function kf(e,t,r,o){var n,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?n=e.value.length:void 0!==e.value&&null!==e.value||(n=0),"number"==typeof i&&"number"==typeof n?n<i:(y.warn("Ignoring condition operation 'lengthLessThan' for parameter_ref "+e.param),!0)}function Tf(e,t,r,o){var n,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?n=e.value.length:void 0!==e.value&&null!==e.value||(n=0),"number"==typeof i&&"number"==typeof n?n>i:(y.warn("Ignoring condition operation 'lengthGreaterThan' for parameter_ref "+e.param),!0)}function wf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Rf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Rf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function _f(e){var t={};if(t.cellNotEmpty=Zh,t.colNotExists=rf,t.colDoesExists=of,t.contains=af,t.equals=sf,t.greaterThan=lf,t.isEmpty=pf,t.isNotEmpty=cf,t.lessThan=uf,t.matches=df,t.notContains=hf,t.notEquals=ff,t.notMatches=mf,t.isDateTime=vf,t.dmTypeEquals=yf,t.dmTypeNotEquals=gf,t.dmMeasurementEquals=bf,t.dmMeasurementNotEquals=Ef,t.dmRoleEquals=If,t.dmRoleNotEquals=Sf,t.lengthEquals=Cf,t.lengthLessThan=kf,t.lengthGreaterThan=Tf,Array.isArray(e)){var r,o=wf(e);try{for(o.s();!(r=o.n()).done;){var n=r.value;n&&"function"==typeof n.op&&"function"==typeof n.evaluate?t[n.op()]=n.evaluate:y.warn("Custom operator missing require function of `op` or `evaluate`")}}catch(e){o.e(e)}finally{o.f()}}return t}function Af(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function Lf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Of(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Of(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 Of(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var Df=function(){return e(function e(){t(this,e),this.propertiesStore=new ll,this.handlers={propertyListener:null,controllerHandler:null,actionHandler:null,customHeaderHandler:null,buttonHandler:null,buttonIconHandler:null,titleChangeHandler:null,tooltipLinkHandler:null,propertyIconHandler:null,filterItemsHandler:null,panelTitleHandler:null},this.propertiesConfig={},this.visibleDefinitions={},this.enabledDefinitions={},this.validationDefinitions={},this.requiredDefinitionsIds=[],this.filterDefinitions={},this.filteredEnumDefinitions={},this.allowChangeDefinitions={},this.conditionalDefaultDefinitions={},this.panelTree={},this.prevControls={},this.controls={},this.actions={},this.customControls=[],this.customActions=[],this.summaryPanelControls={},this.controllerHandlerCalled=!1,this.commandStack=new Br,this.custPropSumPanelValues={},this.controlFactory=new Qh(this),this.sharedCtrlInfo=[],this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this.conditionOps=_f(),this.expressionFunctionInfo={},this.expressionRecentlyUsed=[],this.expressionFieldsRecentlyUsed=[],this.selectionListeners={}},[{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 se(this.propertiesConfig,"locale",Ke)}},{key:"getTopLevelActiveGroupId",value:function(){return this.propertiesStore.getActiveTab()}},{key:"setTopLevelActiveGroupId",value:function(e){this.propertiesStore.setActiveTab(e)}},{key:"isTearsheetContainer",value:function(){return"Tearsheet"===this.propertiesConfig.containerType}},{key:"setParamDef",value:function(e){var t=se(this.getPropertiesConfig(),"containerType"),r=se(this.getPropertiesConfig(),"convertTypes"),o=Ka.makeForm(e,t,r);this.setForm(o)}},{key:"setForm",value:function(e,t,r){if(this.form=e,this.reactIntl=t,this.form){this.prevControls=this.controls,this.controls={},this.setControlStates({}),this.setErrorMessages({}),this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this._parseUiConditions();var o,n=[];hl(n,this.actions,this.form),hl(null,this.actions,{uiItems:this.form.titleUiItems}),this.saveControls(n),this._parseSummaryControls(n),this.parsePanelTree(),lp(this.controls,this.validationDefinitions,this.requiredDefinitionsIds,t);var i={};if(this.form.data&&(o=this.form.data.datasetMetadata,i=this.form.data.uiCurrentParameters?Gs({},this.form.data.currentParameters,this.form.data.uiCurrentParameters):this.form.data.currentParameters),this.setDatasetMetadata(o),this.setPropertyValues(i,{isInitProps:!0}),this.differentProperties=[],r&&(this.differentProperties=Ms(Object.keys(this.controls),Object.keys(this.prevControls))),this._addToControlValues(r),this._addToControlValues(r,!0),this.setInitialAddRemoveRows(),this.setInitialTableButtonState(),this.uiItems=this.form.uiItems,!Jt(this.uiItems)&&!Jt(this.uiItems[0].tabs)){var a=this.uiItems[0].tabs.filter(function(e){return e.content.itemType!==I.TEARSHEET});a.length&&this.propertiesStore.setActiveTab(a[0].group)}this.setTitle(this.form.label)}}},{key:"getForm",value:function(){return this.form}},{key:"getResource",value:function(e,t){return this.form&&this.form.resources&&this.form.resources[e]?this.form.resources[e]:t}},{key:"setAppData",value:function(e){this.appData=e}},{key:"getAppData",value:function(){return this.appData}},{key:"_parseUiConditions",value:function(){if(this.visibleDefinitions={controls:{},refs:{}},this.enabledDefinitions={controls:{},refs:{}},this.validationDefinitions={controls:{},refs:{}},this.filterDefinitions={controls:{},refs:{}},this.filteredEnumDefinitions={controls:{},refs:{}},this.allowChangeDefinitions={controls:{},refs:{}},this.conditionalDefaultDefinitions={controls:{},refs:{}},this.form.conditions){var e,t=Lf(this.form.conditions);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.visible?vl(this.visibleDefinitions,r,Be.VISIBLE):r.enabled?vl(this.enabledDefinitions,r,Be.ENABLED):r.validation?vl(this.validationDefinitions,r,Be.VALIDATION):r.filter?vl(this.filterDefinitions,r,Be.FILTER):r.enum_filter?vl(this.filteredEnumDefinitions,r,Be.FILTEREDENUM):r.allow_change?vl(this.allowChangeDefinitions,r,Be.ALLOWCHANGE):r.default_value?vl(this.conditionalDefaultDefinitions,r,Be.CONDITIONALDEFAULT):y.info("Invalid definition: "+JSON.stringify(r))}}catch(e){t.e(e)}finally{t.f()}}}},{key:"getDefinitions",value:function(e,t,r){var o;switch(t){case Be.VISIBLE:o=this.visibleDefinitions[r];break;case Be.ENABLED:o=this.enabledDefinitions[r];break;case Be.FILTEREDENUM:o=this.filteredEnumDefinitions[r];break;case Be.ALLOWCHANGE:o=this.allowChangeDefinitions[r];break;case Be.CONDITIONALDEFAULT:o=this.conditionalDefaultDefinitions[r];break;case Be.VALIDATION:o=this.validationDefinitions[r]}var n=[];for(var i in o)if(ae(o,i)){var a=sp(i);a.name===e.name&&a.col===e.col&&(n=n.concat(o[i]))}return n}},{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[Ve]={controls:[],panels:[],actions:[]},function(e,t,r){if(t.uiItems){var o,n=El(t.uiItems);try{for(n.s();!(o=n.n()).done;)Sl(e,o.value,r)}catch(e){n.e(e)}finally{n.f()}}}(this.panelTree,this.form,Ve)}},{key:"_addToControlValues",value:function(e,t,r){var o={};for(var n in this.controls)if(ae(this.controls,n)){var i=this.controls[n],a={name:i.name},s=void 0;s=null!=r&&r.values?r.values[i.name]:this.getPropertyValue(a),t?null!=s&&void 0!==s.parameterRef&&(s=this.getPropertyValue({name:s.parameterRef}),this.updatePropertyValue(a,s,!0,je.INITIAL_LOAD)):"structuretable"===i.controlType&&!1===i.addRemoveRows&&!0===i.includeAllFields?(s=this._populateFieldData(s,i),this.updatePropertyValue(a,s,!0,je.INITIAL_LOAD)):void 0!==i.valueDef&&void 0!==i.valueDef.defaultValue&&void 0===s?(s=i.valueDef.defaultValue,F(i)&&(s=V(i.valueDef.isList,i.subControls,s)),null!=r&&r.setDefaultValues?o[i.name]=s:e&&!this.differentProperties.includes(i.name)?this.updatePropertyValue(a,s,!0):this.updatePropertyValue(a,s,!0,je.INITIAL_LOAD)):"structureeditor"===i.controlType&&(!s||Array.isArray(s)&&0===s.length)&&Array.isArray(i.defaultRow)&&this.updatePropertyValue(a,i.defaultRow,!0,je.INITIAL_LOAD)}return null!=r&&r.setDefaultValues?o:null}},{key:"_populateFieldData",value:function(e,t){for(var r=this.getDatasetMetadataFields(),o=this._isMultiSchemaControl(t),n=[].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=o?{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));n.push(a)}}return n}},{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(ae(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(ae(this.controls,e)){var t=this.controls[e];if(this._isMultiSchemaControl(t))return!0}return!1}},{key:"_getDefaultSubControlValue",value:function(e,t,r,o){var n,i=o.subControls[e];return"undefined"!==h(i.dmDefault)?n=x(i,t,r):"undefined"!==h(i.valueDef.defaultValue)?(n=i.valueDef.defaultValue).parameterRef&&(n=this.getPropertyValue({name:n.parameterRef})):n=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),n}},{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=_f(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,o){var n=o;if(t&&Array.isArray(t[e.name]))try{for(var i=t[e.name],a=0;a<i.length;a++)n=$l(e,t[e.name][a].definition,r,n)}catch(t){y.warn("Error thrown in filter for propertyId ("+e.name+"): "+t)}return n}(e,this.filterDefinitions.controls,this,t)),t}},{key:"_filterSharedDataset",value:function(e,t){if(!this.sharedCtrlInfo||!e)return t;var r,o=e.name,n=[],i=Lf(this.sharedCtrlInfo);try{for(i.s();!(r=i.n()).done;){var a,s=r.value,l=Lf(s.controlNames);try{for(l.s();!(a=l.n()).done;){if(o===a.value.controlName){n=s.controlNames;break}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}var p=n.map(function(e){return e.controlName});return this.filterFieldsFromSharedProps(t,p,o)}},{key:"filterFieldsFromSharedProps",value:function(e,t,r){try{var o,n=[],i=Lf(t);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a!==r){var s=this.getControl({name:a}),l=this.getPropertyValue({name:a});if(Array.isArray(l)){var p,c=Lf(l);try{for(c.s();!(p=c.n()).done;){var u=p.value;if(Array.isArray(u)){var d=S(s);d>=0&&d<u.length&&n.push(v(u[d],s))}else n.push(v(u,s))}}catch(e){c.e(e)}finally{c.f()}}else n.push(v(l,s))}}}catch(e){i.e(e)}finally{i.f()}var h=Array.from(new Set(n));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 o=K(e);Array.isArray(o)||(o=[o]);for(var n=0;n<o.length;n++)o[n].name||(o[n].name=n.toString()),o[n].idx=n;var i,a=Lf(o);try{var s=function(){var e=i.value,t=o.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=Lf(o);try{for(p.s();!(l=p.n()).done;){var c=l.value;if(t.push(c.name),c.fields){var u,d=Lf(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=Lf(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){tp(e,this,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"validatePropertiesValues",value:function(){Zl(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),o=r.name;if(this.selectionListeners[o]||(this.selectionListeners[o]={}),Number.isInteger(r.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[o].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=gl(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 o={values:[],valueLabels:[]},n=function(e){o.values.push(r[e]);var n=r[e],i=t.values.findIndex(function(t){return t===r[e]});i>-1&&(n=t.valueLabels[i]),o.valueLabels.push(n)},i=0;i<r.length;i++)n(i);return o}return t}},{key:"updatePropertyValue",value:function(e,t,r,o){var n=this.convertPropertyId(e),i=this.getPropertyValue(n);if(void 0===t?this.removePropertyValue(n):this.propertiesStore.updatePropertyValue(n,t),function(e,t){var r=!0;if(!t.getControl(e))return y.warn("Control not found for "+e.name),r;var o=t.getDefinitions(e,Be.ALLOWCHANGE,Me.CONTROLS);if(o.length>0)try{var n,i=Jl(o);try{for(i.s();!(n=i.n()).done;)if(!(r=Wl(n.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(rp(e,this),r||tp(e,this,!0),this.handlers.propertyListener){var a=this._convertObjectStructure(n,t),s={action:Xe.UPDATE_PROPERTY,property:n,value:a,previousValue:i};void 0!==o&&(s.type=o),this.handlers.propertyListener(s)}}else this.propertiesStore.updatePropertyValue(n,i)}},{key:"getPropertyValue",value:function(e,t,o){var n,i=this.convertPropertyId(e),a=this.propertiesStore.getPropertyValue(i);n=Array.isArray(a)?a.map(function(e){return e}):a&&"object"===r(a)?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Af(Object(r),!0).forEach(function(t){Dr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Af(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},a):a;var s=o,l=t&&(t.filterHiddenDisabled||t.filterHidden),p=t&&(t.filterHiddenDisabled||t.filterDisabled),c=t&&t.filterHiddenControls;if(l||p||c){var u=this.getControlState(i),h=this.getControlType(i);if(u===_e.DISABLED&&p||u===_e.HIDDEN&&l||h===d.HIDDEN&&c)return s;if(s=O(a),Array.isArray(s))for(var f=0;f<s.length;f++){var m=s[f];if(Array.isArray(m))for(var v=0;v<m.length;v++){var y={name:i.name,row:f,col:v},g=this.getControlState(y),b=this.getControlType(y);(g===_e.DISABLED&&p||g===_e.HIDDEN&&l||b===d.HIDDEN&&c)&&(s[f][v]=null)}}return t&&!0===t.applyProperties?this._convertObjectStructure(i,s):s}return t&&!0===t.applyProperties?this._convertObjectStructure(i,a):n}},{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 o=r.structureType&&"object"===r.structureType;return U(r.valueDef.isList,r.subControls,t,o)}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 o={};for(var n in t)if(ae(t,n)){var i=this.getPropertyValue({name:n},e),a=Array.isArray(e.valueFilters)?e.valueFilters:[];void 0===i||a.includes(i)||(o[n]=i)}r=o}if(e&&!0===e.applyProperties)for(var s in r)if(ae(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,o=K(e);if(e){var n=this.getControls();Object.keys(o).forEach(function(t){if(F(n[t])){var r=e[t],i=n[t],a=V(i.valueDef.isList,i.subControls,r);o[t]=a}}),se(this.getPropertiesConfig(),"convertValueDataTypes")&&(o=H(o,n))}if(t&&t.setDefaultValues){var i={values:o,setDefaultValues:!0},a=this._addToControlValues(!1,!1,i);o=Ns(a,o)}if(this.propertiesStore.setPropertyValues(o),null!=t&&t.isInitProps||null!=t&&t.setDefaultValues){var s={};Jt(o)||(Object.keys(o).forEach(function(e){!function(e,t,r){if(!t.getControl(e))return y.warn("Control not found for "+e.name),null;var o=t.getDefinitions(e,Be.CONDITIONALDEFAULT,Me.CONTROLS);if(o.length>0)try{var n,i=Jl(o);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=a.definition.default_value.parameter_ref;s in r||Wl(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,s)}),Jt(s)||Object.keys(s).forEach(function(e){if(!(e in o)){var t=r.getControl({name:e});F(t)&&(s[e]=V(t.valueDef.isList,t.subControls,s[e])),r.propertiesStore.updatePropertyValue({name:e},s[e])}}))}ep(this),this.handlers.propertyListener&&this.handlers.propertyListener({action:Xe.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:"setCustomActions",value:function(e){this.customActions=e}},{key:"getCustomAction",value:function(e){var t=this.convertPropertyId(e.name);if(e.customActionId&&Array.isArray(this.customActions)){var r,o=Lf(this.customActions);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(n.id()===e.customActionId)try{return new n(t,this,e.data).renderAction()}catch(e){return y.warn("Error thrown creating custom action: "+e),""}}}catch(e){o.e(e)}finally{o.f()}}return"Custom action not found: "+e.customActionId}},{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],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=this.convertPropertyId(e);if(t){var i=this.getControlState(n),a=this.getControlType(n);if(i===_e.DISABLED||i===_e.HIDDEN||a===d.HIDDEN)return null}var s=this.propertiesStore.getErrorMessage(n,this.reactIntl);return r&&s&&s.type===Re.SUCCESS||o&&s&&!B(s.displayError)&&!s.displayError?null:s}},{key:"getErrorMessages",value:function(e,t,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=this.propertiesStore.getErrorMessages();return o&&(n=this._filterDisplayErrors(n)),(e||t)&&(n=this._filterMessages(n,e,t,r)),n}},{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,o){var n={},i=[];for(var a in e)if(ae(e,a)){var s=this.getErrorMessage({name:a},r,o);s&&s.text&&(t?i.push({id_ref:a,validation_id:s.validation_id,type:s.type,text:s.text}):n[a]=s)}return t?i:n}},{key:"_filterDisplayErrors",value:function(e){return this._filterErrors(e,function(e){return B(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 o=t.getControlState(r),n=t.getControlType(r);return o!==_e.HIDDEN&&o!==_e.DISABLED&&n!==d.HIDDEN})}},{key:"_filterErrors",value:function(e,t){var r={};return Object.keys(e).forEach(function(o){var n=e[o];if(n.text&&t(n,n.propertyId))r[o]=n;else for(var i in n)if(ae(n,i)){var a=n[i];if(a&&a.text&&t(a,a.propertyId))void 0===r[o]&&(r[o]={}),r[o][i]=a;else for(var s in a)if(ae(a,s)){var l=a[s];l&&l.text&&t(l,l.propertyId)&&(void 0===r[o]&&(r[o]={}),void 0===r[o][i]&&(r[o][i]={}),r[o][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(),o=r[t.name];if(void 0!==o){for(var n=0,i=Object.keys(o);n<i.length;n++){var a=i[n],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 o=this.propertiesStore.getErrorMessages(),n=o[e];if(void 0!==n){var i=n[t],a=n[r];if(void 0!==i&&void 0!==a){(o=this._moveMessageRows(o,e,t,r))[e][t]={};for(var s=0,l=Object.keys(a);s<l.length;s++){var p=l[s];o[e][t][p]=a[p]}}else void 0!==i?o=this._moveMessageRows(o,e,t,r):void 0!==a&&(o=this._moveMessageRows(o,e,r,t));this.setErrorMessages(o)}}},{key:"_moveMessageRows",value:function(e,t,r,o){return e[t][o]=e[t][r],delete e[t][r],e}},{key:"saveControls",value:function(e){var t=this;e.forEach(function(e){void 0===e.columnIndex?(!ae(t.controls,e.name)||ae(t.controls,e.name)&&e.controlType!==d.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===_e.DISABLED||t===_e.HIDDEN?null:this.custPropSumPanelValues[e.name]}},{key:"setControlInSummary",value:function(e,t,r){var o=this.getControl(e);o&&(o.summary=!0,o.summaryLabel=t)}},{key:"createControl",value:function(e,t,r){var o=se(this.getPropertiesConfig(),"containerType"),n=this.controlFactory.createFormControl(t,r,this.getLight(),o),i=[];return fl(i,n,this.getControl(e).parentCategoryId),this.saveControls(i),this.controlFactory.createControlItem(n,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 o,n=Lf(this.customControls);try{for(n.s();!(o=n.n()).done;){var i=o.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){n.e(e)}finally{n.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&&!B(r.addRemoveRows)){var o={name:r.name};e.setAddRemoveRows(o,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),o=this.getPropertyValue(e),n=t.sort();this.validateSelectionValues(n,o)&&this.propertiesStore.updateStaticRows(r,n)}},{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],o={name:r.name};B(r.buttons)||r.buttons.forEach(function(t){e.setTableButtonEnabled(o,t.id,t.enabled||!1)}),r.subControls&&e.setInitialTableButtonSubControlState(o,r.subControls)})}},{key:"setInitialTableButtonSubControlState",value:function(e,t){var r=this;t.forEach(function(t){var o=r.getPropertyValue(e);B(t.buttons)||o.forEach(function(o,n){var i={name:e.name,row:n,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}}])}(),Nf={$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:"Parameter Definitions",description:"Parameter 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}}},Pf={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#",description:"UI Hints schema",title:"UI Hints",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"},title_info:{type:"object",properties:{action_refs:{description:"List of actions to be displayed in the title section",type:"array",items:{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/operator_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:"UI Hint Parameter Definition",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","slider","code","list","hidden"]},increment:{description:"Determines the step value to increment/decrement for spinner and slider controls",type:"number",default:1},min_value:{description:"Determines the minimum value for the slider control only",type:"number",default:1},max_value:{description:"Determines the max value for the slider control only",type:"number",default:1},orientation:{description:"Determines how the control is displayed",type:"string",enum:["vertical","horizontal"]},width:{description:"A number as percentage of group width the control should use, or a string specifying the number of pixels wide the column should be.",oneOf:[{type:"number"},{type:"string"}]},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"},helper_text:{description:"Additional text to be displayed below the control",type:"object",$ref:"#/definitions/resource_definition"},read_only:{description:"Determines whether the control should be readonly or can be edited",type:"boolean"},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"},should_filter_item:{description:"Determines if a dropdown, outside of a table, can allow the dropdown items to be filtered by the custom value entered",type:"boolean",default:!1},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","custom"]},class_name:{description:"Optional class name to set for this action",type:"string"},label:{description:"Action label",type:"object",$ref:"#/definitions/resource_definition"},button:{description:"Properties for button kind and size. Use when control=button.",type:"object",properties:{kind:{description:"button kind",type:"string",enum:["primary","secondary","tertiary","ghost","danger","danger--tertiary","danger--ghost"],default:"tertiary"},size:{description:"button size",enum:["sm","md","lg","xl"],default:"sm"}}},image:{description:"Properties for how the image will look. Use when control=image.",type:"object",properties:{url:{description:"image url to be used for action",type:"string"},placement:{description:"placement of the action image",enum:["right","left"]},size:{description:"pixel size of the image.",type:"object",properties:{height:{description:"image height in pixels",type:"number"},width:{description:"image width in pixels",type:"number"}}},tooltip_direction:{description:"Action image tooltip direction.",enum:["right","left","top","bottom"],default:"bottom"}}},custom_action_id:{description:"Used to determine which custom action to use when control=custom.",type:"string"},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"},kind:{description:"The 'kind' of button to use. This must align with the 'kind' from Carbon buttons",type:"string",enum:["default","primary","danger","secondary","tertiary","ghost"],default:"ghost"}},anyOf:[{required:["id","label"]},{required:["id","icon","description"]},{required:["id","carbon_icon","description"]}]}}},xf={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#",title:"Conditions",description:"Conditions schema for the Common Properties editor",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"]}}},Bf={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#",title:"Operators",description:"Operators schema for the Common Properties editor",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/operator_complex_type_definition"}},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/operator_parameter_definition"}},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","operator_type","parameters"],definitions:{operator_parameter_definition:{description:"Operator parameters definition. Documented here - https://elyra-ai.github.io/canvas/04.01-parameter-definition/#parameter-definitions",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"]},operator_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/operator_parameter_definition"},parameters:{description:"List of parameters",type:"array",items:{anyOf:[{$ref:"#/definitions/operator_parameter_definition"},{$ref:"#/definitions/operator_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/operator_parameter_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/operator_complex_type_definition"}}}},app_data_def:{description:"Object containing application-specific data",type:"object",properties:{},additionalProperties:!0}}};function Mf(e){var t=function(){var e=new zo,t="https://api.dataplatform.ibm.com/schemas/common-canvas/",r="https://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(Nf,t+"parameter-defs/pipeline-flow-v3-schema.json"),e.addSchema(Pf,r+"operators/uihints-v3-schema.json"),e.addSchema(xf,r+"operators/conditions-v3-schema.json"),e.addSchema(Bf,r+"operators/operator-v3-schema.json"),e.addSchema(it,r+"datarecord-metadata/datarecord-metadata-v3-schema.json"),e}();!function(e,t,r,o){var n=o.validate(e,t,{nestedErrors:!0});n&&n.errors&&n.errors.length>0&&console.error(n)}(e,Nf,0,t)}function Ff(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ff=function(){return!!e})()}var Vf=function(){function l(e){var r;return t(this,l),r=function(e,t,r){return t=n(t),i(e,Ff()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,l,[e]),r.state={focused:!1,titleValidation:null},r.editTitleClickHandler=r.editTitleClickHandler.bind(r),r.helpClickHandler=r.helpClickHandler.bind(r),r.id=j(),r.textInputRef=a.createRef(),r.labelText=c(e.controller.getReactIntl(),Ie.TITLE_EDITOR_LABEL),r.textInputOnFocus=r.textInputOnFocus.bind(r),r.textInputOnBlur=r.textInputOnBlur.bind(r),r.headingEnabled=r.props.showHeading&&(r.props.heading||r.props.icon),r.handleTitleChange=r.handleTitleChange.bind(r),r.titleChangeHandler=r.props.controller.getHandlers().titleChangeHandler,r}return o(l,s),e(l,[{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 o=e.target.value;"function"==typeof this.titleChangeHandler&&this.titleChangeHandler(o,function(e){e&&"object"===r(e)&&e.type&&e.message?t.setState({titleValidation:e}):t.setState({titleValidation:null})}),this.props.setTitle(o)}},{key:"createTitleActions",value:function(){var e=this;if(this.props.titleInfo&&this.props.titleInfo.Title.actionIds().length>0){this.actionFactory=new Fi(this.props.controller);var t=[];return this.props.titleInfo.Title.actionIds().forEach(function(r,o){var n=e.props.controller.getAction({name:r}),i=e.actionFactory.generateAction("".concat(r,"-").concat(o),n);t.push(a.createElement("div",{className:"properties-title-editor-action-btn",key:"".concat(r,"-").concat(o)},i))}),a.createElement("div",{className:"properties-title-editor-actions"},t)}return null}},{key:"render",value:function(){var e=this;if(null===this.props.title)return null;var t=c(this.props.controller.getReactIntl(),Ie.TITLE_EDITOR_LABEL),r=c(this.props.controller.getReactIntl(),Ie.TITLE_EDITOR_HELPBUTTON_LABEL),o=c(this.props.controller.getReactIntl(),Ie.TITLE_EDITOR_DESCBUTTON_LABEL),n=c(this.props.controller.getReactIntl(),Ie.PROPERTIESEDIT_CLOSEBUTTON_LABEL),i=[Re.ERROR,Re.WARNING],s=se(this.state.titleValidation,"type",null)===Re.WARNING,l=se(this.state.titleValidation,"type",null)===Re.ERROR,p=!1===this.props.labelEditable||this.state.focused?a.createElement("div",null):a.createElement(ut,{kind:"ghost",className:"properties-title-editor-btn edit","data-id":"edit",onClick:this.editTitleClickHandler,tooltipPosition:"bottom",tooltipAlignment:"end",renderIcon:Er,size:"sm",iconDescription:t,hasIconOnly:!0}),u=function(){var t=e.props,n=t.showHeadingDesc,i=t.description,s=t.help;return n&&i?function(t){var n=e.props.description,i=t?a.createElement(Ht,null,a.createElement(bt,{className:"properties-title-editor-desc-btn desc-help",onClick:e.helpClickHandler,"data-id":"desc-help"},r)):null;return a.createElement(jt,{className:"properties-title-desc-tooltip",align:"bottom",autoAlign:!0},a.createElement(zt,{label:o},a.createElement($e,null)),a.createElement(qt,null,a.createElement("p",{className:"properties-title-editor-desc"},n),i))}(s):e.props.help?a.createElement(ut,{kind:"ghost",className:"properties-title-editor-btn help","data-id":"help",onClick:e.helpClickHandler,tooltipPosition:"bottom",renderIcon:$,size:"sm",iconDescription:r,hasIconOnly:!0}):null}(),d=this.props.closeHandler?a.createElement("div",{className:"properties-close-button"},a.createElement(ut,{kind:"ghost",size:"sm","data-id":"close",onClick:this.props.closeHandler,tooltipPosition:"left",renderIcon:zr,iconDescription:n,hasIconOnly:!0})):null,h=null;if(this.headingEnabled){var f=this.props.heading?a.createElement("div",{className:"properties-title-heading-label"},this.props.heading):null,m=this.props.icon&&"string"==typeof this.props.icon?a.createElement(Or,{className:"properties-title-heading-icon",src:this.props.icon,"aria-hidden":"true"}):null;(f||m)&&(h=a.createElement("div",{className:"properties-title-heading"},m,f,u))}return a.createElement("div",{className:Ee("properties-title-editor",{"properties-title-with-heading":this.headingEnabled},{"properties-title-right-flyout-tabs-view":this.props.rightFlyoutTabsView})},d,h,a.createElement("div",{className:Ee("properties-title-editor-input",{"properties-title-editor-with-help":(this.props.help||this.props.description)&&!this.headingEnabled&&!i.includes(se(this.state.titleValidation,"type")),"properties-title-editor-with-warning":s,"properties-title-editor-with-error":l})},a.createElement(kt,{level:this.props.controller.getLight()?1:0,className:"properties-title-editor-layer"},a.createElement(Et,_r({id:this.id,ref:this.textInputRef,value:this.props.title,onChange:this.handleTitleChange,onKeyDown:function(t){return e._handleKeyPress(t)},readOnly:!1===this.props.labelEditable,labelText:this.labelText,hideLabel:!0,size:"sm",onFocus:this.textInputOnFocus,onBlur:this.textInputOnBlur,invalid:l,invalidText:se(this.state.titleValidation,"message"),warn:s,warnText:se(this.state.titleValidation,"message")},this.state.focused&&{className:"properties-title-editor-focused"}))),i.includes(se(this.state.titleValidation,"type"))?null:p),this.headingEnabled||i.includes(se(this.state.titleValidation,"type"))?null:u,this.createTitleActions())}}])}(),Uf=Xt(function(e,t){return{title:e.componentMetadataReducer.title}},function(e,t){return{setTitle:function(t){e(zn(t))}}})(Vf),Hf='/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n:export {\n flyoutWidthSmall: 320px;\n flyoutWidthMedium: 480px;\n flyoutWidthLarge: 640px;\n flyoutWidthMax: 900px;\n}';function jf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 zf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function qf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qf=function(){return!!e})()}var Gf=parseInt(Hf.flyoutWidthSmall,10),Wf=parseInt(Hf.flyoutWidthMedium,10),$f=parseInt(Hf.flyoutWidthLarge,10),Xf=parseInt(Hf.flyoutWidthMax,10),Kf=function(r){function s(e){var r;t(this,s),r=function(e,t,r){return t=n(t),i(e,qf()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.commonProperties=a.createRef(),r.propertiesController=new Df,r.propertiesController.setPropertiesConfig(r.props.propertiesConfig),r.props.propertiesInfo.initialEditorSize&&r.propertiesController.setEditorSize(r.props.propertiesInfo.initialEditorSize),void 0!==e.customControls&&r.propertiesController.setCustomControls(e.customControls),r.propertiesController.setCustomActions(e.customActions),r.propertiesController.setConditionOps(e.customConditionOps),r.propertiesController.setLight(e.light),r.propertiesController.setAppData(e.propertiesInfo.appData),r.propertiesController.setExpressionInfo(e.propertiesInfo.expressionInfo),r.setCallbacks(),r.setForm(e.propertiesInfo,!1),r.previousErrorMessages={},r.propertiesController.validatePropertiesValues(!1),e.propertiesInfo.messages&&(r.propertiesController.validatePropertiesValues(!0),r.previousErrorMessages=r.propertiesController.getAllErrorMessages()),r.props.callbacks.propertyListener&&r.props.callbacks.propertyListener({action:Xe.PROPERTIES_LOADED}),r.currentParameters=r.propertiesController.getPropertyValues();var o=r.getEditorSize();return r.state={showPropertiesButtons:!0,editorSize:o,showResizeBtn:!0},r.applyPropertiesEditing=r.applyPropertiesEditing.bind(r),r.showPropertiesButtons=r.showPropertiesButtons.bind(r),r.updateEditorSize=r.updateEditorSize.bind(r),r.cancelHandler=r.cancelHandler.bind(r),r._getOverrideSize=r._getOverrideSize.bind(r),r._getResizeButton=r._getResizeButton.bind(r),r._isResizeButtonRequired=r._isResizeButtonRequired.bind(r),r.onBlur=r.onBlur.bind(r),r.detectResize=r.detectResize.bind(r),r.detectResizeThrottled=X(r.detectResize,500),r.resizeClicked=!1,r.lastPanelHeight=0,r}return o(s,r),e(s,[{key:"componentDidMount",value:function(){var e=this;this.resizeObserver=new ResizeObserver(function(t){var r,o=jf(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;e.detectResizeThrottled(n.contentRect,n.target)}}catch(e){o.e(e)}finally{o.f()}}),this.commonProperties.current&&this.resizeObserver.observe(this.commonProperties.current),this.props.callbacks.setPropertiesHasMounted()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(this.props.light!==e.light&&this.propertiesController.setLight(e.light),e.propertiesInfo&&(!D(Object.keys(e.propertiesInfo),Object.keys(this.props.propertiesInfo))||e.propertiesInfo.parameterDef&&!D(e.propertiesInfo.parameterDef,this.props.propertiesInfo.parameterDef)||e.propertiesInfo.appData&&!D(e.propertiesInfo.appData,this.props.propertiesInfo.appData))){var t=e.propertiesInfo.id===this.props.propertiesInfo.id;this.setForm(e.propertiesInfo,t);var r=this.propertiesController.getForm().editorSize;this.state.editorSize!==r&&this.setState({editorSize:r}),e.propertiesInfo.id&&!t&&(this.currentParameters=this.propertiesController.getPropertyValues()),this.propertiesController.setAppData(e.propertiesInfo.appData),void 0!==e.customControls&&this.propertiesController.setCustomControls(e.customControls),this.propertiesController.setCustomActions(e.customActions),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:"componentDidUpdate",value:function(e){D(e.callbacks,this.props.callbacks)||this.setCallbacks()}},{key:"componentWillUnmount",value:function(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}},{key:"onBlur",value:function(e){var t;!this.props.propertiesConfig.applyOnBlur||null!==(t=this.commonProperties)&&void 0!==t&&null!==(t=t.current)&&void 0!==t&&t.contains(e.relatedTarget)||this.propertiesController.isSummaryPanelShowing()||this.propertiesController.isSubPanelsShowing()||this.applyPropertiesEditing(!1)}},{key:"setCallbacks",value:function(){this.propertiesController.setHandlers({controllerHandler:this.props.callbacks.controllerHandler,propertyListener:this.props.callbacks.propertyListener,actionHandler:this.props.callbacks.actionHandler,customHeaderHandler:this.props.callbacks.customHeaderHandler,buttonHandler:this.props.callbacks.buttonHandler,buttonIconHandler:this.props.callbacks.buttonIconHandler,validationHandler:this.props.callbacks.validationHandler,titleChangeHandler:this.props.callbacks.titleChangeHandler,tooltipLinkHandler:this.props.callbacks.tooltipLinkHandler,propertyIconHandler:this.props.callbacks.propertyIconHandler,filterItemsHandler:this.props.callbacks.filterItemsHandler,panelTitleHandler:this.props.callbacks.panelTitleHandler})}},{key:"setForm",value:function(e,t){var r=null;e.parameterDef&&(this.props.propertiesConfig.schemaValidation&&Mf(e.parameterDef),r=Ka.makeForm(e.parameterDef,this.props.propertiesConfig.containerType)),this.propertiesController.setForm(r,this.props.intl,t),r&&(this.originalTitle=r.label),this.initialValueInfo={additionalInfo:{messages:[]},undoInfo:{}},this.uiParameterKeys=this._getUiOnlyKeys(),this.initialValueInfo=this._setValueInforProperties(this.initialValueInfo),e.messages&&(this.initialValueInfo.additionalInfo.messages=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:c(this.props.intl,Ie.PROPERTIESEDIT_APPLYBUTTON_LABEL)}},{key:"getRejectButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.secondary?this.props.propertiesConfig.buttonLabels.secondary:c(this.props.intl,Ie.PROPERTIESEDIT_REJECTBUTTON_LABEL)}},{key:"getPropertiesActionLabel",value:function(){if(this.props.callbacks.propertiesActionLabelHandler){var e=this.props.callbacks.propertiesActionLabelHandler();if(e)return e}return c(this.props.intl,Ie.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!==l.SMALL||t!==l.LARGE&&t!==l.MAX)&&(e!==l.MEDIUM||t!==l.SMALL&&t!==l.MAX)&&(e!==l.LARGE||t!==l.SMALL&&t!==l.MEDIUM)?e===l.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===l.SMALL?this.state.editorSize===l.SMALL&&e.min?r=e.min:this.state.editorSize===l.MEDIUM&&e.max&&(r=e.max):t===l.MEDIUM?this.state.editorSize===l.MEDIUM&&e.min?r=e.min:this.state.editorSize===l.LARGE&&e.max&&(r=e.max):t===l.LARGE?this.state.editorSize===l.LARGE&&e.min?r=e.min:this.state.editorSize===l.MAX&&e.max&&(r=e.max):t===l.MAX&&e.max&&(r=e.max)),r}},{key:"_getResizeButton",value:function(){var e=a.createElement(yr,{type:Ae.CHEVRONARROWS.LEFT,className:"properties-resize-caret-left"});return this.propertiesController.getForm().editorSize===l.SMALL?this.state.editorSize===l.MEDIUM&&(e=a.createElement(yr,{type:Ae.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===l.MEDIUM?this.state.editorSize===l.LARGE&&(e=a.createElement(yr,{type:Ae.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===l.LARGE&&this.state.editorSize===l.MAX&&(e=a.createElement(yr,{type:Ae.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===l.SMALL){if(e.min&&!e.max&&e.min>=Wf)return y.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+Wf),!1;if(!e.min&&e.max&&e.max<=Gf)return y.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+Gf),!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===l.MEDIUM){if(e.min&&!e.max&&e.min>=$f)return y.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+$f),!1;if(!e.min&&e.max&&e.max<=Wf)return y.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+Wf),!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===l.LARGE){if(e.min&&!e.max&&e.min>=Xf)return y.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+Xf),!1;if(!e.min&&e.max&&e.max<=$f)return y.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+$f),!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===l.MAX)return!!e.min&&(y.warn("No resize button shown. Pixel width min size ignored."),!1)}else if(this.propertiesController.getForm().editorSize===l.MAX)return!1;return!0}return!1}},{key:"_setValueInforProperties",value:function(e,t){var r=t&&!0===t.applyProperties,o=this.props.propertiesConfig.conditionReturnValueHandling===Ye.NULL,n=this.propertiesController.getPropertyValues({filterHiddenDisabled:o,applyProperties:r,valueFilters:this.props.propertiesConfig.returnValueFiltering});return this.uiParameterKeys.length>0?(e.properties=at(n,this.uiParameterKeys),e.uiProperties=Yo(n,this.uiParameterKeys)):e.properties=n,e}},{key:"_getUiOnlyKeys",value:function(){var e=[],t=this.propertiesController.getControls();if(Object.keys(t).length>0)for(var r in t){if(ae(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 o=this.propertiesController.getErrorMessages(!0,!0,!0,!1);o&&(r.additionalInfo.messages=o),r.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.propertiesController.getTitle()&&(r.additionalInfo.title=this.propertiesController.getTitle());var n=this.getPropertiesActionLabel(),i=new Qa(r,this.initialValueInfo,this.props.propertiesInfo.appData,this.props.callbacks.applyPropertyChanges,n);this.propertiesController.getCommandStack().do(i),this.currentParameters=this.propertiesController.getPropertyValues(),this.initialValueInfo=K(r),this.previousErrorMessages=this.propertiesController.getAllErrorMessages()}e&&this.cancelHandler(Je)}},{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.resizeClicked=!0,this.propertiesController.getForm().editorSize===l.SMALL?this.state.editorSize===l.SMALL?this.updateEditorSize(l.MEDIUM):this.updateEditorSize(l.SMALL):this.propertiesController.getForm().editorSize===l.MEDIUM?this.state.editorSize===l.MEDIUM?this.updateEditorSize(l.LARGE):this.updateEditorSize(l.MEDIUM):this.propertiesController.getForm().editorSize===l.LARGE&&(this.state.editorSize===l.LARGE?this.updateEditorSize(l.MAX):this.updateEditorSize(l.LARGE))}},{key:"detectResize",value:function(e,t){e.height===this.lastPanelHeight&&(this.resizeClicked||this.setState({showResizeBtn:!1}),this.resizeClicked=!1),this.lastPanelHeight=e.height}},{key:"render",value:function(){var e=this.props.propertiesConfig.applyOnBlur&&this.props.propertiesConfig.rightFlyout,t=this.cancelHandler.bind(this,Qe);e&&(t=null);var r=this.getApplyButtonLabel(),o=this.getRejectButtonLabel(),n=this.propertiesController.getTitle(),i=this.propertiesController.getForm();if(null!==i){var s=[],l=a.createElement("div",null),p=a.createElement("div",null),u=null,d=!1;if(this.props.propertiesConfig.rightFlyout&&(l=a.createElement(Uf,{labelEditable:i.labelEditable,help:i.help,description:i.description,controller:this.propertiesController,helpClickHandler:this.props.callbacks.helpClickHandler,closeHandler:e?this.applyPropertiesEditing.bind(this,!0):null,icon:i.icon,heading:i.heading,showHeading:this.props.propertiesConfig.heading,showHeadingDesc:this.props.propertiesConfig.showHeadingDesc,titleInfo:i.title,rightFlyoutTabsView:this.props.propertiesConfig.categoryView===De.TABS}),d=this.props.propertiesConfig.heading&&(i.icon||i.heading),p=a.createElement(an,{controller:this.propertiesController,okHandler:e?null:this.applyPropertiesEditing.bind(this,!0),cancelHandler:t,applyLabel:r,rejectLabel:o,showPropertiesButtons:this.state.showPropertiesButtons,disableSaveOnRequiredErrors:this.props.propertiesConfig.disableSaveOnRequiredErrors}),this._isResizeButtonRequired()&&this.state.showResizeBtn)){var h=this._getResizeButton(),f=h.props&&"properties-resize-caret-left"===h.props.className?c(this.props.intl,Ie.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL):c(this.props.intl,Ie.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);u=a.createElement(ut,{kind:"ghost",className:"properties-btn-resize",onClick:this.resize.bind(this),"aria-label":f},h)}var m=a.createElement(qi,{key:"editor-form-key",controller:this.propertiesController,additionalComponents:this.props.propertiesInfo.additionalComponents,showPropertiesButtons:this.showPropertiesButtons,customPanels:this.props.customPanels,rightFlyout:this.props.propertiesConfig.rightFlyout,categoryView:this.props.propertiesConfig.categoryView,showAlertsTab:!1!==this.props.propertiesConfig.showAlertsTab});s="Editing"===this.props.propertiesConfig.containerType?a.createElement(rn,{applyLabel:r,rejectLabel:o,bsSize:this.state.editorSize,title:n,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:t,showPropertiesButtons:this.state.showPropertiesButtons},m):"Custom"===this.props.propertiesConfig.containerType?a.createElement("div",{className:Ee("properties-custom-container",{"properties-custom-container-with-heading":!e&&d,"properties-custom-container-applyOnBlur":e&&!d,"properties-custom-container-applyOnBlur-with-heading":e&&d})},m):"Tearsheet"===this.props.propertiesConfig.containerType?a.createElement(pn,{open:!0,onCloseCallback:this.props.propertiesConfig.applyOnBlur?this.applyPropertiesEditing.bind(this,!0):null,tearsheet:{title:n,content:m},applyLabel:r,rejectLabel:o,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:t,showPropertiesButtons:this.state.showPropertiesButtons,applyOnBlur:this.props.propertiesConfig.applyOnBlur,controller:this.propertiesController,disableSaveOnRequiredErrors:this.props.propertiesConfig.disableSaveOnRequiredErrors}):a.createElement(Zo,{onHide:this.props.callbacks.closePropertiesDialog,title:n,bsSize:this.state.editorSize,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:t,showPropertiesButtons:this.state.showPropertiesButtons,applyLabel:r,rejectLabel:o},m);var v="properties-".concat(this.state.editorSize),y=this._getOverrideSize(),g=null;null!==y&&(v="properties-custom-size",g={width:y+"px"});var b=Ee("properties-wrapper",{"properties-right-flyout":this.props.propertiesConfig.rightFlyout,"properties-light-enabled":this.props.light,"properties-light-disabled":!this.props.light},v);return a.createElement(Kt,{store:this.propertiesController.getStore()},a.createElement("div",{className:"properties-right-flyout-container"},a.createElement("aside",{"aria-label":c(this.props.intl,Ie.PROPERTIES_LABEL,{label:n}),role:"region",ref:this.commonProperties,className:b,onBlur:this.onBlur,style:g},l,s,p),u))}return a.createElement("div",null)}}])}(a.Component),Yf=Wt(Kf,{forwardRef:!0});function Jf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jf=function(){return!!e})()}var Qf=function(r){function s(e){var r;return t(this,s),r=function(e,t,r){return t=n(t),i(e,Jf()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}(this,s,[e]),r.state={hasError:!1,error:null,info:null},r.createPropertiesMainComponent=r.createPropertiesMainComponent.bind(r),r.revertState=r.revertState.bind(r),r.propertiesMainHasMounted=!1,r.setPropertiesHasMounted=r.setPropertiesHasMounted.bind(r),r.applyPropertiesEditing=r.applyPropertiesEditing.bind(r),r}return o(s,r),e(s,[{key:"componentDidCatch",value:function(e,t){console.error(e),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}),a.createElement(Yf,{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,customActions:this.props.customActions,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:c(this.props.intl,Ie.PROPERTIES_UNEXPECTED_MESSAGE),type:"error"},o=a.createElement("div",{className:"properties-error-heading"},a.createElement(Np,{messageInfo:r})),n=c(this.props.intl,Ie.PROPERTIES_SUPPORT_MESSAGE),i=c(this.props.intl,Ie.PROPERTIESEDIT_CLOSEBUTTON_LABEL),s=this.props.callbacks.closePropertiesDialog,l=c(this.props.intl,Ie.PROPERTIESEDIT_REVERTBUTTON_LABEL),u=this.revertState,d=c(this.props.intl,Ie.PROPERTIES_ERROR_LABEL);return"Custom"===this.props.propertiesConfig.containerType?(!0===this.propertiesMainHasMounted?(e=c(this.props.intl,Ie.PROPERTIES_REVERT_MESSAGE),t=a.createElement("div",{className:"properties-modal-buttons"},a.createElement(p,{className:"properties-error-display-close-button",okHandler:s,cancelHandler:u,showPropertiesButtons:!0,applyLabel:i,rejectLabel:l}))):(e=c(this.props.intl,Ie.PROPERTIES_CLOSE_MESSAGE),t=a.createElement("div",{className:"properties-modal-buttons"},a.createElement(p,{className:"properties-error-display-close-button",okHandler:s,showPropertiesButtons:!0,applyLabel:i}))),this.props.propertiesConfig.rightFlyout?a.createElement("aside",{"aria-label":d,role:"region",className:"properties-wrapper properties-right-flyout properties-small"},a.createElement("div",{className:"properties-flyout-error-container"},o,a.createElement("br",null),a.createElement("br",null),a.createElement("div",{className:"properties-error-content"},e,a.createElement("br",null),n)),t):a.createElement("aside",{"aria-label":d,role:"region",className:"properties-wrapper properties-custom-container"},a.createElement("div",{className:"properties-flyout-error-container"},o,a.createElement("br",null),a.createElement("br",null),a.createElement("div",{className:"properties-error-content"},e,a.createElement("br",null),n)),t)):(!0===this.propertiesMainHasMounted?(e=c(this.props.intl,Ie.PROPERTIES_REVERT_MESSAGE),t=a.createElement(Zo,{bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:l,okHandler:s,cancelHandler:u,title:o},a.createElement("div",{className:"properties-modal-container properties-error-content"},e,a.createElement("br",null),n))):(e=c(this.props.intl,Ie.PROPERTIES_CLOSE_MESSAGE),t=a.createElement("div",{className:"properties-modal-error"},a.createElement(Zo,{okHandler:s,bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:"null",title:o},a.createElement("div",{className:"properties-modal-container properties-error-content"},e,a.createElement("br",null),n)))),t)}},{key:"render",value:function(){return this.state.hasError?this.displayAppropriateUIFallback():this.createPropertiesMainComponent()}}])}(a.Component);Qf.defaultProps={propertiesConfig:{containerType:"Custom",rightFlyout:!0,categoryView:De.ACCORDIONS,applyOnBlur:!1,trimSpaces:!0,disableSaveOnRequiredErrors:!1,enableResize:!0,conditionReturnValueHandling:"value",schemaValidation:!1,applyPropertiesWithoutEdit:!1,maxLengthForMultiLineControls:1024,maxLengthForSingleLineControls:128,convertValueDataTypes:!1,showRequiredIndicator:!0,showAlertsTab:!0,locale:Ke,enableTanstackTable:!1},callbacks:{},light:!0};var Zf=Wt(Qf,{forwardRef:!0});export{Ka as F,Df as P,Zf as c};
2
+ //# sourceMappingURL=common-properties-dcfb5ebe.js.map