@genesislcap/design-system-configurator 15.24.1 → 15.25.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.
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[122],{41492(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(a,r,s){var o=r.prototype;s.utc=function(e){return new r({date:e,utc:!0,args:arguments})},o.utc=function(t){var i=s(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},o.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var n=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),n.call(this,e)};var l=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var d=o.utcOffset;o.utcOffset=function(a,r){var s=this.$utils().u;if(s(a))return this.$u?0:s(this.$offset)?d.call(this):this.$offset;if("string"==typeof a&&(a=function(e){void 0===e&&(e="");var a=e.match(t);if(!a)return null;var r=(""+a[0]).match(i)||["-",0,0],s=r[0],o=60*+r[1]+ +r[2];return 0===o?0:"+"===s?o:-o}(a),null===a))return this;var o=Math.abs(a)<=16?60*a:a;if(0===o)return this.utc(r);var n=this.clone();if(r)return n.$offset=o,n.$u=!1,n;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(o+l,e)).$offset=o,n.$x.$localOffset=l,n};var g=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var c=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=o.diff;o.diff=function(e,t,i){if(e&&this.$u===e.$u)return h.call(this,e,t,i);var a=this.local(),r=s(e).local();return h.call(a,r,t,i)}}}()},48049(e,t,i){"use strict";i.r(t),i.d(t,{AG_BOOLEAN_PROPERTIES:()=>ht.ME,AG_NUMBER_PROPERTIES:()=>ht.LB,AG_PROPERTIES:()=>ht.zI,ActionRenderer:()=>R.eA,ActionsMenuRenderer:()=>k.cN,AgGridCSSVars:()=>s.W3,AgGridTheme:()=>s.mJ,AgTextFieldRenderer:()=>Jt.p8,AgTextRenderer:()=>xt.t,BooleanRenderer:()=>O._Y,CellTemplate:()=>Qt.x,ColumnTemplate:()=>Zt.R,DARK_BACKGROUND_HEX:()=>le,DARK_BORDER_HEX:()=>de,DARK_FOREGROUND_HEX:()=>oe,DARK_HEADER_FOREGROUND_HEX:()=>ne,DARK_ROW_HOVER_HEX:()=>ge,DEBOUNCED_RESIZE_TIME:()=>ht.BW,DEFAULT_STATUS_BAR_CONFIG:()=>s.o2,DISPLAY_NONE_CLASS:()=>Nt,DatasourceRowMatchTracker:()=>ii,DateEditor:()=>f.S8,EDITED_COLUMN_FIELD:()=>s.A7,ERROR_COLUMN_FIELD:()=>s.h1,EditableRenderer:()=>L.YM,EnumColumnFilter:()=>Ue,EnumColumnFloatingFilter:()=>je,ErrorTooltip:()=>bt.y,GRID_READY_EVENT:()=>s.mr,GenesisGridDatasourceElement:()=>at.yu,GridOptionsConfig:()=>s.lz,GridPro:()=>r.cF,GridProBaseDatasource:()=>at.ML,GridProBeta:()=>wt,GridProCaseType:()=>s.uA,GridProCell:()=>Me.O,GridProClientSideDatasource:()=>qe.L,GridProColumn:()=>_e.G,GridProFilterTypes:()=>De,GridProGenesisDatasource:()=>ct.D,GridProInfiniteDatasource:()=>dt,GridProRendererTypes:()=>s.IX,GridProServerSideDatasource:()=>Ye.X,GridProStatusBarTypes:()=>s.k7,IconRenderer:()=>P.Jt,KVStorageStatePersistence:()=>Ai,LIGHT_BACKGROUND_HEX:()=>ue,LIGHT_BORDER_HEX:()=>pe,LIGHT_FOREGROUND_HEX:()=>ce,LIGHT_HEADER_FOREGROUND_HEX:()=>he,LIGHT_ROW_HOVER_HEX:()=>me,LabelValueStatusBarComponent:()=>pt.k,LoadMoreStatusBarComponent:()=>mt.s,LocalStorageStatePersistence:()=>ki.H,MulticolumnDropdown:()=>qt,MultiselectEditor:()=>p.pZ,NumberEditor:()=>c.Z0,OperationType:()=>at.S5,ROW_MATCH_ALERT_CELL_CLASS:()=>ai.mJ,ROW_MATCH_ALERT_CLASS:()=>ai.Xm,RapidAgActionRenderer:()=>E,RapidAgActionsMenuRenderer:()=>D,RapidAgSelectRenderer:()=>N,RapidAgTextRenderer:()=>Ot,RapidBooleanRenderer:()=>T,RapidDateEditor:()=>b,RapidEditableRenderer:()=>F,RapidGridPro:()=>Re,RapidGridProBeta:()=>kt,RapidIconRenderer:()=>M,RapidMultiselectEditor:()=>m,RapidNumberEditor:()=>h,RapidSelectEditor:()=>d,RapidStatusPillRenderer:()=>z,RapidStringEditor:()=>S,ReloadStatusBarComponent:()=>vt.W,RowCountStatusBarComponent:()=>ft.i,SelectEditor:()=>l._Q,SelectRenderer:()=>$.gs,StatePersistence:()=>ut.l,StatusPillRenderer:()=>B.N7,StringEditor:()=>y.XJ,actionHeightMultiplier:()=>R.Fz,agActionRendererStyles:()=>R.AC,agBooleanRendererStyles:()=>O.CL,agDateEditorStyles:()=>f.kI,agDragGhostShadowDomStyles:()=>U.yK,agEditableRendererStyles:()=>L.Mx,agExternalStockStyles:()=>ri.Kp,agGridAlpineFontFace:()=>ri.KX,agGridBalhamFontFace:()=>ri.c_,agGridCSS:()=>ri.AT,agGridMaterialFontFace:()=>ri.Id,agHeadCSS:()=>ri.g4,agIconRendererStyles:()=>P.X5,agMultiselectEditorStyles:()=>p.$b,agNumberEditorStyles:()=>c.Fv,agSelectEditorStyles:()=>l.Uo,agSelectRendererStyles:()=>$.Ad,agStatusPillRendererStyles:()=>B.x2,agStringEditorStyles:()=>y.P_,agThemeAlpineNofontsCSS:()=>ri.lJ,agThemeBalhamNofontsCSS:()=>ri.HC,agThemeFontFaceMap:()=>ri.KE,agThemeFontsId:()=>s.b7,agThemeGenesisRapid:()=>Y,agThemeGenesisRapidDark:()=>Q,agThemeGenesisRapidLight:()=>Z,agThemeGenesisRapidTokens:()=>Ce,agThemeMaterialCustomTokens:()=>Ti,agThemeMaterialNofontsCSS:()=>ri.DX,agThemeTokenMapCSS:()=>s.Kb,agThemeTokenMapClassname:()=>s.eL,backgroundSwatch:()=>Di,baseDatasourceEventNames:()=>gt.L,convertColDefToColumnState:()=>yt.pr,convertColDefsToColumnStates:()=>yt.rG,convertDateFilterToCriteria:()=>ot.A0,convertFilterModelToCriteria:()=>ot.P4,convertNumberFilterToCriteria:()=>ot.X_,convertSetFilterToCriteria:()=>ot.EC,convertTextFilterToCriteria:()=>ot.zP,convertToKebabCase:()=>Ct.w,copyAttributesToGridOptions:()=>ht.Qg,createEnumValueLabelFormatter:()=>He,createRowAlert:()=>ui,createRowMatchCellClassRules:()=>ai.Li,createRowMatchClassRules:()=>ai.PO,criteriaDelimiter:()=>at.NC,criteriaJoin:()=>at.W_,csvExportParams:()=>Fi,darkColors:()=>ve,datasourceEventNames:()=>it.c,dateTimeValueFormatter:()=>ht.XV,dateValueFormatter:()=>ht.sL,defaultAgGridFontFace:()=>ri.qh,defaultGridOptionsConfig:()=>s.YO,defaultGridProConfig:()=>r.Z$,defaultRowAlertColorPresets:()=>oi,defaultRowAlertPreferences:()=>di,defaultRowAlertRatePresets:()=>ni,defaultRowAlertScopePresets:()=>li,deriveHeightsFromTokens:()=>ye,dropdownWidthVar:()=>_t,errorHandlerDialogStyles:()=>ei.B,extractErrorMessage:()=>Ii.P,foregroundSwatch:()=>xi,formatDateExtra:()=>ht.mC,formatEnumFilterModelAsString:()=>Be,foundationAgBooleanRenderer:()=>O.fg,foundationAgEditableRenderer:()=>L.r8,foundationAgSelectRenderer:()=>$.bE,foundationAgTextFieldRenderer:()=>Jt.wG,foundationAgTextRenderer:()=>xt.G4,foundationDateEditor:()=>f.vr,foundationGridComponents:()=>si,foundationGridPro:()=>r.RB,foundationGridProActionRenderer:()=>R._X,foundationGridProActionsMenuRenderer:()=>k.su,foundationGridProShadowOptions:()=>r.LU,foundationGridProStyles:()=>U.XF,foundationIconRenderer:()=>P.qN,foundationMulticolumnDropdown:()=>Yt,foundationMultiselectEditor:()=>p.UH,foundationNumberEditor:()=>c.CY,foundationSelectEditor:()=>l.RU,foundationStatusPillRenderer:()=>B.a1,foundationStringEditor:()=>y.cb,getActionsMenuDef:()=>k.Al,getAgBooleanRendererTemplate:()=>O.A9,getAgEditableRendererTemplate:()=>L.iP,getAvailableIndexFields:()=>Li.P,getAvailableIndexes:()=>Li.i,getColumnType:()=>ht.nh,getDateEditorTemplate:()=>f.m6,getEnumFilterParams:()=>ht.O7,getErrorHandlerDialogTemplate:()=>ei.P,getGridProTemplate:()=>te.U,getIconRendererTemplate:()=>P.V$,getMulticolumnDropdownTemplate:()=>Vt,getMultiselectEditorTemplate:()=>p.tB,getNumberEditorTemplate:()=>c.r1,getSelectEditorTemplate:()=>l.iY,getSelectRendererTemplate:()=>$.qj,getStatusPillRendererTemplate:()=>B.T2,getStringEditorTemplate:()=>y.bZ,getTextFieldRendererTemplate:()=>Jt.tm,getTextRendererTemplate:()=>xt.d6,gridProColumns:()=>$e.T,gridProErrorNames:()=>ht.Ie,gridProEventNames:()=>ht.yY,gridProGenesisDatasourceEventNames:()=>tt.V,gridProTemplate:()=>te.a,lightColors:()=>fe,logger:()=>Ne.v,matchesRowCriteria:()=>ti.D,mergeAndDedupColDefWithColumnState:()=>yt.yS,multicolumnDropdownStyles:()=>Ht,multicolumnDropdownTemplate:()=>Ut,normalizeRowAlertPreferences:()=>gi,optionsClass:()=>$t,rapidAgActionRenderer:()=>A,rapidAgActionsMenuRenderer:()=>x,rapidAgBooleanRenderer:()=>I,rapidAgDateEditor:()=>C,rapidAgEditableRenderer:()=>G,rapidAgMultiselectEditor:()=>v,rapidAgNumberEditor:()=>u,rapidAgSelectEditor:()=>g,rapidAgSelectRenderer:()=>H,rapidAgStringEditor:()=>w,rapidAgTextRenderer:()=>Tt,rapidDefaultGridProConfig:()=>Ae,rapidGridComponents:()=>It,rapidGridPro:()=>ke,rapidGridProBeta:()=>Dt,rapidGridProShadowOptions:()=>Ee,rapidGridProStyles:()=>ee,rapidGridProTemplate:()=>ie,rapidIconRenderer:()=>_,rapidMulticolumnDropdown:()=>Wt,rapidStatusPillRenderer:()=>V,resolveVisibleColumnFields:()=>$e.C,rowMatchAlertStyles:()=>U.em,sanitizeColumnState:()=>yt.n7,textFieldRendererStyles:()=>Jt.zS,textRendererStyles:()=>xt.JN,themeGenesisRapid:()=>q,themeGenesisRapidDark:()=>W,themeGenesisRapidLight:()=>J,wasClickOutsideElement:()=>Xt});var a=i(55823),r=i(51266),s=i(55365),o=i(54634),n=i(33681),l=i(48075);class d extends l._Q{}const g=d.compose({baseName:"select-editor",styles:l.Uo,template:(0,l.iY)("rapid")});var c=i(48072);class h extends c.Z0{}const u=h.compose({baseName:"number-editor",styles:c.Fv,template:(0,c.r1)("rapid")});var p=i(56182);class m extends p.pZ{}const v=m.compose({baseName:"multiselect-editor",styles:p.$b,template:(0,p.tB)("rapid")});var f=i(49255);class b extends f.S8{}const C=b.compose({baseName:"date-editor",styles:f.kI,template:(0,f.m6)("rapid")});var y=i(43352);class S extends y.XJ{}const w=S.compose({baseName:"string-editor",styles:y.P_,template:(0,y.bZ)("rapid")});var R=i(67489);class E extends R.eA{paramsChanged(e,t){(null==t?void 0:t.node.rowHeight)&&this.style.setProperty("--params-row-node-height",`${t.node.rowHeight}px`,"")}}const A=E.compose({baseName:"grid-pro-action-renderer",styles:n.css`
1
+ (self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[122],{41492(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(a,r,s){var o=r.prototype;s.utc=function(e){return new r({date:e,utc:!0,args:arguments})},o.utc=function(t){var i=s(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},o.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var n=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),n.call(this,e)};var l=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var d=o.utcOffset;o.utcOffset=function(a,r){var s=this.$utils().u;if(s(a))return this.$u?0:s(this.$offset)?d.call(this):this.$offset;if("string"==typeof a&&(a=function(e){void 0===e&&(e="");var a=e.match(t);if(!a)return null;var r=(""+a[0]).match(i)||["-",0,0],s=r[0],o=60*+r[1]+ +r[2];return 0===o?0:"+"===s?o:-o}(a),null===a))return this;var o=Math.abs(a)<=16?60*a:a;if(0===o)return this.utc(r);var n=this.clone();if(r)return n.$offset=o,n.$u=!1,n;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(o+l,e)).$offset=o,n.$x.$localOffset=l,n};var g=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var c=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=o.diff;o.diff=function(e,t,i){if(e&&this.$u===e.$u)return h.call(this,e,t,i);var a=this.local(),r=s(e).local();return h.call(a,r,t,i)}}}()},48049(e,t,i){"use strict";i.r(t),i.d(t,{AG_BOOLEAN_PROPERTIES:()=>ht.ME,AG_NUMBER_PROPERTIES:()=>ht.LB,AG_PROPERTIES:()=>ht.zI,ActionRenderer:()=>R.eA,ActionsMenuRenderer:()=>k.cN,AgGridCSSVars:()=>s.W3,AgGridTheme:()=>s.mJ,AgTextFieldRenderer:()=>Jt.p8,AgTextRenderer:()=>xt.t,BooleanRenderer:()=>O._Y,CellTemplate:()=>Qt.x,ColumnTemplate:()=>Zt.R,DARK_BACKGROUND_HEX:()=>le,DARK_BORDER_HEX:()=>de,DARK_FOREGROUND_HEX:()=>oe,DARK_HEADER_FOREGROUND_HEX:()=>ne,DARK_ROW_HOVER_HEX:()=>ge,DEBOUNCED_RESIZE_TIME:()=>ht.BW,DEFAULT_STATUS_BAR_CONFIG:()=>s.o2,DISPLAY_NONE_CLASS:()=>Nt,DatasourceRowMatchTracker:()=>ii,DateEditor:()=>f.S8,EDITED_COLUMN_FIELD:()=>s.A7,ERROR_COLUMN_FIELD:()=>s.h1,EditableRenderer:()=>L.YM,EnumColumnFilter:()=>Ue,EnumColumnFloatingFilter:()=>je,ErrorTooltip:()=>bt.y,GRID_READY_EVENT:()=>s.mr,GenesisGridDatasourceElement:()=>at.yu,GridOptionsConfig:()=>s.lz,GridPro:()=>r.cF,GridProBaseDatasource:()=>at.ML,GridProBeta:()=>wt,GridProCaseType:()=>s.uA,GridProCell:()=>Me.O,GridProClientSideDatasource:()=>qe.L,GridProColumn:()=>_e.G,GridProFilterTypes:()=>De,GridProGenesisDatasource:()=>ct.D,GridProInfiniteDatasource:()=>dt,GridProRendererTypes:()=>s.IX,GridProServerSideDatasource:()=>Ye.X,GridProStatusBarTypes:()=>s.k7,IconRenderer:()=>P.Jt,KVStorageStatePersistence:()=>Ai,LIGHT_BACKGROUND_HEX:()=>ue,LIGHT_BORDER_HEX:()=>pe,LIGHT_FOREGROUND_HEX:()=>ce,LIGHT_HEADER_FOREGROUND_HEX:()=>he,LIGHT_ROW_HOVER_HEX:()=>me,LabelValueStatusBarComponent:()=>pt.k,LoadMoreStatusBarComponent:()=>mt.s,LocalStorageStatePersistence:()=>ki.H,MulticolumnDropdown:()=>qt,MultiselectEditor:()=>p.pZ,NumberEditor:()=>c.Z0,OperationType:()=>at.S5,ROW_MATCH_ALERT_CELL_CLASS:()=>ai.mJ,ROW_MATCH_ALERT_CLASS:()=>ai.Xm,RapidAgActionRenderer:()=>E,RapidAgActionsMenuRenderer:()=>D,RapidAgSelectRenderer:()=>N,RapidAgTextRenderer:()=>Ot,RapidBooleanRenderer:()=>T,RapidDateEditor:()=>b,RapidEditableRenderer:()=>F,RapidGridPro:()=>Re,RapidGridProBeta:()=>kt,RapidIconRenderer:()=>M,RapidMultiselectEditor:()=>m,RapidNumberEditor:()=>h,RapidSelectEditor:()=>d,RapidStatusPillRenderer:()=>z,RapidStringEditor:()=>S,ReloadStatusBarComponent:()=>vt.W,RowCountStatusBarComponent:()=>ft.i,SelectEditor:()=>l._Q,SelectRenderer:()=>$.gs,StatePersistence:()=>ut.l,StatusPillRenderer:()=>B.N7,StringEditor:()=>C.XJ,actionHeightMultiplier:()=>R.Fz,agActionRendererStyles:()=>R.AC,agBooleanRendererStyles:()=>O.CL,agDateEditorStyles:()=>f.kI,agDragGhostShadowDomStyles:()=>U.yK,agEditableRendererStyles:()=>L.Mx,agExternalStockStyles:()=>ri.Kp,agGridAlpineFontFace:()=>ri.KX,agGridBalhamFontFace:()=>ri.c_,agGridCSS:()=>ri.AT,agGridMaterialFontFace:()=>ri.Id,agHeadCSS:()=>ri.g4,agIconRendererStyles:()=>P.X5,agMultiselectEditorStyles:()=>p.$b,agNumberEditorStyles:()=>c.Fv,agSelectEditorStyles:()=>l.Uo,agSelectRendererStyles:()=>$.Ad,agStatusPillRendererStyles:()=>B.x2,agStringEditorStyles:()=>C.P_,agThemeAlpineNofontsCSS:()=>ri.lJ,agThemeBalhamNofontsCSS:()=>ri.HC,agThemeFontFaceMap:()=>ri.KE,agThemeFontsId:()=>s.b7,agThemeGenesisRapid:()=>Y,agThemeGenesisRapidDark:()=>Q,agThemeGenesisRapidLight:()=>Z,agThemeGenesisRapidTokens:()=>ye,agThemeMaterialCustomTokens:()=>Ti,agThemeMaterialNofontsCSS:()=>ri.DX,agThemeTokenMapCSS:()=>s.Kb,agThemeTokenMapClassname:()=>s.eL,backgroundSwatch:()=>Di,baseDatasourceEventNames:()=>gt.L,convertColDefToColumnState:()=>Ct.pr,convertColDefsToColumnStates:()=>Ct.rG,convertDateFilterToCriteria:()=>ot.A0,convertFilterModelToCriteria:()=>ot.P4,convertNumberFilterToCriteria:()=>ot.X_,convertSetFilterToCriteria:()=>ot.EC,convertTextFilterToCriteria:()=>ot.zP,convertToKebabCase:()=>yt.w,copyAttributesToGridOptions:()=>ht.Qg,createEnumValueLabelFormatter:()=>He,createRowAlert:()=>ui,createRowMatchCellClassRules:()=>ai.Li,createRowMatchClassRules:()=>ai.PO,criteriaDelimiter:()=>at.NC,criteriaJoin:()=>at.W_,csvExportParams:()=>Fi,darkColors:()=>ve,datasourceEventNames:()=>it.c,dateTimeValueFormatter:()=>ht.XV,dateValueFormatter:()=>ht.sL,defaultAgGridFontFace:()=>ri.qh,defaultGridOptionsConfig:()=>s.YO,defaultGridProConfig:()=>r.Z$,defaultRowAlertColorPresets:()=>oi,defaultRowAlertPreferences:()=>di,defaultRowAlertRatePresets:()=>ni,defaultRowAlertScopePresets:()=>li,deriveHeightsFromTokens:()=>Ce,dropdownWidthVar:()=>_t,errorHandlerDialogStyles:()=>ei.B,extractErrorMessage:()=>Ii.P,foregroundSwatch:()=>xi,formatDateExtra:()=>ht.mC,formatEnumFilterModelAsString:()=>Be,foundationAgBooleanRenderer:()=>O.fg,foundationAgEditableRenderer:()=>L.r8,foundationAgSelectRenderer:()=>$.bE,foundationAgTextFieldRenderer:()=>Jt.wG,foundationAgTextRenderer:()=>xt.G4,foundationDateEditor:()=>f.vr,foundationGridComponents:()=>si,foundationGridPro:()=>r.RB,foundationGridProActionRenderer:()=>R._X,foundationGridProActionsMenuRenderer:()=>k.su,foundationGridProShadowOptions:()=>r.LU,foundationGridProStyles:()=>U.XF,foundationIconRenderer:()=>P.qN,foundationMulticolumnDropdown:()=>Yt,foundationMultiselectEditor:()=>p.UH,foundationNumberEditor:()=>c.CY,foundationSelectEditor:()=>l.RU,foundationStatusPillRenderer:()=>B.a1,foundationStringEditor:()=>C.cb,getActionsMenuDef:()=>k.Al,getAgBooleanRendererTemplate:()=>O.A9,getAgEditableRendererTemplate:()=>L.iP,getAvailableIndexFields:()=>Li.P,getAvailableIndexes:()=>Li.i,getColumnType:()=>ht.nh,getDateEditorTemplate:()=>f.m6,getEnumFilterParams:()=>ht.O7,getErrorHandlerDialogTemplate:()=>ei.P,getGridProTemplate:()=>te.U,getIconRendererTemplate:()=>P.V$,getMulticolumnDropdownTemplate:()=>Vt,getMultiselectEditorTemplate:()=>p.tB,getNumberEditorTemplate:()=>c.r1,getSelectEditorTemplate:()=>l.iY,getSelectRendererTemplate:()=>$.qj,getStatusPillRendererTemplate:()=>B.T2,getStringEditorTemplate:()=>C.bZ,getTextFieldRendererTemplate:()=>Jt.tm,getTextRendererTemplate:()=>xt.d6,gridProColumns:()=>$e.T,gridProErrorNames:()=>ht.Ie,gridProEventNames:()=>ht.yY,gridProGenesisDatasourceEventNames:()=>tt.V,gridProTemplate:()=>te.a,lightColors:()=>fe,logger:()=>Ne.v,matchesRowCriteria:()=>ti.D,mergeAndDedupColDefWithColumnState:()=>Ct.yS,multicolumnDropdownStyles:()=>Ht,multicolumnDropdownTemplate:()=>Ut,normalizeRowAlertPreferences:()=>gi,optionsClass:()=>$t,rapidAgActionRenderer:()=>A,rapidAgActionsMenuRenderer:()=>x,rapidAgBooleanRenderer:()=>I,rapidAgDateEditor:()=>y,rapidAgEditableRenderer:()=>G,rapidAgMultiselectEditor:()=>v,rapidAgNumberEditor:()=>u,rapidAgSelectEditor:()=>g,rapidAgSelectRenderer:()=>H,rapidAgStringEditor:()=>w,rapidAgTextRenderer:()=>Tt,rapidDefaultGridProConfig:()=>Ae,rapidGridComponents:()=>It,rapidGridPro:()=>ke,rapidGridProBeta:()=>Dt,rapidGridProShadowOptions:()=>Ee,rapidGridProStyles:()=>ee,rapidGridProTemplate:()=>ie,rapidIconRenderer:()=>_,rapidMulticolumnDropdown:()=>Wt,rapidStatusPillRenderer:()=>V,resolveVisibleColumnFields:()=>$e.C,rowMatchAlertStyles:()=>U.em,sanitizeColumnState:()=>Ct.n7,textFieldRendererStyles:()=>Jt.zS,textRendererStyles:()=>xt.JN,themeGenesisRapid:()=>q,themeGenesisRapidDark:()=>W,themeGenesisRapidLight:()=>J,wasClickOutsideElement:()=>Xt});var a=i(55823),r=i(51266),s=i(55365),o=i(54634),n=i(33681),l=i(48075);class d extends l._Q{}const g=d.compose({baseName:"select-editor",styles:l.Uo,template:(0,l.iY)("rapid")});var c=i(48072);class h extends c.Z0{}const u=h.compose({baseName:"number-editor",styles:c.Fv,template:(0,c.r1)("rapid")});var p=i(56182);class m extends p.pZ{}const v=m.compose({baseName:"multiselect-editor",styles:p.$b,template:(0,p.tB)("rapid")});var f=i(49255);class b extends f.S8{}const y=b.compose({baseName:"date-editor",styles:f.kI,template:(0,f.m6)("rapid")});var C=i(43352);class S extends C.XJ{}const w=S.compose({baseName:"string-editor",styles:C.P_,template:(0,C.bZ)("rapid")});var R=i(67489);class E extends R.eA{paramsChanged(e,t){(null==t?void 0:t.node.rowHeight)&&this.style.setProperty("--params-row-node-height",`${t.node.rowHeight}px`,"")}}const A=E.compose({baseName:"grid-pro-action-renderer",styles:n.css`
2
2
  ${R.AC}
3
3
  .button-padding {
4
4
  justify-content: center;
@@ -757,7 +757,7 @@
757
757
  ${Y}
758
758
  ${Q}
759
759
  ${Z}
760
- `;var te=i(82128);const ie=(0,te.U)("rapid");var ae=i(20166),re=i(38370),se=i(83912);const oe="#cccccc",ne="#879ba6",le="#1f2126",de="#2e3339",ge="#2b2e34",ce="#000000",he="#181d1f",ue="#FFFFFF",pe="#babfc7",me="#2196f3",ve={foregroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(oe)),headerForegroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ne)),backgroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(le)),borderSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(de)),rowHoverSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ge))},fe={foregroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ce)),headerForegroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(he)),backgroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ue)),borderSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(pe)),rowHoverSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(me))},{create:be}=re.DesignToken,Ce={backgroundColor:be("rapid-ag-background-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.backgroundSwatch:ve.backgroundSwatch),borderColor:be("rapid-ag-border-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.borderSwatch:ve.borderSwatch),foregroundColor:be("rapid-ag-foreground-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.foregroundSwatch:ve.foregroundSwatch),headerForegroundColor:be("rapid-ag-header-foreground-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.headerForegroundSwatch:ve.headerForegroundSwatch),rowHoverColor:be("rapid-ag-row-hover-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.rowHoverSwatch:ve.rowHoverSwatch)},ye=()=>{const e=(0,ae.designTokensMap)();if(!e.value)return null;const{style:t,space:i}=e.value.design_tokens;return(t.baseHeightMultiplier.$value+t.density.$value)*i.designUnit.$value-8},Se="ag-theme-genesis-rapid-dark",we="ag-theme-genesis-rapid-light";class Re extends r.cF{constructor(){super(...arguments),this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.handleLuminanceChange=e=>{const t=o.baseLayerLuminance.getValueFor(e.target);this.theme=t===o.StandardLuminance.DarkMode?Se:we},this.theme="light"===localStorage.getItem("luminance")?we:Se}connectedCallback(){var e;super.connectedCallback();const t=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=o.baseLayerLuminance.subscribe(this.luminanceObserver,t)}disconnectedCallback(){var e;const t=null!==(e=this.provider)&&void 0!==e?e:this;o.baseLayerLuminance.unsubscribe(this.luminanceObserver,t),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),super.disconnectedCallback()}themeChanged(e,t){(e||t===Se)&&super.themeChanged(e,t)}set gridOptions(e){var t,i,a,r;const o=Object.assign({},e);o.components=Object.assign({[s.IX.action]:E,[s.IX.actionsMenu]:D,[s.IX.boolean]:T,[s.IX.editable]:F,[s.IX.icon]:M,[s.IX.select]:N,[s.IX.selectEditor]:d,[s.IX.numberEditor]:h,[s.IX.multiselectEditor]:m,[s.IX.dateEditor]:b,[s.IX.stringEditor]:S,[s.IX.statusPill]:z},e.components);(this.theme===q||this.theme===W||this.theme===J)&&(this.headerHeight=null!==(i=null!==(t=o.headerHeight)&&void 0!==t?t:ye())&&void 0!==i?i:32,this.rowHeight=null!==(r=null!==(a=o.rowHeight)&&void 0!==a?a:ye())&&void 0!==r?r:32),super.gridOptions=o}}(0,a.Cg)([n.observable],Re.prototype,"provider",void 0);const Ee=r.LU,Ae=r.Z$,ke=Re.compose(Object.assign({baseName:"grid-pro",template:ie,styles:ee,shadowOptions:Ee},Ae));var De,xe=i(6884),Oe=i(20633),Te=i(21409),Ie=i(17190),Le=i(48046),Fe=i(88047),Ge=i(62051),Pe=i.n(Ge),Me=i(56943),_e=i(64315),$e=i(14987),Ne=i(1510);!function(e){e.enumFilter="enumColumnFilter",e.enumFloatingFilter="enumColumnFloatingFilter"}(De||(De={}));function He(e){const t=null==e?void 0:e.valueFormatter,i=t?i=>String(t({value:i,api:null==e?void 0:e.api,colDef:null==e?void 0:e.colDef,column:null==e?void 0:e.column,context:null==e?void 0:e.context})):e=>(0,Fe.capitalCase)(e);return e=>null===e?"(Blanks)":i(e)}function Be(e,t){return(null==e?void 0:e.values)?0===e.values.length?"(None)":`(${e.values.length}) ${e.values.map(t).join(", ")}`:""}const ze="gp-enum-filter",Ve=n.css`
760
+ `;var te=i(82128);const ie=(0,te.U)("rapid");var ae=i(20166),re=i(38370),se=i(83912);const oe="#cccccc",ne="#879ba6",le="#1f2126",de="#2e3339",ge="#2b2e34",ce="#000000",he="#181d1f",ue="#FFFFFF",pe="#babfc7",me="#2196f3",ve={foregroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(oe)),headerForegroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ne)),backgroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(le)),borderSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(de)),rowHoverSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ge))},fe={foregroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ce)),headerForegroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(he)),backgroundSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(ue)),borderSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(pe)),rowHoverSwatch:o.SwatchRGB.from((0,se.parseColorHexRGB)(me))},{create:be}=re.DesignToken,ye={backgroundColor:be("rapid-ag-background-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.backgroundSwatch:ve.backgroundSwatch),borderColor:be("rapid-ag-border-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.borderSwatch:ve.borderSwatch),foregroundColor:be("rapid-ag-foreground-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.foregroundSwatch:ve.foregroundSwatch),headerForegroundColor:be("rapid-ag-header-foreground-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.headerForegroundSwatch:ve.headerForegroundSwatch),rowHoverColor:be("rapid-ag-row-hover-color").withDefault(e=>o.baseLayerLuminance.getValueFor(e)===o.StandardLuminance.LightMode?fe.rowHoverSwatch:ve.rowHoverSwatch)},Ce=()=>{const e=(0,ae.designTokensMap)();if(!e.value)return null;const{style:t,space:i}=e.value.design_tokens;return(t.baseHeightMultiplier.$value+t.density.$value)*i.designUnit.$value-8},Se="ag-theme-genesis-rapid-dark",we="ag-theme-genesis-rapid-light";class Re extends r.cF{constructor(){super(...arguments),this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.handleLuminanceChange=e=>{const t=o.baseLayerLuminance.getValueFor(e.target);this.theme=t===o.StandardLuminance.DarkMode?Se:we},this.theme="light"===localStorage.getItem("luminance")?we:Se}connectedCallback(){var e;super.connectedCallback();const t=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=o.baseLayerLuminance.subscribe(this.luminanceObserver,t)}disconnectedCallback(){var e;const t=null!==(e=this.provider)&&void 0!==e?e:this;o.baseLayerLuminance.unsubscribe(this.luminanceObserver,t),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),super.disconnectedCallback()}themeChanged(e,t){(e||t===Se)&&super.themeChanged(e,t)}set gridOptions(e){var t,i,a,r;const o=Object.assign({},e);o.components=Object.assign({[s.IX.action]:E,[s.IX.actionsMenu]:D,[s.IX.boolean]:T,[s.IX.editable]:F,[s.IX.icon]:M,[s.IX.select]:N,[s.IX.selectEditor]:d,[s.IX.numberEditor]:h,[s.IX.multiselectEditor]:m,[s.IX.dateEditor]:b,[s.IX.stringEditor]:S,[s.IX.statusPill]:z},e.components);(this.theme===q||this.theme===W||this.theme===J)&&(this.headerHeight=null!==(i=null!==(t=o.headerHeight)&&void 0!==t?t:Ce())&&void 0!==i?i:32,this.rowHeight=null!==(r=null!==(a=o.rowHeight)&&void 0!==a?a:Ce())&&void 0!==r?r:32),super.gridOptions=o}}(0,a.Cg)([n.observable],Re.prototype,"provider",void 0);const Ee=r.LU,Ae=r.Z$,ke=Re.compose(Object.assign({baseName:"grid-pro",template:ie,styles:ee,shadowOptions:Ee},Ae));var De,xe=i(6884),Oe=i(20633),Te=i(21409),Ie=i(17190),Le=i(48046),Fe=i(88047),Ge=i(62051),Pe=i.n(Ge),Me=i(56943),_e=i(64315),$e=i(14987),Ne=i(1510);!function(e){e.enumFilter="enumColumnFilter",e.enumFloatingFilter="enumColumnFloatingFilter"}(De||(De={}));function He(e){const t=null==e?void 0:e.valueFormatter,i=t?i=>String(t({value:i,api:null==e?void 0:e.api,colDef:null==e?void 0:e.colDef,column:null==e?void 0:e.column,context:null==e?void 0:e.context})):e=>(0,Fe.capitalCase)(e);return e=>null===e?"(Blanks)":i(e)}function Be(e,t){return(null==e?void 0:e.values)?0===e.values.length?"(None)":`(${e.values.length}) ${e.values.map(t).join(", ")}`:""}const ze="gp-enum-filter",Ve=n.css`
761
761
  :host {
762
762
  display: flex;
763
763
  flex-direction: column;
@@ -858,7 +858,7 @@
858
858
  opacity: 1;
859
859
  background: var(--ag-row-hover-color, rgba(33, 150, 243, 0.1));
860
860
  }
861
- `;class je{init(e){var t,i;this.params=e,this.formatLabel=He(e.filterParams),this.eGui=document.createElement("div"),this.eGui.className=Ke,this.eRoot=this.eGui.attachShadow({mode:"open"}),Xe.addStylesTo(this.eRoot),this.eSummary=document.createElement("span"),this.eSummary.className=`${Ke}__summary`,this.eSummary.setAttribute("role","button"),this.eSummary.tabIndex=0,this.eSummary.addEventListener("click",()=>this.params.showParentFilter()),this.eSummary.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.params.showParentFilter())}),this.eRoot.appendChild(this.eSummary),this.eClear=document.createElement("button"),this.eClear.type="button",this.eClear.className=`${Ke}__clear`,this.eClear.textContent="✕",this.eClear.setAttribute("aria-label","Clear filter"),this.eClear.title="Clear filter",this.eClear.hidden=!0,this.eClear.addEventListener("click",()=>{this.params.parentFilterInstance(e=>{var t,i;null===(i=(t=e).clear)||void 0===i||i.call(t)})}),this.eRoot.appendChild(this.eClear),this.onParentModelChanged(null!==(i=null===(t=e.currentParentModel)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null)}getGui(){return this.eGui}onParentModelChanged(e){const t=Be(e,this.formatLabel)||"All";this.eSummary.textContent=t,this.eSummary.title=t,this.eSummary.classList.toggle(`${Ke}__summary--inactive`,!e),this.eClear.hidden=!e}destroy(){var e;null===(e=this.eGui)||void 0===e||e.remove()}}var qe=i(63296),Ye=i(81876),We=i(48707),Qe=i(96730),Je=i(57963),Ze=i(24669),et=i(49964),tt=i(90509),it=i(79270),at=i(35610),rt=i(21281),st=i(34193),ot=i(44561);class nt{constructor(e){this.rowData=new Map,this.pendingBlocks=new Set,this.deliveredRowCount=0,this.streamStarted=!1,this.moreRowsInFlight=!1,this.hasCriteria=!1,this.viewTruncationWarned=!1,this.createSnapshotFunc=e.createSnapshotFunc,this.createDataserverStreamFunc=e.createDataserverStreamFunc,this.getMoreRowsFunc=e.getMoreRowsFunc,this.onRowsInvalidatedFunc=e.onRowsInvalidatedFunc,this.onRowsUpdatedFunc=e.onRowsUpdatedFunc,this.errorHandlerFunc=e.errorHandlerFunc,this.resourceName=e.resourceName,this.resourceParams=Object.assign({},e.resourceParams),this.resourceIndexes=e.resourceIndexes,this.resourceColDefs=e.resourceColDefs,this.maxRows=e.maxRows,this.rowId=e.rowId,this.baseCriteria=e.baseCriteria||"",this.isRequestServer=e.isRequestServer}buildRequestServerParams(e,t,i){const a=Object.assign({},this.resourceParams);return a.DETAILS=Object.assign({},a.DETAILS),a.DETAILS.MAX_ROWS=this.maxRows,a.DETAILS.OFFSET=e,t?a.DETAILS.CRITERIA_MATCH=t:delete a.DETAILS.CRITERIA_MATCH,a.DETAILS.ORDER_BY=i.orderBy||`${this.rowId} ASC`,a}buildDataserverLogonParams(e,t){const i=Object.assign({},this.resourceParams);return i.MAX_ROWS=this.maxRows,delete i.VIEW_NUMBER,e?i.CRITERIA_MATCH=e:delete i.CRITERIA_MATCH,t.orderBy?(i.ORDER_BY=t.orderBy,i.REVERSE=t.reverse):(delete i.ORDER_BY,delete i.REVERSE),i}getLastRow(e,t,i,a){return"MORE_ROWS"in e&&!1===e.MORE_ROWS?t+i:!a&&"ROWS_COUNT"in e&&"number"==typeof e.ROWS_COUNT?e.ROWS_COUNT:-1}getRows(e){return(0,a.sH)(this,void 0,void 0,function*(){Ne.v.debug("Infinite getRows called",{startRow:e.startRow,endRow:e.endRow,isRequestServer:this.isRequestServer});try{const t=(0,ot.P4)(e.filterModel,this.resourceColDefs),i=[this.baseCriteria,t].filter(Boolean).join(" && "),a=function(e,t,i=!1){if(!e||0===e.length)return{orderBy:null,reverse:!1};const a=e[0],r=a.colId,s="desc"===a.sort;if(i)return{orderBy:`${r} ${s?"DESC":"ASC"}`,reverse:!1};for(const[e,i]of t.entries())if(e&&i.includes(r))return{orderBy:e,reverse:s};return Ne.v.warn(`Column '${r}' is not part of any named INDEX. Server-side sorting is not available for this column.`),{orderBy:null,reverse:!1}}(e.sortModel,this.resourceIndexes,this.isRequestServer);if(!this.isRequestServer)return void this.getDataserverRows(e,i,a);const r=this.buildRequestServerParams(e.startRow,i,a);Ne.v.debug("Infinite datasource request params",r);const s=yield this.createSnapshotFunc(r);if(!s)return void e.failCallback();if("REPLY"in s&&Array.isArray(s.REPLY)){const t=s.REPLY,a=this.getLastRow(s,e.startRow,t.length,Boolean(i));return void e.successCallback(t,a)}e.successCallback([],e.startRow)}catch(t){Ne.v.error("Error in infinite getRows:",t),this.errorHandlerFunc&&this.errorHandlerFunc(t instanceof Error?t.message:String(t),"unknown"),e.failCallback()}})}getDataserverRows(e,t,i){if(!this.createDataserverStreamFunc||!this.getMoreRowsFunc)return Ne.v.error("Infinite DATASERVER paging requires a stream and a getMoreRows function"),void e.failCallback();const a=JSON.stringify(Object.assign({criteria:t},i));void 0!==this.subscriptionKey&&this.subscriptionKey!==a&&this.teardownDataserverSubscription(),this.subscriptionKey=a;const r=Number.isFinite(Number(e.startRow))?Number(e.startRow):0,s=Number.isFinite(Number(e.endRow))?Number(e.endRow):r+this.maxRows,o={startRow:r,endRow:s,settled:!1,success:e.successCallback,fail:e.failCallback};if(this.streamStarted&&(this.rowData.size>=s||!1===this.moreRows))this.settleBlock(o,!0);else{if(o.timer=this.createBlockTimer(o),this.pendingBlocks.add(o),!this.dataserverStream){const e=this.buildDataserverLogonParams(t,i);return this.hasCriteria=Boolean(e.CRITERIA_MATCH),this.dataserverStream=this.createDataserverStreamFunc(e),void(this.dataserverStreamSubscription=this.dataserverStream.subscribe(e=>this.handleDataserverMessage(e)))}this.pumpMoreRows()}}pumpMoreRows(){this.moreRowsInFlight||!1===this.moreRows||0===this.pendingBlocks.size||this.dataserverStream&&this.dataserverStreamSubscription&&this.sourceRef&&(this.moreRowsInFlight=!0,this.requestMoreRows())}requestMoreRows(){return(0,a.sH)(this,void 0,void 0,function*(){if(this.dataserverStreamSubscription&&this.sourceRef)try{yield this.getMoreRowsFunc(this.sourceRef)}catch(e){if(this.moreRowsInFlight=!1,(null==e?void 0:e.status)===nt.HTTP_NOT_FOUND)return Ne.v.warn(`Infinite DATASERVER paging is not available on this connection (MORE_ROWS answered 404, expected over HTTP/feature.forceHttp). ${this.resourceName} is truncated to the ${this.rowData.size} row(s) already delivered; use a websocket connection, or a REQUEST_SERVER resource, to page further.`),this.moreRows=!1,this.viewTruncationWarned=!0,void this.settleCoveredBlocks();Ne.v.error("Infinite DATASERVER MORE_ROWS failed:",e),this.failAllPendingBlocks()}else this.moreRowsInFlight=!1})}handleDataserverMessage(e){var t,i,a,r,s,o;const n=null==e?void 0:e.MESSAGE_TYPE;if(n===rt.Go.LOGOFF_ACK||n===rt.Go.MSG_NACK)return null===(t=this.errorHandlerFunc)||void 0===t||t.call(this,n===rt.Go.LOGOFF_ACK?`Connection lost to ${this.resourceName}`:`Authentication failed for ${this.resourceName}`,"connection"),void this.teardownDataserverSubscription();this.sourceRef=null!==(i=null==e?void 0:e.SOURCE_REF)&&void 0!==i?i:this.sourceRef;const l=(null==e?void 0:e.ROW)?(0,st.d)(e,this.rowId):void 0;if((null!==(r=null===(a=null==l?void 0:l.updates)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0||(null!==(o=null===(s=null==l?void 0:l.deletes)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0)return this.streamStarted=!0,void this.notifyLiveChange(l);const d=this.moreRowsInFlight||this.pendingBlocks.size>0||!this.streamStarted;if(this.moreRowsInFlight=!1,void 0!==(null==e?void 0:e.MORE_ROWS)&&(this.moreRows=e.MORE_ROWS),l){if(void 0!==e.ROWS_COUNT&&void 0===this.serverRowsCount&&(this.serverRowsCount=e.ROWS_COUNT),!d)return this.streamStarted=!0,void this.notifyLiveChange(l);this.accumulate(l),this.refreshPendingDeadlines()}this.streamStarted=!0,this.settleCoveredBlocks(),this.pumpMoreRows()}notifyLiveChange(e){var t,i,a,r,s,o,n,l,d,g,c,h,u,p;const m=(null!==(i=null===(t=e.inserts)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0||(null!==(r=null===(a=e.deletes)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0,v=(null!==(o=null===(s=e.updates)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0;if(m)return Ne.v.debug("Infinite DATASERVER live change invalidates the cache",{inserts:null!==(l=null===(n=e.inserts)||void 0===n?void 0:n.length)&&void 0!==l?l:0,deletes:null!==(g=null===(d=e.deletes)||void 0===d?void 0:d.length)&&void 0!==g?g:0}),this.reset(),void(null===(c=this.onRowsInvalidatedFunc)||void 0===c||c.call(this));v&&(this.accumulate(e),Ne.v.debug("Infinite DATASERVER live update patched into the cache",{updates:null!==(u=null===(h=e.updates)||void 0===h?void 0:h.length)&&void 0!==u?u:0}),null===(p=this.onRowsUpdatedFunc)||void 0===p||p.call(this))}refreshPendingDeadlines(){for(const e of this.pendingBlocks)clearTimeout(e.timer),e.timer=this.createBlockTimer(e)}createBlockTimer(e){return setTimeout(()=>{Ne.v.warn(`Infinite DATASERVER block ${e.startRow}-${e.endRow} for ${this.resourceName} timed out waiting for rows; resolving with ${this.rowData.size} accumulated row(s).`),this.settleBlock(e,!0)},nt.BLOCK_RESOLVE_TIMEOUT_MS)}accumulate(e){var t,i,a;const r=new Map(this.rowData);null===(t=e.inserts)||void 0===t||t.forEach(e=>{const t=null==e?void 0:e[this.rowId];void 0!==t&&r.set(t,e)}),null===(i=e.updates)||void 0===i||i.forEach(e=>{const t=null==e?void 0:e[this.rowId];if(void 0===t)return;const i=r.get(t);r.set(t,i?Object.assign(Object.assign({},i),e):e)}),null===(a=e.deletes)||void 0===a||a.forEach(e=>{const t=null==e?void 0:e[this.rowId];if(void 0===t)return;const i=this.cacheIndexOf(r,t);-1===i||this.deliveredRowCount>0&&i<this.deliveredRowCount||r.delete(t)}),this.rowData=r}cacheIndexOf(e,t){let i=0;for(const a of e.keys()){if(a===t)return i;i+=1}return-1}settleCoveredBlocks(){for(const e of[...this.pendingBlocks])(this.rowData.size>=e.endRow||!1===this.moreRows)&&this.settleBlock(e,!0)}settleBlock(e,t){var i;if(e.settled)return;if(e.settled=!0,this.pendingBlocks.delete(e),clearTimeout(e.timer),!t)return void e.fail();const a=[...this.rowData.values()].slice(e.startRow,e.endRow);this.deliveredRowCount=Math.max(this.deliveredRowCount,e.startRow+a.length);const r=!1===this.moreRows?this.rowData.size:this.hasCriteria?-1:null!==(i=this.serverRowsCount)&&void 0!==i?i:-1;this.warnIfViewTruncated(),Ne.v.debug("Infinite DATASERVER block settled",{startRow:e.startRow,endRow:e.endRow,rows:a.length,cached:this.rowData.size,lastRow:r}),e.success(a,r)}warnIfViewTruncated(){var e,t;this.viewTruncationWarned||!1!==this.moreRows||this.hasCriteria||void 0===this.serverRowsCount||this.rowData.size>=this.serverRowsCount||(this.viewTruncationWarned=!0,Ne.v.warn(`${this.resourceName} stopped at ${this.rowData.size} of ${this.serverRowsCount} rows: the DATASERVER view is capped by MAX_VIEW (${null!==(t=null===(e=this.resourceParams)||void 0===e?void 0:e.MAX_VIEW)&&void 0!==t?t:"server default"}). Raise max-view past the row count to reach the rest.`))}failAllPendingBlocks(){for(const e of[...this.pendingBlocks])this.settleBlock(e,!1)}reset(){this.teardownDataserverSubscription()}teardownDataserverSubscription(){var e;this.failAllPendingBlocks(),null===(e=this.dataserverStreamSubscription)||void 0===e||e.unsubscribe(),this.dataserverStreamSubscription=void 0,this.dataserverStream=void 0,this.subscriptionKey=void 0,this.sourceRef=void 0,this.rowData=new Map,this.deliveredRowCount=0,this.streamStarted=!1,this.serverRowsCount=void 0,this.hasCriteria=!1,this.viewTruncationWarned=!1,this.moreRows=void 0,this.moreRowsInFlight=!1}destroy(){this.teardownDataserverSubscription(),Ne.v.debug("GenesisInfiniteDatasource destroyed")}}nt.BLOCK_RESOLVE_TIMEOUT_MS=1e4,nt.HTTP_NOT_FOUND=404;var lt=i(62922);let dt=class extends((0,Te.S)(at.ML)){constructor(){super(...arguments),this.request={},this.onDatasourceReady=e=>(0,a.sH)(this,void 0,void 0,function*(){if(!(yield this.initializeDatasource(this.datasourceOptions(),!0,!1)))return Ne.v.debug(`Genesis Datasource init failed for ${this.resourceName}`),this.clearRowData(),void this.setDisconnected(!0);this.$emit(tt.V.dataInit),this.setDisconnected(!1),this.indexes=this.getResourceIndexes(this.datasource.availableIndexes,this.datasource.availableSortableFields);const e=(0,We.X)(this.datasource.originalFieldDef),t=yield this.getAgColumnDefs(e);this.$emit(it.c.schemaUpdated,{schema:t,metadata:e}),this.infiniteDatasource=new nt({createSnapshotFunc:this.createSnapshot.bind(this),createDataserverStreamFunc:this.createDataserverStream.bind(this),getMoreRowsFunc:e=>this.connect.getMoreRows(e,0),onRowsInvalidatedFunc:()=>this.$emit(it.c.refreshInfiniteCache,{purge:!0}),onRowsUpdatedFunc:()=>this.$emit(it.c.refreshInfiniteCache,{purge:!1}),errorHandlerFunc:this.handleErrors.bind(this),resourceName:this.resourceName,resourceParams:this.isRequestServer?this.datasource.requestOnlyParams:this.datasource.dataserverOnlyParams,resourceIndexes:this.indexes,resourceColDefs:this.datasource.originalFieldDef,maxRows:+this.maxRows,rowId:this.rowId,baseCriteria:this.criteria,isRequestServer:this.isRequestServer}),this.$emit(it.c.setInfiniteDatasource,{datasource:this.infiniteDatasource}),this.setupCommitTriggeredRefresh(),this.$emit(it.c.filtersRestored)})}resourceNameChanged(e,t){e&&e!==t&&n.DOM.queueUpdate(()=>(0,a.sH)(this,void 0,void 0,function*(){yield this.restart()}))}criteriaChanged(e,t){const i=e!==(0,Qe.Q)(t,";");this.infiniteDatasource&&i&&n.DOM.queueUpdate(()=>(0,a.sH)(this,void 0,void 0,function*(){yield this.reloadResourceData()}))}connectedCallback(){super.connectedCallback();const e=this.shouldRunConnect;n.DOM.queueUpdate(()=>{e&&(this.init(),this.subscribeToConnection())})}disconnectedCallback(){super.disconnectedCallback();const e=this.shouldRunDisconnect;n.DOM.queueUpdate(()=>(0,a.sH)(this,void 0,void 0,function*(){e&&(yield this.destroy(),this.unsubscribeFromConnection())}))}deepClone(){const e=super.deepClone();return e.deferredColumnStates=structuredClone(this.deferredColumnStates),e}reloadResourceData(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;null===(t=null===(e=this.infiniteDatasource)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e),this.infiniteDatasource=void 0,this.datasource.destroy(),this.$emit(it.c.cacheFilterConfig),this.clearRowData(!1),this.setDisconnected(!1),this.$emit(it.c.refreshInfiniteCache,{purge:!0}),yield this.init()})}init(){return(0,a.sH)(this,void 0,void 0,function*(){const e={getRowId:e=>e.data?String(e.data[this.rowId]):null,cacheBlockSize:this.maxRows,defaultColDef:{filter:!0,resizable:!0,sortable:!1,unSortIcon:!0},rowBuffer:0,rowModelType:"infinite",suppressMultiSort:!0,cacheOverflowSize:2,maxConcurrentDatasourceRequests:1,infiniteInitialRowCount:1,maxBlocksInCache:10};this.$emit(it.c.initialize,{options:e,keepColDefsOnClearRowData:this.keepColDefsOnClearRowData}),this.clearReadyListener(),this.addEventListener(it.c.ready,this.onDatasourceReady,{once:!0}),this.resourceName||this.handleErrors("Application not connected or invalid resource name, datasource will not work.","unknown")})}clearReadyListener(){this.removeEventListener(it.c.ready,this.onDatasourceReady)}destroy(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;this.clearReadyListener(),this.teardownCommitTriggeredRefresh(),this.datasource.destroy(),this.clearRowData(),this.infiniteDatasource&&(null===(t=(e=this.infiniteDatasource).destroy)||void 0===t||t.call(e),this.infiniteDatasource=void 0),this.$emit(it.c.setInfiniteDatasource,{datasource:null})})}restart(){return(0,a.sH)(this,void 0,void 0,function*(){yield this.destroy(),yield this.init()})}clearRowData(e=!0){this.rowData=new Map,e&&this.$emit(it.c.dataCleared,{includeSchema:!0}),this.transactionData={remove:[]}}setupCommitTriggeredRefresh(){var e;this.teardownCommitTriggeredRefresh(),!this.isSnapshot&&this.isRequestServer&&(null===(e=this.pollTriggerEvents)||void 0===e?void 0:e.length)&&(this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener(e=>{var t;const{eventName:i,response:a}=e.detail;this.pollTriggerEvents.includes(i)&&(null===(t=a.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(Ne.v.debug(`Commit ACK for ${i}, re-reading the loaded blocks.`),this.$emit(it.c.refreshInfiniteCache,{purge:!1}))}))}teardownCommitTriggeredRefresh(){var e;null===(e=this.commitResponseUnsubscribe)||void 0===e||e.call(this),this.commitResponseUnsubscribe=void 0}createSnapshot(){return(0,a.sH)(this,arguments,void 0,function*(e=null){return yield this.datasource.snapshot(e)})}createDataserverStream(e=null){return this.connect.stream(this.resourceName,()=>{},e=>{var t;Ne.v.error("Infinite DATASERVER paged stream error:",e),this.handleErrors((null===(t=null==e?void 0:e.receivedMessage)||void 0===t?void 0:t.ERROR)||(null==e?void 0:e.message),"stream")},e)}getAgColumnDefs(e){return(0,a.sH)(this,void 0,void 0,function*(){const t=this.generateColumnDefsFromMetadata(e,lt.O,lt.c),i=new Set;return this.indexes.forEach((e,t)=>{t&&e.forEach(e=>i.add(e))}),t.forEach(e=>{e.sortable=this.isRequestServer||i.has(e.field),this.datasource.criteriaOnlyRequest&&(e.filter=this.datasource.availableCriteriaFields.includes(e.field)?e.filter:null)}),t})}loadMore(){Ne.v.warn("loadMore() is not needed for Infinite Row Model - scrolling triggers data loading automatically")}};(0,a.Cg)([Je.dm],dt.prototype,"connect",void 0),(0,a.Cg)([Ze.a4],dt.prototype,"connectEvents",void 0),(0,a.Cg)([et.yW],dt.prototype,"datasource",void 0),(0,a.Cg)([n.observable],dt.prototype,"request",void 0),dt=(0,a.Cg)([(0,n.customElement)({name:"grid-pro-infinite-datasource"})],dt);var gt=i(18070),ct=i(26062),ht=i(32610),ut=i(53397),pt=i(52540),mt=i(49104),vt=i(88863),ft=i(71964),bt=i(73203),Ct=i(50103),yt=i(23201);(0,Oe.N)(ct.D,qe.L,Ye.X,dt,Me.O,_e.G),Le.syG.registerModules([Le.n76,Le.Q90,Le.x6L,Le.YN8,Le.YzW,Le.Lt,Le.I95,Le.O4V,Le.H18,Le.mfG,Le.Iws,Le.nSw,Le.FUS,Le.Ss0,Le.tkg,Le.ZDV,Le.ZyC,Le.XG7,Le.VZy,Le.$I9,Le.dGu,Le.AJG,Le.c5B,Le.BG,Le.KIB,Le.Sko]);const St="gridReady";class wt extends((0,Te.S)(re.FoundationElement)){rowDataChanged(e,t){this.initialised&&this.gridApi&&this.gridApi.setGridOption("rowData",t)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}getfilterModel(){return(0,a.sH)(this,void 0,void 0,function*(){if(!this.persistFilterModelKey)return this._filterConfig;return yield this.statePersistence.getFilterModel(this.persistFilterModelKey)})}setFilterModel(e){return(0,a.sH)(this,void 0,void 0,function*(){this.persistFilterModelKey?yield this.statePersistence.saveFilterModel(this.persistFilterModelKey,e):this._filterConfig=e})}constructor(){super(),this.gridErrorItems=[],this.disposed=!1,this.debouncedSaveColumnState=Pe()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=Pe()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=Pe()(this.notifyDatasourceVisibleColumns.bind(this),400),this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.enableCellFlashing=!1,this.enableRowFlashing=!1,this.columnComponentName="grid-pro-column",this.themeMode="dark",this.statusBarConfig=s.o2,this.withStatusBar=!1,this.applyingDatasourceGridOptions=!1,this.rehydrationAttempted=!1,this.rootEventsListeners=[],this.datasourceEventHandlers=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this.gridEventListeners=new Map,this.boundGlobalEventListener=this.globalEventListener.bind(this),this._filterConfig=void 0,this.handleLuminanceChange=e=>{const t=o.baseLayerLuminance.getValueFor(e.target);this.themeMode=t===o.StandardLuminance.DarkMode?"dark":"light"},this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.agAttributes={},this.agPropertiesMap=ht.zI.reduce((e,t)=>(e[t.toLowerCase()]=t,e[(0,Ct.w)(t)]=t,e),{});const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([tt.V.dataInit,e],[ht.yY.datasourceErrorClose,e],[gt.L.error,this.handleBaseDatasourceError.bind(this)],[gt.L.connected,e]),this.datasourceEventHandlers=[[it.c.initialize,this.handleInitialize.bind(this)],[it.c.dataLoaded,this.handleDataLoaded.bind(this)],[it.c.dataChanged,this.handleDataChanged.bind(this)],[it.c.schemaUpdated,this.handleSchemaUpdated.bind(this)],[it.c.dataCleared,this.handleDataCleared.bind(this)],[it.c.loadingStarted,this.handleLoadingStarted.bind(this)],[it.c.loadingFinished,this.handleLoadingFinished.bind(this)],[it.c.noDataAvailable,this.handleNoDataAvailable.bind(this)],[it.c.filtersRestored,this.handleFiltersRestored.bind(this)],[it.c.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[it.c.error,this.handleDatasourceError.bind(this)],[it.c.destroy,this.handleDatasourceDestroy.bind(this)],[it.c.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[it.c.refreshServerSide,this.handleRefreshServerSide.bind(this)],[it.c.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[it.c.addGridCssClass,this.handleAddGridCssClass.bind(this)],[it.c.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[it.c.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[it.c.setInfiniteDatasource,this.handleSetInfiniteDatasource.bind(this)],[it.c.refreshInfiniteCache,this.handleRefreshInfiniteCache.bind(this)]]}addEventListener(e,t,i){super.addEventListener(e,t,i),this.gridApi?this.addGridEventListener(e):this.gridEventsQueue.includes(e)||this.gridEventsQueue.push(e)}addGridEventListener(e){if(this.registeredGridEvents.has(e))return;this.registeredGridEvents.add(e);const t=t=>{this.$emit(e,t)};this.gridEventListeners.set(e,t),this.gridApi.addEventListener(e,t)}handleError(e,t){this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:e}]}handleBaseDatasourceError(e){const t={detail:{message:e.detail.message},type:ht.Ie.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:t.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==ht.Ie.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){var e;super.connectedCallback(),this.disposed=!1;const t=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=o.baseLayerLuminance.subscribe(this.luminanceObserver,t),this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,Ie.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,t])=>{this.addEventListener(e,t)}),ht.zI.forEach(e=>{const t=function(e,t){let i=Object.getPrototypeOf(e);for(;i&&i!==HTMLElement.prototype;){const e=Object.getOwnPropertyDescriptor(i,t);if(e)return e;i=Object.getPrototypeOf(i)}}(this,e);Object.defineProperty(this,e,{get:null==t?void 0:t.get,set:i=>{var a,r;const s=null===(a=null==t?void 0:t.get)||void 0===a?void 0:a.call(this);null===(r=null==t?void 0:t.set)||void 0===r||r.call(this,i),this.agAttributeChangedCallback((0,Ct.w)(e),s,i)},enumerable:!0,configurable:!0})}),this.toggleDatasourceEventListeners(!0))}disconnectedCallback(){var e;this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel();const t=null!==(e=this.provider)&&void 0!==e?e:this;o.baseLayerLuminance.unsubscribe(this.luminanceObserver,t),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),this.visibilityObserverCleanup&&(this.visibilityObserverCleanup(),this.visibilityObserverCleanup=void 0),super.disconnectedCallback(),this.rehydrationAttempted=!1;const i=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,t])=>{this.removeEventListener(e,t)}),i?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}performDisconnectCleanup(){this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.initialised=!1,this.resetGridOptionsState(),this.destroyGridInstance(),this.toggleDatasourceEventListeners(!1),this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.registeredGridEvents.clear(),this.gridEventsQueue=[]}destroyGridInstance(){this.gridApi&&this.gridEventListeners.forEach((e,t)=>{this.gridApi.removeEventListener(t,e)}),this.gridEventListeners.clear(),this.gridApi?this.gridApi.destroy():this.agGrid&&this.agGrid.destroy(),this.gridSlot&&this.gridSlot.replaceChildren(),this.gridApi=void 0,this.agGrid=void 0}toggleDatasourceEventListeners(e){const t=e?"addEventListener":"removeEventListener";this.datasourceEventHandlers.forEach(([e,i])=>{super[t](e,i)})}handleInitialize(e){const{options:t,keepColDefsOnClearRowData:i}=e.detail;i&&(this.columnState=this.gridApi.getColumnState()),this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),t),i?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",t)}handleDataChanged(e){const{changes:t}=e.detail;if(!this.gridApi)return;const i=this.gridApi.applyTransaction(t);this.flashAddedCells(null==i?void 0:i.add)}flashAddedCells(e){this.enableRowFlashing&&(null==e?void 0:e.length)&&this.gridApi.flashCells({rowNodes:e})}handleSchemaUpdated(e){return(0,a.sH)(this,void 0,void 0,function*(){this.gridApi?yield this.processSchemaUpdate(e.detail):this.pendingSchemaUpdate=e.detail})}processSchemaUpdate(e){return(0,a.sH)(this,arguments,void 0,function*({schema:e}){const t=this.gridApi.getColumnDefs();if(t&&t.length>0)return;this.applyCommunityFilterFallbacks(e);const i=yield this.mergeAllColumnDefsAndStates(e,!0);this.gridApi.setGridOption("columnDefs",i),this.restoreCachedFilterConfig()})}applyCommunityFilterFallbacks(e){const t=this.gridApi.isModuleRegistered("SetFilterModule"),i=this.gridApi.isModuleRegistered("MultiFilterModule");e.forEach(e=>{var a,r,s,o,n;if("agSetColumnFilter"===e.filter&&!t)return Ne.v.debug(`SetFilterModule is not registered; column '${e.field}' falls back to the enum filter`),e.filter=De.enumFilter,void(null!==(a=e.floatingFilterComponent)&&void 0!==a||(e.floatingFilterComponent=De.enumFloatingFilter));if("agMultiColumnFilter"!==e.filter)return;const l=null===(s=null===(r=e.filterParams)||void 0===r?void 0:r.filters)||void 0===s?void 0:s.find(e=>"agSetColumnFilter"===e.filter);i?!t&&l&&(Ne.v.debug(`SetFilterModule is not registered; the set sub-filter of column '${e.field}' falls back to the enum filter`),l.filter=De.enumFilter):(null===(o=null==l?void 0:l.filterParams)||void 0===o?void 0:o.values)?(Ne.v.debug(`MultiFilterModule is not registered; enum column '${e.field}' falls back to the enum filter`),e.filter=De.enumFilter,e.filterParams=Object.assign({},l.filterParams),null!==(n=e.floatingFilterComponent)&&void 0!==n||(e.floatingFilterComponent=De.enumFloatingFilter)):(Ne.v.warn("MultiFilterModule is not registered, falling back to text filter"),e.filter="agTextColumnFilter")})}handleDataCleared(e){const{includeSchema:t}=e.detail;this.gridApi&&(t&&this.gridApi.setGridOption("columnDefs",[]),this.gridApi.setGridOption("rowData",[]),this.gridApi.refreshCells({force:!0}))}handleLoadingStarted(){this.gridApi&&this.gridApi.setGridOption("loading",!0)}handleLoadingFinished(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.hideOverlay())}handleNoDataAvailable(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.showNoRowsOverlay())}handleFiltersRestored(){this.restoreCachedFilterConfig()}handleMoreDataAvailable(e){var t,i,a,r;const{hasMoreData:o,sourceRef:n}=e.detail;if(!this.gridApi)return;const l=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,s.k7.loadMore);l&&(null===(r=(a=l).updateParams)||void 0===r||r.call(a,{moreRows:o,sourceRef:n}))}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:t}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:t})}handleSetServerSideDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",t)}handleAddGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.add(i)}handleRemoveGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.remove(i)}handleApplyServerSideTransaction(e){var t,i;const{transaction:a,async:r,callback:s}=e.detail;if(this.gridApi)if(r)this.gridApi.applyServerSideTransactionAsync(a,e=>{var t,i;this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),null==s||s(e)});else{const e=this.gridApi.applyServerSideTransaction(a);this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),s&&s(e)}}handleSetInfiniteDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("datasource",t)}handleRefreshInfiniteCache(e){var t;this.gridApi&&((null===(t=e.detail)||void 0===t?void 0:t.purge)?this.gridApi.purgeInfiniteCache():this.gridApi.refreshInfiniteCache())}combineAllGridComponents(e){const t={[s.IX.action]:R.eA,[s.IX.actionsMenu]:k.cN,[s.IX.boolean]:O._Y,[s.IX.editable]:L.YM,[s.IX.icon]:P.Jt,[s.IX.statusPill]:B.N7,[s.IX.select]:$.gs,[s.IX.selectEditor]:l._Q,[s.IX.numberEditor]:c.Z0,[s.IX.multiselectEditor]:p.pZ,[s.IX.dateEditor]:f.S8,[s.IX.stringEditor]:y.XJ,[De.enumFilter]:Ue,[De.enumFloatingFilter]:je,[s.k7.labelValue]:pt.k,[s.k7.loadMore]:mt.s,[s.k7.reload]:vt.W,[s.k7.rowCount]:ft.i};return Object.assign(Object.assign(Object.assign({},t),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,t,i,a;try{if(!this.initialised||!this.gridApi)return[];const r=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===r||"multiple"===r)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(t=this.gridApi)||void 0===t?void 0:t.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(i=this.gridOptions)||void 0===i?void 0:i.enableRangeSelection)){const e=null===(a=this.gridApi)||void 0===a?void 0:a.getFocusedCell();if(e){const t=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==t?void 0:t.data)return[t.data]}}return[]}catch(e){return Ne.v.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const t=this.gridApi.getCellRanges();if(0===t.length)return[];const i=[];return t.forEach(e=>{const t=e.startRow.rowIndex,a=e.endRow.rowIndex;for(let e=t;e<=a;e+=1){const t=this.gridApi.getDisplayedRowAtIndex(e);(null==t?void 0:t.data)&&!i.some(e=>e===t.data)&&i.push(t.data)}}),i}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var t,i;if(!this.gridApi)return void Ne.v.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const a=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,s.k7.labelValue);a&&"function"==typeof a.updateParams?a.updateParams(e):Ne.v.warn("Grid Pro: Label-value status bar component not found or updateParams method not available")}debouncedColumnAutosize(){this.gridAutosizingEnabled&&(this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.debounced=setTimeout(()=>{var e;null===(e=this.gridApi)||void 0===e||e.sizeColumnsToFit()},ht.BW))}removeConfigWidthsToAutosize(e){return e.map(e=>Object.assign(Object.assign({},e),{width:null}))}saveColumnState(){return(0,a.sH)(this,void 0,void 0,function*(){if(this.rehydrationAttempted&&this.statePersistanceEnabled()){let e=this.gridApi.getColumnState();e=(0,yt.n7)(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const t=0===e.filter(e=>{if(e.hide)return!1;const t=this.gridApi.getColumn(e.colId);return Boolean(t.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||t)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,a.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}restoreColumnState(){return(0,a.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const t=yield this.getSavedColumnState(),i=(0,yt.n7)(t);i&&i.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:i,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;const i=yield this.getfilterModel();void 0!==i&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(i),null===(t=this.gridApi)||void 0===t||t.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof Ye.X}get gridParams(){return{globalListener:this.boundGlobalEventListener}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")||this.querySelector("grid-pro-infinite-datasource")}get isInfiniteRowModel(){return this.gridProDatasource instanceof dt}notifyDatasourceVisibleColumns(){var e,t,i,a;const r=this.gridProDatasource;if(!r)return;const s=(0,$e.C)(null===(t=null===(e=this.gridApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===t?void 0:t.call(e),null===(a=null===(i=this.gridApi)||void 0===i?void 0:i.getColumnDefs)||void 0===a?void 0:a.call(i));s.length&&r.setVisibleColumns(s)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const t=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize())},i=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const t=this.agPropertiesMap[e.name];t&&(this.agAttributes[t]=e.value)});const{columnDefs:r,components:o,defaultColDef:n,getRowId:l,onGridReady:d,onFilterChanged:g,onFirstDataRendered:c}=e,h=(0,a.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered"]),u=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},n),components:this.combineAllGridComponents(o),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,a.sH)(this,void 0,void 0,function*(){var t,i,a;if(this.gridApi=e.api,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.pendingSchemaUpdate){const e=this.pendingSchemaUpdate;this.pendingSchemaUpdate=void 0;try{yield this.processSchemaUpdate(e)}catch(e){Ne.v.error("Grid Pro: failed to apply the pending schema update on grid ready:",e)}}this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),d&&d(e),(null===(t=this.gridProDatasource)||void 0===t?void 0:t.keepColDefsOnClearRowData)&&(null===(i=this.columnState)||void 0===i?void 0:i.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(St,{event:e,gridId:this.id}),this.$emit(s.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(a=this.gridProDatasource)||void 0===a||a.$emit(it.c.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.notifyDatasourceVisibleColumns(),c&&c(e)},onColumnPinned:t,onColumnResized:t,onColumnMoved:t,onColumnVisible:()=>{t(),i()},onDisplayedColumnsChanged:()=>{t(),i()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),g&&g(e))},onGridSizeChanged:t,onSortChanged:t}),h);this.gridProDatasource?(u.columnDefs=r,u.getRowId=l,this.setupStatusBar(u),this.setLocalGridOptions(u)):this.mergeAllColumnDefsAndStates(r).then(e=>{!this.disposed&&this.isConnected&&(u.columnDefs=e,u.getRowId=l,this.setupStatusBar(u),this.setLocalGridOptions(u),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),(0,ht.Qg)(e,this.agAttributes))}clearLocalGridOptions(){this.agGridOptions=void 0}resetGridOptionsState(){this.userProvidedGridOptions=void 0,this.agGridOptions=void 0}initGrid(){n.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.agGrid=(0,Le.Dvw)(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0)})}mergeAllColumnDefsAndStates(e){return(0,a.sH)(this,arguments,void 0,function*(e,t=!1){var i;const a=e||[];a.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const t=Fe[this.headerCaseType];t?e.headerName=t(e.field):Ne.v.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const r=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var t,i,r,o,n,l;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter||e.filter===De.enumFilter){if(!(null!=e.filterParams&&"values"in e.filterParams)){const s=null===(t=a.find(t=>t.field===e.field))||void 0===t?void 0:t.filterParams,l=null!==(i=null==s?void 0:s.values)&&void 0!==i?i:null===(n=null===(o=null===(r=null==s?void 0:s.filters)||void 0===r?void 0:r.find(e=>"agSetColumnFilter"===e.filter))||void 0===o?void 0:o.filterParams)||void 0===n?void 0:n.values;l&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:l}))}e.filter===De.enumFilter&&(null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=De.enumFloatingFilter))}e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=t=>{if(t.data[s.A7]===e.field)return{component:s.IX.editable}}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=bt.y,e.tooltipValueGetter=t=>{const i=t.data[s.h1];if(i&&i.column===e.field)return i.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var t;return(null===(t=e.data[s.h1])||void 0===t?void 0:t.column)===e.colDef.field}}));const d=a.find(t=>e.field===t.field);return Object.assign(Object.assign({},d),e)}),o=r.map(e=>e.field),n=[...r,...this.onlyTemplateColDefs?[]:a.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&t){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return(0,yt.yS)(n,e);if((null===(i=this.gridProDatasource.deferredColumnStates)||void 0===i?void 0:i.length)>0)return(0,yt.yS)(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,t){return t.some(t=>t.statusPanel===e)}addRowCountPanel(e,t){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const i=this.isServerSide||this.isInfiniteRowModel||"infinite"===(null==t?void 0:t.rowModelType)||"serverSide"===(null==t?void 0:t.rowModelType);if(i)this.panelExists(s.k7.rowCount,e)||e.push({statusPanel:s.k7.rowCount,align:"left"});else if(!i){const t="agTotalAndFilteredRowCountComponent";this.panelExists(t,e)||e.push({statusPanel:t,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(s.k7.labelValue,e)||e.push({statusPanel:s.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||xe.OD.MAX_ROWS_250,hide:!1},align:"left"}))}addAggregationPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.aggregation&&(this.panelExists("agAggregationComponent",e)||e.push({statusPanel:"agAggregationComponent",align:"right"}))}addDatasourcePanels(e){if(this.gridProDatasource){const t=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide||this.isInfiniteRowModel,this.statusBarConfig).filter(t=>!this.panelExists(t.statusPanel,e));e.push(...t)}}setupStatusBar(e){var t,i;if(this.withStatusBar&&this.statusBarConfig){const a=[...(null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]];this.addRowCountPanel(a,e),this.addMaxRowsPanel(a),this.addAggregationPanel(a),this.addDatasourcePanels(a);const r=((null===(i=e.statusBar)||void 0===i?void 0:i.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,a));a.push(...r),e.statusBar={statusPanels:a}}}get observedAttributes(){const e=ht.zI.map(e=>e.toLowerCase()),t=ht.zI.map(e=>(0,Ct.w)(e));return e.concat(t)}agAttributeChangedCallback(e,t,i){var a;if(t===i)return;const r=this.agPropertiesMap[e];r&&(this.agAttributes[r]=i,this.initialised&&(null===(a=this.gridApi)||void 0===a||a.setGridOption(r,i)))}globalEventListener(e,t){const i=e.toLowerCase(),a=new Event(i);a.agGridDetails=t,this.dispatchEvent(a);const r="on"+i;"function"==typeof this[r]&&this[r](a)}}(0,a.Cg)([n.observable],wt.prototype,"gridApi",void 0),(0,a.Cg)([n.observable],wt.prototype,"gridErrorItems",void 0),(0,a.Cg)([ut.l],wt.prototype,"statePersistence",void 0),(0,a.Cg)([(0,n.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],wt.prototype,"autoCellRendererByType",void 0),(0,a.Cg)([(0,n.attr)({attribute:"only-template-col-defs",mode:"boolean"})],wt.prototype,"onlyTemplateColDefs",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"grid-autosizing"})],wt.prototype,"gridAutosizingEnabled",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],wt.prototype,"enableCellFlashing",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-row-flashing"})],wt.prototype,"enableRowFlashing",void 0),(0,a.Cg)([(0,n.attr)({attribute:"persist-column-state-key"})],wt.prototype,"persistColumnStateKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"persist-filter-model-key"})],wt.prototype,"persistFilterModelKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"header-case-type"})],wt.prototype,"headerCaseType",void 0),(0,a.Cg)([n.observable],wt.prototype,"rowData",void 0),(0,a.Cg)([n.attr],wt.prototype,"columnComponentName",void 0),(0,a.Cg)([n.observable],wt.prototype,"eventsAndCallbacks",void 0),(0,a.Cg)([n.attr],wt.prototype,"headerHeight",void 0),(0,a.Cg)([n.attr],wt.prototype,"rowHeight",void 0),(0,a.Cg)([n.observable],wt.prototype,"classNames",void 0),(0,a.Cg)([n.observable],wt.prototype,"agGrid",void 0),(0,a.Cg)([n.observable],wt.prototype,"gridSlot",void 0),(0,a.Cg)([n.observable],wt.prototype,"themeMode",void 0),(0,a.Cg)([n.observable],wt.prototype,"gridComponents",void 0),(0,a.Cg)([n.observable],wt.prototype,"statusBarConfig",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"with-status-bar"})],wt.prototype,"withStatusBar",void 0),(0,a.Cg)([n.observable],wt.prototype,"customErrorHandlerTemplate",void 0),(0,a.Cg)([s.lz],wt.prototype,"gridOptionsConfig",void 0),(0,a.Cg)([n.observable],wt.prototype,"provider",void 0);const Rt={backgroundColor:"var(--neutral-layer-card-container)",cellHorizontalPadding:"calc(var(--design-unit) * 2px)",foregroundColor:"var(--neutral-foreground-rest)",headerTextColor:"var(--neutral-foreground-hint)",headerBackgroundColor:"var(--neutral-layer-3)",headerColumnBorder:"1px solid var(--neutral-stroke-rest)",oddRowBackgroundColor:"var(--neutral-layer-1)",rowBorder:"1px solid var(--neutral-stroke-divider-rest)",borderColor:"var(--neutral-stroke-rest)",wrapperBorder:"0",accentColor:"var(--accent-foreground-rest)",fontFamily:"var(--body-font)",sideBarBackgroundColor:"var(--neutral-layer-2)",dataFontSize:"var(--type-ramp-minus-2-font-size)",iconButtonColor:"var(--accent-foreground-rest)",iconButtonHoverColor:"color-mix(in srgb, var(--accent-foreground-rest), var(--ag-foreground-color) 30%)"},Et=["rowheight","row-height"];function At(e){const t=Number(e);return Number.isFinite(t)&&t>0?t:void 0}class kt extends wt{getCachedTheme(e){const t=null!=e?e:"default";let i=kt.cachedThemes.get(t);return i||(i=Le.N8R.withParams("default"===t?Rt:Object.assign(Object.assign({},Rt),{rowHeight:`${t}px`})),kt.cachedThemes.set(t,i)),i}resolveRowHeight(e){for(const e of Et){const t=At(this.getAttribute(e));if(t)return t}return At(e.rowHeight)}agAttributeChangedCallback(e,t,i){var a;super.agAttributeChangedCallback(e,t,i),"rowHeight"===this.agPropertiesMap[e]&&t!==i&&(null===(a=this.gridApi)||void 0===a||a.setGridOption("theme",this.getCachedTheme(At(i))))}set gridOptions(e){const t=Object.assign({},e);t.components=Object.assign({[s.IX.action]:E,[s.IX.actionsMenu]:D,[s.IX.boolean]:T,[s.IX.editable]:F,[s.IX.select]:N,[s.IX.selectEditor]:d,[s.IX.numberEditor]:h,[s.IX.multiselectEditor]:m,[s.IX.dateEditor]:b,[s.IX.stringEditor]:S,[s.IX.statusPill]:z,[s.IX.icon]:M},t.components),t.theme=this.getCachedTheme(this.resolveRowHeight(t)),super.gridOptions=t}}kt.cachedThemes=new Map,(0,a.Cg)([n.observable],kt.prototype,"provider",void 0);const Dt=kt.compose(Object.assign({baseName:"grid-pro",template:ie,styles:n.css`
861
+ `;class je{init(e){var t,i;this.params=e,this.formatLabel=He(e.filterParams),this.eGui=document.createElement("div"),this.eGui.className=Ke,this.eRoot=this.eGui.attachShadow({mode:"open"}),Xe.addStylesTo(this.eRoot),this.eSummary=document.createElement("span"),this.eSummary.className=`${Ke}__summary`,this.eSummary.setAttribute("role","button"),this.eSummary.tabIndex=0,this.eSummary.addEventListener("click",()=>this.params.showParentFilter()),this.eSummary.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.params.showParentFilter())}),this.eRoot.appendChild(this.eSummary),this.eClear=document.createElement("button"),this.eClear.type="button",this.eClear.className=`${Ke}__clear`,this.eClear.textContent="✕",this.eClear.setAttribute("aria-label","Clear filter"),this.eClear.title="Clear filter",this.eClear.hidden=!0,this.eClear.addEventListener("click",()=>{this.params.parentFilterInstance(e=>{var t,i;null===(i=(t=e).clear)||void 0===i||i.call(t)})}),this.eRoot.appendChild(this.eClear),this.onParentModelChanged(null!==(i=null===(t=e.currentParentModel)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null)}getGui(){return this.eGui}onParentModelChanged(e){const t=Be(e,this.formatLabel)||"All";this.eSummary.textContent=t,this.eSummary.title=t,this.eSummary.classList.toggle(`${Ke}__summary--inactive`,!e),this.eClear.hidden=!e}destroy(){var e;null===(e=this.eGui)||void 0===e||e.remove()}}var qe=i(63296),Ye=i(81876),We=i(48707),Qe=i(96730),Je=i(57963),Ze=i(24669),et=i(49964),tt=i(90509),it=i(79270),at=i(35610),rt=i(21281),st=i(34193),ot=i(44561);class nt{constructor(e){this.rowData=new Map,this.pendingBlocks=new Set,this.deliveredRowCount=0,this.streamStarted=!1,this.moreRowsInFlight=!1,this.hasCriteria=!1,this.viewTruncationWarned=!1,this.createSnapshotFunc=e.createSnapshotFunc,this.createDataserverStreamFunc=e.createDataserverStreamFunc,this.getMoreRowsFunc=e.getMoreRowsFunc,this.onRowsInvalidatedFunc=e.onRowsInvalidatedFunc,this.onRowsUpdatedFunc=e.onRowsUpdatedFunc,this.errorHandlerFunc=e.errorHandlerFunc,this.resourceName=e.resourceName,this.resourceParams=Object.assign({},e.resourceParams),this.resourceIndexes=e.resourceIndexes,this.resourceColDefs=e.resourceColDefs,this.maxRows=e.maxRows,this.rowId=e.rowId,this.baseCriteria=e.baseCriteria||"",this.isRequestServer=e.isRequestServer}buildRequestServerParams(e,t,i){const a=Object.assign({},this.resourceParams);return a.DETAILS=Object.assign({},a.DETAILS),a.DETAILS.MAX_ROWS=this.maxRows,a.DETAILS.OFFSET=e,t?a.DETAILS.CRITERIA_MATCH=t:delete a.DETAILS.CRITERIA_MATCH,a.DETAILS.ORDER_BY=i.orderBy||`${this.rowId} ASC`,a}buildDataserverLogonParams(e,t){const i=Object.assign({},this.resourceParams);return i.MAX_ROWS=this.maxRows,delete i.VIEW_NUMBER,e?i.CRITERIA_MATCH=e:delete i.CRITERIA_MATCH,t.orderBy?(i.ORDER_BY=t.orderBy,i.REVERSE=t.reverse):(delete i.ORDER_BY,delete i.REVERSE),i}getLastRow(e,t,i,a){return"MORE_ROWS"in e&&!1===e.MORE_ROWS?t+i:!a&&"ROWS_COUNT"in e&&"number"==typeof e.ROWS_COUNT?e.ROWS_COUNT:-1}getRows(e){return(0,a.sH)(this,void 0,void 0,function*(){Ne.v.debug("Infinite getRows called",{startRow:e.startRow,endRow:e.endRow,isRequestServer:this.isRequestServer});try{const t=(0,ot.P4)(e.filterModel,this.resourceColDefs),i=[this.baseCriteria,t].filter(Boolean).join(" && "),a=function(e,t,i=!1){if(!e||0===e.length)return{orderBy:null,reverse:!1};const a=e[0],r=a.colId,s="desc"===a.sort;if(i)return{orderBy:`${r} ${s?"DESC":"ASC"}`,reverse:!1};for(const[e,i]of t.entries())if(e&&i.includes(r))return{orderBy:e,reverse:s};return Ne.v.warn(`Column '${r}' is not part of any named INDEX. Server-side sorting is not available for this column.`),{orderBy:null,reverse:!1}}(e.sortModel,this.resourceIndexes,this.isRequestServer);if(!this.isRequestServer)return void this.getDataserverRows(e,i,a);const r=this.buildRequestServerParams(e.startRow,i,a);Ne.v.debug("Infinite datasource request params",r);const s=yield this.createSnapshotFunc(r);if(!s)return void e.failCallback();if("REPLY"in s&&Array.isArray(s.REPLY)){const t=s.REPLY,a=this.getLastRow(s,e.startRow,t.length,Boolean(i));return void e.successCallback(t,a)}e.successCallback([],e.startRow)}catch(t){Ne.v.error("Error in infinite getRows:",t),this.errorHandlerFunc&&this.errorHandlerFunc(t instanceof Error?t.message:String(t),"unknown"),e.failCallback()}})}getDataserverRows(e,t,i){if(!this.createDataserverStreamFunc||!this.getMoreRowsFunc)return Ne.v.error("Infinite DATASERVER paging requires a stream and a getMoreRows function"),void e.failCallback();const a=JSON.stringify(Object.assign({criteria:t},i));void 0!==this.subscriptionKey&&this.subscriptionKey!==a&&this.teardownDataserverSubscription(),this.subscriptionKey=a;const r=Number.isFinite(Number(e.startRow))?Number(e.startRow):0,s=Number.isFinite(Number(e.endRow))?Number(e.endRow):r+this.maxRows,o={startRow:r,endRow:s,settled:!1,success:e.successCallback,fail:e.failCallback};if(this.streamStarted&&(this.rowData.size>=s||!1===this.moreRows))this.settleBlock(o,!0);else{if(o.timer=this.createBlockTimer(o),this.pendingBlocks.add(o),!this.dataserverStream){const e=this.buildDataserverLogonParams(t,i);return this.hasCriteria=Boolean(e.CRITERIA_MATCH),this.dataserverStream=this.createDataserverStreamFunc(e),void(this.dataserverStreamSubscription=this.dataserverStream.subscribe(e=>this.handleDataserverMessage(e)))}this.pumpMoreRows()}}pumpMoreRows(){this.moreRowsInFlight||!1===this.moreRows||0===this.pendingBlocks.size||this.dataserverStream&&this.dataserverStreamSubscription&&this.sourceRef&&(this.moreRowsInFlight=!0,this.requestMoreRows())}requestMoreRows(){return(0,a.sH)(this,void 0,void 0,function*(){if(this.dataserverStreamSubscription&&this.sourceRef)try{yield this.getMoreRowsFunc(this.sourceRef)}catch(e){if(this.moreRowsInFlight=!1,(null==e?void 0:e.status)===nt.HTTP_NOT_FOUND)return Ne.v.warn(`Infinite DATASERVER paging is not available on this connection (MORE_ROWS answered 404, expected over HTTP/feature.forceHttp). ${this.resourceName} is truncated to the ${this.rowData.size} row(s) already delivered; use a websocket connection, or a REQUEST_SERVER resource, to page further.`),this.moreRows=!1,this.viewTruncationWarned=!0,void this.settleCoveredBlocks();Ne.v.error("Infinite DATASERVER MORE_ROWS failed:",e),this.failAllPendingBlocks()}else this.moreRowsInFlight=!1})}handleDataserverMessage(e){var t,i,a,r,s,o;const n=null==e?void 0:e.MESSAGE_TYPE;if(n===rt.Go.LOGOFF_ACK||n===rt.Go.MSG_NACK)return null===(t=this.errorHandlerFunc)||void 0===t||t.call(this,n===rt.Go.LOGOFF_ACK?`Connection lost to ${this.resourceName}`:`Authentication failed for ${this.resourceName}`,"connection"),void this.teardownDataserverSubscription();this.sourceRef=null!==(i=null==e?void 0:e.SOURCE_REF)&&void 0!==i?i:this.sourceRef;const l=(null==e?void 0:e.ROW)?(0,st.d)(e,this.rowId):void 0;if((null!==(r=null===(a=null==l?void 0:l.updates)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0||(null!==(o=null===(s=null==l?void 0:l.deletes)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0)return this.streamStarted=!0,void this.notifyLiveChange(l);const d=this.moreRowsInFlight||this.pendingBlocks.size>0||!this.streamStarted;if(this.moreRowsInFlight=!1,void 0!==(null==e?void 0:e.MORE_ROWS)&&(this.moreRows=e.MORE_ROWS),l){if(void 0!==e.ROWS_COUNT&&void 0===this.serverRowsCount&&(this.serverRowsCount=e.ROWS_COUNT),!d)return this.streamStarted=!0,void this.notifyLiveChange(l);this.accumulate(l),this.refreshPendingDeadlines()}this.streamStarted=!0,this.settleCoveredBlocks(),this.pumpMoreRows()}notifyLiveChange(e){var t,i,a,r,s,o,n,l,d,g,c,h,u,p;const m=(null!==(i=null===(t=e.inserts)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0||(null!==(r=null===(a=e.deletes)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0,v=(null!==(o=null===(s=e.updates)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0;if(m)return Ne.v.debug("Infinite DATASERVER live change invalidates the cache",{inserts:null!==(l=null===(n=e.inserts)||void 0===n?void 0:n.length)&&void 0!==l?l:0,deletes:null!==(g=null===(d=e.deletes)||void 0===d?void 0:d.length)&&void 0!==g?g:0}),this.reset(),void(null===(c=this.onRowsInvalidatedFunc)||void 0===c||c.call(this));v&&(this.accumulate(e),Ne.v.debug("Infinite DATASERVER live update patched into the cache",{updates:null!==(u=null===(h=e.updates)||void 0===h?void 0:h.length)&&void 0!==u?u:0}),null===(p=this.onRowsUpdatedFunc)||void 0===p||p.call(this))}refreshPendingDeadlines(){for(const e of this.pendingBlocks)clearTimeout(e.timer),e.timer=this.createBlockTimer(e)}createBlockTimer(e){return setTimeout(()=>{Ne.v.warn(`Infinite DATASERVER block ${e.startRow}-${e.endRow} for ${this.resourceName} timed out waiting for rows; resolving with ${this.rowData.size} accumulated row(s).`),this.settleBlock(e,!0)},nt.BLOCK_RESOLVE_TIMEOUT_MS)}accumulate(e){var t,i,a;const r=new Map(this.rowData);null===(t=e.inserts)||void 0===t||t.forEach(e=>{const t=null==e?void 0:e[this.rowId];void 0!==t&&r.set(t,e)}),null===(i=e.updates)||void 0===i||i.forEach(e=>{const t=null==e?void 0:e[this.rowId];if(void 0===t)return;const i=r.get(t);r.set(t,i?Object.assign(Object.assign({},i),e):e)}),null===(a=e.deletes)||void 0===a||a.forEach(e=>{const t=null==e?void 0:e[this.rowId];if(void 0===t)return;const i=this.cacheIndexOf(r,t);-1===i||this.deliveredRowCount>0&&i<this.deliveredRowCount||r.delete(t)}),this.rowData=r}cacheIndexOf(e,t){let i=0;for(const a of e.keys()){if(a===t)return i;i+=1}return-1}settleCoveredBlocks(){for(const e of[...this.pendingBlocks])(this.rowData.size>=e.endRow||!1===this.moreRows)&&this.settleBlock(e,!0)}settleBlock(e,t){var i;if(e.settled)return;if(e.settled=!0,this.pendingBlocks.delete(e),clearTimeout(e.timer),!t)return void e.fail();const a=[...this.rowData.values()].slice(e.startRow,e.endRow);this.deliveredRowCount=Math.max(this.deliveredRowCount,e.startRow+a.length);const r=!1===this.moreRows?this.rowData.size:this.hasCriteria?-1:null!==(i=this.serverRowsCount)&&void 0!==i?i:-1;this.warnIfViewTruncated(),Ne.v.debug("Infinite DATASERVER block settled",{startRow:e.startRow,endRow:e.endRow,rows:a.length,cached:this.rowData.size,lastRow:r}),e.success(a,r)}warnIfViewTruncated(){var e,t;this.viewTruncationWarned||!1!==this.moreRows||this.hasCriteria||void 0===this.serverRowsCount||this.rowData.size>=this.serverRowsCount||(this.viewTruncationWarned=!0,Ne.v.warn(`${this.resourceName} stopped at ${this.rowData.size} of ${this.serverRowsCount} rows: the DATASERVER view is capped by MAX_VIEW (${null!==(t=null===(e=this.resourceParams)||void 0===e?void 0:e.MAX_VIEW)&&void 0!==t?t:"server default"}). Raise max-view past the row count to reach the rest.`))}failAllPendingBlocks(){for(const e of[...this.pendingBlocks])this.settleBlock(e,!1)}reset(){this.teardownDataserverSubscription()}teardownDataserverSubscription(){var e;this.failAllPendingBlocks(),null===(e=this.dataserverStreamSubscription)||void 0===e||e.unsubscribe(),this.dataserverStreamSubscription=void 0,this.dataserverStream=void 0,this.subscriptionKey=void 0,this.sourceRef=void 0,this.rowData=new Map,this.deliveredRowCount=0,this.streamStarted=!1,this.serverRowsCount=void 0,this.hasCriteria=!1,this.viewTruncationWarned=!1,this.moreRows=void 0,this.moreRowsInFlight=!1}destroy(){this.teardownDataserverSubscription(),Ne.v.debug("GenesisInfiniteDatasource destroyed")}}nt.BLOCK_RESOLVE_TIMEOUT_MS=1e4,nt.HTTP_NOT_FOUND=404;var lt=i(62922);let dt=class extends((0,Te.S)(at.ML)){constructor(){super(...arguments),this.request={},this.onDatasourceReady=e=>(0,a.sH)(this,void 0,void 0,function*(){if(!(yield this.initializeDatasource(this.datasourceOptions(),!0,!1)))return Ne.v.debug(`Genesis Datasource init failed for ${this.resourceName}`),this.clearRowData(),void this.setDisconnected(!0);this.$emit(tt.V.dataInit),this.setDisconnected(!1),this.indexes=this.getResourceIndexes(this.datasource.availableIndexes,this.datasource.availableSortableFields);const e=(0,We.X)(this.datasource.originalFieldDef),t=yield this.getAgColumnDefs(e);this.$emit(it.c.schemaUpdated,{schema:t,metadata:e}),this.infiniteDatasource=new nt({createSnapshotFunc:this.createSnapshot.bind(this),createDataserverStreamFunc:this.createDataserverStream.bind(this),getMoreRowsFunc:e=>this.connect.getMoreRows(e,0),onRowsInvalidatedFunc:()=>this.$emit(it.c.refreshInfiniteCache,{purge:!0}),onRowsUpdatedFunc:()=>this.$emit(it.c.refreshInfiniteCache,{purge:!1}),errorHandlerFunc:this.handleErrors.bind(this),resourceName:this.resourceName,resourceParams:this.isRequestServer?this.datasource.requestOnlyParams:this.datasource.dataserverOnlyParams,resourceIndexes:this.indexes,resourceColDefs:this.datasource.originalFieldDef,maxRows:+this.maxRows,rowId:this.rowId,baseCriteria:this.criteria,isRequestServer:this.isRequestServer}),this.$emit(it.c.setInfiniteDatasource,{datasource:this.infiniteDatasource}),this.setupCommitTriggeredRefresh(),this.$emit(it.c.addGridCssClass,{className:"grid-pro-infinite"}),this.$emit(it.c.filtersRestored)})}resourceNameChanged(e,t){e&&e!==t&&n.DOM.queueUpdate(()=>(0,a.sH)(this,void 0,void 0,function*(){yield this.restart()}))}criteriaChanged(e,t){const i=e!==(0,Qe.Q)(t,";");this.infiniteDatasource&&i&&n.DOM.queueUpdate(()=>(0,a.sH)(this,void 0,void 0,function*(){yield this.reloadResourceData()}))}connectedCallback(){super.connectedCallback();const e=this.shouldRunConnect;n.DOM.queueUpdate(()=>{e&&(this.init(),this.subscribeToConnection())})}disconnectedCallback(){super.disconnectedCallback();const e=this.shouldRunDisconnect;n.DOM.queueUpdate(()=>(0,a.sH)(this,void 0,void 0,function*(){e&&(yield this.destroy(),this.unsubscribeFromConnection())}))}deepClone(){const e=super.deepClone();return e.deferredGridOptions=structuredClone(this.deferredGridOptions),e.deferredColumnStates=structuredClone(this.deferredColumnStates),e}reloadResourceData(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;null===(t=null===(e=this.infiniteDatasource)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e),this.infiniteDatasource=void 0,this.datasource.destroy(),this.$emit(it.c.cacheFilterConfig),this.clearRowData(!1),this.setDisconnected(!1),this.$emit(it.c.refreshInfiniteCache,{purge:!0}),yield this.init()})}init(){return(0,a.sH)(this,void 0,void 0,function*(){const e=Object.assign({getRowId:e=>e.data?String(e.data[this.rowId]):null,cacheBlockSize:this.maxRows,defaultColDef:{filter:!0,resizable:!0,sortable:!1,unSortIcon:!0},rowBuffer:0,rowModelType:"infinite",suppressMultiSort:!0,cacheOverflowSize:2,maxConcurrentDatasourceRequests:1,infiniteInitialRowCount:1,maxBlocksInCache:10},this.deferredGridOptions);this.$emit(it.c.initialize,{options:e,keepColDefsOnClearRowData:this.keepColDefsOnClearRowData}),this.clearReadyListener(),this.addEventListener(it.c.ready,this.onDatasourceReady,{once:!0}),this.resourceName||this.handleErrors("Application not connected or invalid resource name, datasource will not work.","unknown")})}clearReadyListener(){this.removeEventListener(it.c.ready,this.onDatasourceReady)}destroy(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;this.clearReadyListener(),this.teardownCommitTriggeredRefresh(),this.$emit(it.c.removeGridCssClass,{className:"grid-pro-infinite"}),this.datasource.destroy(),this.clearRowData(),this.infiniteDatasource&&(null===(t=(e=this.infiniteDatasource).destroy)||void 0===t||t.call(e),this.infiniteDatasource=void 0),this.$emit(it.c.setInfiniteDatasource,{datasource:null})})}restart(){return(0,a.sH)(this,void 0,void 0,function*(){yield this.destroy(),yield this.init()})}clearRowData(e=!0){this.rowData=new Map,e&&this.$emit(it.c.dataCleared,{includeSchema:!0}),this.transactionData={remove:[]}}setupCommitTriggeredRefresh(){var e;this.teardownCommitTriggeredRefresh(),!this.isSnapshot&&this.isRequestServer&&(null===(e=this.pollTriggerEvents)||void 0===e?void 0:e.length)&&(this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener(e=>{var t;const{eventName:i,response:a}=e.detail;this.pollTriggerEvents.includes(i)&&(null===(t=a.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(Ne.v.debug(`Commit ACK for ${i}, re-reading the loaded blocks.`),this.$emit(it.c.refreshInfiniteCache,{purge:!1}))}))}teardownCommitTriggeredRefresh(){var e;null===(e=this.commitResponseUnsubscribe)||void 0===e||e.call(this),this.commitResponseUnsubscribe=void 0}createSnapshot(){return(0,a.sH)(this,arguments,void 0,function*(e=null){return yield this.datasource.snapshot(e)})}createDataserverStream(e=null){return this.connect.stream(this.resourceName,()=>{},e=>{var t;Ne.v.error("Infinite DATASERVER paged stream error:",e),this.handleErrors((null===(t=null==e?void 0:e.receivedMessage)||void 0===t?void 0:t.ERROR)||(null==e?void 0:e.message),"stream")},e)}getAgColumnDefs(e){return(0,a.sH)(this,void 0,void 0,function*(){const t=this.generateColumnDefsFromMetadata(e,lt.O,lt.c),i=new Set;return this.indexes.forEach((e,t)=>{t&&e.forEach(e=>i.add(e))}),t.forEach(e=>{e.sortable=this.isRequestServer||i.has(e.field),this.datasource.criteriaOnlyRequest&&(e.filter=this.datasource.availableCriteriaFields.includes(e.field)?e.filter:null)}),t})}loadMore(){Ne.v.warn("loadMore() is not needed for Infinite Row Model - scrolling triggers data loading automatically")}};(0,a.Cg)([Je.dm],dt.prototype,"connect",void 0),(0,a.Cg)([Ze.a4],dt.prototype,"connectEvents",void 0),(0,a.Cg)([et.yW],dt.prototype,"datasource",void 0),(0,a.Cg)([n.observable],dt.prototype,"request",void 0),dt=(0,a.Cg)([(0,n.customElement)({name:"grid-pro-infinite-datasource"})],dt);var gt=i(18070),ct=i(26062),ht=i(32610),ut=i(53397),pt=i(52540),mt=i(49104),vt=i(88863),ft=i(71964),bt=i(73203),yt=i(50103),Ct=i(23201);(0,Oe.N)(ct.D,qe.L,Ye.X,dt,Me.O,_e.G),Le.syG.registerModules([Le.n76,Le.Q90,Le.x6L,Le.YN8,Le.YzW,Le.Lt,Le.I95,Le.O4V,Le.H18,Le.mfG,Le.Iws,Le.nSw,Le.FUS,Le.Ss0,Le.tkg,Le.ZDV,Le.ZyC,Le.XG7,Le.VZy,Le.$I9,Le.dGu,Le.AJG,Le.c5B,Le.BG,Le.KIB,Le.Sko]);const St="gridReady";class wt extends((0,Te.S)(re.FoundationElement)){rowDataChanged(e,t){this.initialised&&this.gridApi&&this.gridApi.setGridOption("rowData",t)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}getfilterModel(){return(0,a.sH)(this,void 0,void 0,function*(){if(!this.persistFilterModelKey)return this._filterConfig;return yield this.statePersistence.getFilterModel(this.persistFilterModelKey)})}setFilterModel(e){return(0,a.sH)(this,void 0,void 0,function*(){this.persistFilterModelKey?yield this.statePersistence.saveFilterModel(this.persistFilterModelKey,e):this._filterConfig=e})}constructor(){super(),this.gridErrorItems=[],this.disposed=!1,this.debouncedSaveColumnState=Pe()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=Pe()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=Pe()(this.notifyDatasourceVisibleColumns.bind(this),400),this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.enableCellFlashing=!1,this.enableRowFlashing=!1,this.columnComponentName="grid-pro-column",this.themeMode="dark",this.statusBarConfig=s.o2,this.withStatusBar=!1,this.applyingDatasourceGridOptions=!1,this.rehydrationAttempted=!1,this.rootEventsListeners=[],this.datasourceEventHandlers=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this.gridEventListeners=new Map,this.boundGlobalEventListener=this.globalEventListener.bind(this),this._filterConfig=void 0,this.handleLuminanceChange=e=>{const t=o.baseLayerLuminance.getValueFor(e.target);this.themeMode=t===o.StandardLuminance.DarkMode?"dark":"light"},this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.agAttributes={},this.agPropertiesMap=ht.zI.reduce((e,t)=>(e[t.toLowerCase()]=t,e[(0,yt.w)(t)]=t,e),{});const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([tt.V.dataInit,e],[ht.yY.datasourceErrorClose,e],[gt.L.error,this.handleBaseDatasourceError.bind(this)],[gt.L.connected,e]),this.datasourceEventHandlers=[[it.c.initialize,this.handleInitialize.bind(this)],[it.c.dataLoaded,this.handleDataLoaded.bind(this)],[it.c.dataChanged,this.handleDataChanged.bind(this)],[it.c.schemaUpdated,this.handleSchemaUpdated.bind(this)],[it.c.dataCleared,this.handleDataCleared.bind(this)],[it.c.loadingStarted,this.handleLoadingStarted.bind(this)],[it.c.loadingFinished,this.handleLoadingFinished.bind(this)],[it.c.noDataAvailable,this.handleNoDataAvailable.bind(this)],[it.c.filtersRestored,this.handleFiltersRestored.bind(this)],[it.c.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[it.c.error,this.handleDatasourceError.bind(this)],[it.c.destroy,this.handleDatasourceDestroy.bind(this)],[it.c.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[it.c.refreshServerSide,this.handleRefreshServerSide.bind(this)],[it.c.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[it.c.addGridCssClass,this.handleAddGridCssClass.bind(this)],[it.c.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[it.c.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[it.c.setInfiniteDatasource,this.handleSetInfiniteDatasource.bind(this)],[it.c.refreshInfiniteCache,this.handleRefreshInfiniteCache.bind(this)]]}addEventListener(e,t,i){super.addEventListener(e,t,i),this.gridApi?this.addGridEventListener(e):this.gridEventsQueue.includes(e)||this.gridEventsQueue.push(e)}addGridEventListener(e){if(this.registeredGridEvents.has(e))return;this.registeredGridEvents.add(e);const t=t=>{this.$emit(e,t)};this.gridEventListeners.set(e,t),this.gridApi.addEventListener(e,t)}handleError(e,t){this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:e}]}handleBaseDatasourceError(e){const t={detail:{message:e.detail.message},type:ht.Ie.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:t.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==ht.Ie.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){var e;super.connectedCallback(),this.disposed=!1;const t=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=o.baseLayerLuminance.subscribe(this.luminanceObserver,t),this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,Ie.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,t])=>{this.addEventListener(e,t)}),ht.zI.forEach(e=>{const t=function(e,t){let i=Object.getPrototypeOf(e);for(;i&&i!==HTMLElement.prototype;){const e=Object.getOwnPropertyDescriptor(i,t);if(e)return e;i=Object.getPrototypeOf(i)}}(this,e);Object.defineProperty(this,e,{get:null==t?void 0:t.get,set:i=>{var a,r;const s=null===(a=null==t?void 0:t.get)||void 0===a?void 0:a.call(this);null===(r=null==t?void 0:t.set)||void 0===r||r.call(this,i),this.agAttributeChangedCallback((0,yt.w)(e),s,i)},enumerable:!0,configurable:!0})}),this.toggleDatasourceEventListeners(!0))}disconnectedCallback(){var e;this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel();const t=null!==(e=this.provider)&&void 0!==e?e:this;o.baseLayerLuminance.unsubscribe(this.luminanceObserver,t),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),this.visibilityObserverCleanup&&(this.visibilityObserverCleanup(),this.visibilityObserverCleanup=void 0),super.disconnectedCallback(),this.rehydrationAttempted=!1;const i=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,t])=>{this.removeEventListener(e,t)}),i?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}performDisconnectCleanup(){this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.initialised=!1,this.resetGridOptionsState(),this.destroyGridInstance(),this.toggleDatasourceEventListeners(!1),this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.registeredGridEvents.clear(),this.gridEventsQueue=[]}destroyGridInstance(){this.gridApi&&this.gridEventListeners.forEach((e,t)=>{this.gridApi.removeEventListener(t,e)}),this.gridEventListeners.clear(),this.gridApi?this.gridApi.destroy():this.agGrid&&this.agGrid.destroy(),this.gridSlot&&this.gridSlot.replaceChildren(),this.gridApi=void 0,this.agGrid=void 0}toggleDatasourceEventListeners(e){const t=e?"addEventListener":"removeEventListener";this.datasourceEventHandlers.forEach(([e,i])=>{super[t](e,i)})}handleInitialize(e){const{options:t,keepColDefsOnClearRowData:i}=e.detail;i&&(this.columnState=this.gridApi.getColumnState()),this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),t),i?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",t)}handleDataChanged(e){const{changes:t}=e.detail;if(!this.gridApi)return;const i=this.gridApi.applyTransaction(t);this.flashAddedCells(null==i?void 0:i.add)}flashAddedCells(e){this.enableRowFlashing&&(null==e?void 0:e.length)&&this.gridApi.flashCells({rowNodes:e})}handleSchemaUpdated(e){return(0,a.sH)(this,void 0,void 0,function*(){this.gridApi?yield this.processSchemaUpdate(e.detail):this.pendingSchemaUpdate=e.detail})}processSchemaUpdate(e){return(0,a.sH)(this,arguments,void 0,function*({schema:e}){const t=this.gridApi.getColumnDefs();if(t&&t.length>0)return;this.applyCommunityFilterFallbacks(e);const i=yield this.mergeAllColumnDefsAndStates(e,!0);this.gridApi.setGridOption("columnDefs",i),this.restoreCachedFilterConfig()})}applyCommunityFilterFallbacks(e){const t=this.gridApi.isModuleRegistered("SetFilterModule"),i=this.gridApi.isModuleRegistered("MultiFilterModule");e.forEach(e=>{var a,r,s,o,n;if("agSetColumnFilter"===e.filter&&!t)return Ne.v.debug(`SetFilterModule is not registered; column '${e.field}' falls back to the enum filter`),e.filter=De.enumFilter,void(null!==(a=e.floatingFilterComponent)&&void 0!==a||(e.floatingFilterComponent=De.enumFloatingFilter));if("agMultiColumnFilter"!==e.filter)return;const l=null===(s=null===(r=e.filterParams)||void 0===r?void 0:r.filters)||void 0===s?void 0:s.find(e=>"agSetColumnFilter"===e.filter);i?!t&&l&&(Ne.v.debug(`SetFilterModule is not registered; the set sub-filter of column '${e.field}' falls back to the enum filter`),l.filter=De.enumFilter):(null===(o=null==l?void 0:l.filterParams)||void 0===o?void 0:o.values)?(Ne.v.debug(`MultiFilterModule is not registered; enum column '${e.field}' falls back to the enum filter`),e.filter=De.enumFilter,e.filterParams=Object.assign({},l.filterParams),null!==(n=e.floatingFilterComponent)&&void 0!==n||(e.floatingFilterComponent=De.enumFloatingFilter)):(Ne.v.warn("MultiFilterModule is not registered, falling back to text filter"),e.filter="agTextColumnFilter")})}handleDataCleared(e){const{includeSchema:t}=e.detail;this.gridApi&&(t&&this.gridApi.setGridOption("columnDefs",[]),this.gridApi.setGridOption("rowData",[]),this.gridApi.refreshCells({force:!0}))}handleLoadingStarted(){this.gridApi&&this.gridApi.setGridOption("loading",!0)}handleLoadingFinished(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.hideOverlay())}handleNoDataAvailable(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.showNoRowsOverlay())}handleFiltersRestored(){this.restoreCachedFilterConfig()}handleMoreDataAvailable(e){var t,i,a,r;const{hasMoreData:o,sourceRef:n}=e.detail;if(!this.gridApi)return;const l=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,s.k7.loadMore);l&&(null===(r=(a=l).updateParams)||void 0===r||r.call(a,{moreRows:o,sourceRef:n}))}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:t}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:t})}handleSetServerSideDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",t)}handleAddGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.add(i)}handleRemoveGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.remove(i)}handleApplyServerSideTransaction(e){var t,i;const{transaction:a,async:r,callback:s}=e.detail;if(this.gridApi)if(r)this.gridApi.applyServerSideTransactionAsync(a,e=>{var t,i;this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),null==s||s(e)});else{const e=this.gridApi.applyServerSideTransaction(a);this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),s&&s(e)}}handleSetInfiniteDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("datasource",t)}handleRefreshInfiniteCache(e){var t;this.gridApi&&((null===(t=e.detail)||void 0===t?void 0:t.purge)?this.gridApi.purgeInfiniteCache():this.gridApi.refreshInfiniteCache())}combineAllGridComponents(e){const t={[s.IX.action]:R.eA,[s.IX.actionsMenu]:k.cN,[s.IX.boolean]:O._Y,[s.IX.editable]:L.YM,[s.IX.icon]:P.Jt,[s.IX.statusPill]:B.N7,[s.IX.select]:$.gs,[s.IX.selectEditor]:l._Q,[s.IX.numberEditor]:c.Z0,[s.IX.multiselectEditor]:p.pZ,[s.IX.dateEditor]:f.S8,[s.IX.stringEditor]:C.XJ,[De.enumFilter]:Ue,[De.enumFloatingFilter]:je,[s.k7.labelValue]:pt.k,[s.k7.loadMore]:mt.s,[s.k7.reload]:vt.W,[s.k7.rowCount]:ft.i};return Object.assign(Object.assign(Object.assign({},t),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,t,i,a;try{if(!this.initialised||!this.gridApi)return[];const r=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===r||"multiple"===r)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(t=this.gridApi)||void 0===t?void 0:t.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(i=this.gridOptions)||void 0===i?void 0:i.enableRangeSelection)){const e=null===(a=this.gridApi)||void 0===a?void 0:a.getFocusedCell();if(e){const t=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==t?void 0:t.data)return[t.data]}}return[]}catch(e){return Ne.v.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const t=this.gridApi.getCellRanges();if(0===t.length)return[];const i=[];return t.forEach(e=>{const t=e.startRow.rowIndex,a=e.endRow.rowIndex;for(let e=t;e<=a;e+=1){const t=this.gridApi.getDisplayedRowAtIndex(e);(null==t?void 0:t.data)&&!i.some(e=>e===t.data)&&i.push(t.data)}}),i}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var t,i;if(!this.gridApi)return void Ne.v.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const a=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,s.k7.labelValue);a&&"function"==typeof a.updateParams?a.updateParams(e):Ne.v.warn("Grid Pro: Label-value status bar component not found or updateParams method not available")}debouncedColumnAutosize(){this.gridAutosizingEnabled&&(this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.debounced=setTimeout(()=>{var e;null===(e=this.gridApi)||void 0===e||e.sizeColumnsToFit()},ht.BW))}removeConfigWidthsToAutosize(e){return e.map(e=>Object.assign(Object.assign({},e),{width:null}))}saveColumnState(){return(0,a.sH)(this,void 0,void 0,function*(){if(this.rehydrationAttempted&&this.statePersistanceEnabled()){let e=this.gridApi.getColumnState();e=(0,Ct.n7)(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const t=0===e.filter(e=>{if(e.hide)return!1;const t=this.gridApi.getColumn(e.colId);return Boolean(t.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||t)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,a.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}restoreColumnState(){return(0,a.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const t=yield this.getSavedColumnState(),i=(0,Ct.n7)(t);i&&i.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:i,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;const i=yield this.getfilterModel();void 0!==i&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(i),null===(t=this.gridApi)||void 0===t||t.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof Ye.X}get gridParams(){return{globalListener:this.boundGlobalEventListener}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")||this.querySelector("grid-pro-infinite-datasource")}get isInfiniteRowModel(){return this.gridProDatasource instanceof dt}notifyDatasourceVisibleColumns(){var e,t,i,a;const r=this.gridProDatasource;if(!r)return;const s=(0,$e.C)(null===(t=null===(e=this.gridApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===t?void 0:t.call(e),null===(a=null===(i=this.gridApi)||void 0===i?void 0:i.getColumnDefs)||void 0===a?void 0:a.call(i));s.length&&r.setVisibleColumns(s)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const t=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize())},i=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const t=this.agPropertiesMap[e.name];t&&(this.agAttributes[t]=e.value)});const{columnDefs:r,components:o,defaultColDef:n,getRowId:l,onGridReady:d,onFilterChanged:g,onFirstDataRendered:c}=e,h=(0,a.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered"]),u=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},n),components:this.combineAllGridComponents(o),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,a.sH)(this,void 0,void 0,function*(){var t,i,a;if(this.gridApi=e.api,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.pendingSchemaUpdate){const e=this.pendingSchemaUpdate;this.pendingSchemaUpdate=void 0;try{yield this.processSchemaUpdate(e)}catch(e){Ne.v.error("Grid Pro: failed to apply the pending schema update on grid ready:",e)}}this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),d&&d(e),(null===(t=this.gridProDatasource)||void 0===t?void 0:t.keepColDefsOnClearRowData)&&(null===(i=this.columnState)||void 0===i?void 0:i.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(St,{event:e,gridId:this.id}),this.$emit(s.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(a=this.gridProDatasource)||void 0===a||a.$emit(it.c.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.notifyDatasourceVisibleColumns(),c&&c(e)},onColumnPinned:t,onColumnResized:t,onColumnMoved:t,onColumnVisible:()=>{t(),i()},onDisplayedColumnsChanged:()=>{t(),i()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),g&&g(e))},onGridSizeChanged:t,onSortChanged:t}),h);this.gridProDatasource?(u.columnDefs=r,u.getRowId=l,this.setupStatusBar(u),this.setLocalGridOptions(u)):this.mergeAllColumnDefsAndStates(r).then(e=>{!this.disposed&&this.isConnected&&(u.columnDefs=e,u.getRowId=l,this.setupStatusBar(u),this.setLocalGridOptions(u),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),(0,ht.Qg)(e,this.agAttributes))}clearLocalGridOptions(){this.agGridOptions=void 0}resetGridOptionsState(){this.userProvidedGridOptions=void 0,this.agGridOptions=void 0}initGrid(){n.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.agGrid=(0,Le.Dvw)(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0)})}mergeAllColumnDefsAndStates(e){return(0,a.sH)(this,arguments,void 0,function*(e,t=!1){var i;const a=e||[];a.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const t=Fe[this.headerCaseType];t?e.headerName=t(e.field):Ne.v.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const r=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var t,i,r,o,n,l;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter||e.filter===De.enumFilter){if(!(null!=e.filterParams&&"values"in e.filterParams)){const s=null===(t=a.find(t=>t.field===e.field))||void 0===t?void 0:t.filterParams,l=null!==(i=null==s?void 0:s.values)&&void 0!==i?i:null===(n=null===(o=null===(r=null==s?void 0:s.filters)||void 0===r?void 0:r.find(e=>"agSetColumnFilter"===e.filter))||void 0===o?void 0:o.filterParams)||void 0===n?void 0:n.values;l&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:l}))}e.filter===De.enumFilter&&(null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=De.enumFloatingFilter))}e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=t=>{if(t.data[s.A7]===e.field)return{component:s.IX.editable}}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=bt.y,e.tooltipValueGetter=t=>{const i=t.data[s.h1];if(i&&i.column===e.field)return i.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var t;return(null===(t=e.data[s.h1])||void 0===t?void 0:t.column)===e.colDef.field}}));const d=a.find(t=>e.field===t.field);return Object.assign(Object.assign({},d),e)}),o=r.map(e=>e.field),n=[...r,...this.onlyTemplateColDefs?[]:a.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&t){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return(0,Ct.yS)(n,e);if((null===(i=this.gridProDatasource.deferredColumnStates)||void 0===i?void 0:i.length)>0)return(0,Ct.yS)(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,t){return t.some(t=>t.statusPanel===e)}addRowCountPanel(e,t){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const i=this.isServerSide||this.isInfiniteRowModel||"infinite"===(null==t?void 0:t.rowModelType)||"serverSide"===(null==t?void 0:t.rowModelType);if(i)this.panelExists(s.k7.rowCount,e)||e.push({statusPanel:s.k7.rowCount,align:"left"});else if(!i){const t="agTotalAndFilteredRowCountComponent";this.panelExists(t,e)||e.push({statusPanel:t,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(s.k7.labelValue,e)||e.push({statusPanel:s.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||xe.OD.MAX_ROWS_250,hide:!1},align:"left"}))}addAggregationPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.aggregation&&(this.panelExists("agAggregationComponent",e)||e.push({statusPanel:"agAggregationComponent",align:"right"}))}addDatasourcePanels(e){if(this.gridProDatasource){const t=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide||this.isInfiniteRowModel,this.statusBarConfig).filter(t=>!this.panelExists(t.statusPanel,e));e.push(...t)}}setupStatusBar(e){var t,i;if(this.withStatusBar&&this.statusBarConfig){const a=[...(null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]];this.addRowCountPanel(a,e),this.addMaxRowsPanel(a),this.addAggregationPanel(a),this.addDatasourcePanels(a);const r=((null===(i=e.statusBar)||void 0===i?void 0:i.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,a));a.push(...r),e.statusBar={statusPanels:a}}}get observedAttributes(){const e=ht.zI.map(e=>e.toLowerCase()),t=ht.zI.map(e=>(0,yt.w)(e));return e.concat(t)}agAttributeChangedCallback(e,t,i){var a;if(t===i)return;const r=this.agPropertiesMap[e];r&&(this.agAttributes[r]=i,this.initialised&&(null===(a=this.gridApi)||void 0===a||a.setGridOption(r,i)))}globalEventListener(e,t){const i=e.toLowerCase(),a=new Event(i);a.agGridDetails=t,this.dispatchEvent(a);const r="on"+i;"function"==typeof this[r]&&this[r](a)}}(0,a.Cg)([n.observable],wt.prototype,"gridApi",void 0),(0,a.Cg)([n.observable],wt.prototype,"gridErrorItems",void 0),(0,a.Cg)([ut.l],wt.prototype,"statePersistence",void 0),(0,a.Cg)([(0,n.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],wt.prototype,"autoCellRendererByType",void 0),(0,a.Cg)([(0,n.attr)({attribute:"only-template-col-defs",mode:"boolean"})],wt.prototype,"onlyTemplateColDefs",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"grid-autosizing"})],wt.prototype,"gridAutosizingEnabled",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],wt.prototype,"enableCellFlashing",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-row-flashing"})],wt.prototype,"enableRowFlashing",void 0),(0,a.Cg)([(0,n.attr)({attribute:"persist-column-state-key"})],wt.prototype,"persistColumnStateKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"persist-filter-model-key"})],wt.prototype,"persistFilterModelKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"header-case-type"})],wt.prototype,"headerCaseType",void 0),(0,a.Cg)([n.observable],wt.prototype,"rowData",void 0),(0,a.Cg)([n.attr],wt.prototype,"columnComponentName",void 0),(0,a.Cg)([n.observable],wt.prototype,"eventsAndCallbacks",void 0),(0,a.Cg)([n.attr],wt.prototype,"headerHeight",void 0),(0,a.Cg)([n.attr],wt.prototype,"rowHeight",void 0),(0,a.Cg)([n.observable],wt.prototype,"classNames",void 0),(0,a.Cg)([n.observable],wt.prototype,"agGrid",void 0),(0,a.Cg)([n.observable],wt.prototype,"gridSlot",void 0),(0,a.Cg)([n.observable],wt.prototype,"themeMode",void 0),(0,a.Cg)([n.observable],wt.prototype,"gridComponents",void 0),(0,a.Cg)([n.observable],wt.prototype,"statusBarConfig",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean",attribute:"with-status-bar"})],wt.prototype,"withStatusBar",void 0),(0,a.Cg)([n.observable],wt.prototype,"customErrorHandlerTemplate",void 0),(0,a.Cg)([s.lz],wt.prototype,"gridOptionsConfig",void 0),(0,a.Cg)([n.observable],wt.prototype,"provider",void 0);const Rt={backgroundColor:"var(--neutral-layer-card-container)",cellHorizontalPadding:"calc(var(--design-unit) * 2px)",foregroundColor:"var(--neutral-foreground-rest)",headerTextColor:"var(--neutral-foreground-hint)",headerBackgroundColor:"var(--neutral-layer-3)",headerColumnBorder:"1px solid var(--neutral-stroke-rest)",oddRowBackgroundColor:"var(--neutral-layer-1)",rowBorder:"1px solid var(--neutral-stroke-divider-rest)",borderColor:"var(--neutral-stroke-rest)",wrapperBorder:"0",accentColor:"var(--accent-foreground-rest)",fontFamily:"var(--body-font)",sideBarBackgroundColor:"var(--neutral-layer-2)",dataFontSize:"var(--type-ramp-minus-2-font-size)",iconButtonColor:"var(--accent-foreground-rest)",iconButtonHoverColor:"color-mix(in srgb, var(--accent-foreground-rest), var(--ag-foreground-color) 30%)"},Et=["rowheight","row-height"];function At(e){const t=Number(e);return Number.isFinite(t)&&t>0?t:void 0}class kt extends wt{getCachedTheme(e){const t=null!=e?e:"default";let i=kt.cachedThemes.get(t);return i||(i=Le.N8R.withParams("default"===t?Rt:Object.assign(Object.assign({},Rt),{rowHeight:`${t}px`})),kt.cachedThemes.set(t,i)),i}resolveRowHeight(e){for(const e of Et){const t=At(this.getAttribute(e));if(t)return t}return At(e.rowHeight)}agAttributeChangedCallback(e,t,i){var a;super.agAttributeChangedCallback(e,t,i),"rowHeight"===this.agPropertiesMap[e]&&t!==i&&(null===(a=this.gridApi)||void 0===a||a.setGridOption("theme",this.getCachedTheme(At(i))))}set gridOptions(e){const t=Object.assign({},e);t.components=Object.assign({[s.IX.action]:E,[s.IX.actionsMenu]:D,[s.IX.boolean]:T,[s.IX.editable]:F,[s.IX.select]:N,[s.IX.selectEditor]:d,[s.IX.numberEditor]:h,[s.IX.multiselectEditor]:m,[s.IX.dateEditor]:b,[s.IX.stringEditor]:S,[s.IX.statusPill]:z,[s.IX.icon]:M},t.components),t.theme=this.getCachedTheme(this.resolveRowHeight(t)),super.gridOptions=t}}kt.cachedThemes=new Map,(0,a.Cg)([n.observable],kt.prototype,"provider",void 0);const Dt=kt.compose(Object.assign({baseName:"grid-pro",template:ie,styles:n.css`
862
862
  ${U.yK}
863
863
  ${U.em}
864
864
 
@@ -880,7 +880,26 @@
880
880
  overflow: unset;
881
881
  background: var(--ag-scrollbar-background, var(--neutral-layer-4));
882
882
  }
883
- `,shadowOptions:Ee},Ae));var xt=i(96598);class Ot extends xt.t{}const Tt=Ot.compose({baseName:"grid-text-renderer",styles:xt.JN,template:(0,xt.d6)("rapid")}),It={rapidIconRenderer:_,rapidAgEditableRenderer:G,rapidAgActionRenderer:A,rapidAgActionsMenuRenderer:x,rapidAgBooleanRenderer:I,rapidAgTextRenderer:Tt,rapidAgSelectRenderer:H,rapidAgDateEditor:C,rapidAgMultiselectEditor:v,rapidAgSelectEditor:g,rapidAgNumberEditor:u,rapidAgStringEditor:w,rapidStatusPillRenderer:V,rapidGridPro:ke,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};var Lt=i(58749),Ft=i(95553),Gt=i(14609),Pt=i(86636);const Mt={fromView(e){if(null==e?void 0:e.trim())return e.includes(",")?e.split(",").map(e=>e.trim()):e.trim()},toView:e=>"string"==typeof e?e:Array.isArray(e)?e.join(","):""},_t="--dropdown-width",$t="options",Nt="dnone",Ht=n.css`
883
+
884
+ /*
885
+ * Server-side and infinite row models: reveal the inactive (unsorted) sort icon on header
886
+ * hover rather than always. The datasource adds .grid-pro-server-side / .grid-pro-infinite to
887
+ * the grid host while attached; unSortIcon renders the .ag-sort-none-icon on sortable columns,
888
+ * and these rules keep just that icon hidden until the header is hovered. Only the none icon
889
+ * is targeted - AG shows the ascending/descending icon (and hides the none icon) once a column
890
+ * is sorted, so a sorted column's arrow stays fully visible at rest. Matches the client-side
891
+ * model's quiet header while keeping sortability discoverable.
892
+ */
893
+ .grid-pro-server-side .ag-header-cell-sortable .ag-sort-none-icon,
894
+ .grid-pro-infinite .ag-header-cell-sortable .ag-sort-none-icon {
895
+ opacity: 0;
896
+ transition: opacity 0.15s ease-in-out;
897
+ }
898
+ .grid-pro-server-side .ag-header-cell-sortable:hover .ag-sort-none-icon,
899
+ .grid-pro-infinite .ag-header-cell-sortable:hover .ag-sort-none-icon {
900
+ opacity: 1;
901
+ }
902
+ `,shadowOptions:Ee},Ae));var xt=i(96598);class Ot extends xt.t{}const Tt=Ot.compose({baseName:"grid-text-renderer",styles:xt.JN,template:(0,xt.d6)("rapid")}),It={rapidIconRenderer:_,rapidAgEditableRenderer:G,rapidAgActionRenderer:A,rapidAgActionsMenuRenderer:x,rapidAgBooleanRenderer:I,rapidAgTextRenderer:Tt,rapidAgSelectRenderer:H,rapidAgDateEditor:y,rapidAgMultiselectEditor:v,rapidAgSelectEditor:g,rapidAgNumberEditor:u,rapidAgStringEditor:w,rapidStatusPillRenderer:V,rapidGridPro:ke,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};var Lt=i(58749),Ft=i(95553),Gt=i(14609),Pt=i(86636);const Mt={fromView(e){if(null==e?void 0:e.trim())return e.includes(",")?e.split(",").map(e=>e.trim()):e.trim()},toView:e=>"string"==typeof e?e:Array.isArray(e)?e.join(","):""},_t="--dropdown-width",$t="options",Nt="dnone",Ht=n.css`
884
903
  label {
885
904
  color: var(--neutral-foreground-hint, rgb(135 155 166));
886
905
  font-style: normal;
@@ -1069,5 +1088,5 @@
1069
1088
  </div>
1070
1089
  </div>
1071
1090
  </div>
1072
- `,Ut=Vt(),Kt={menuTabs:["filterMenuTab","generalMenuTab","columnsMenuTab"]},Xt=(e,t)=>!e.composedPath().includes(t);function jt(e,t,i,r){return(0,a.sH)(this,void 0,void 0,function*(){var a;try{const s=function(e,t){const i=(new Lt.K).withField(e).withValue(null!=t?t:"").withSerialiser(Ft.n.EQ).withGroup("default").build();return i.serialiser(i)}(i,r),o=yield e.request(t,{DETAILS:{CRITERIA_MATCH:s}});return 1===(null===(a=o.REPLY)||void 0===a?void 0:a.length)?o.REPLY[0]:void 0}catch(e){return void console.error(`Failed to retrieve object from the ${t} resource: ${e instanceof Error?e.message:String(e)}`)}})}class qt extends((0,Te.S)(re.FoundationElement)){constructor(){super(...arguments),this.requestSupportsAdvancedSearch=!1,this.defaultSlottedNodes=[],this.getAndSetRowsDebounce=Pe()(()=>this.getAndSetRows(),300),this.handleClickOutside=e=>{Xt(e,this)&&(this.open=!1)}}get connect(){var e;return null!==(e=this.connectOverride)&&void 0!==e?e:this._connectDI}set connect(e){this.connectOverride=e}get value(){return n.Observable.track(this,"value"),this._value}set value(e){e!==this._value&&(e?jt(this.connect,this.resourceName,this.valueKey,e).then(t=>{this.value===e&&(this.selectedRow=t)}):this.selectedRow=void 0,this.emitValue(e))}get displayValue(){return this.selectedRow&&this.labelKey&&this.selectedRow[this.labelKey]||this.value||""}get hasSearchKey(){return!!this.searchKey&&this.searchKey.length>0}get hasSlottedContent(){return!(!this.defaultSlottedNodes||0===this.defaultSlottedNodes.length)&&this.defaultSlottedNodes.some(e=>{var t;return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(null===(t=e.textContent)||void 0===t?void 0:t.trim().length)>0})}connectedCallback(){var e;super.connectedCallback(),(null===(e=this.optionsElement)||void 0===e?void 0:e.style)&&this.dropdownWidthChanged(),this.open=!1,this.filterSearch="",this.grid&&(this.grid.gridOptions={defaultColDef:Kt,onRowClicked:e=>{this.selectedRow=e.data,this.emitValue(e.data[this.valueKey]),this.toggle()}})}setGridRowData(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({rowData:e}):i.setRowData(e))}setGridColumnDefs(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({columnDefs:e}):i.setColumnDefs(e))}emitValue(e){this._value=e,this.$emit("change",e),this.$emit("input",e),n.Observable.notify(this,"value")}toggle(){this.open=!this.open}getAndSetRows(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;if(!(null===(e=this.grid)||void 0===e?void 0:e.gridApi))return;const i=this.lastRequest={},a=this.request?{REQUEST:Object.assign({},this.request)}:{},r=Array.isArray(this.searchKey)&&1===this.searchKey.length?this.searchKey[0]:this.searchKey;let s;if(r&&this.filterSearch)if(this.requestSupportsAdvancedSearch){const e=(Array.isArray(r)?r:[r]).map(e=>{var t;return(new Lt.K).withField(e).withValue(null!==(t=this.filterSearch)&&void 0!==t?t:"").withSerialiser(Ft.n.containsIgnoreCase).withGroup("default").build()}),t=new Gt.b;t.Or(e,{join:Pt.r.Or()}),s=t.build()}else{if(Array.isArray(r))throw Error("MulticolumnDropdown: Unable to search multiple keys via request; if the request is a GPAL ReqRep, set requestSupportsAdvancedSearch to true");a.REQUEST=Object.assign(Object.assign({},a.REQUEST),{[r]:`*${this.filterSearch}*`})}const o=null===(t=this.baseCriteria)||void 0===t?void 0:t.trim();o&&s?s=`(${s}) && (${o})`:o&&(s=o),s&&(a.DETAILS={CRITERIA_MATCH:s});try{const e=yield this.connect.request(this.resourceName,a);if(i!==this.lastRequest)return;const t=(null==e?void 0:e.REPLY)||[];this.setGridRowData(t),t.length>0?this.grid.gridApi.hideOverlay():this.grid.gridApi.showNoRowsOverlay()}catch(e){console.error(`Failed to retrieve rows from the ${this.resourceName} resource: ${e instanceof Error?e.message:String(e)}`)}})}filterSearchChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRowsDebounce())}requestChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRows())}columnDefinitionsChanged(){this.setGridColumnDefs(this.columnDefinitions)}openChanged(){var e,t;this.open?(document.addEventListener("mousedown",this.handleClickOutside),(null===(e=this.grid)||void 0===e?void 0:e.gridApi)&&(this.grid.gridApi.showLoadingOverlay(),this.getAndSetRows())):(document.removeEventListener("mousedown",this.handleClickOutside),this.filterSearch="",(null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]))}dropdownWidthChanged(){var e,t;null===(t=null===(e=this.optionsElement)||void 0===e?void 0:e.style)||void 0===t||t.setProperty(_t,this.dropdownWidth>0?`${this.dropdownWidth}px`:"inherit")}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback();const e=this.shouldRunDisconnect;n.DOM.queueUpdate(()=>{var t;e&&((null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]),this.selectedRow=void 0,this._value=void 0)})}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}}(0,a.Cg)([Je.dm],qt.prototype,"_connectDI",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean"})],qt.prototype,"disabled",void 0),(0,a.Cg)([(0,n.attr)({attribute:"resource-name"})],qt.prototype,"resourceName",void 0),(0,a.Cg)([(0,n.attr)({attribute:"search-key",converter:Mt})],qt.prototype,"searchKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"advanced-search-req",mode:"boolean"})],qt.prototype,"requestSupportsAdvancedSearch",void 0),(0,a.Cg)([(0,n.attr)({attribute:"value-key"})],qt.prototype,"valueKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"label-key"})],qt.prototype,"labelKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"dropdown-placement"})],qt.prototype,"dropdownPlacement",void 0),(0,a.Cg)([n.attr],qt.prototype,"dropdownWidth",void 0),(0,a.Cg)([n.observable],qt.prototype,"request",void 0),(0,a.Cg)([n.observable],qt.prototype,"columnDefinitions",void 0),(0,a.Cg)([n.observable],qt.prototype,"baseCriteria",void 0),(0,a.Cg)([n.observable],qt.prototype,"defaultSlottedNodes",void 0),(0,a.Cg)([n.observable],qt.prototype,"filterSearch",void 0),(0,a.Cg)([n.observable],qt.prototype,"open",void 0),(0,a.Cg)([n.observable],qt.prototype,"selectedRow",void 0),(0,a.Cg)([n.volatile],qt.prototype,"displayValue",null),(0,a.Cg)([n.volatile],qt.prototype,"hasSearchKey",null),(0,a.Cg)([n.volatile],qt.prototype,"hasSlottedContent",null);const Yt=qt.compose({baseName:"multicolumn-dropdown",template:Ut,styles:Ht}),Wt=qt.compose({baseName:"multicolumn-dropdown",template:Vt("rapid"),styles:Ht});var Qt=i(3299),Jt=i(70349),Zt=i(91327),ei=i(30335),ti=i(22133);class ii{constructor(e,t){this.criteria=e,this.onActiveChanged=t,this.matchedRowIds=new Set,this.lastReportedActive=!1}get active(){return this.matchedRowIds.size>0}get matchCount(){return this.matchedRowIds.size}reset(){this.matchedRowIds.clear(),this.report()}handleDataChanged(e){var t;const{add:i=[],update:a=[],remove:r=[]}=null!==(t=null==e?void 0:e.changes)&&void 0!==t?t:{};for(const e of r)this.syncRow(e,!0);for(const e of i)this.syncRow(e,!1);for(const e of a)this.syncRow(e,!1);this.report()}handleDataCleared(){this.reset()}observe(e){const t=e=>{this.handleDataChanged(e.detail)},i=()=>{this.handleDataCleared()};return e.addEventListener(it.c.dataChanged,t),e.addEventListener(it.c.dataCleared,i),()=>{e.removeEventListener(it.c.dataChanged,t),e.removeEventListener(it.c.dataCleared,i)}}syncRow(e,t){var i;if(!e)return;const a=String(null!==(i=e[this.criteria.rowIdField])&&void 0!==i?i:"");a&&(!t&&(0,ti.D)(this.criteria,e)?this.matchedRowIds.add(a):this.matchedRowIds.delete(a))}report(){const e=this.active;e!==this.lastReportedActive&&(this.lastReportedActive=e,this.onActiveChanged(e))}}var ai=i(49260),ri=i(49568);const si={foundationIconRenderer:P.qN,foundationGridProActionRenderer:R._X,foundationGridProActionsMenuRenderer:k.su,foundationAgBooleanRenderer:O.fg,foundationAgTextRenderer:xt.G4,foundationAgTextFieldRenderer:Jt.wG,foundationAgEditableRenderer:L.r8,foundationAgSelectRenderer:$.bE,foundationSelectEditor:l.RU,foundationNumberEditor:c.CY,foundationDateEditor:f.vr,foundationMultiselectEditor:p.UH,foundationStringEditor:y.cb,foundationMulticolumnDropdown:Yt,foundationStatusPillRenderer:B.a1,StatusPillRenderer:B.N7,foundationGridPro:r.RB,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}},oi=[{id:"error",label:"Error",value:"var(--error-fill-rest, #c62828)"},{id:"warning",label:"Warning",value:"var(--warning-fill-rest, #ef6c00)"},{id:"success",label:"Success",value:"var(--success-fill-rest, #2e7d32)"},{id:"accent",label:"Accent",value:"var(--accent-fill-rest, #1565c0)"},{id:"neutral",label:"Neutral",value:"var(--neutral-fill-rest, #546e7a)"}],ni=[{id:"slow",label:"Slow",value:1400},{id:"normal",label:"Normal",value:1e3},{id:"fast",label:"Fast",value:500}],li=[{id:"row",label:"Whole row",value:"row"},{id:"cell",label:"Alert field cell",value:"cell"}],di={color:oi[0].value,durationMs:ni[1].value,scope:"row"};function gi(e){return{color:"string"==typeof(null==e?void 0:e.color)&&e.color.trim().length>0?e.color:di.color,durationMs:"number"==typeof(null==e?void 0:e.durationMs)&&Number.isFinite(e.durationMs)&&e.durationMs>0?e.durationMs:di.durationMs,scope:"row"===(null==e?void 0:e.scope)||"cell"===(null==e?void 0:e.scope)?e.scope:di.scope}}const ci=new Map;function hi(e){const{persistPreferencesKey:t,target:i,mirrorColorTo:a=[]}=e,r=t?function(e){if(e.statePersistence)return e.statePersistence;try{return re.DI.getOrCreateDOMContainer().get(ut.l)}catch(e){return void Ne.v.debug("Row alert preferences will not persist; no StatePersistence available",e)}}(e):void 0,s=new Set;let o=gi(Object.assign(Object.assign({},di),e.preferences));function n(){const e=null!=i?i:"undefined"==typeof document?void 0:document.documentElement;if(e){e.style.setProperty("--row-alert-color",o.color),e.style.setProperty("--alert-flash-duration",`${o.durationMs}ms`);for(const t of a)e.style.setProperty(t,o.color)}}function l(e,i){o=e,n();for(const e of s)e(o);i&&t&&(null==r?void 0:r.saveRowAlertPreferences)&&r.saveRowAlertPreferences(t,o).catch(e=>{Ne.v.warn("Could not save row alert preferences",e)})}return n(),t&&(null==r?void 0:r.getRowAlertPreferences)&&r.getRowAlertPreferences(t).then(e=>{l(gi(Object.assign(Object.assign({},o),e)),!1)}).catch(e=>{Ne.v.warn("Could not load row alert preferences",e)}),{get preferences(){return o},change(e){l(gi(Object.assign(Object.assign({},o),e)),!0)},subscribe:e=>(s.add(e),()=>{s.delete(e)})}}function ui(e,t={}){var i,a,r,s,o;const{colorPresets:n=oi,ratePresets:l=ni,menuLabel:d="Alert flash"}=t,g=function(e){const{persistPreferencesKey:t}=e;if(!t)return hi(e);let i=ci.get(t);return i||(i=hi(e),ci.set(t,i)),i}(t),c=(0,ai.PO)(e)[ai.Xm],h=(0,ai.Li)(Object.assign(Object.assign({},e),{flashField:null!==(a=null!==(i=e.flashField)&&void 0!==i?i:e.stateField)&&void 0!==a?a:null===(o=null===(s=null===(r=e.anyOf)||void 0===r?void 0:r[0])||void 0===s?void 0:s[0])||void 0===o?void 0:o.field}))[ai.mJ];function u(e,t,i,a){return e.map(e=>({name:e.label,checked:e.value===t,action:()=>{g.change(i(e.value)),a()}}))}const p={rowClassRules:{[ai.Xm]:e=>"row"===g.preferences.scope&&c(e)},defaultColDef:{cellClassRules:{[ai.mJ]:e=>"cell"===g.preferences.scope&&h(e)}},get preferences(){return g.preferences},createMenuItem(e){const t=()=>{var t;return null===(t=null==e?void 0:e.redrawRows)||void 0===t?void 0:t.call(e)};return{name:d,subMenu:[{name:"Flash target",subMenu:u(li,g.preferences.scope,e=>({scope:e}),t)},{name:"Color",subMenu:u(n,g.preferences.color,e=>({color:e}),()=>{})},{name:"Flash rate",subMenu:u(l,g.preferences.durationMs,e=>({durationMs:e}),()=>{})},{name:"Reset to defaults",action:()=>{p.reset(),t()}}]}},getContextMenuItems(e){var t;return[...null!==(t=e.defaultItems)&&void 0!==t?t:[],"separator",p.createMenuItem(e.api)]},setPreferences(e){g.change(e)},reset(){g.change(di)},subscribe:e=>g.subscribe(e)};return p}var pi=i(92277);const mi=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,vi=e=>{const t=e.split(":");let i,a;2===t.length?[i,a]=t:a=e;const r=(e=>{if(mi.test(e)){const t=atob(e),i=new Uint8Array(t.length);return[...t].forEach((e,a)=>{i[a]=t.charCodeAt(a)}),i.buffer}return e})(a);if("str"===i){return new TextDecoder("utf-8").decode(r)}return r},fi=e=>{const t=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const t=new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),"");return btoa(t)}return""})(e);return"string"==typeof e?`str:${t}`:e instanceof ArrayBuffer?`bin:${t}`:""},bi={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},Ci=re.DI.createInterface();var yi,Si;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(yi||(yi={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(Si||(Si={}));let wi=class{constructor(e,t,i=bi){this.connect=e,this.user=t,this.kvStorageConfig=i}delete(e){return(0,a.sH)(this,void 0,void 0,function*(){const t={DETAILS:{KEYS:e}},i=yield this.connect.commitEvent(Si.EVENT_KEY_VALUE_DELETE,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}get(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i={REQUEST:{USER_NAME:null!==(t=this.kvStorageConfig.authEmail)&&void 0!==t?t:this.user.userName,KEY:e}},a=yield this.connect.request(yi.REQ_KEY_VALUE_READ,i);if(a&&a.REPLY&&a.REPLY.length>0){const t=a.REPLY.map(e=>{const t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let t=vi(e);return"string"==typeof t&&t.startsWith("str:")&&(t=vi(t)),"string"==typeof t&&t.startsWith("bin:")&&(t=vi(t)),t}list(){return(0,a.sH)(this,void 0,void 0,function*(){var e;const t={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},i=yield this.connect.request(yi.REQ_KEY_VALUE_LIST,t);if(i&&i.REPLY&&i.REPLY.length>0){return i.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,a.sH)(this,void 0,void 0,function*(){const t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?fi(e.value):e.value}))}},i=yield this.connect.commitEvent(Si.EVENT_KEY_VALUE_PUT,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}};wi=(0,a.Cg)([(0,a.Qj)(0,Je.dm),(0,a.Qj)(1,pi.KJ),(0,a.Qj)(2,(0,re.optional)(Ci))],wi);const Ri=re.DI.createInterface(e=>e.singleton(wi));var Ei=i(98316);class Ai{getColumnState(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;yield this.migrateLocalStorageToKVStorage(e);const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):[]})}saveColumnState(e,t){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}deleteColumnState(e){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.delete([e])})}migrateLocalStorageToKVStorage(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e);if(i&&(null===(t=i.kv)||void 0===t?void 0:t.value))return;const a=this.session.getLocalStorageItem("gridOptions"),r=a?JSON.parse(a)[e]:void 0;r&&(Ne.v.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:r}]))})}getFilterModel(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveFilterModel(e,t){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}getRowAlertPreferences(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveRowAlertPreferences(e,t){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}}(0,a.Cg)([Ri],Ai.prototype,"kvStorage",void 0),(0,a.Cg)([Ei.N],Ai.prototype,"session",void 0);var ki=i(11749);const Di=o.SwatchRGB.from((0,se.parseColorHexRGB)("#4c4c4c")),xi=o.SwatchRGB.from((0,se.parseColorHexRGB)("#c01754")),{create:Oi}=re.DesignToken,Ti={foregroundColor:Oi("fui-ag-foreground-color").withDefault(xi),backgroundColor:Oi("fui-ag-background-color").withDefault(Di)};var Ii=i(68858),Li=i(49874);const Fi={processCellCallback:e=>["+","=","-","@","\t","\n"].some(t=>String(e.value).startsWith(t))?`'${e.value}`:e.value}}}]);
1073
- //# sourceMappingURL=122.d6a83851d86c188b6a7a7c71791572f9.js.map
1091
+ `,Ut=Vt(),Kt={menuTabs:["filterMenuTab","generalMenuTab","columnsMenuTab"]},Xt=(e,t)=>!e.composedPath().includes(t);function jt(e,t,i,r){return(0,a.sH)(this,void 0,void 0,function*(){var a;try{const s=function(e,t){const i=(new Lt.K).withField(e).withValue(null!=t?t:"").withSerialiser(Ft.n.EQ).withGroup("default").build();return i.serialiser(i)}(i,r),o=yield e.request(t,{DETAILS:{CRITERIA_MATCH:s}});return 1===(null===(a=o.REPLY)||void 0===a?void 0:a.length)?o.REPLY[0]:void 0}catch(e){return void console.error(`Failed to retrieve object from the ${t} resource: ${e instanceof Error?e.message:String(e)}`)}})}class qt extends((0,Te.S)(re.FoundationElement)){constructor(){super(...arguments),this.requestSupportsAdvancedSearch=!1,this.defaultSlottedNodes=[],this.getAndSetRowsDebounce=Pe()(()=>this.getAndSetRows(),300),this.handleClickOutside=e=>{Xt(e,this)&&(this.open=!1)}}get connect(){var e;return null!==(e=this.connectOverride)&&void 0!==e?e:this._connectDI}set connect(e){this.connectOverride=e}get value(){return n.Observable.track(this,"value"),this._value}set value(e){e!==this._value&&(e?jt(this.connect,this.resourceName,this.valueKey,e).then(t=>{this.value===e&&(this.selectedRow=t)}):this.selectedRow=void 0,this.emitValue(e))}get displayValue(){return this.selectedRow&&this.labelKey&&this.selectedRow[this.labelKey]||this.value||""}get hasSearchKey(){return!!this.searchKey&&this.searchKey.length>0}get hasSlottedContent(){return!(!this.defaultSlottedNodes||0===this.defaultSlottedNodes.length)&&this.defaultSlottedNodes.some(e=>{var t;return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(null===(t=e.textContent)||void 0===t?void 0:t.trim().length)>0})}connectedCallback(){var e;super.connectedCallback(),(null===(e=this.optionsElement)||void 0===e?void 0:e.style)&&this.dropdownWidthChanged(),this.open=!1,this.filterSearch="",this.grid&&(this.grid.gridOptions={defaultColDef:Kt,onRowClicked:e=>{this.selectedRow=e.data,this.emitValue(e.data[this.valueKey]),this.toggle()}})}setGridRowData(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({rowData:e}):i.setRowData(e))}setGridColumnDefs(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({columnDefs:e}):i.setColumnDefs(e))}emitValue(e){this._value=e,this.$emit("change",e),this.$emit("input",e),n.Observable.notify(this,"value")}toggle(){this.open=!this.open}getAndSetRows(){return(0,a.sH)(this,void 0,void 0,function*(){var e,t;if(!(null===(e=this.grid)||void 0===e?void 0:e.gridApi))return;const i=this.lastRequest={},a=this.request?{REQUEST:Object.assign({},this.request)}:{},r=Array.isArray(this.searchKey)&&1===this.searchKey.length?this.searchKey[0]:this.searchKey;let s;if(r&&this.filterSearch)if(this.requestSupportsAdvancedSearch){const e=(Array.isArray(r)?r:[r]).map(e=>{var t;return(new Lt.K).withField(e).withValue(null!==(t=this.filterSearch)&&void 0!==t?t:"").withSerialiser(Ft.n.containsIgnoreCase).withGroup("default").build()}),t=new Gt.b;t.Or(e,{join:Pt.r.Or()}),s=t.build()}else{if(Array.isArray(r))throw Error("MulticolumnDropdown: Unable to search multiple keys via request; if the request is a GPAL ReqRep, set requestSupportsAdvancedSearch to true");a.REQUEST=Object.assign(Object.assign({},a.REQUEST),{[r]:`*${this.filterSearch}*`})}const o=null===(t=this.baseCriteria)||void 0===t?void 0:t.trim();o&&s?s=`(${s}) && (${o})`:o&&(s=o),s&&(a.DETAILS={CRITERIA_MATCH:s});try{const e=yield this.connect.request(this.resourceName,a);if(i!==this.lastRequest)return;const t=(null==e?void 0:e.REPLY)||[];this.setGridRowData(t),t.length>0?this.grid.gridApi.hideOverlay():this.grid.gridApi.showNoRowsOverlay()}catch(e){console.error(`Failed to retrieve rows from the ${this.resourceName} resource: ${e instanceof Error?e.message:String(e)}`)}})}filterSearchChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRowsDebounce())}requestChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRows())}columnDefinitionsChanged(){this.setGridColumnDefs(this.columnDefinitions)}openChanged(){var e,t;this.open?(document.addEventListener("mousedown",this.handleClickOutside),(null===(e=this.grid)||void 0===e?void 0:e.gridApi)&&(this.grid.gridApi.showLoadingOverlay(),this.getAndSetRows())):(document.removeEventListener("mousedown",this.handleClickOutside),this.filterSearch="",(null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]))}dropdownWidthChanged(){var e,t;null===(t=null===(e=this.optionsElement)||void 0===e?void 0:e.style)||void 0===t||t.setProperty(_t,this.dropdownWidth>0?`${this.dropdownWidth}px`:"inherit")}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback();const e=this.shouldRunDisconnect;n.DOM.queueUpdate(()=>{var t;e&&((null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]),this.selectedRow=void 0,this._value=void 0)})}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}}(0,a.Cg)([Je.dm],qt.prototype,"_connectDI",void 0),(0,a.Cg)([(0,n.attr)({mode:"boolean"})],qt.prototype,"disabled",void 0),(0,a.Cg)([(0,n.attr)({attribute:"resource-name"})],qt.prototype,"resourceName",void 0),(0,a.Cg)([(0,n.attr)({attribute:"search-key",converter:Mt})],qt.prototype,"searchKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"advanced-search-req",mode:"boolean"})],qt.prototype,"requestSupportsAdvancedSearch",void 0),(0,a.Cg)([(0,n.attr)({attribute:"value-key"})],qt.prototype,"valueKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"label-key"})],qt.prototype,"labelKey",void 0),(0,a.Cg)([(0,n.attr)({attribute:"dropdown-placement"})],qt.prototype,"dropdownPlacement",void 0),(0,a.Cg)([n.attr],qt.prototype,"dropdownWidth",void 0),(0,a.Cg)([n.observable],qt.prototype,"request",void 0),(0,a.Cg)([n.observable],qt.prototype,"columnDefinitions",void 0),(0,a.Cg)([n.observable],qt.prototype,"baseCriteria",void 0),(0,a.Cg)([n.observable],qt.prototype,"defaultSlottedNodes",void 0),(0,a.Cg)([n.observable],qt.prototype,"filterSearch",void 0),(0,a.Cg)([n.observable],qt.prototype,"open",void 0),(0,a.Cg)([n.observable],qt.prototype,"selectedRow",void 0),(0,a.Cg)([n.volatile],qt.prototype,"displayValue",null),(0,a.Cg)([n.volatile],qt.prototype,"hasSearchKey",null),(0,a.Cg)([n.volatile],qt.prototype,"hasSlottedContent",null);const Yt=qt.compose({baseName:"multicolumn-dropdown",template:Ut,styles:Ht}),Wt=qt.compose({baseName:"multicolumn-dropdown",template:Vt("rapid"),styles:Ht});var Qt=i(3299),Jt=i(70349),Zt=i(91327),ei=i(30335),ti=i(22133);class ii{constructor(e,t){this.criteria=e,this.onActiveChanged=t,this.matchedRowIds=new Set,this.lastReportedActive=!1}get active(){return this.matchedRowIds.size>0}get matchCount(){return this.matchedRowIds.size}reset(){this.matchedRowIds.clear(),this.report()}handleDataChanged(e){var t;const{add:i=[],update:a=[],remove:r=[]}=null!==(t=null==e?void 0:e.changes)&&void 0!==t?t:{};for(const e of r)this.syncRow(e,!0);for(const e of i)this.syncRow(e,!1);for(const e of a)this.syncRow(e,!1);this.report()}handleDataCleared(){this.reset()}observe(e){const t=e=>{this.handleDataChanged(e.detail)},i=()=>{this.handleDataCleared()};return e.addEventListener(it.c.dataChanged,t),e.addEventListener(it.c.dataCleared,i),()=>{e.removeEventListener(it.c.dataChanged,t),e.removeEventListener(it.c.dataCleared,i)}}syncRow(e,t){var i;if(!e)return;const a=String(null!==(i=e[this.criteria.rowIdField])&&void 0!==i?i:"");a&&(!t&&(0,ti.D)(this.criteria,e)?this.matchedRowIds.add(a):this.matchedRowIds.delete(a))}report(){const e=this.active;e!==this.lastReportedActive&&(this.lastReportedActive=e,this.onActiveChanged(e))}}var ai=i(49260),ri=i(49568);const si={foundationIconRenderer:P.qN,foundationGridProActionRenderer:R._X,foundationGridProActionsMenuRenderer:k.su,foundationAgBooleanRenderer:O.fg,foundationAgTextRenderer:xt.G4,foundationAgTextFieldRenderer:Jt.wG,foundationAgEditableRenderer:L.r8,foundationAgSelectRenderer:$.bE,foundationSelectEditor:l.RU,foundationNumberEditor:c.CY,foundationDateEditor:f.vr,foundationMultiselectEditor:p.UH,foundationStringEditor:C.cb,foundationMulticolumnDropdown:Yt,foundationStatusPillRenderer:B.a1,StatusPillRenderer:B.N7,foundationGridPro:r.RB,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}},oi=[{id:"error",label:"Error",value:"var(--error-fill-rest, #c62828)"},{id:"warning",label:"Warning",value:"var(--warning-fill-rest, #ef6c00)"},{id:"success",label:"Success",value:"var(--success-fill-rest, #2e7d32)"},{id:"accent",label:"Accent",value:"var(--accent-fill-rest, #1565c0)"},{id:"neutral",label:"Neutral",value:"var(--neutral-fill-rest, #546e7a)"}],ni=[{id:"slow",label:"Slow",value:1400},{id:"normal",label:"Normal",value:1e3},{id:"fast",label:"Fast",value:500}],li=[{id:"row",label:"Whole row",value:"row"},{id:"cell",label:"Alert field cell",value:"cell"}],di={color:oi[0].value,durationMs:ni[1].value,scope:"row"};function gi(e){return{color:"string"==typeof(null==e?void 0:e.color)&&e.color.trim().length>0?e.color:di.color,durationMs:"number"==typeof(null==e?void 0:e.durationMs)&&Number.isFinite(e.durationMs)&&e.durationMs>0?e.durationMs:di.durationMs,scope:"row"===(null==e?void 0:e.scope)||"cell"===(null==e?void 0:e.scope)?e.scope:di.scope}}const ci=new Map;function hi(e){const{persistPreferencesKey:t,target:i,mirrorColorTo:a=[]}=e,r=t?function(e){if(e.statePersistence)return e.statePersistence;try{return re.DI.getOrCreateDOMContainer().get(ut.l)}catch(e){return void Ne.v.debug("Row alert preferences will not persist; no StatePersistence available",e)}}(e):void 0,s=new Set;let o=gi(Object.assign(Object.assign({},di),e.preferences));function n(){const e=null!=i?i:"undefined"==typeof document?void 0:document.documentElement;if(e){e.style.setProperty("--row-alert-color",o.color),e.style.setProperty("--alert-flash-duration",`${o.durationMs}ms`);for(const t of a)e.style.setProperty(t,o.color)}}function l(e,i){o=e,n();for(const e of s)e(o);i&&t&&(null==r?void 0:r.saveRowAlertPreferences)&&r.saveRowAlertPreferences(t,o).catch(e=>{Ne.v.warn("Could not save row alert preferences",e)})}return n(),t&&(null==r?void 0:r.getRowAlertPreferences)&&r.getRowAlertPreferences(t).then(e=>{l(gi(Object.assign(Object.assign({},o),e)),!1)}).catch(e=>{Ne.v.warn("Could not load row alert preferences",e)}),{get preferences(){return o},change(e){l(gi(Object.assign(Object.assign({},o),e)),!0)},subscribe:e=>(s.add(e),()=>{s.delete(e)})}}function ui(e,t={}){var i,a,r,s,o;const{colorPresets:n=oi,ratePresets:l=ni,menuLabel:d="Alert flash"}=t,g=function(e){const{persistPreferencesKey:t}=e;if(!t)return hi(e);let i=ci.get(t);return i||(i=hi(e),ci.set(t,i)),i}(t),c=(0,ai.PO)(e)[ai.Xm],h=(0,ai.Li)(Object.assign(Object.assign({},e),{flashField:null!==(a=null!==(i=e.flashField)&&void 0!==i?i:e.stateField)&&void 0!==a?a:null===(o=null===(s=null===(r=e.anyOf)||void 0===r?void 0:r[0])||void 0===s?void 0:s[0])||void 0===o?void 0:o.field}))[ai.mJ];function u(e,t,i,a){return e.map(e=>({name:e.label,checked:e.value===t,action:()=>{g.change(i(e.value)),a()}}))}const p={rowClassRules:{[ai.Xm]:e=>"row"===g.preferences.scope&&c(e)},defaultColDef:{cellClassRules:{[ai.mJ]:e=>"cell"===g.preferences.scope&&h(e)}},get preferences(){return g.preferences},createMenuItem(e){const t=()=>{var t;return null===(t=null==e?void 0:e.redrawRows)||void 0===t?void 0:t.call(e)};return{name:d,subMenu:[{name:"Flash target",subMenu:u(li,g.preferences.scope,e=>({scope:e}),t)},{name:"Color",subMenu:u(n,g.preferences.color,e=>({color:e}),()=>{})},{name:"Flash rate",subMenu:u(l,g.preferences.durationMs,e=>({durationMs:e}),()=>{})},{name:"Reset to defaults",action:()=>{p.reset(),t()}}]}},getContextMenuItems(e){var t;return[...null!==(t=e.defaultItems)&&void 0!==t?t:[],"separator",p.createMenuItem(e.api)]},setPreferences(e){g.change(e)},reset(){g.change(di)},subscribe:e=>g.subscribe(e)};return p}var pi=i(92277);const mi=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,vi=e=>{const t=e.split(":");let i,a;2===t.length?[i,a]=t:a=e;const r=(e=>{if(mi.test(e)){const t=atob(e),i=new Uint8Array(t.length);return[...t].forEach((e,a)=>{i[a]=t.charCodeAt(a)}),i.buffer}return e})(a);if("str"===i){return new TextDecoder("utf-8").decode(r)}return r},fi=e=>{const t=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const t=new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),"");return btoa(t)}return""})(e);return"string"==typeof e?`str:${t}`:e instanceof ArrayBuffer?`bin:${t}`:""},bi={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},yi=re.DI.createInterface();var Ci,Si;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(Ci||(Ci={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(Si||(Si={}));let wi=class{constructor(e,t,i=bi){this.connect=e,this.user=t,this.kvStorageConfig=i}delete(e){return(0,a.sH)(this,void 0,void 0,function*(){const t={DETAILS:{KEYS:e}},i=yield this.connect.commitEvent(Si.EVENT_KEY_VALUE_DELETE,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}get(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i={REQUEST:{USER_NAME:null!==(t=this.kvStorageConfig.authEmail)&&void 0!==t?t:this.user.userName,KEY:e}},a=yield this.connect.request(Ci.REQ_KEY_VALUE_READ,i);if(a&&a.REPLY&&a.REPLY.length>0){const t=a.REPLY.map(e=>{const t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let t=vi(e);return"string"==typeof t&&t.startsWith("str:")&&(t=vi(t)),"string"==typeof t&&t.startsWith("bin:")&&(t=vi(t)),t}list(){return(0,a.sH)(this,void 0,void 0,function*(){var e;const t={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},i=yield this.connect.request(Ci.REQ_KEY_VALUE_LIST,t);if(i&&i.REPLY&&i.REPLY.length>0){return i.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,a.sH)(this,void 0,void 0,function*(){const t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?fi(e.value):e.value}))}},i=yield this.connect.commitEvent(Si.EVENT_KEY_VALUE_PUT,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}};wi=(0,a.Cg)([(0,a.Qj)(0,Je.dm),(0,a.Qj)(1,pi.KJ),(0,a.Qj)(2,(0,re.optional)(yi))],wi);const Ri=re.DI.createInterface(e=>e.singleton(wi));var Ei=i(98316);class Ai{getColumnState(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;yield this.migrateLocalStorageToKVStorage(e);const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):[]})}saveColumnState(e,t){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}deleteColumnState(e){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.delete([e])})}migrateLocalStorageToKVStorage(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e);if(i&&(null===(t=i.kv)||void 0===t?void 0:t.value))return;const a=this.session.getLocalStorageItem("gridOptions"),r=a?JSON.parse(a)[e]:void 0;r&&(Ne.v.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:r}]))})}getFilterModel(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveFilterModel(e,t){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}getRowAlertPreferences(e){return(0,a.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveRowAlertPreferences(e,t){return(0,a.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}}(0,a.Cg)([Ri],Ai.prototype,"kvStorage",void 0),(0,a.Cg)([Ei.N],Ai.prototype,"session",void 0);var ki=i(11749);const Di=o.SwatchRGB.from((0,se.parseColorHexRGB)("#4c4c4c")),xi=o.SwatchRGB.from((0,se.parseColorHexRGB)("#c01754")),{create:Oi}=re.DesignToken,Ti={foregroundColor:Oi("fui-ag-foreground-color").withDefault(xi),backgroundColor:Oi("fui-ag-background-color").withDefault(Di)};var Ii=i(68858),Li=i(49874);const Fi={processCellCallback:e=>["+","=","-","@","\t","\n"].some(t=>String(e.value).startsWith(t))?`'${e.value}`:e.value}}}]);
1092
+ //# sourceMappingURL=122.b24c02e6533b0422407b14ce89b68108.js.map