@progress/kendo-react-grid 7.2.3-develop.3 → 7.2.4-develop.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.
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(m,J){typeof exports=="object"&&typeof module!="undefined"?J(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-intl"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-data-query"),require("@progress/kendo-react-animation")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-data-tools","@progress/kendo-react-intl","@progress/kendo-svg-icons","@progress/kendo-react-inputs","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-react-buttons","@progress/kendo-react-dropdowns","@progress/kendo-data-query","@progress/kendo-react-animation"],J):(m=typeof globalThis!="undefined"?globalThis:m||self,J(m.KendoReactGrid={},m.React,m.PropTypes,m.KendoReactCommon,m.KendoReactDataTools,m.KendoReactIntl,m.KendoSvgIcons,m.KendoReactInputs,m.KendoReactDateinputs,m.KendoReactPopup,m.KendoReactButtons,m.KendoReactDropdowns,m.KendoDataQuery,m.KendoReactAnimation))})(this,function(m,J,p,f,b,I,N,L,xe,ii,K,Z,de,ri){"use strict";"use client";function si(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const i in r)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}return t.default=r,Object.freeze(t)}const o=si(J),q=r=>null;q.displayName="KendoReactGridColumn",q.defaultProps={filterable:!0,editable:!0,sortable:!0,resizable:!0,reorderable:!0,groupable:!0},q.propTypes={field:p.string,title:p.string,editable:p.bool,sortable:p.oneOfType([p.bool,p.shape({allowUnsort:p.bool.isRequired})]),cell:p.any,filterCell:p.any,filterTitle:p.string,filterable:p.bool,filter:p.oneOf(["text","numeric","boolean","date"]),editor:p.oneOf(["text","numeric","boolean","date"]),width:p.oneOfType([p.string,p.number]),minResizableWidth:p.number,headerCell:p.any,footerCell:p.any,headerSelectionValue:p.bool,format:p.string,headerClassName:p.string,className:p.string,reorderable:p.bool,resizable:p.bool,orderIndex:p.number,groupable:p.bool,columnMenu:p.any,locked:p.bool};function H(r,t){const i=(r||"").split(".");let l=t;return i.forEach(e=>{l=l?l[e]:void 0}),l}function et(r,t,i,l,e,s,n=0){let a=n;for(let h=0;h<t.length;h++){if(!e||t[h].value===void 0||t[h].items===void 0){r[r.length]={dataIndex:l.index,dataItem:t[h],rowType:"data",level:n,expanded:s===void 0||H(s,t[h])},l.index++;continue}a=Math.max(a,n+1);const c=s===void 0||H(s,t[h])===void 0||H(s,t[h]);r[r.length]={dataIndex:-1,dataItem:t[h],level:n,rowType:"groupHeader",expanded:c},c&&(a=Math.max(et(r,t[h].items,i,l,e,s,n+1),a)),(i==="always"||c&&i==="visible")&&(r[r.length]={dataIndex:-1,dataItem:t[h],rowType:"groupFooter",level:n,expanded:c})}return a}function tt(r,t,i,l=0){let e=[];if(!r)return[];r&&r.length===void 0&&(r=[r]),r.forEach((n,a)=>{n=n.props?n.props:n;const h=t[a]||null,c=tt(n.children,h&&h.children||[],i,l+1);e.push(Object.assign({depth:l},q.defaultProps,c.length?{cell:()=>null,filterCell:()=>null}:{},h?{width:h.width,orderIndex:h.orderIndex}:{},n,{id:n.id?n.id:b.tableKeyboardNavigationTools.generateNavigatableId(`${i.prevId++}`,i.idPrefix,"column"),declarationIndex:e.length,children:c,rowSpan:0,colSpan:0,isAccessible:!0,left:h&&Math.floor(h.left),right:h&&Math.floor(h.right)}))});const s=(n,a)=>n.orderIndex===a.orderIndex?n.declarationIndex-a.declarationIndex:(n.orderIndex||0)-(a.orderIndex||0);if(e.sort(s),l===0){let n=[];const a=(h,c)=>h.forEach(d=>{d.parentIndex=c,a(d.children,n.push(d)-1)});return a(e,-1),n}return e}function li(r,t,i,l){let e=[];Array.isArray(r)?e=r:r&&(e=r.data);const s=[];if(e.length>0){let n=e[0];if(t)for(let h=0;h<t.length;h++)n=n.items&&n.items[0];Object.getOwnPropertyNames(n).forEach(h=>{h!==i&&s.push(Object.assign({id:b.tableKeyboardNavigationTools.generateNavigatableId(`${l.prevId++}`,l.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},q.defaultProps,{field:h}))})}return s}const oi=(r,t)=>{let i=r[t.parentIndex];for(;i;){if(i.footerCell)return!0;i=r[i.parentIndex]}return!1},ni=r=>r.filter(t=>oi(r,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),Ee=r=>r.width!==void 0?Math.floor(parseFloat(r.width.toString()))+"px":void 0,it=r=>(r.sort((t,i)=>t.declarationIndex-i.declarationIndex),r.map(t=>{const{declarationIndex:i,parentIndex:l,depth:e,colSpan:s,rowSpan:n,index:a,kFirst:h,children:c,...d}=t;return c.length?{children:it(c),...d}:d})),Se=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),rt=17895697,pe=(r,t)=>{if(!(!r&&!t))return t?r?{...r,...t,select:{...r.select||{},...t.select||{}},hierarchy:{...r.hierarchy||{},...t.hierarchy||{}},group:{...r.group||{},...t.group||{}},edit:{...r.edit||{},...t.edit||{}}}:t:r},Ie="grid.noRecords",st="grid.pagerInfo",lt="grid.pagerFirstPage",ot="grid.pagerPreviousPage",nt="grid.pagerNextPage",at="grid.pagerLastPage",ht="grid.pagerItemsPerPage",ai="grid.pagerPage",hi="grid.pagerPageSizeAriaLabel",ci="grid.pagerOf",di="grid.pagerTotalPages",we="grid.groupPanelEmpty",ct="grid.groupColumn",dt="grid.ungroupColumn",ke="grid.columnMenu",P="grid.filterClearButton",Q="grid.filterSubmitButton",ee="grid.filterTitle",ye="grid.sortAscending",Ne="grid.sortDescending",Fe="grid.searchPlaceholder",Ge="grid.filterCheckAll",Me="grid.filterChooseOperator",ze="grid.filterSelectedItems",Le="grid.sortAriaLabel",De="grid.filterAriaLabel",Oe="grid.groupPanelAriaLabel",pt="grid.groupExpand",ut="grid.groupCollapse",gt="grid.detailExpand",ft="grid.detailCollapse",te="grid.selectRow",w={[gt]:"Expand detail row",[ft]:"Collapse detail row",[pt]:"Expand group",[ut]:"Collapse Group",[Ie]:"No records available",[we]:"Drag a column header and drop it here to group by that column",[P]:"Clear",[Q]:"Filter",[ee]:"Filter",[ye]:"Sort Ascending",[Ne]:"Sort Descending",[Le]:"Sortable",[ct]:"Group Column",[dt]:"Ungroup Column",[ke]:"Column menu",[ht]:"items per page",[st]:"{0} - {1} of {2} items",[lt]:"Go to the first page",[ot]:"Go to the previous page",[nt]:"Go to the next page",[at]:"Go to the last page",[ai]:"Page",[hi]:"Page size",[ci]:"of",[di]:"{0}",[Fe]:"Search",[Ge]:"Check All",[Me]:"Choose Operator",[ze]:"selected items",[De]:"Filter",[Oe]:"Group panel",[te]:"Select Row","grid.filterEqOperator":"Is equal to","grid.filterNotEqOperator":"Is not equal to","grid.filterIsNullOperator":"Is null","grid.filterIsNotNullOperator":"Is not null","grid.filterIsEmptyOperator":"Is empty","grid.filterIsNotEmptyOperator":"Is not empty","grid.filterStartsWithOperator":"Starts with","grid.filterContainsOperator":"Contains","grid.filterNotContainsOperator":"Does not contain","grid.filterEndsWithOperator":"Ends with","grid.filterGteOperator":"Is greater than or equal to","grid.filterGtOperator":"Is greater than","grid.filterLteOperator":"Is less than or equal to","grid.filterLtOperator":"Is less than","grid.filterIsTrue":"Is true","grid.filterIsFalse":"Is false","grid.filterBooleanAll":"(All)","grid.filterAfterOrEqualOperator":"Is after or equal to","grid.filterAfterOperator":"Is after","grid.filterBeforeOperator":"Is before","grid.filterBeforeOrEqualOperator":"Is before or equal to","grid.filterAndLogic":"And","grid.filterOrLogic":"Or"};function pi(r){const t=r.replace(/^pager\.([a-z])/,(i,l)=>"grid.pager"+l.toUpperCase());return{messageKey:t,defaultMessage:w[t]}}const mt=r=>{const t=I.useLocalization(),i=o.useCallback(C=>{r.selectionChange&&r.selectionChange({syntheticEvent:C})},[r.selectionChange]),l=f.useId(),e=H(r.field,r.dataItem),s=b.useTableKeyboardNavigation(r.id),n={colSpan:r.colSpan,style:r.style,className:r.className,"aria-colindex":r.ariaColumnIndex,role:"gridcell",...s},a=typeof e=="boolean"&&e,h=o.createElement("span",{key:1,className:"k-checkbox-wrap"},o.createElement("input",{id:l,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(te,w[te]),"aria-checked":a,checked:a,onChange:i})),c=r.rowType!=="groupHeader"?o.createElement("td",{...n},h):null,d=r.rowType||"data",u=r.cells;if(u&&u.select&&u.select[d]){const C=u.select[d];return o.createElement(C,{...r,tdProps:n},h)}return r.render?r.render.call(void 0,c,r):c},Ct=r=>{let t=null,i=null,l=null;const e=H(r.field,r.dataItem),s=b.useTableKeyboardNavigation(r.id),n=I.useLocalization(),a=o.useCallback(d=>{d.isDefaultPrevented()||d.keyCode===f.Keys.enter&&r.onChange&&(d.preventDefault(),r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:d,field:r.field,value:!e}))},[r.dataItem,r.dataIndex,r.field,r.onChange,e]);if(r.rowType==="groupFooter")i={className:"k-table-td k-hierarchy-cell",role:"gridcell",...s},t=o.createElement("td",{...i});else if(r.rowType!=="groupHeader"){const d=e?ft:gt,u=n.toLanguageString(d,w[d]);i={className:"k-table-td k-hierarchy-cell",onKeyDown:a,"aria-expanded":!!e,role:"gridcell","aria-colindex":r.ariaColumnIndex,...s},l=o.createElement("a",{onClick:C=>{C.preventDefault(),r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:C,field:r.field,value:!e})},"aria-label":u,href:"#",tabIndex:-1},o.createElement(f.IconWrap,{name:e?"minus":"plus",icon:e?N.minusIcon:N.plusIcon})),t=o.createElement("td",{...i},l)}const h=r.rowType||"data",c=r.cells;if(c&&c.hierarchy&&c.hierarchy[h]){const d=c.hierarchy[h];return o.createElement(d,{...r,tdProps:i},l)}return r.render?r.render.call(void 0,t,r):t},bt=b.TABLE_ROW_INDEX_ATTRIBUTE,U=b.TABLE_COL_INDEX_ATTRIBUTE,ui=b.TABLE_PREVENT_SELECTION_ELEMENT,vt=r=>{const t=H(r.field,r.dataItem);let i=null;const l=f.classNames("k-table-td","k-grid-edit-cell",{["k-selected"]:r.isSelected},r.className),e=f.useId(),s=b.useTableKeyboardNavigation(r.id);let n=null,a=null;const h=o.useCallback(g=>{if(r.onChange){const E=g.target.type==="checkbox"?g.target.checked:g.target.value;r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g,value:E})}},[r.onChange,r.dataItem,r.dataIndex,r.field]),c=o.useCallback(g=>{r.onContextMenu&&r.onContextMenu.call(void 0,g,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),d=o.useCallback(g=>{r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g.syntheticEvent,value:g.value})},[r.onChange,r.dataItem,r.dataIndex,r.field]);switch(r.editor){case"numeric":{n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=o.createElement(L.NumericTextBox,{width:"100%",value:t===void 0?null:t,onChange:d}),i=o.createElement("td",{...n},a);break}case"date":n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=o.createElement(xe.DatePicker,{width:"100%",value:t,onChange:d}),i=o.createElement("td",{...n},a);break;case"boolean":n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=[o.createElement("span",{key:1,className:"k-checkbox-wrap"},o.createElement("input",{checked:t||!1,id:e,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",onChange:h})),o.createElement("label",{className:"k-checkbox-label",htmlFor:e,key:2})],i=o.createElement("td",{...n},a);break;default:n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=o.createElement("input",{style:{width:"100%"},className:"k-input",value:t||"",onChange:h}),i=o.createElement("td",{...n},a)}const u=r.editor||"text",C=r.cells;if(C&&C.edit&&C.edit[u]){const g=C.edit[u];return o.createElement(g,{...r,tdProps:n},a)}return r.render?r.render.call(void 0,i,r):i};class gi extends o.Component{constructor(){super(...arguments),this.headerWrap=null,this.table=null,this.syncScroll=!1,this.scrollbarWidth=f.getScrollbarWidth(),this.onScroll=t=>{if(this.syncScroll){this.syncScroll=!1;return}if(!this.headerWrap)return;const i=this.headerWrap.scrollLeft,l=this.props.scrollableDataElement();l&&l.scrollLeft!==i&&(l.scrollLeft=i)}}get element(){return this.props.elemRef.current}componentDidMount(){const t=b.isRtl(this.element);this.props.columnResize&&this.props.columnResize.setIsRtl(t),this.forceUpdate()}setScrollLeft(t){this.headerWrap&&this.headerWrap.scrollLeft!==t&&(this.syncScroll=!0,this.headerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?o.createElement("div",{ref:this.props.elemRef,className:f.classNames("k-grid-header",{"k-grid-draggable-header":this.props.draggable}),role:"presentation"},o.createElement("div",{ref:t=>{this.headerWrap=t},className:"k-grid-header-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},onScroll:this.onScroll,role:"presentation"},o.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-header-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},o.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupHeader=t}},this.props.cols),o.createElement("thead",{className:"k-table-thead",role:"rowgroup",...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)))):o.createElement("thead",{role:"presentation",className:f.classNames("k-table-thead",{"k-grid-draggable-header":this.props.draggable}),...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)}}const xt=(...r)=>Object.assign({allowUnsort:!0,mode:"single"},...r);class fi extends o.PureComponent{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.pressHandler&&this.props.pressHandler(t.event,i)},this.onDrag=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.dragHandler&&this.props.dragHandler(t.event,i)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.releaseHandler&&this.props.releaseHandler(t.event)}}render(){return o.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,hint:this.props.dragClue,autoScroll:{boundaryElementRef:this.props.headerRef,direction:{horizontal:!0,vertical:!1}},scrollContainer:this.props.containerRef||void 0,ref:t=>{this.draggable=t}},o.createElement("tr",{className:"k-table-row",style:{touchAction:"none"},role:"row","aria-rowindex":this.props.ariaRowIndex},this.props.children))}}class He extends o.Component{constructor(){super(...arguments),this.state={show:!1},this._anchor=null,this._content=null,this.blurTimeout=void 0,this.willBlur=!1,this.blur=()=>{if(this.willBlur){this.willBlur=!1;return}clearTimeout(this.blurTimeout),this.blurTimeout=window.setTimeout(()=>{this.closeMenu()})},this.focus=()=>{clearTimeout(this.blurTimeout)},this.anchorClick=t=>{t.preventDefault(),this.state.show&&this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!this.state.show},()=>this.state.show&&this._content&&this._content.focus())},this.closeMenu=()=>{this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!1})},this.onAnchorMouseDown=t=>{this.willBlur=this.state.show&&t.currentTarget===this._anchor},this.onAnchorKeyDown=t=>{var i;if(t.keyCode===f.Keys.tab){const l=t.target,e=l&&((i=l.closest(".k-grid"))==null?void 0:i.getElementsByClassName("k-grid-content")[0]);e&&e.scrollWidth>e.clientWidth&&l.scrollIntoView({inline:"center"})}}}render(){const{columnMenu:t,...i}=this.props,{column:l}=this.props,e=I.provideLocalizationService(this),s=l.title||l.field,n=s?`${s} `:"";return o.createElement(o.Fragment,null,o.createElement("a",{className:"k-grid-header-menu k-grid-column-menu",ref:a=>this._anchor=a,onClick:this.anchorClick,onMouseDown:this.onAnchorMouseDown,onKeyDown:this.onAnchorKeyDown,href:"#","aria-label":`${n}${e.toLanguageString(ke,w[ke])}`},o.createElement(f.IconWrap,{name:"filter",icon:N.filterIcon})),o.createElement(ii.Popup,{anchor:this._anchor,show:this.state.show,popupClass:"k-column-menu k-column-menu-popup k-grid-columnmenu-popup"},o.createElement("div",{ref:a=>this._content=a,tabIndex:0,onBlur:this.blur,onFocus:this.focus,style:{outline:"none"}},t&&o.createElement(t,{...i,onCloseMenu:this.closeMenu}))))}}class Et extends o.Component{render(){const{columnMenuWrapperProps:t}=this.props,i=this.props.onClick?{onClick:this.props.onClick}:{},l=o.createElement("span",{className:"k-cell-inner"},o.createElement("span",{className:f.classNames("k-link",{"!k-cursor-default":!this.props.columnMenuWrapperProps.sortable}),...i},o.createElement("span",{className:"k-column-title"},this.props.title||this.props.field||" "),this.props.children),t.columnMenu&&o.createElement(He,{...t}));return this.props.render?this.props.render.call(void 0,l,this.props):l}}const mi={true:{asc:"desc",desc:"","":"asc"},false:{asc:"desc",desc:"asc","":"asc"}},Ci={none:"none",asc:"ascending",desc:"descending"};class St extends o.Component{constructor(t){super(t),this.serviceIndex=0,this.index=-1,this.cellKeyDown=(i,l)=>{i.isDefaultPrevented()||i.keyCode===f.Keys.enter&&this.cellClick(i,l)},this.cells=i=>i.map(l=>{const e=this.props.columns[l],s=this.props.sortable&&e.sortable,n=this.props.sort?this.props.sort.findIndex(k=>k.field===e.field):-1,a=n>=0&&this.props.sort[n].dir||"none",h=e.columnMenu===null?null:e.columnMenu||this.props.columnMenu,c=f.classNames({"k-first":e.kFirst,"k-filterable":!!h,"k-table-th":!0,"k-header":!0,"k-grid-header-sticky":e.locked,"k-sorted":this.props.sort&&this.props.sort.some(k=>k.field===e.field)},e.headerClassName),d=e.left!==void 0?this.props.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},u=I.provideLocalizationService(this).toLanguageString(Le,w[Le]);let C=e.isAccessible?{ariaSort:Ci[a],role:"columnheader",ariaColumnIndex:e.ariaColumnIndex,ariaSelected:!1,ariaDescription:s?u:""}:{role:"presentation"};const g=e.declarationIndex>=0?++this.index:--this.serviceIndex,E=e.headerCell?e.headerCell:Et,y=o.createElement(E,{key:1,field:e.field,onClick:s&&(k=>this.cellClick(k,e))||void 0,selectionChange:this.props.selectionChange,title:e.title,selectionValue:e.headerSelectionValue,render:this.props.cellRender,children:this.sortIcon(n),columnMenuWrapperProps:{column:{field:e.field,title:e.title,locked:e.locked,filter:e.filter,id:e.id},sortable:s&&this.props.sortable,sort:this.props.sort,onSortChange:this.props.sortChange,filter:this.props.filter,filterable:this.props.filterable&&e.filterable,filterOperators:this.props.filterOperators,onFilterChange:this.props.filterChange,group:this.props.group,groupable:this.props.groupable,onGroupChange:this.props.groupChange,columnMenu:h}}),x={...C,key:g,colSpan:e.colSpan,rowSpan:e.rowSpan,className:c,style:d,columnId:e.id,navigatable:e.navigatable,onKeyDown:s&&(k=>this.cellKeyDown(k,e))||void 0,role:"columnheader"},S=[y,this.props.columnResize&&this.props.columnResize.resizable&&e.resizable&&o.createElement(b.ColumnResizer,{key:2,resize:(k,B,_)=>this.props.columnResize&&this.props.columnResize.dragHandler(k,e,B,_),autofit:k=>this.props.columnResize&&this.props.columnResize.dblClickHandler(k,[e.id])})],F=pe(this.props.cells,e.cells);if(F&&F.headerCell){const k=F.headerCell;return o.createElement(k,{key:g,thProps:x,index:l},S)}return o.createElement(b.HeaderThElement,{...x,key:g},S)}),this.cellClick=this.cellClick.bind(this)}cellClick(t,i){if(t.preventDefault(),!this.props.sortChange)return;const{allowUnsort:l,mode:e}=xt(this.props.sortable||!1,i.sortable||!1),s=(this.props.sort||[]).filter(h=>h.field===i.field)[0],n=mi[l][s&&s.dir||""],a=e==="single"?[]:(this.props.sort||[]).filter(h=>h.field!==i.field);n!==""&&i.field&&a.push({field:i.field,dir:n}),this.props.sortChange(a,t)}sortIcon(t){return this.props.sort?t>=0&&[o.createElement("span",{key:1,className:"k-sort-icon"},o.createElement(f.IconWrap,{name:"sort-"+this.props.sort[t].dir+"-small",icon:this.props.sort[t].dir==="asc"?N.sortAscSmallIcon:N.sortDescSmallIcon})),this.props.sort.length>1&&o.createElement("span",{key:2,className:"k-sort-icon"},o.createElement("span",{className:"k-sort-order"},t+1))]:null}render(){return this.serviceIndex=0,this.index=-1,this.props.columnsMap.map((t,i)=>this.props.pressHandler&&o.createElement(fi,{key:i,pressHandler:this.props.pressHandler,dragHandler:this.props.dragHandler,releaseHandler:this.props.releaseHandler,ariaRowIndex:i+1,dragClue:this.props.dragClue,headerRef:this.props.headerRef,containerRef:this.props.containerRef},this.cells(t))||o.createElement("tr",{key:i,className:"k-table-row",role:"row","aria-rowindex":i+1},this.cells(t)))}}I.registerForLocalization(St);const bi=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],_e={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},R=r=>r==="isnull"||r==="isnotnull"||r==="isempty"||r==="isnotempty",ie=(r,t)=>r.map(i=>({text:t.toLanguageString(i.text,w[i.text]),operator:i.operator})),vi="eq",Re=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],xi={text:!1,numeric:!1,date:!1,boolean:!0},Ae=(r,t,i)=>{const l=It(i.operators);let e=i.operator;switch(i.filterType){case"numeric":(!e||R(e))&&(e=l),r===null&&e===l&&(e="");break;case"date":(!e||R(e))&&(e=l),r===null&&e===l&&(e="");break;case"text":(!e||R(e))&&(e=l),!r&&e===l&&(e="");break;default:return}i.onChange({value:r,operator:e,syntheticEvent:t})},It=(r,t)=>t?r[t][0].operator:r[0].operator,Ke=r=>r||"text",Be=(r,t)=>{const i=r.target.value;t({value:i.operator,operator:i.operator===""?"":vi,syntheticEvent:r.syntheticEvent})},We=(r,t,i)=>{let l=t;const e=r.target.value;r.target.state.opened&&(R(e.operator)&&(l=null),t===null&&!R(e.operator)&&(l=void 0),i({value:l,operator:e.operator,syntheticEvent:r.syntheticEvent}))};class Te extends o.Component{constructor(t){super(t),this._inputRef=o.createRef(),this.renderOperatorEditor=i=>{if(this.props.filterType==="boolean")return;const l=this.props.operators.find(e=>e.operator===this.props.operator)||null;return o.createElement(Z.DropDownList,{size:this.props.size,value:l,onChange:this.operatorChange,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",svgIcon:N.filterIcon,data:this.props.operators,textField:"text",title:i.toLanguageString(Me,w[Me]),popupSettings:{width:""}})},this.inputChange=this.inputChange.bind(this),this.clear=this.clear.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){const t=I.provideLocalizationService(this),i=o.createElement("div",{className:"k-filtercell"},o.createElement("div",{className:"k-filtercell-wrapper"},this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues),o.createElement("div",{className:"k-filtercell-operator"},this.renderOperatorEditor(t)," ",o.createElement(K.Button,{size:this.props.size,icon:"filter-clear",svgIcon:N.filterClearIcon,className:f.classNames({"k-clear-button-visible":!!(!(this.props.value===null||this.props.value==="")||this.props.operator)}),title:t.toLanguageString(P,w[P]),type:"button",onClick:this.clear,disabled:!(!(this.props.value===null||this.props.value==="")||this.props.operator)}))));return this.props.render?this.props.render.call(void 0,i,this.props):i}inputChange(t,i){Ae(t,i,this.props)}operatorChange(t){We(t,this.props.value,this.props.onChange)}boolDropdownChange(t){Be(t,this.props.onChange)}clear(t){t.preventDefault(),this.props.onChange({value:"",operator:"",syntheticEvent:t}),this._inputRef.current&&(this._inputRef.current.element.value="",setTimeout(()=>{this._inputRef.current.element.focus()},0))}filterComponent(t,i,l){switch(t){case"numeric":return o.createElement(L.NumericTextBox,{ref:this._inputRef,size:this.props.size,value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"date":return o.createElement(xe.DatePicker,{ref:this._inputRef,size:this.props.size,value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"boolean":{const e=s=>s==null;return o.createElement(Z.DropDownList,{ref:this._inputRef,size:this.props.size,onChange:this.boolDropdownChange,value:l.find(s=>s.operator===(e(i)?"":i)),data:l,textField:"text",title:this.props.title,ariaLabel:this.props.ariaLabel})}default:return o.createElement(L.TextBox,{ref:this._inputRef,size:this.props.size,value:i||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)},title:this.props.title,"aria-label":this.props.ariaLabel})}}}I.registerForLocalization(Te);const Ei="k-table-row k-filter-row";class wt extends o.Component{headerCellClassName(t,i){let l=`${i?"k-grid-header-sticky":""}`;return this.props.sort&&this.props.sort.filter(e=>e.field===t).length>0&&(l+=" k-sorted"),l}setFilter(t,i,l,e){if(!this.props.filterChange)return;const s=[];(t!==""&&t!==null||i!=="")&&s.push({field:l,operator:i,value:t}),this.props.filter&&this.props.filter.filters&&(this.props.filter.filters||[]).forEach(h=>{const c=h;c&&c.field!==l&&s.push(c)});const n=this.props.filter&&this.props.filter.logic?this.props.filter.logic:"and";this.props.filterChange(s.length>0?{logic:n,filters:s}:null,e)}render(){const t=I.provideLocalizationService(this),i=this.props.filter&&this.props.filter.filters||[],l=a=>{if(a===void 0)return;const h=i.filter(c=>c.field===a);return h.length?h[0]:void 0};let e=0,s=-1;const n=this.props.columns.filter(a=>a.children.length===0).map(a=>{const h=Ke(a.filter),c=l(a.field),d=a.filterable?t.toLanguageString(De,w[De]):void 0;let u=c&&c.value;u===void 0&&(u=h==="text"?"":null);const C=a.filterable&&{render:this.props.cellRender,field:a.field,title:a.filterTitle,value:u,operator:c&&c.operator,operators:ie(this.props.filterOperators[h]||[],t),booleanValues:ie(Re,t),filterType:h,ariaLabel:d,onChange:k=>{this.setFilter(k.value,k.operator,a.field,k.syntheticEvent)}},g=a.declarationIndex>=0?++s:--e,E={ariaLabel:d,ariaColumnIndex:a.ariaColumnIndex},y=a.left!==void 0?this.props.isRtl?{left:a.right,right:a.left}:{left:a.left,right:a.right}:{},x={columnId:b.tableKeyboardNavigationTools.getFilterColumnId(a.id),navigatable:a.navigatable,style:y,className:f.classNames("k-table-th",this.headerCellClassName(a.field,a.locked)||void 0),role:"columnheader",...E},S=C&&(a.filterCell?o.createElement(a.filterCell,{...C}):o.createElement(Te,{size:this.props.size,...C})),F=pe(this.props.cells,a.cells);if(F&&F.filterCell){const k=F.filterCell;return o.createElement(k,{key:g,...C,thProps:x,index:s},S)}return o.createElement(b.HeaderThElement,{key:g,...x},S)});return o.createElement("tr",{className:Ei,"aria-rowindex":this.props.ariaRowIndex,role:"row"},n)}}I.registerForLocalization(wt);class kt extends o.Component{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.onPress&&this.props.onPress(t.event,i)},this.onDrag=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.onDrag&&this.props.onDrag(t.event,i)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.onRelease&&this.props.onRelease(t.event)},this.sortChange=t=>{if(t.preventDefault(),this.props.onSortChange){const i=this.props.dir==="asc"?"desc":"asc";this.props.onSortChange(t,i)}},this.groupRemove=t=>{t.preventDefault(),t.stopPropagation(),this.props.onRemove&&this.props.onRemove(t)},this.onContextMenu=t=>{const i={title:this.props.title,dir:this.props.dir,index:this.props.index};this.props.onContextMenu&&this.props.onContextMenu.call(void 0,t,{dataItem:{...i}})}}render(){const{dir:t}=this.props;return o.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:i=>{this.draggable=i}},o.createElement("div",{className:"k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",onClick:this.sortChange,onContextMenu:this.onContextMenu,role:"button",style:{touchAction:"none"}},o.createElement("span",null,o.createElement(f.IconWrap,{name:"sort-"+t+"-small",icon:t==="asc"?N.sortAscSmallIcon:N.sortDescSmallIcon,size:"small"})),o.createElement("span",{className:"k-chip-content"},this.props.title),o.createElement("span",{className:"k-chip-actions"},o.createElement("span",{className:"k-chip-action k-chip-remove-action",onClick:this.groupRemove},o.createElement(f.IconWrap,{name:"x-circle",icon:N.xCircleIcon,size:"small"})))))}}I.registerForLocalization(kt);class yt extends o.Component{constructor(){super(...arguments),this.onGroupRemove=(t,i)=>{const l=this.props.group.slice();l.splice(i,1),this.props.groupChange(l,t)},this.onGroupSortChange=(t,i,l,e)=>{const s=Object.assign({},l,{dir:e}),n=this.props.group.slice();n.splice(i,1,s),this.props.groupChange(n,t)}}render(){const i=(this.props.group||[]).map((l,e)=>o.createElement(kt,{key:e,index:e,dir:l.dir||"asc",title:this.props.resolveTitle(l.field),onRemove:s=>{this.onGroupRemove(s,e)},onSortChange:(s,n)=>{this.onGroupSortChange(s,e,l,n)},onPress:this.props.pressHandler,onDrag:this.props.dragHandler,onRelease:this.props.releaseHandler,onContextMenu:this.props.onContextMenu}));return o.createElement("div",{ref:this.props.refCallback,className:"k-grouping-header",role:"toolbar","aria-label":I.provideLocalizationService(this).toLanguageString(Oe,w[Oe]),"aria-controls":this.props.ariaControls||""},o.createElement("div",{className:"k-chip-list k-chip-list-md",role:"none"},i),o.createElement("div",{className:"k-grouping-drop-container"},!i.length&&I.provideLocalizationService(this).toLanguageString(we,w[we])," "))}}I.registerForLocalization(yt);class Si extends o.Component{constructor(){super(...arguments),this.footerWrap=null,this.table=null,this.scrollbarWidth=f.getScrollbarWidth()}componentDidMount(){this.setState({})}setScrollLeft(t){this.footerWrap&&(this.footerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?o.createElement("div",{className:"k-grid-footer",role:"presentation"},o.createElement("div",{ref:t=>{this.footerWrap=t},className:"k-grid-footer-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},role:"presentation"},o.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-footer-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},o.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupFooter=t},role:"presentation"},this.props.cols),o.createElement("tfoot",{className:"k-table-tfoot",role:"presentation"},this.props.row)))):o.createElement("tfoot",{className:"k-table-tfoot"},this.props.row)}}class Ii{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=o.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=o.createRef(),this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(o.version),this.topItems=(i,l)=>{if(!this.container||l)return{topItemsCount:0,topItemsHeight:0};const e=this.container.clientHeight,s=Math.ceil(e/i[0].line),n=Math.ceil((i.length-s)/2);let a=0;for(let h=0;h<n;h++)a+=i[h].line+i[h].acc;return{topItemsCount:n,topItemsHeight:a,itemsNeededOnScreen:s+s/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,t&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}get rowHeights(){const t=[],i=this.tableBodyRef.current&&this.tableBodyRef.current.children||[];let l=0;for(let e=0;e<i.length;e++){if(i[e].className.indexOf("k-grouping-row")>-1){l+=i[e].scrollHeight;continue}i[e].className.indexOf("k-detail-row")>-1?t[t.length-1].line+=i[e].scrollHeight:(t.push({line:i[e].scrollHeight,acc:l}),l=0)}return t}changePage(t,i){this.attendedSkip=t-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,t-this.topCacheCount),take:this.pageSize},i)}translate(t,i){this.tableTranslate=t,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||i?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(t){if(!this.container)return;const i=this.rowHeights,l=this.container.scrollTop;let e=this.tableTranslate,s=0;const{topItemsCount:n,topItemsHeight:a,itemsNeededOnScreen:h}=this.topItems(i,!!this.topCacheCount),c=l-e;if(!(c>a||i.length<=h)){for(;s<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-s>0&&!(e+(i[i.length-1-s].line+i[i.length-1-s].acc)+c<=l);)e-=i[i.length-1-s].line+i[i.length-1-s].acc,s++;if(s===0&&this.topCacheCount===0&&this.attendedSkip>0&&(e=Math.max(e-i[0].line,0),s=1),this.propsSkip-s<=0&&e>l){this.translate(0),this.changePage(0,t),this.container.scrollTop=0;return}if(e>l&&(e=l),e!==this.tableTranslate){this.translate(Math.max(0,e-a));const d=Math.max(0,this.propsSkip-s-n);this.changePage(d,t)}}}localScrollDown(t){if(!this.container)return;const i=this.rowHeights,l=this.container.scrollTop;let e=this.tableTranslate,s=0;const{topItemsCount:n,topItemsHeight:a,itemsNeededOnScreen:h}=this.topItems(i,!!this.topCacheCount);for(;s<i.length-this.topCacheCount&&!(e+i[s].line+i[s].acc>l);)e+=i[s].line+i[s].acc,s++;n>this.propsSkip+s||i.length<=h||(s>=i.length-this.topCacheCount&&this.propsSkip+s>=this.total?(this.translate(e-a),this.changePage(this.total-1-n,t)):e!==this.tableTranslate&&this.propsSkip+s-n!==this.propsSkip&&(this.translate(e-a),this.changePage(this.propsSkip+s-n,t)))}scrollNonStrict(t){const i=this.total*this.prevScrollPos/this.containerHeight;let l=Math.floor(i);l>=this.total&&(l=this.total-1);const e=Math.min(i-l,1);let s=0;const n=l-this.propsSkip,a=this.rowHeights;n>=0&&n<=1?s=-((a[0].line+a[0].acc)*e):n===-1&&(s=-((a[a.length-1].line+a[a.length-1].acc)*e));const{topItemsCount:h,topItemsHeight:c}=this.topItems(a,!!this.topCacheCount);this.translate(Math.max(0,s-c-this.horizontalScrollbarHeight()+this.containerHeight*i/this.total)),this.changePage(l-h,t)}scrollHandler(t){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const i=this.container.scrollTop,l=this.prevScrollPos;if(this.prevScrollPos=i,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,t),this.prevScrollPos=i,this.askedSkip=void 0;return}i-l<0&&i>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(t):i-l>0&&i<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(t):this.scrollNonStrict(t),this.prevScrollPos=i}}class Nt{constructor(t=0,i,l,e){this.total=t,this.offsets=[],this.heights=[];let s=0;for(let n=0;n<t;n++){this.offsets.push(s);const a=e&&e[n].expanded&&e[n].rowType==="data"?l:i;s+=a,this.heights.push(a)}}height(t){return this.heights[t]}index(t){if(t<0)return;const i=this.offsets.reduce((l,e,s)=>{if(l!==void 0)return l;if(e===t)return s;if(e>t)return s-1},void 0);return i===void 0?this.total-1:i}offset(t){return this.offsets[t]}totalHeight(){const t=this.offsets[this.offsets.length-1],i=this.heights[this.heights.length-1];return t+i}}class Ft{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=o.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=o.createRef(),this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(o.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}translate(t,i){this.scrollableVirtual&&this.table&&(Se||this.reactVersion<=17||i?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,i){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},i)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef.current)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const i=this.container.scrollTop,l=this.lastScrollTop>=i,e=!l;this.lastScrollTop=i;let s=this.rowHeightService.index(i),n=this.rowHeightService.offset(s);const{offsetHeight:a}=this.containerRef.current,h=this.rowHeightService.index(i+a);if(e&&h>=this.lastLoaded&&this.lastLoaded<this.total){const c=s+this.pageSize-this.total;c>0&&(s=s-c,n=this.rowHeightService.offset(s)),this.firstLoaded=s,this.translate(n);let d=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(d,this.total),this.changePage(this.firstLoaded,t)}else if(l&&s<this.firstLoaded){const c=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(s-c,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}const wi=1,ki=20;class yi{constructor(t){this.columns=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=i=>{this.isRtl=i},this.dragHandler=(i,l,e,s)=>{const n=i.originalEvent;s||(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation());const a=e.closest("th");if(!a||!a)return;const h=a.clientWidth;let c=h;if(this.isRtl?c+=e.getBoundingClientRect().right-e.offsetWidth/2-i.clientX:c+=i.clientX-e.getBoundingClientRect().left-e.offsetWidth/2,!s&&Math.abs(c-h)<1)return;this.fixateInitialWidths(a.parentElement.clientWidth),this.setWidths(l,Math.floor(c)/h);const d=this.columns.filter(u=>!u.children.length).findIndex(u=>u.id===l.id);this.onResize(d,h,c,n,s,l.id)},this.dblClickHandler=(i,l)=>{const e=this.columns.filter(C=>l.indexOf(C.id)>-1);if(!this.colGroupMain||!e.length)return;const s={},n=e;for(;n.length>0;){const C=n.pop();if(!C)break;C.children.length?n.push(...C.children):s[C.id]=C}const a=this.columns.filter(C=>!C.children.length),h=[];a.forEach((C,g)=>{s[C.id]&&h.push(g)});const c=[this.colGroupMain.parentElement],d=[this.colGroupMain];this.colGroupHeader&&(c.push(this.colGroupHeader.parentElement),d.push(this.colGroupHeader)),this.colGroupFooter&&(c.push(this.colGroupFooter.parentElement),d.push(this.colGroupFooter)),c.forEach(C=>C.classList.add("k-autofitting"));let u=[];d.forEach(C=>{h.forEach(g=>{C.children[g]&&(C.children[g].width="",u[g]=Math.max(u[g]||0,C.children[g].offsetWidth+wi))})}),d.forEach(C=>{h.forEach(g=>{C.children[g]&&(C.children[g].width=u[g]+"px",a[g].width=u[g])})}),c.forEach(C=>C.classList.remove("k-autofitting")),this.onResize(h[0],0,0,i,!0,l[0])},this.updateColElements=i=>{const l=this.columns.filter(s=>!s.children.length);let e=1e-10;for(let s=0;s<i.length;s++){const n=i[s],a=l.findIndex(u=>u.id===n.id),h=parseFloat((n.width||0).toString()),c=Math.floor(h);e+=h-c;const d=c+Math.floor(e);if(e-=Math.floor(e),this.colGroupMain&&this.colGroupMain.children[a]){const u=parseInt(this.colGroupMain.children[a].width,10);this.colGroupMain.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupMain.parentElement,n,u-d)}if(this.colGroupHeader&&this.colGroupHeader.children[a]){const u=parseInt(this.colGroupHeader.children[a].width,10);this.colGroupHeader.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupHeader.parentElement,n,u-d)}if(this.colGroupFooter&&this.colGroupFooter.children[a]){const u=parseInt(this.colGroupFooter.children[a].width,10);this.colGroupFooter.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupFooter.parentElement,n,u-d)}}},this.onResize=t}fixateInitialWidths(t){const i=this.columns.filter(n=>!n.children.length);let l=0,e=this.colGroupMain?this.colGroupMain.children:[];for(let n=0;n<e.length;n++)e[n].width?t-=parseFloat(e[n].width):l++;if(l===0)return;const s=Math.floor(t/l);for(let n=0;n<e.length;n++){const a=e[n];a.width||(a.width=s,i[n].width=s.toString(),this.colGroupHeader&&(this.colGroupHeader.children[n].width=s),this.colGroupFooter&&(this.colGroupFooter.children[n].width=s))}}setWidths(t,i){const l=this.columns.findIndex(n=>n.id===t.id),e=[];let s=t.children.length;for(let n=l+1;s>0&&n<this.columns.length;n++,s--){const a=this.columns[n];a.children.length?s+=a.children.length:e.push(a)}return e.length===0&&e.push(t),e.forEach(n=>{let a=n.width?parseFloat(n.width.toString())*i:0;const h=n.minResizableWidth===void 0?10:n.minResizableWidth;a<h&&(a=h),n.width=a}),this.updateColElements(e),e}updateNextLockedCol(t,i,l){const e=i.index,s=this.colGroupMain.parentElement.closest(".k-grid"),n=s==null?void 0:s.clientWidth,a=this.columns.filter(h=>h.locked).map(h=>parseInt(h.width+"",10)).reduce((h,c)=>h+c,0);!i.locked||n<=a+ki||this.columns.forEach(h=>{if(h!=null&&h.locked&&l){const c=t==null?void 0:t.querySelectorAll('[aria-colindex="'+h.ariaColumnIndex+'"]');c==null||c.forEach(d=>{const u=d.style;this.isRtl?(h.index>e&&u&&u.right&&(u.right=parseInt(u.right,10)-l+"px"),h.index<e&&u&&u.left&&(u.left=parseInt(u.left,10)-l+"px")):(h.index>e&&u&&u.left&&(u.left=parseInt(u.left,10)-l+"px"),h.index<e&&u&&u.right&&(u.right=parseInt(u.right,10)-l+"px"))})}})}}class Gt{constructor(t,i,l){this.refDragElementClue=o.createRef(),this.refDropElementClue=o.createRef(),this.columns=[],this.reorderable=!1,this.groupable=!1,this.startColumn=-1,this.startGroup=-1,this.currentColumn=-1,this.currentGroup=-1,this.groupPanelDivElement=null,this.refGroupPanelDiv=e=>{this.groupPanelDivElement=e&&e.children?e.children[0]:e},this.pressHandler=(e,s)=>{const n=this.getColumnIndex(e,s);if(this.startGroup=this.getGroupIndex(e),n>=0){const a=this.columns[n];(a.reorderable&&this.reorderable||a.groupable&&this.groupable)&&(this.startColumn=n)}},this.dragHandler=(e,s)=>{if(e.isTouch||e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),this.startColumn===-1&&this.startGroup===-1)return;this.currentColumn=this.getColumnIndex(e,s);const n=this.groupPanelDivElement&&this.groupPanelDivElement.children;this.currentGroup=this.isTargetGroupingContainer(e)?n&&n.length?n.length:0:this.getGroupIndex(e);const a=!this.isValid();a&&(this.currentColumn=-1,this.currentGroup=-1);const h=this.currentColumn>=0?s.children[this.columns[this.currentColumn].index]:this.isTargetGroupingContainer(e)?e.originalEvent.target:this.groupPanelDivElement&&this.groupPanelDivElement.children[this.currentGroup];this.updateDragElementClue(e,s,h,a),this.updateDropElementClue(e,s,h,a)},this.releaseHandler=e=>{const s=this.startColumn,n=this.currentColumn,a=this.startGroup,h=this.currentGroup;e.originalEvent.preventDefault(),this.dropElementClue&&this.dropElementClue.setState({visible:!1}),this.dragElementClue&&this.dragElementClue.setState({visible:!1});const c=this.isValid();this.startColumn=this.startGroup=this.currentColumn=this.currentGroup=-1,c&&(s>=0&&n>=0?this.columnReorder(s,n,e.originalEvent):a>=0&&h>=0?this.groupReorder(a,h,e.originalEvent):s>=0&&h>=0&&this.columnToGroup(s,h,e.originalEvent))},this.columnReorder=t,this.groupReorder=i,this.columnToGroup=l}get dragClueRef(){return this.refDragElementClue}get dropClueRef(){return this.refDropElementClue}get dragElementClue(){return this.refDragElementClue.current}get dropElementClue(){return this.refDropElementClue.current}getColumnIndex(t,i){if(!i||i.parentElement===this.groupPanelDivElement)return-1;const l=b.getIndex(t,i);if(l===-1)return-1;for(let e=0;e<i.parentNode.children.length;e++)if(i.parentNode.children[e]===i)return this.columns.findIndex(s=>s.index===l&&s.depth===e);return-1}isTargetGroupingContainer(t){const i=t.originalEvent.target;return i.className.indexOf?i.className.indexOf("k-grouping-drop-container")!==-1:!1}getGroupIndex(t){return b.getIndex(t,this.groupPanelDivElement)}isValid(){return this.startGroup>=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:this.startColumn===-1?!1:this.currentGroup>=0?this.columns[this.startColumn].groupable===!0&&this.groupable===!0:this.reorderable===!0&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&this.columns[this.startColumn].reorderable===!0&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex}updateDragElementClue(t,i,l,e){if(!this.dragElementClue)return;const s=this.startColumn>=0?i.children[this.columns[this.startColumn].index].innerText:i.innerText;this.dragElementClue.setState({visible:!0,top:t.pageY+10,left:t.pageX,innerText:s,status:e||!l?"k-i-cancel":"k-i-plus"})}updateDropElementClue(t,i,l,e){if(!this.dropElementClue)return;if(e||!l){this.dropElementClue.setState({visible:!1});return}const s=l.getBoundingClientRect(),a=(l.closest(".k-grouping-header")||l).getBoundingClientRect();let h=s.left+t.pageX-t.clientX-6;!this.isTargetGroupingContainer(t)&&(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&this.startGroup!==-1)&&(h+=s.width);const c=a.top+t.pageY-t.clientY;this.dropElementClue.setState({visible:!0,top:c,left:h,height:this.currentColumn>=0?i.clientHeight:a.height})}}const Mt=r=>{let t=null;const i=I.useInternationalization(),l=b.useTableKeyboardNavigation(r.id),e=o.useCallback(c=>{r.onContextMenu&&r.onContextMenu.call(void 0,c,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]);let s=null,n=null;if(r.rowType==="groupFooter")s={onContextMenu:e,className:r.className},t=o.createElement("td",{...s});else if(r.rowType!=="groupHeader"){if(r.field!==void 0){const d=H(r.field,r.dataItem);d!=null&&(n=r.format?i.format(r.format,d):d.toString())}const c=f.classNames("k-table-td",r.className,{"k-selected":r.isSelected});s={onContextMenu:e,colSpan:r.colSpan,style:r.style,className:c,role:"gridcell","aria-colindex":r.ariaColumnIndex,"aria-selected":r.isSelected,[U]:r.columnIndex,...l},t=o.createElement("td",{...s},n)}const a=r.rowType||"data",h=r.cells;if(h&&h[a]){const c=h[a];return o.createElement(c,{...r,tdProps:s},n)}return r.render?r.render.call(void 0,t,r):t},Pe=r=>{let t=null;const{columnIndex:i,level:l,columnsCount:e,rowType:s,dataItem:n,field:a,onChange:h,expanded:c,render:d,dataIndex:u,ariaColumnIndex:C,isRtl:g}=r,E=a||"",y=b.useTableKeyboardNavigation(r.id),x=I.useLocalization();let S=null,F=null,k=null;const B=o.useCallback(D=>{D.isDefaultPrevented()||D.keyCode===f.Keys.enter&&h&&(D.preventDefault(),h({dataItem:n,dataIndex:u,syntheticEvent:D,field:void 0,value:!c}))},[c,h,n,u]),_=o.useCallback(D=>{r.onContextMenu&&r.onContextMenu.call(void 0,D,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),me=(D,Xe)=>{const Ce=c?ut:pt,Ye=x.toLanguageString(Ce,w[Ce]);return S={className:"k-table-td",style:{...r.style,...Xe},colSpan:D,key:"g-colspan",role:"gridcell",["aria-selected"]:!1,["aria-expanded"]:c,["aria-colindex"]:C,onKeyDown:B,onContextMenu:_,...y},k=o.createElement("p",{className:"k-reset"},o.createElement("a",{onClick:oe=>{oe.preventDefault(),h&&h({dataItem:n,dataIndex:u,syntheticEvent:oe,field:void 0,value:!c})},href:"#",tabIndex:-1,"aria-label":Ye},o.createElement(f.IconWrap,{name:c?"caret-alt-down":g?"caret-alt-left":"caret-alt-right",icon:c?N.caretAltDownIcon:g?N.caretAltLeftIcon:N.caretAltRightIcon})),n[E]instanceof Date&&n[E].toString?n[E].toString():n[E]),o.createElement("td",{...S,key:S.key},k)};i===void 0||l===void 0||i<l||e===void 0||s!=="groupHeader"||n[E]===void 0?(S={style:r.style,key:"g"+i,className:f.classNames("k-table-td","k-group-cell",{"k-grid-content-sticky":r.locked}),role:"gridcell",onContextMenu:_},t=o.createElement("td",{...S,key:S.key})):i<=l&&!r.locked?t=me(e-i,{}):i<=l&&r.locked&&(F={className:"k-table-td",role:"gridcell",colSpan:e-i,style:{borderLeftWidth:0,borderRightWidth:0},onContextMenu:_},t=o.createElement(o.Fragment,null,me(0,{position:"sticky",zIndex:2}),o.createElement("td",{...F})));const le=r.rowType||"data",X=r.cells;if(X&&X.group&&X.group[le]){const D=X.group[le];return o.createElement(D,{...r,tdProps:S,td2Props:F},k)}return d?d.call(void 0,t,r):t};class zt extends o.Component{render(){const t=f.classNames("k-table-row",{"k-table-group-row k-grouping-row":this.props.rowType==="groupHeader","k-group-footer":this.props.rowType==="groupFooter","k-master-row":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter","k-table-alt-row k-alt":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter"&&this.props.isAltRow,"k-selected":this.props.isSelected,"k-grid-edit-row":this.props.isInEdit}),i=o.createElement("tr",{id:this.props.id,onClick:this.props.onClick,onDoubleClick:this.props.onDoubleClick,className:t,style:{height:this.props.rowHeight?this.props.rowHeight+"px":"",visibility:this.props.isHidden?"hidden":""},role:"row","aria-rowindex":this.props.ariaRowIndex,"absolute-row-index":this.props.absoluteRowIndex,key:this.props.absoluteRowIndex,[bt]:this.props.rowType==="data"?this.props.dataIndex:void 0},this.props.children);return this.props.render?this.props.render.call(void 0,i,this.props):i}}class Lt extends o.Component{get _inputId(){return this.props.id}render(){const t=I.provideLocalizationService(this),{columnMenuWrapperProps:i}=this.props,l=[o.createElement("span",{key:0,className:"k-checkbox-wrap"},o.createElement("input",{id:this._inputId,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(te,w[te]),"aria-checked":this.props.selectionValue,checked:this.props.selectionValue,onChange:e=>this.props.selectionChange({field:this.props.field,syntheticEvent:e})})),i.columnMenu&&o.createElement(He,{...i})];return this.props.render?this.props.render.call(void 0,l,this.props):l}}I.registerForLocalization(Lt);const Ni=f.withIdHOC(Lt);class ue extends o.Component{render(){return this.props.children||I.provideLocalizationService(this).toLanguageString(Ie,w[Ie])}}ue.displayName="KendoReactGridNoRecords",I.registerForLocalization(ue);class Fi extends o.Component{constructor(){super(...arguments),this._element=null,this.renderCell=(t,i)=>{const l={colSpan:t.colSpan!==1?t.colSpan:void 0,style:t.left!==void 0?this.props.isRtl?{left:t.right,right:t.left}:{left:t.left,right:t.right}:{},className:f.classNames("k-table-td",t.locked&&t.left!==void 0?"k-grid-footer-sticky":""),key:i,role:"gridcell",["aria-colindex"]:t.ariaColumnIndex},e={field:t.field,ariaColumnIndex:t.ariaColumnIndex,...l},s=pe(this.props.cells,t.cells);if(s&&s.footerCell){const n=s.footerCell;return o.createElement(n,{...e,tdProps:l,index:i})}return t.footerCell&&o.createElement(t.footerCell,{...e,key:i})||o.createElement("td",{...l})}}get element(){return this._element}render(){return o.createElement("tr",{className:"k-table-row",role:"row","aria-rowindex":this.props.ariaRowIndex},ni(this.props.columns).map(this.renderCell))}}const Gi=({buttonCount:r=10,info:t=!0,type:i="numeric",pageSizes:l=void 0,previousNext:e=!0,responsive:s=void 0,pageSizeValue:n=void 0})=>({buttonCount:r,info:t,pageSizes:l===!0?[5,10,20]:l||void 0,previousNext:e,responsive:s!==!1,type:i,pageSizeValue:n}),Mi=r=>Gi(r===!0?{}:r),Dt={name:"@progress/kendo-react-grid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},zi=r=>{const{colSpan:t,ariaColIndex:i,dataItem:l,dataIndex:e,id:s}=r,n=b.useTableKeyboardNavigation(s),a=o.useCallback(h=>{r.onContextMenu&&r.onContextMenu.call(void 0,h,r.dataItem)},[r.onContextMenu,r.dataItem]);return o.createElement("td",{onContextMenu:a,className:"k-table-td k-detail-cell",colSpan:t,"aria-colindex":i,role:"gridcell",...n},o.createElement(r.detail,{dataItem:l,dataIndex:e}))},Li=r=>{const t=b.useTableKeyboardNavigation(r.id);return o.createElement("td",{className:"k-table-td k-hierarchy-cell",...t,role:"gridcell"})};let $=class extends o.Component{constructor(t){super(t),this._columns=[],this._columnsMap=[[]],this._columnsMutations=0,this._resized=!1,this._shouldUpdateLeftRight=!0,this.contextStateRef={current:void 0},this.navigationStateRef={current:void 0},this._data=[],this._slicedData=void 0,this.wrapperScrollTop=0,this.showLicenseWatermark=!1,this.headerRef=o.createRef(),this.headerElementRef=o.createRef(),this._element=null,this.tableElement=null,this.containerRef=o.createRef(),this.tableBodyRef=o.createRef(),this._footer=null,this.forceUpdateTimeout=void 0,this.isRtl=!1,this.observer=null,this.handleIntersection=e=>{const s={rowIndex:this.rowIndex};e.forEach(n=>{n.isIntersecting||this.setCurrentOnTop(s)})},this.setCurrentOnTop=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.observer&&this.observer.disconnect();const{rowIndex:s}=e;if(this.props.scrollable==="virtual")this.vs.askedSkip=s,this.vs.container.scroll(0,Math.round(this.vs.askedSkip/this.vs.total*this.vs.container.scrollHeight));else if(this.element){const n=s<1?this.element.querySelector("tbody > tr:nth-child(1)"):this.element.querySelector(`tbody > tr:nth-child(${s+1})`);n&&this.containerRef.current&&(this.containerRef.current.scrollTop=n.offsetTop)}},this.scrollIntoView=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.rowIndex=e.rowIndex;const{rowIndex:s}=e,n=this.element;if(this.observer&&n){this.observer.disconnect();const a=n.querySelector(`[absolute-row-index="${s}"]`);a?this.observer.observe(a):this.setCurrentOnTop(e)}},this.fitColumns=e=>{this.columnResize.dblClickHandler(null,e)},this.onContextMenu=(e,s,n)=>{if(this.props.onContextMenu){const a={target:this,syntheticEvent:e,nativeEvent:e.nativeEvent,dataItem:s,field:n};this.props.onContextMenu.call(void 0,a)}},this.getVirtualScroll=e=>{const{rowHeight:s,detailRowHeight:n,detail:a,expandField:h,groupable:c}=e,d=this.isAllData(),u=s!==void 0&&s>0,C=n!==void 0&&n>0,g=c===!0||typeof c=="object"&&c.enabled!==!1;return!u||g&&!d||!!(a&&h)&&(!C||!d)?Ii:Ft},this.isAllData=()=>{const{data:e,total:s}=this.props;return Array.isArray(e)?e.length===s:e?s===e.total:!1},this.initializeVirtualization=(e,s)=>{if(this.reInitVirtualization(this.props.scrollable==="virtual",this.props.total,this.props.filter,this.props.group,this.props.sort,s||this.props.rowHeight===void 0||this.props.rowHeight===0),this.vs.fixedScroll=this.props.fixedScroll||!1,this.vs.PageChange=this.pageChange,this.vs.realSkip=this.props.skip||0,this.vs.pageSize=(this.props.take!==void 0?this.props.take:this.props.pageSize)||0,this.vs.scrollableVirtual=this.props.scrollable==="virtual",this.vs.total=e,this.vs.propsSkip=(this.props.skip||0)+(this.props.scrollable==="virtual"?this.vs.topCacheCount+(this.vs.attendedSkip-(this.props.skip||0)):0),this.props.rowHeight!==void 0&&this.props.rowHeight>0&&!s){const n=this.props.rowHeight*e;this.vs.containerHeight=Se?Math.min(rt,n):n}else this.vs.containerHeight=1533915;if(this.vs.containerRef=this.containerRef,this.vs.tableBodyRef=this.tableBodyRef,this.vs.table=this.tableElement,this._slicedData=void 0,this.vs instanceof Ft){const{rowHeight:n=0,detail:a,expandField:h}=this.props;let{detailRowHeight:c=0}=this.props;c=a&&h?c:n,this.isAllData()?(this.vs.total=this._data.length,this._slicedData=this._data.slice(this.vs.realSkip,this.vs.realSkip+this.vs.pageSize),this.vs.rowHeightService=this.rowHeightService(this.vs,this._data.length,n,c,this._data)):this.vs.rowHeightService=new Nt(e,n,c);const d=this.vs.rowHeightService.totalHeight();this.vs.containerHeight=Se?Math.min(rt,d):d}},this.scrollHandler=e=>{if(e.target!==e.currentTarget)return;clearTimeout(this.forceUpdateTimeout),this.vs.table=this.tableElement;const s=e.currentTarget.scrollLeft,n=e.currentTarget.scrollTop;this.props.columnVirtualization&&(!this.vs.scrollableVirtual||n===this.wrapperScrollTop)&&(this.forceUpdateTimeout=window.setTimeout(()=>{this.forceUpdate()},0)),this._header&&this._header.setScrollLeft(s),this._footer&&this._footer.setScrollLeft(s),this.vs&&n!==this.wrapperScrollTop&&this.vs.scrollHandler(e),f.dispatchEvent(this.props.onScroll,e,this,void 0),this.wrapperScrollTop=n},this.onKeyDown=e=>{if(b.tableKeyboardNavigation.onKeyDown(e,{contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,onNavigationAction:this.onNavigationAction}),this.props.onKeyDown){const{mode:s,cell:n}=b.getSelectionOptions(this.props.selectable),a={dataItems:this.getLeafDataItems(),mode:s,cell:n,componentId:this._gridId,selectedField:this.props.selectedField,...this.getArguments(e)};this.props.onKeyDown.call(void 0,a)}},this.onFocus=e=>{b.tableKeyboardNavigation.onFocus(e,{contextStateRef:this.contextStateRef})},this.onNavigationAction=e=>{if(this.props.onNavigationAction){const s={focusElement:e.focusElement,...this.getArguments(e.event)};this.props.onNavigationAction.call(void 0,s)}},this.rowClick=(e,s)=>{this.props.onRowClick&&e.target.nodeName==="TD"&&this.props.onRowClick.call(void 0,{dataItem:s.dataItem,...this.getArguments(e)})},this.rowDblClick=(e,s)=>{this.props.onRowDoubleClick&&e.target.nodeName==="TD"&&this.props.onRowDoubleClick.call(void 0,{dataItem:s.dataItem,...this.getArguments(e)})},this.itemChange=e=>{const s=this.props.onItemChange;if(e.field===this.props.expandField||this.props.group&&e.field===void 0){const n=this.props.onExpandChange;n&&n.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,dataIndex:e.dataIndex,value:e.value});return}s&&s.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,field:e.field,value:e.value})},this.onHeaderSelectionChange=e=>{this.props.onHeaderSelectionChange&&this.props.onHeaderSelectionChange.call(void 0,{field:e.field,nativeEvent:e.syntheticEvent&&e.syntheticEvent.nativeEvent,syntheticEvent:e.syntheticEvent,target:this,dataItems:this.getLeafDataItems(),selectedField:this.props.selectedField})},this.selectionRelease=e=>{if(this.props.onSelectionChange){const s={syntheticEvent:void 0,target:this,selectedField:this.props.selectedField||"",componentId:this._gridId,dataItems:this.getLeafDataItems(),dataItem:null,...e};this.props.onSelectionChange.call(void 0,s)}},this.pageChange=(e,s,n)=>{this.raiseDataEvent(this.props.onPageChange,{page:e},{skip:e.skip,take:e.take},s,n)},this.pagerPageChange=e=>{this.pageChange({skip:e.skip,take:e.take},e.syntheticEvent,e.targetEvent)},this.sortChange=(e,s)=>{this.raiseDataEvent(this.props.onSortChange,{sort:e},{sort:e,...this.props.scrollable==="virtual"?{skip:0}:{}},s)},this.filterChange=(e,s)=>{this.raiseDataEvent(this.props.onFilterChange,{filter:e},{filter:e||void 0,skip:0},s)},this.groupChange=(e,s)=>{const n=s.nativeEvent?s:{nativeEvent:s.nativeEvent||s.originalEvent};this.raiseDataEvent(this.props.onGroupChange,{group:e},{group:e,skip:0},n)},this.onClipboard=(e,s)=>{if(this.props.onClipboard){if(!this.inActiveElement()||!e)return;this.props.onClipboard.call(void 0,{type:e,nativeEvent:s,columns:this._columns,dataItemKey:this.props.dataItemKey||"",...typeof this.props.clipboard!="boolean"?this.props.clipboard:{}})}},this.inActiveElement=()=>{var h,c,d;if(!f.canUseDOM)return!1;const e=f.getActiveElement(this.document),s=e?e.matches(".k-table-td")?e:(h=this.document)==null?void 0:h.body:(c=this.document)==null?void 0:c.body,n=s.closest(".k-grid-container"),a=s&&((d=this._element)==null?void 0:d.contains(s));return!!(s&&a&&n)},this.onResize=(e,s,n,a,h,c)=>{this.resetTableWidth(),this._shouldUpdateLeftRight=!0,this._resized=!0,this._columnsMutations++,this.props.onColumnResize&&this.props.onColumnResize.call(void 0,{columns:this.columns,nativeEvent:a,targetColumnId:c,index:e,newWidth:s,oldWidth:n,end:h,target:this})},this.reInitVirtualization=f.memoizeOne((e,s,n,a,h,c)=>{this.vs.reset();const d=this.getVirtualScroll(this.props);this.vs=new d(c)}),this.flatData=f.memoizeOne((e,s,n,a,h,c,d)=>{const u=[],C=et(u,e,s,{index:n},a!==void 0,h);return{flattedData:u,resolvedGroupsCount:C}}),this.rowHeightService=f.memoizeOne((e,s,n,a,h)=>new Nt(s,n,a,h)),this.childrenToArray=f.memoizeOne(e=>o.Children.toArray(e)),this.readColumns=f.memoizeOne((e,s,n)=>{const a=e.filter(h=>h&&h.type&&h.type.displayName==="KendoReactGridColumn");return tt(a,this.columns,{prevId:0,idPrefix:s})}),this.mapColumns=f.memoizeOne(e=>b.mapColumns(e)),this.configureColumns=f.memoizeOne((e,s,n)=>{this.props.selectedField&&e.filter(c=>c.field===this.props.selectedField).forEach(c=>{c.width=c.width||"50px",c.cell=c.cell||mt,c.headerCell=c.headerCell||Ni});const a={id:"",resizable:!0,width:"32px",title:" ",declarationIndex:-1,orderIndex:-1,children:[],parentIndex:-1,depth:0,colSpan:0,rowSpan:0,left:0,right:0,index:0,rightBorder:!1,ariaColumnIndex:0,isAccessible:!0};let h=0;this.props.expandField&&this.props.onExpandChange&&this.props.detail&&(e.unshift({...a,cell:Ct,field:this.props.expandField,headerClassName:"k-hierarchy-cell k-header",id:b.tableKeyboardNavigationTools.generateNavigatableId(`${this._columns.length}`,n,"column")}),h++);for(let c=0;c<s;c++)e.unshift({...a,isAccessible:!1,cell:Pe,field:"value",locked:this.props.lockGroups}),h++;e.slice(h).forEach(c=>c.parentIndex>=0&&(c.parentIndex+=h))}),this.getHeaderRow=f.memoizeOne((e,s,n,a,h,c,d,u,C,g,E,y)=>o.createElement(St,{cells:this.props.cells,sort:e,sortable:s,sortChange:this.sortChange,group:n||[],groupable:a,groupChange:this.groupChange,filter:h,filterable:c,filterOperators:d,filterChange:this.filterChange,columnMenu:C,selectionChange:this.onHeaderSelectionChange,columns:g,columnResize:this.columnResize,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,columnsMap:E,cellRender:u,isRtl:y,dragClue:this.dragLogic.dragClueRef,headerRef:this.headerElementRef,containerRef:this.containerRef})),this.resolveTitle=e=>{const s=this._columns.find(a=>a.field===e),n=s&&(s.title||s.field);return n===void 0?e:n},this.getLeafDataItems=()=>this._data.filter(e=>e.rowType==="data").map(e=>e.dataItem),f.validatePackage(Dt),this.showLicenseWatermark=f.shouldShowValidationUI(Dt);const i=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1,l=this.getVirtualScroll(t);this.vs=new l(i||t.rowHeight===void 0||t.rowHeight===0),this.dragLogic=new Gt(this.columnReorder.bind(this),this.groupReorder.bind(this),this.columnToGroup.bind(this)),this.columnResize=new yi(this.onResize),this.props.clipboard&&(this.clipboardService=new b.ClipboardService(this.onClipboard)),b.tableKeyboardNavigation.onConstructor({navigatable:!!t.navigatable,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,idPrefix:this._gridId})}get columns(){const t=this._columns.filter(i=>i.declarationIndex>=0&&i.parentIndex===-1);return it(t)}get element(){return this._element}get document(){if(f.canUseDOM)return this.element&&this.element.ownerDocument||document}get _header(){return this.headerRef.current}get _gridId(){return this.props.id+"-role-element-id"}componentDidMount(){this.resetTableWidth(),f.setScrollbarWidth();const t=b.isRtl(this.element);this.isRtl=t,b.tableKeyboardNavigation.onComponentDidMount({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),this.isRtl&&this.forceUpdate();const i={rootMargin:"0px",threshold:.9};this.clipboardService&&this.clipboardService.addEventListeners(this.document),this.observer=f.canUseDOM&&window.IntersectionObserver&&new window.IntersectionObserver(this.handleIntersection,i)||null}getSnapshotBeforeUpdate(){return b.tableKeyboardNavigation.onGetSnapshotBeforeUpdate({document:this.document,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),null}componentDidUpdate(){this.resetTableWidth(),f.setScrollbarWidth(),this.vs.tableTransform&&this.vs.table&&(this.vs.table.style.transform=this.vs.tableTransform,this.vs.tableTransform=""),b.tableKeyboardNavigation.onComponentDidUpdate({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}componentWillUnmount(){clearTimeout(this.forceUpdateTimeout),this.clipboardService&&this.clipboardService.removeEventListeners(this.document)}render(){var ei;let t=this.props.total||0;const i=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);let l=[];Array.isArray(this.props.data)?(l=this.props.data,t=t||this.props.data.length):this.props.data&&(l=this.props.data.data,t=t||this.props.data.total);const e=typeof this.props.groupable=="object"&&this.props.groupable.footer||"none",{resolvedGroupsCount:s,flattedData:n}=this.flatData(l,e,this.props.skip||0,this.props.group,this.props.expandField,this.props.filter,this.props.sort);this._data=n;const a=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1;this.columnResize.resizable=this.props.resizable||!1,this.dragLogic.reorderable=this.props.reorderable||!1,this.dragLogic.groupable=a;const h=this.props.selectable&&this.props.selectable.drag?"none":void 0;this.initializeVirtualization(t,a);const c=this.childrenToArray(this.props.children);this.initColumns(c,s);const d=c.map(v=>v&&v.type&&v.type.displayName==="KendoReactGridToolbar"?o.cloneElement(v,{...v.props,ariaControls:this._gridId}):null),u=c.filter(v=>v&&v.type&&v.type.displayName==="KendoReactGridNoRecords"),C=c.filter(v=>v&&v.type&&v.type.displayName==="KendoReactGridStatusBar"),g=this._columns.filter(v=>v.children.length===0),E=a&&o.createElement(yt,{group:this.props.group||[],groupChange:this.groupChange,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,refCallback:this.dragLogic.refGroupPanelDiv,resolveTitle:this.resolveTitle,ariaControls:this._gridId,onContextMenu:this.onContextMenu}),{sort:y,sortable:x,group:S,filter:F,filterable:k,filterOperators:B=_e,headerCellRender:_,columnMenu:me}=this.props,le=o.createElement(gi,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",scrollableDataElement:()=>this.vs.container,draggable:this.props.reorderable||a,ref:this.headerRef,elemRef:this.headerElementRef,headerRow:this.getHeaderRow(y,x,S,a,F,k,B,_,me,this._columns,this._columnsMap,this.isRtl),filterRow:this.props.filterable&&o.createElement(wt,{cells:this.props.cells,size:this.props.size,columns:this._columns,filter:this.props.filter,filterOperators:this.props.filterOperators||_e,filterChange:this.filterChange,sort:this.props.sort,cellRender:this.props.filterCellRender,isRtl:this.isRtl,ariaRowIndex:this._columnsMap.length+1})||void 0,cols:g.map((v,M)=>o.createElement("col",{key:M.toString(),width:Ee(v)}))}),X=this.vs&&this.vs.container&&this.vs.container.scrollLeft||0,D=parseFloat(((this.props.style||{}).width||"").toString()),{colSpans:Xe,hiddenColumns:Ce}=b.tableColumnsVirtualization({enabled:this.props.columnVirtualization,columns:g,tableViewPortWidth:D,scrollLeft:X}),Ye=(v,M,z)=>{let Y=!1;const V=this.props.selectedField?H(this.props.selectedField,v.dataItem):void 0;return{row:g.map((G,O)=>{if(Ce[O])return null;const ae=G.id?G.id:O,he=`${G.className?G.className+" ":""}${G.locked?"k-grid-content-sticky":""}`,W=G.left!==void 0?this.isRtl?{left:G.right,right:G.left}:{left:G.left,right:G.right}:{};let T=!1;if(G.editable&&this.props.editField){const A=H(this.props.editField,v.dataItem);A&&(A===!0||A===G.field)&&(Y=!0,T=!0)}const Qe=G.cell||T&&vt||Mt;return o.createElement(Qe,{onContextMenu:this.onContextMenu,key:ae,locked:this.props.lockGroups,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${M}-${String(O)}`,i),colSpan:Xe[O],dataItem:v.dataItem,field:G.field,editor:G.editor,format:G.format,className:he,render:this.props.cellRender,cells:pe(this.props.cells,G.cells),onChange:this.itemChange,selectionChange:this.props.onSelectionChange?A=>{this.selectionChange({event:A,dataItem:v.dataItem,dataIndex:z,columnIndex:O})}:void 0,columnIndex:O,columnsCount:g.length,rowType:v.rowType,level:v.level,expanded:v.expanded,dataIndex:v.dataIndex,style:W,ariaColumnIndex:G.ariaColumnIndex,isSelected:Array.isArray(V)&&V.indexOf(O)>-1})}),isInEdit:Y,isSelected:typeof V=="boolean"&&V}};let oe=0;if(this.props.scrollable==="virtual")for(let v=0;v<this.vs.topCacheCount+this.vs.attendedSkip-(this.props.skip||0);v++){const M=this._data.shift();if(M)this._data.push(M),oe++,M.rowType==="groupHeader"&&v--;else break}const qt=v=>v>=this._data.length-oe;let Ut=this.vs.realSkip||0;const be=[];let Je=!1;const Ze=this._columnsMap.length+(this.props.filterable?1:0)+1,$t=o.createElement("div",{key:"no-records",className:"k-grid-norecords","aria-rowindex":Ze},o.createElement("div",{className:"k-grid-norecords-template"},u.length?u:o.createElement(ue,null)));let ne=0;if(this._data.length){let v=-1,M=0;(this._slicedData||this._data).forEach((z,Y)=>{z.rowType==="data"&&(Ut++,v++);const V=Ut%2===0,G=this.props.dataItemKey&&f.getter(this.props.dataItemKey)(z.dataItem),O=Y+(this.vs.realSkip||0),ae=G||"ai"+O,he=ae+"_1",W=Ye(z,ae,v);if(ne=O+Ze+M,be.push(o.createElement(zt,{key:ae,dataItem:z.dataItem,isAltRow:V,isInEdit:W.isInEdit,rowType:z.rowType,isHidden:qt(Y),onClick:T=>this.rowClick(T,z),onDoubleClick:T=>this.rowDblClick(T,z),selectedField:this.props.selectedField,rowHeight:this.props.rowHeight,render:this.props.rowRender,ariaRowIndex:ne,absoluteRowIndex:O,dataIndex:v,isSelected:W.isSelected},W.row)),this.props.detail&&z.rowType==="data"&&z.expanded){const T=g.length-(this.props.expandField?1:0)-(this.props.group?this.props.group.length:0)||1;M++,ne=O+Ze+M,be.push(o.createElement("tr",{key:he,className:f.classNames("k-table-row",V?"k-detail-row k-table-alt-row k-alt":"k-detail-row"),style:{visibility:qt(Y)?"hidden":"",height:this.props.detailRowHeight},role:"row","aria-rowindex":ne},this.props.group&&this.props.group.map((Qe,A)=>{var ti;const ce=(ti=W==null?void 0:W.row[A])==null?void 0:ti.props.style,Ki=ce?this.isRtl?{left:ce.right,right:ce.left}:{left:ce.left,right:ce.right}:{};return o.createElement(Pe,{id:"",dataIndex:z.dataIndex,field:Qe.field,dataItem:z.dataItem,key:A,style:Ki,ariaColumnIndex:1+A,isSelected:!1,locked:this.props.lockGroups,isRtl:this.isRtl,cells:this.props.cells})}),this.props.expandField&&o.createElement(Li,{id:b.tableKeyboardNavigationTools.generateNavigatableId(`${he}-dhcell`,i)}),o.createElement(zi,{onContextMenu:this.onContextMenu,dataItem:z.dataItem,dataIndex:z.dataIndex,colSpan:T,ariaColIndex:2+(this.props.group?this.props.group.length:0),detail:this.props.detail,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${he}-dcell`,i)})))}})}else Je=!0;const jt={size:this.props.size,onPageChange:this.pagerPageChange,total:t,dir:this.isRtl?"rtl":void 0,skip:this.vs.propsSkip||0,take:(this.props.take!==void 0?this.props.take:this.props.pageSize)||10,messagesMap:pi,...Mi(this.props.pageable||{})},Xt=this.props.pager?o.createElement(this.props.pager,{...jt}):o.createElement(b.Pager,{className:"k-grid-pager",...jt}),Ri=v=>this.props.sort&&this.props.sort.filter(M=>M.field===v).length>0,Ai=(v,M)=>o.createElement("col",{key:M.toString(),width:Ee(v)}),Yt=(ei=this.props.cells)!=null&&ei.footerCell||this._columns.some(v=>{var M;return!!(v.footerCell||(M=v.cells)!=null&&M.footerCell)})?o.createElement(Si,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",ref:v=>this._footer=v,row:o.createElement(Fi,{cells:this.props.cells,columns:this._columns,isRtl:this.isRtl,ariaRowIndex:ne+1}),cols:g.map(Ai)}):null,Jt=o.createElement("colgroup",{ref:v=>{this.columnResize.colGroupMain=v}},g.map((v,M)=>o.createElement("col",{key:M.toString(),className:Ri(v.field)?"k-sorted":void 0,width:Ee(v)}))),Zt=this.dragLogic.reorderable||this.dragLogic.groupable,Qt=this.props.columnVirtualization?"block":"table";if(this.props.scrollable==="none")return o.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},o.createElement("div",{id:this.props.id,style:this.props.style,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),ref:v=>{this._element=v},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,E,o.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:v=>{this.tableElement=v}},o.createElement("table",{className:f.classNames("k-table k-grid-table",{[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),style:{userSelect:h,display:Qt}},Jt,le,o.createElement("tbody",{role:"rowgroup",className:"k-table-tbody",...b.tableKeyboardNavigationBodyAttributes},be),Yt)),Je&&$t,Zt&&o.createElement(o.Fragment,null,o.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),o.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue}))),C,this.props.pageable&&Xt);let ve=this.props.style||{};return this.props.scrollable==="virtual"&&(ve.height||(ve=Object.assign({},ve,{height:"450px"}))),o.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},o.createElement("div",{id:this.props.id,style:ve,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size,"k-grid-virtual":this.props.scrollable==="virtual"},this.props.className),ref:v=>{this._element=v},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,E,o.createElement("div",{className:"k-grid-aria-root",role:"grid","aria-colcount":g.length,"aria-rowcount":t,id:this._gridId},le,o.createElement("div",{className:"k-grid-container",role:"presentation"},o.createElement("div",{ref:this.containerRef,className:"k-grid-content k-virtual-content",onScroll:this.scrollHandler,role:"presentation"},o.createElement("div",{className:"k-grid-table-wrap",role:"presentation"},o.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:v=>{this.tableElement=v}},o.createElement("table",{className:f.classNames("k-table k-grid-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),role:"presentation",style:{userSelect:h,display:Qt}},Jt,o.createElement("tbody",{className:"k-table-tbody",ref:this.tableBodyRef,role:"rowgroup",...b.tableKeyboardNavigationBodyAttributes},be))),Je&&$t),o.createElement("div",{className:"k-height-container",role:"presentation"},o.createElement("div",{style:this.props.scrollable==="virtual"?{height:this.vs.containerHeight+"px"}:{}})))),Yt,Zt&&o.createElement(o.Fragment,null,o.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),o.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue})),this.showLicenseWatermark&&o.createElement(f.WatermarkOverlay,null)),C,this.props.pageable&&Xt))}selectionChange(t){if(this.props.onSelectionChange){const{event:i,dataItem:l,dataIndex:e,columnIndex:s}=t,{mode:n,cell:a}=b.getSelectionOptions(this.props.selectable),h={...this.getArguments(i.syntheticEvent),dataItem:l,startColIndex:s,endColIndex:s,startRowIndex:e,endRowIndex:e,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:n,cell:a,isDrag:!1,componentId:this._gridId,selectedField:this.props.selectedField||""};this.props.onSelectionChange.call(void 0,h)}}raiseDataEvent(t,i,l,e,s){const n=this.props.onDataStateChange;if(t){const a={...this.getArguments(e),...i,targetEvent:s};t.call(void 0,a)}else n&&n.call(void 0,{...this.getArguments(e),targetEvent:s||{},dataState:{...this.getDataState(),...l}})}columnReorder(t,i,l){const e=this._columns[t],s=e.depth,n=d=>{do d++;while(d<this._columns.length&&this._columns[d].depth>s);return d},a=this._columns.splice(t,n(t)-t);this._columns.splice(t<i?n(i-a.length):i,0,...a),this._columns.filter(d=>d.declarationIndex>=0).forEach((d,u)=>d.orderIndex=u),this._columnsMutations++;const h=this._columns[t].locked&&this._columns[i].locked;b.updateLeft(this._columnsMap,this._columns,h||this._shouldUpdateLeftRight),b.updateRight(this._columnsMap,this._columns,h||this._shouldUpdateLeftRight),this._resized&&(this._shouldUpdateLeftRight=!1,this._resized=!1);const c=this.columns;if(this.forceUpdate(),this.props.onColumnReorder){const d={target:this,columns:c,columnId:e.id,nativeEvent:l};this.props.onColumnReorder.call(void 0,d)}}groupReorder(t,i,l){if(this.props.group===void 0)return;const e=this.props.group.slice();e.splice(i,0,...e.splice(t,1)),this.groupChange(e,l)}columnToGroup(t,i,l){const e=this._columns[t].field;if(!e)return;const s=(this.props.group||[]).slice();s.splice(i,0,{field:e}),this.groupChange(s,l)}resetTableWidth(){let t=0;if(!this.columnResize.colGroupMain)return;const i=this.columnResize.colGroupMain.children;for(let l=0;l<i.length;l++){const e=i[l].width;if(!e)return;t+=parseFloat(e.toString())}t=Math.round(t),this._header&&this._header.setWidth(t),this._footer&&this._footer.setWidth(t),this.tableElement&&(this.tableElement.style.width=t+"px")}initColumns(t,i){const l=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);this._columns=this.readColumns(t,l,this._columnsMutations),this._columns.length===0&&(this._columns=li(this.props.data,this.props.group,this.props.expandField,{prevId:0,idPrefix:l})),this.configureColumns(this._columns,i,l),this._columnsMap=this.mapColumns(this._columns),this.columnResize.columns=this._columns,this.dragLogic.columns=this._columns}getDataState(){return{filter:this.props.filter,sort:this.props.sort,skip:this.props.skip,take:this.props.take!==void 0?this.props.take:this.props.pageSize,group:this.props.group}}getArguments(t){return{nativeEvent:t&&t.nativeEvent,syntheticEvent:t,target:this}}};$.displayName="KendoReactGrid",$.defaultProps={},$.propTypes={data:p.oneOfType([p.array,p.shape({data:p.array,total:p.number})]),sortable:p.oneOfType([p.bool,p.shape({mode:p.oneOf(["single","multiple"]),allowUnsort:p.bool})]),onSortChange:p.func,sort:p.array,filterable:p.bool,filter:p.any,onFilterChange:p.func,pageable:p.oneOfType([p.bool,p.shape({buttonCount:p.number,responsive:p.bool,info:p.bool,type:p.oneOf(["numeric","input"]),pageSizes:p.oneOfType([p.bool,p.arrayOf(p.oneOfType([p.string,p.number]))]),previousNext:p.bool})]),pageSize:p.number,onPageChange:p.func,total:p.number,skip:p.number,take:p.number,fixedScroll:p.bool,onExpandChange:p.func,expandField:p.string,selectedField:p.string,onSelectionChange:p.func,onHeaderSelectionChange:p.func,resizable:p.bool,reorderable:p.bool,group:p.any,groupable:p.oneOfType([p.bool,p.shape({enabled:p.bool,footer:p.oneOf(["always","visible","none"])})]),onGroupChange:p.func,onRowClick:p.func,onRowDoubleClick:p.func,onItemChange:p.func,editField:p.string,scrollable:p.oneOf(["none","scrollable","virtual"]),rowHeight:p.number,detailRowHeight:p.number,detail:p.any,style:p.object,onDataStateChange:p.func,onColumnResize:p.func,onColumnReorder:p.func,dataItemKey:p.string,navigatable:p.bool,size:p.oneOf(["small","medium"])},$.contextType=b.TableKeyboardNavigationContext;class re extends o.Component{render(){const{children:t}=this.props;return o.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-wrapper",this.props.className),style:this.props.style},t)}}class j extends o.Component{render(){const{title:t,iconClass:i,svgIcon:l,selected:e}=this.props;return o.createElement("div",{onClick:this.props.onClick,className:`k-columnmenu-item ${e?"k-selected":""}`},(i||l)&&o.createElement(f.IconWrap,{name:i&&f.toIconName(i),icon:l}),t)}}class Ve extends o.Component{constructor(){super(...arguments),this.onGroupClick=t=>{if(t.preventDefault(),this.props.onGroupChange){const{column:i}=this.props;if(!i.field)return;const l=(this.props.group||[]).slice(),e=l.findIndex(s=>s.field===i.field);e>-1?l.splice(e,1):l.push({field:i.field}),this.props.onGroupChange(l,t)}this.props.onCloseMenu&&this.props.onCloseMenu()}}render(){const{group:t,column:i}=this.props,l=I.provideLocalizationService(this),e=!!(t&&i.field&&t.find(n=>n.field===i.field)),s=e?dt:ct;return o.createElement(re,null,o.createElement(j,{title:l.toLanguageString(s,w[s]),iconClass:e?"k-i-ungroup":"k-i-group",svgIcon:e?N.ungroupIcon:N.groupIcon,onClick:this.onGroupClick}))}}I.registerForIntl(Ve),I.registerForLocalization(Ve);const Ot="asc",Ht="desc",Di={true:{asc:{asc:"",desc:"desc"},desc:{asc:"asc",desc:""},"":{asc:"asc",desc:"desc"}},false:{asc:{asc:"asc",desc:"desc"},desc:{asc:"asc",desc:"desc"},"":{asc:"asc",desc:"desc"}}},_t=(r,t)=>t?t.findIndex(i=>i.field===r):-1,Rt=(r,t)=>!!(t&&r>-1&&t[r].dir===Ot),At=(r,t)=>!!(t&&r>-1&&t[r].dir===Ht);class ge extends o.Component{constructor(){super(...arguments),this.onAscClick=t=>{this.onSort(t,Ot),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onDescClick=t=>{this.onSort(t,Ht),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onSort=(t,i)=>{if(t.preventDefault(),!this.props.onSortChange)return;const{column:l,sortable:e,sort:s}=this.props,{allowUnsort:n,mode:a}=xt(e||!1,!1),h=(s||[]).filter(u=>u.field===l.field)[0],c=Di[n][h&&h.dir||""][i],d=a==="single"?[]:(this.props.sort||[]).filter(u=>u.field!==l.field);c!==""&&l.field&&d.push({field:l.field,dir:c}),this.props.onSortChange(d,t)}}render(){const{sort:t,column:i}=this.props,l=_t(i.field,t),e=I.provideLocalizationService(this);return o.createElement(re,null,o.createElement(j,{title:e.toLanguageString(ye,w[ye]),iconClass:"k-i-sort-asc-sm",svgIcon:N.sortAscSmallIcon,selected:Rt(l,t),onClick:this.onAscClick}),o.createElement(j,{title:e.toLanguageString(Ne,w[Ne]),iconClass:"k-i-sort-desc-sm",svgIcon:N.sortDescSmallIcon,selected:At(l,t),onClick:this.onDescClick}))}}ge.active=(r,t)=>{const i=_t(r,t);return At(i,t)||Rt(i,t)},I.registerForIntl(ge),I.registerForLocalization(ge);class qe extends o.Component{render(){return o.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-content",this.props.className),style:this.props.style},o.createElement(ri.Reveal,{style:{position:"relative",display:"block"}},this.props.show?this.props.children:null))}}class Ue extends o.Component{constructor(t){super(t),this.renderOperatorEditor=()=>{if(this.props.filterType==="boolean")return;const i=this.props.operators.find(l=>l.operator===this.props.operator)||null;return o.createElement(Z.DropDownList,{value:i,onChange:this.operatorChange,data:this.props.operators,textField:"text"})},this.inputChange=this.inputChange.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){return o.createElement(o.Fragment,null,this.renderOperatorEditor(),this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues))}inputChange(t,i){Ae(t,i,this.props)}operatorChange(t){We(t,this.props.value,this.props.onChange)}boolDropdownChange(t){Be(t,this.props.onChange)}filterComponent(t,i,l){switch(t){case"numeric":return o.createElement(L.NumericTextBox,{value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},rangeOnEnter:!1});case"date":return o.createElement(xe.DatePicker,{value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)}});case"boolean":{const e=s=>s==null;return o.createElement(Z.DropDownList,{onChange:this.boolDropdownChange,value:l.find(s=>s.operator===(e(i)?"":i)),data:l,textField:"text"})}default:return o.createElement(L.Input,{value:i||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)}})}}}class Kt extends o.Component{render(){const{firstFilterProps:t,hideSecondFilter:i,secondFilterProps:l,logicData:e,logicValue:s,onLogicChange:n}=this.props;return o.createElement(o.Fragment,null,o.createElement(Ue,{...t}),!i&&o.createElement(o.Fragment,null,o.createElement(Z.DropDownList,{data:e,value:s,onChange:n,className:"k-filter-and",textField:"text"}),o.createElement(Ue,{...l})))}}const fe=r=>r||{filters:[],logic:"and"},se=(r,t)=>fe(t).filters.filter(e=>de.isCompositeFilterDescriptor(e)?e.filters&&e.filters.length&&e.filters.length<=2&&!e.filters.find(s=>de.isCompositeFilterDescriptor(s)||s.field!==r):!1)[0]||null;class $e extends o.Component{constructor(t){super(t),this.removeGroup=(l,e)=>{const s=[...e.filters],n=s.findIndex(a=>a===l);return n>-1&&s.splice(n,1),{...e,filters:s}},this.insertGroup=(l,e)=>({...e,filters:[l,...e.filters]}),this.isControlled=()=>this.props.expanded!==void 0,this.onFilterExpand=()=>{const l=this.isControlled(),e=!(l?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(e),l||this.setState({expanded:e})},this.firstFilterChange=l=>{this.filterChange(0,l)},this.secondFilterChange=l=>{this.filterChange(1,l)},this.filterChange=(l,e)=>{const s=this.state.filterGroup.filters.map((n,a)=>a===l?{...n,value:e.value,operator:e.operator}:n);this.setState({filterGroup:{...this.state.filterGroup,filters:s}})},this.logicChange=l=>{this.setState({filterGroup:{...this.state.filterGroup,logic:l.target.value.operator}})},this.clear=l=>{if(l.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,s=fe(this.props.filter),n=se(e,this.props.filter),a=s.filters.filter(h=>h!==n);a.length?this.props.onFilterChange({...s,filters:a},l):this.props.onFilterChange(null,l),this.props.onCloseMenu&&this.props.onCloseMenu()},this.currentFilterGroup=()=>({...this.state.filterGroup,filters:this.state.filterGroup.filters.filter(l=>l.value!==void 0&&l.value!==null&&l.value!==""||l.value===null&&l.operator)}),this.submit=l=>{if(l.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,s=fe(this.props.filter),n=se(e,this.props.filter),a=this.currentFilterGroup();let h=null;if(n&&a.filters.length>0){const c=s.filters.map(d=>d===n?a:d);h={...s,filters:c}}else if(a.filters.length===0){const c=s.filters.filter(d=>d!==n);c.length&&(h={...s,filters:c})}else h={...s,filters:[...s.filters,a]};this.props.onFilterChange(h,l),this.props.onCloseMenu&&this.props.onCloseMenu()};let i;if(t.column&&t.column.field){const l=Ke(t.column.filter),e=It(t.filterOperators,l);i=se(t.column.field,t.filter),i=i?{...i,filters:i.filters.map(s=>({...s}))}:{logic:"and",filters:[{field:t.column.field,operator:e,value:R(e)?null:void 0},{field:t.column.field,operator:e,value:R(e)?null:void 0}]},i.filters.filter(s=>s.field===t.column.field).length===1&&i.filters.splice(1,0,{field:t.column.field,operator:e})}this.state={expanded:t.expanded||!1,filterGroup:i}}render(){const{column:t,filterUI:i,hideSecondFilter:l,filterOperators:e}=this.props;if(!t||!t.field)return o.createElement("div",null);const s=Ke(t.filter),n=l!==void 0?l:xi[s],a=I.provideLocalizationService(this),h=this.state.filterGroup.filters,c=ie(e[s],a),d=ie(Re,a),u={field:t.field,value:h[0].value,operator:h[0].operator,operators:c,booleanValues:d,onChange:this.firstFilterChange,filterType:s},C={field:t.field,value:h[1].value,operator:h[1].operator,operators:c,booleanValues:d,onChange:this.secondFilterChange,filterType:s},g=this.state.filterGroup.logic,E=ie(bi,a),y={value:E.find(_=>_.operator===(g===null?"":g)),onChange:this.logicChange,data:E},x=i,S={firstFilterProps:u,secondFilterProps:C,logicData:y.data,logicValue:y.value,onLogicChange:y.onChange,hideSecondFilter:n},F=this.currentFilterGroup().filters.length!==0||R(h[0].operator)||R(h[1].operator),k=this.isControlled()?this.props.expanded:this.state.expanded,B=this.props.alwaysExpand;return o.createElement(re,null,!B&&o.createElement(j,{title:a.toLanguageString(ee,w[ee]),iconClass:"k-i-filter",svgIcon:N.filterIcon,onClick:this.onFilterExpand}),o.createElement(qe,{show:B||!!k},o.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear,onKeyDown:_=>_.stopPropagation()},o.createElement("div",{className:"k-filter-menu-container"},x?o.createElement(x,{...S}):o.createElement(Kt,{...S}),o.createElement("div",{className:"k-actions k-actions-stretched"},o.createElement(K.Button,{themeColor:"primary",disabled:!F},a.toLanguageString(Q,w[Q])),o.createElement(K.Button,{type:"reset"},a.toLanguageString(P,w[P])))))))}}$e.active=(r,t)=>!!se(r,t),I.registerForLocalization($e);const Oi=(r,t)=>r.length!==t.length?!1:r.every((i,l)=>i===t[l]);class je extends o.Component{constructor(t){super(t),this.defaultFilter=()=>this.props.filter?f.clone(this.props.filter):{filters:[],logic:"and"},this.isControlled=()=>this.props.expanded!==void 0,this.parseData=(i,l)=>{const e=this.props.column.field||"",s=i.map(n=>H(e,n));return l?s.filter((n,a)=>s.indexOf(n)===a):s},this.getFilterIndex=()=>{const i=this.props.column.field;return this.defaultFilter().filters.findIndex(s=>s.filters&&s.filters.length>0&&s.filters[0].field===i)},this.onFilterExpand=()=>{const i=this.isControlled(),l=!(i?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(l),i||this.setState({expanded:l})},this.handleSearchChange=i=>{const l=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",e={logic:"and",filters:[{field:this.props.column.field,operator:l,value:i.target.value,ignoreCase:!0}]};this.setState({value:i.target.value,data:this.parseData(de.filterBy(this.props.data||[],e),this.props.uniqueData)})},this.handleClear=()=>{const i=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",l={logic:"and",filters:[{field:this.props.column.field,operator:i,value:"",ignoreCase:!0}]};this.setState({value:"",data:this.parseData(de.filterBy(this.props.data||[],l),this.props.uniqueData)})},this.clear=i=>{if(i.preventDefault(),!this.props.onFilterChange)return;const l=this.state.currentFilter||null;l!==null&&l.filters.length>0?(this.compositeFilterIndex>=0&&l.filters.splice(this.compositeFilterIndex,1),this.props.onFilterChange(l,i)):this.props.onFilterChange(null,i),this.props.onCloseMenu&&this.props.onCloseMenu()},this.submit=i=>{if(i.preventDefault(),!this.props.onFilterChange)return;const l=this.state.currentFilter||null;this.props.onFilterChange(l,i),this.props.onCloseMenu&&this.props.onCloseMenu()},this.handleCheckBoxChange=(i,l)=>{const e=this.props.column.field||"",s={...this.state.currentFilter},n=[...this.state.currentFilter.filters];let a=[];if(this.compositeFilterIndex!==-1&&s.filters[this.compositeFilterIndex].filters&&l!=="all"&&(a=s.filters[this.compositeFilterIndex].filters),i.value&&l==="all")this.state.data.forEach(h=>{a.push({field:e,operator:"eq",value:h})});else if(i.value)a.push({field:e,operator:"eq",value:l});else if(this.state.currentFilter){const h=a.findIndex(c=>c.value===l);a.splice(h,1)}s.logic="and",this.compositeFilterIndex!==-1?n[this.compositeFilterIndex]={logic:"or",filters:a}:n.push({logic:"or",filters:a}),(!i.value&&l==="all"||a.length===0)&&n.splice(this.compositeFilterIndex,1),s.filters=n,this.setState({currentFilter:s})},this.isAllSelected=()=>{let i=!1;if(this.state.currentFilter){const l=[...this.state.currentFilter.filters];return this.compositeFilterIndex===-1?!1:(i=this.state.data.every(e=>this.compositeFilterIndex!==-1&&l[this.compositeFilterIndex].filters?l[this.compositeFilterIndex].filters.findIndex(n=>n.value===e)>=0:!1),i)}return i},this.compositeFilterIndex=this.getFilterIndex(),this.state={expanded:t.expanded||!1,value:"",data:this.parseData(this.props.data,this.props.uniqueData)||[],dataFromProps:this.parseData(this.props.data,!1)||[],currentFilter:this.defaultFilter()}}componentDidUpdate(){const t=this.props.column.field||"",i=this.props.data.map(l=>H(t,l));Oi(i,this.state.dataFromProps)||this.setState({data:i,dataFromProps:i})}render(){const{column:t}=this.props;if(!t||!t.field)return o.createElement("div",null);const i=I.provideLocalizationService(this),l=this.isControlled()?this.props.expanded:this.state.expanded,e=[];if(this.state.currentFilter){const a=[...this.state.currentFilter.filters];this.compositeFilterIndex=a.findIndex(h=>h.filters&&h.filters.length>0?h.filters[0].field===t.field:!1),this.compositeFilterIndex!==-1&&a[this.compositeFilterIndex].filters.length>0&&a[this.compositeFilterIndex].filters.forEach(h=>{h.field===this.props.column.field&&e.push(h.value)})}const s=this.props.searchBox?o.createElement(this.props.searchBox,{value:this.state.value,onChange:this.handleSearchChange}):o.createElement("div",{className:"k-searchbox k-textbox k-input k-input-md k-input-solid"},o.createElement(f.IconWrap,{className:"k-input-icon",name:"search",icon:N.searchIcon}),o.createElement(L.Input,{className:"k-input-inner",type:"text",placeholder:i.toLanguageString(Fe,w[Fe]),value:this.state.value,onChange:a=>this.handleSearchChange(a.nativeEvent)}),o.createElement(K.Button,{type:"button",rounded:null,className:"k-input-button",onClick:this.handleClear,icon:"x",svgIcon:N.xIcon})),n=e.filter((a,h)=>e.indexOf(a)===h);return o.createElement(re,null,o.createElement(j,{title:i.toLanguageString(ee,w[ee]),iconClass:"k-i-filter",svgIcon:N.filterIcon,onClick:this.onFilterExpand}),o.createElement(qe,{show:!!l},o.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear},o.createElement("div",{className:"k-filter-menu-container"},s,o.createElement("ul",{className:"k-reset k-multicheck-wrap"},o.createElement("li",{className:"k-item k-check-all-wrap"},o.createElement(L.Checkbox,{label:i.toLanguageString(Ge,w[Ge]),onChange:a=>this.handleCheckBoxChange(a,"all"),checked:this.isAllSelected()})),this.state.data.map((a,h)=>o.createElement("li",{className:"k-item",key:h},o.createElement(L.Checkbox,{label:String(a),onChange:c=>this.handleCheckBoxChange(c,a),checked:n.includes(a)})))),o.createElement("div",{className:"k-filter-selected-items"},n.length+" "+i.toLanguageString(ze,w[ze])),o.createElement("div",{className:"k-actions k-hstack k-justify-content-stretch"},o.createElement(K.Button,{themeColor:"primary",type:"submit"},i.toLanguageString(Q,w[Q])),o.createElement(K.Button,{className:"k-button",type:"reset"},i.toLanguageString(P,w[P])))))))}}je.defaultProps={uniqueData:!0},I.registerForLocalization(je);const Bt=r=>{const[t,i]=o.useState(""),l=o.useMemo(()=>new Set(r.columnsState.map(g=>g.id)),[r.columnsState]),e=o.useMemo(()=>r.columns.filter(g=>{var E;return(E=g.title||g.field)==null?void 0:E.toLowerCase().includes(t.toLowerCase())}),[r.columns,t]),[s,n]=o.useState(r.columns.map(g=>l.has(g.id))),a=o.useCallback(()=>{const g=r.columns.filter((E,y)=>s[y]);r.onColumnsChange.call(void 0,g),r.onCloseMenu.call(void 0)},[s,r.columns,r.onColumnsChange,r.onCloseMenu]),h=o.useCallback(()=>{n(r.columns.map(g=>l.has(g.id)))},[l,r.columns]),c=s.filter(g=>g).length,d=c===s.length,u=o.useCallback(()=>{n(r.columns.map((g,E)=>d&&E===0?!0:!d))},[r.columns,d]),C=o.useCallback((g,E)=>{const y=s.slice();y[E]=g,n(y)},[s]);return o.createElement("form",{className:"k-filter-menu"},o.createElement("div",{className:"k-filter-menu-container"},o.createElement(L.TextBox,{className:"k-searchbox",value:t,onChange:g=>i(String(g.target.value)),prefix:()=>o.createElement(L.InputPrefix,null,o.createElement(f.IconWrap,{name:"search",icon:N.searchIcon}))}),o.createElement("ul",{className:"k-reset k-multicheck-wrap"},!t&&o.createElement("li",{className:"k-item k-check-all-wrap"},o.createElement(L.Checkbox,{checked:d,onChange:u,label:"(Select all)"})),e.map((g,E)=>o.createElement("li",{key:g.id,className:"k-item"},o.createElement(L.Checkbox,{disabled:s[E]&&c===1,checked:s[E],onChange:y=>{var x;return C(!!((x=y.target.element)!=null&&x.checked),E)},label:g.title||g.field})))),o.createElement("div",{className:"k-filter-selected-items"},c," selected items"),o.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},o.createElement(K.Button,{type:"button",themeColor:"primary",onClick:a},"Apply"),o.createElement(K.Button,{type:"button",onClick:h},"Reset"))))};Bt.displayName="GridColumnMenuColumnsList";class Hi extends o.Component{render(){return null}}class Wt extends o.Component{render(){return o.createElement("div",{className:f.classNames("k-toolbar k-grid-toolbar",{"k-toolbar-md":!this.props.size,[`k-toolbar-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),"aria-label":this.props.ariaLabel,"aria-controls":this.props.ariaControls,role:"toolbar"},this.props.children)}}Wt.displayName="KendoReactGridToolbar";const Tt=r=>{const{data:t=[]}=r;return o.createElement("div",{className:"k-selection-aggregates k-grid-selection-aggregates"},t.map((i,l)=>o.createElement("div",{key:l},o.createElement("span",{className:"k-selection-aggregates-item-text"},i.type,": "),o.createElement("span",{className:"k-selection-aggregates-item-value"},i.formattedValue))))};Tt.displayName="KendoReactGridStatusBar";const Pt=r=>{var i;const t=r.slice();for(let l=0;l<t.length;l++)for(;t[l]&&((i=t[l].children)!=null&&i.length);)t.splice(l,1,...t[l].children);return t},_i=r=>{const{dataItems:t,target:i,selectedField:l}=r,s=Pt(i.columns).map(x=>x.field).filter(x=>x&&typeof x=="string").map(x=>f.getter(x)),n=f.getter(l),a={dates:[],numbers:[],booleans:[],others:[]},h=x=>{typeof x=="number"?a.numbers.push(x):typeof x=="boolean"?a.booleans.push(x):x instanceof Date?a.dates.push(x):a.others.push(x)};t.forEach(x=>{const S=n(x);S&&S.forEach(F=>{h(s[F](x))})});const c=a.dates.map(x=>x.getTime()),d=a.booleans.filter(x=>x).length,u=a.booleans.filter(x=>!x).length,C=a.numbers.length?a.numbers.reduce((x,S)=>x+=S,0):void 0,g={sum:C,average:typeof C=="number"?C/a.numbers.length:void 0,min:a.numbers.length?Math.min(...a.numbers):void 0,max:a.numbers.length?Math.max(...a.numbers):void 0,count:a.numbers.length+a.booleans.length+a.dates.length+a.others.length,isTrue:d>0?d:void 0,isFalse:u>0?u:void 0,earliest:a.dates.length?new Date(Math.min(...c)):void 0,latest:a.dates.length?new Date(Math.max(...c)):void 0},E=(x,S)=>(S==="sum"||S==="average")&&typeof x=="number"?x.toFixed(2):(S==="earliest"||S==="latest")&&x instanceof Date?x.toLocaleDateString():String(x),y=[];return Object.keys(g).forEach(x=>{const S=x,F=g[S];F!==void 0&&y.push({type:S,value:F,formattedValue:E(F,S)})}),y},Vt=f.withIdHOC($);Vt.displayName="KendoReactGrid",Object.defineProperty(m,"getSelectedState",{enumerable:!0,get:()=>b.getSelectedState}),Object.defineProperty(m,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>b.getSelectedStateFromKeyDown}),Object.defineProperty(m,"setSelectedState",{enumerable:!0,get:()=>b.setSelectedState}),m.GRID_COL_INDEX_ATTRIBUTE=U,m.GRID_PREVENT_SELECTION_ELEMENT=ui,m.GRID_ROW_INDEX_ATTRIBUTE=bt,m.Grid=Vt,m.GridCell=Mt,m.GridClassComponent=$,m.GridColumn=q,m.GridColumnMenuCheckboxFilter=je,m.GridColumnMenuColumnsList=Bt,m.GridColumnMenuFilter=$e,m.GridColumnMenuFilterCell=Ue,m.GridColumnMenuFilterUI=Kt,m.GridColumnMenuGroup=Ve,m.GridColumnMenuItem=j,m.GridColumnMenuItemContent=qe,m.GridColumnMenuItemGroup=re,m.GridColumnMenuSort=ge,m.GridColumnMenuWrapper=He,m.GridCommonDragLogic=Gt,m.GridDetailRow=Hi,m.GridEditCell=vt,m.GridFilterCell=Te,m.GridGroupCell=Pe,m.GridHeaderCell=Et,m.GridHierarchyCell=Ct,m.GridNoRecords=ue,m.GridRow=zt,m.GridSelectionCell=mt,m.GridToolbar=Wt,m.StatusBar=Tt,m.booleanFilterValues=Re,m.cellBoolDropdownChange=Be,m.cellInputChange=Ae,m.cellOperatorChange=We,m.filterGroupByField=se,m.getStatusData=_i,m.gridMessages=w,m.leafColumns=Pt,m.operators=_e,m.pagerFirstPage=lt,m.pagerInfo=st,m.pagerItemPerPage=ht,m.pagerLastPage=at,m.pagerNextPage=nt,m.pagerPreviousPage=ot,m.rootFilterOrDefault=fe,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
5
+ (function(m,J){typeof exports=="object"&&typeof module!="undefined"?J(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-intl"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-data-query"),require("@progress/kendo-react-animation")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-data-tools","@progress/kendo-react-intl","@progress/kendo-svg-icons","@progress/kendo-react-inputs","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-react-buttons","@progress/kendo-react-dropdowns","@progress/kendo-data-query","@progress/kendo-react-animation"],J):(m=typeof globalThis!="undefined"?globalThis:m||self,J(m.KendoReactGrid={},m.React,m.PropTypes,m.KendoReactCommon,m.KendoReactDataTools,m.KendoReactIntl,m.KendoSvgIcons,m.KendoReactInputs,m.KendoReactDateinputs,m.KendoReactPopup,m.KendoReactButtons,m.KendoReactDropdowns,m.KendoDataQuery,m.KendoReactAnimation))})(this,function(m,J,p,f,b,I,N,L,xe,ii,K,Z,de,ri){"use strict";"use client";function si(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const i in r)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}return t.default=r,Object.freeze(t)}const o=si(J),q=r=>null;q.displayName="KendoReactGridColumn",q.defaultProps={filterable:!0,editable:!0,sortable:!0,resizable:!0,reorderable:!0,groupable:!0},q.propTypes={field:p.string,title:p.string,editable:p.bool,sortable:p.oneOfType([p.bool,p.shape({allowUnsort:p.bool.isRequired})]),cell:p.any,filterCell:p.any,filterTitle:p.string,filterable:p.bool,filter:p.oneOf(["text","numeric","boolean","date"]),editor:p.oneOf(["text","numeric","boolean","date"]),width:p.oneOfType([p.string,p.number]),minResizableWidth:p.number,headerCell:p.any,footerCell:p.any,headerSelectionValue:p.bool,format:p.string,headerClassName:p.string,className:p.string,reorderable:p.bool,resizable:p.bool,orderIndex:p.number,groupable:p.bool,columnMenu:p.any,locked:p.bool};function H(r,t){const i=(r||"").split(".");let l=t;return i.forEach(e=>{l=l?l[e]:void 0}),l}function et(r,t,i,l,e,s,n=0){let a=n;for(let h=0;h<t.length;h++){if(!e||t[h].value===void 0||t[h].items===void 0){r[r.length]={dataIndex:l.index,dataItem:t[h],rowType:"data",level:n,expanded:s===void 0||H(s,t[h])},l.index++;continue}a=Math.max(a,n+1);const c=s===void 0||H(s,t[h])===void 0||H(s,t[h]);r[r.length]={dataIndex:-1,dataItem:t[h],level:n,rowType:"groupHeader",expanded:c},c&&(a=Math.max(et(r,t[h].items,i,l,e,s,n+1),a)),(i==="always"||c&&i==="visible")&&(r[r.length]={dataIndex:-1,dataItem:t[h],rowType:"groupFooter",level:n,expanded:c})}return a}function tt(r,t,i,l=0){let e=[];if(!r)return[];r&&r.length===void 0&&(r=[r]),r.forEach((n,a)=>{n=n.props?n.props:n;const h=t[a]||null,c=tt(n.children,h&&h.children||[],i,l+1);e.push(Object.assign({depth:l},q.defaultProps,c.length?{cell:()=>null,filterCell:()=>null}:{},h?{width:h.width,orderIndex:h.orderIndex}:{},n,{id:n.id?n.id:b.tableKeyboardNavigationTools.generateNavigatableId(`${i.prevId++}`,i.idPrefix,"column"),declarationIndex:e.length,children:c,rowSpan:0,colSpan:0,isAccessible:!0,left:h&&Math.floor(h.left),right:h&&Math.floor(h.right)}))});const s=(n,a)=>n.orderIndex===a.orderIndex?n.declarationIndex-a.declarationIndex:(n.orderIndex||0)-(a.orderIndex||0);if(e.sort(s),l===0){let n=[];const a=(h,c)=>h.forEach(d=>{d.parentIndex=c,a(d.children,n.push(d)-1)});return a(e,-1),n}return e}function li(r,t,i,l){let e=[];Array.isArray(r)?e=r:r&&(e=r.data);const s=[];if(e.length>0){let n=e[0];if(t)for(let h=0;h<t.length;h++)n=n.items&&n.items[0];Object.getOwnPropertyNames(n).forEach(h=>{h!==i&&s.push(Object.assign({id:b.tableKeyboardNavigationTools.generateNavigatableId(`${l.prevId++}`,l.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},q.defaultProps,{field:h}))})}return s}const oi=(r,t)=>{let i=r[t.parentIndex];for(;i;){if(i.footerCell)return!0;i=r[i.parentIndex]}return!1},ni=r=>r.filter(t=>oi(r,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),Ee=r=>r.width!==void 0?Math.floor(parseFloat(r.width.toString()))+"px":void 0,it=r=>(r.sort((t,i)=>t.declarationIndex-i.declarationIndex),r.map(t=>{const{declarationIndex:i,parentIndex:l,depth:e,colSpan:s,rowSpan:n,index:a,kFirst:h,children:c,...d}=t;return c.length?{children:it(c),...d}:d})),Se=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),rt=17895697,pe=(r,t)=>{if(!(!r&&!t))return t?r?{...r,...t,select:{...r.select||{},...t.select||{}},hierarchy:{...r.hierarchy||{},...t.hierarchy||{}},group:{...r.group||{},...t.group||{}},edit:{...r.edit||{},...t.edit||{}}}:t:r},Ie="grid.noRecords",st="grid.pagerInfo",lt="grid.pagerFirstPage",ot="grid.pagerPreviousPage",nt="grid.pagerNextPage",at="grid.pagerLastPage",ht="grid.pagerItemsPerPage",ai="grid.pagerPage",hi="grid.pagerPageSizeAriaLabel",ci="grid.pagerOf",di="grid.pagerTotalPages",we="grid.groupPanelEmpty",ct="grid.groupColumn",dt="grid.ungroupColumn",ke="grid.columnMenu",P="grid.filterClearButton",Q="grid.filterSubmitButton",ee="grid.filterTitle",ye="grid.sortAscending",Ne="grid.sortDescending",Fe="grid.searchPlaceholder",Ge="grid.filterCheckAll",Me="grid.filterChooseOperator",ze="grid.filterSelectedItems",Le="grid.sortAriaLabel",De="grid.filterAriaLabel",Oe="grid.groupPanelAriaLabel",pt="grid.groupExpand",ut="grid.groupCollapse",gt="grid.detailExpand",ft="grid.detailCollapse",te="grid.selectRow",w={[gt]:"Expand detail row",[ft]:"Collapse detail row",[pt]:"Expand group",[ut]:"Collapse Group",[Ie]:"No records available",[we]:"Drag a column header and drop it here to group by that column",[P]:"Clear",[Q]:"Filter",[ee]:"Filter",[ye]:"Sort Ascending",[Ne]:"Sort Descending",[Le]:"Sortable",[ct]:"Group Column",[dt]:"Ungroup Column",[ke]:"Column menu",[ht]:"items per page",[st]:"{0} - {1} of {2} items",[lt]:"Go to the first page",[ot]:"Go to the previous page",[nt]:"Go to the next page",[at]:"Go to the last page",[ai]:"Page",[hi]:"Page size",[ci]:"of",[di]:"{0}",[Fe]:"Search",[Ge]:"Check All",[Me]:"Choose Operator",[ze]:"selected items",[De]:"Filter",[Oe]:"Group panel",[te]:"Select Row","grid.filterEqOperator":"Is equal to","grid.filterNotEqOperator":"Is not equal to","grid.filterIsNullOperator":"Is null","grid.filterIsNotNullOperator":"Is not null","grid.filterIsEmptyOperator":"Is empty","grid.filterIsNotEmptyOperator":"Is not empty","grid.filterStartsWithOperator":"Starts with","grid.filterContainsOperator":"Contains","grid.filterNotContainsOperator":"Does not contain","grid.filterEndsWithOperator":"Ends with","grid.filterGteOperator":"Is greater than or equal to","grid.filterGtOperator":"Is greater than","grid.filterLteOperator":"Is less than or equal to","grid.filterLtOperator":"Is less than","grid.filterIsTrue":"Is true","grid.filterIsFalse":"Is false","grid.filterBooleanAll":"(All)","grid.filterAfterOrEqualOperator":"Is after or equal to","grid.filterAfterOperator":"Is after","grid.filterBeforeOperator":"Is before","grid.filterBeforeOrEqualOperator":"Is before or equal to","grid.filterAndLogic":"And","grid.filterOrLogic":"Or"};function pi(r){const t=r.replace(/^pager\.([a-z])/,(i,l)=>"grid.pager"+l.toUpperCase());return{messageKey:t,defaultMessage:w[t]}}const mt=r=>{const t=I.useLocalization(),i=o.useCallback(C=>{r.selectionChange&&r.selectionChange({syntheticEvent:C})},[r.selectionChange]),l=f.useId(),e=H(r.field,r.dataItem),s=b.useTableKeyboardNavigation(r.id),n={colSpan:r.colSpan,style:r.style,className:r.className,"aria-colindex":r.ariaColumnIndex,role:"gridcell",...s},a=typeof e=="boolean"&&e,h=o.createElement("span",{key:1,className:"k-checkbox-wrap"},o.createElement("input",{id:l,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(te,w[te]),"aria-checked":a,checked:a,onChange:i})),c=r.rowType!=="groupHeader"?o.createElement("td",{...n},h):null,d=r.rowType||"data",u=r.cells;if(u&&u.select&&u.select[d]){const C=u.select[d];return o.createElement(C,{...r,tdProps:n},h)}return r.render?r.render.call(void 0,c,r):c},Ct=r=>{let t=null,i=null,l=null;const e=H(r.field,r.dataItem),s=b.useTableKeyboardNavigation(r.id),n=I.useLocalization(),a=o.useCallback(d=>{d.isDefaultPrevented()||d.keyCode===f.Keys.enter&&r.onChange&&(d.preventDefault(),r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:d,field:r.field,value:!e}))},[r.dataItem,r.dataIndex,r.field,r.onChange,e]);if(r.rowType==="groupFooter")i={className:"k-table-td k-hierarchy-cell",role:"gridcell",...s},t=o.createElement("td",{...i});else if(r.rowType!=="groupHeader"){const d=e?ft:gt,u=n.toLanguageString(d,w[d]);i={className:"k-table-td k-hierarchy-cell",onKeyDown:a,"aria-expanded":!!e,role:"gridcell","aria-colindex":r.ariaColumnIndex,...s},l=o.createElement("a",{onClick:C=>{C.preventDefault(),r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:C,field:r.field,value:!e})},"aria-label":u,href:"#",tabIndex:-1},o.createElement(f.IconWrap,{name:e?"minus":"plus",icon:e?N.minusIcon:N.plusIcon})),t=o.createElement("td",{...i},l)}const h=r.rowType||"data",c=r.cells;if(c&&c.hierarchy&&c.hierarchy[h]){const d=c.hierarchy[h];return o.createElement(d,{...r,tdProps:i},l)}return r.render?r.render.call(void 0,t,r):t},bt=b.TABLE_ROW_INDEX_ATTRIBUTE,U=b.TABLE_COL_INDEX_ATTRIBUTE,ui=b.TABLE_PREVENT_SELECTION_ELEMENT,vt=r=>{const t=H(r.field,r.dataItem);let i=null;const l=f.classNames("k-table-td","k-grid-edit-cell",{["k-selected"]:r.isSelected},r.className),e=f.useId(),s=b.useTableKeyboardNavigation(r.id);let n=null,a=null;const h=o.useCallback(g=>{if(r.onChange){const E=g.target.type==="checkbox"?g.target.checked:g.target.value;r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g,value:E})}},[r.onChange,r.dataItem,r.dataIndex,r.field]),c=o.useCallback(g=>{r.onContextMenu&&r.onContextMenu.call(void 0,g,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),d=o.useCallback(g=>{r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g.syntheticEvent,value:g.value})},[r.onChange,r.dataItem,r.dataIndex,r.field]);switch(r.editor){case"numeric":{n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=o.createElement(L.NumericTextBox,{width:"100%",value:t===void 0?null:t,onChange:d}),i=o.createElement("td",{...n},a);break}case"date":n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=o.createElement(xe.DatePicker,{width:"100%",value:t,onChange:d}),i=o.createElement("td",{...n},a);break;case"boolean":n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=[o.createElement("span",{key:1,className:"k-checkbox-wrap"},o.createElement("input",{checked:t||!1,id:e,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",onChange:h})),o.createElement("label",{className:"k-checkbox-label",htmlFor:e,key:2})],i=o.createElement("td",{...n},a);break;default:n={onContextMenu:c,colSpan:r.colSpan,style:r.style,className:l,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...s},a=o.createElement("input",{style:{width:"100%"},className:"k-input",value:t||"",onChange:h}),i=o.createElement("td",{...n},a)}const u=r.editor||"text",C=r.cells;if(C&&C.edit&&C.edit[u]){const g=C.edit[u];return o.createElement(g,{...r,tdProps:n},a)}return r.render?r.render.call(void 0,i,r):i};class gi extends o.Component{constructor(){super(...arguments),this.headerWrap=null,this.table=null,this.syncScroll=!1,this.scrollbarWidth=f.getScrollbarWidth(),this.onScroll=t=>{if(this.syncScroll){this.syncScroll=!1;return}if(!this.headerWrap)return;const i=this.headerWrap.scrollLeft,l=this.props.scrollableDataElement();l&&l.scrollLeft!==i&&(l.scrollLeft=i)}}get element(){return this.props.elemRef.current}componentDidMount(){const t=b.isRtl(this.element);this.props.columnResize&&this.props.columnResize.setIsRtl(t),this.forceUpdate()}setScrollLeft(t){this.headerWrap&&this.headerWrap.scrollLeft!==t&&(this.syncScroll=!0,this.headerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?o.createElement("div",{ref:this.props.elemRef,className:f.classNames("k-grid-header",{"k-grid-draggable-header":this.props.draggable}),role:"presentation"},o.createElement("div",{ref:t=>{this.headerWrap=t},className:"k-grid-header-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},onScroll:this.onScroll,role:"presentation"},o.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-header-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},o.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupHeader=t}},this.props.cols),o.createElement("thead",{className:"k-table-thead",role:"rowgroup",...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)))):o.createElement("thead",{role:"presentation",className:f.classNames("k-table-thead",{"k-grid-draggable-header":this.props.draggable}),...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)}}const xt=(...r)=>Object.assign({allowUnsort:!0,mode:"single"},...r);class fi extends o.PureComponent{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.pressHandler&&this.props.pressHandler(t.event,i)},this.onDrag=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.dragHandler&&this.props.dragHandler(t.event,i)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.releaseHandler&&this.props.releaseHandler(t.event)}}render(){return o.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,hint:this.props.dragClue,autoScroll:{boundaryElementRef:this.props.headerRef,direction:{horizontal:!0,vertical:!1}},scrollContainer:this.props.containerRef||void 0,ref:t=>{this.draggable=t}},o.createElement("tr",{className:"k-table-row",style:{touchAction:"none"},role:"row","aria-rowindex":this.props.ariaRowIndex},this.props.children))}}class He extends o.Component{constructor(){super(...arguments),this.state={show:!1},this._anchor=null,this._content=null,this.blurTimeout=void 0,this.willBlur=!1,this.blur=()=>{if(this.willBlur){this.willBlur=!1;return}clearTimeout(this.blurTimeout),this.blurTimeout=window.setTimeout(()=>{this.closeMenu()})},this.focus=()=>{clearTimeout(this.blurTimeout)},this.anchorClick=t=>{t.preventDefault(),this.state.show&&this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!this.state.show},()=>this.state.show&&this._content&&this._content.focus())},this.closeMenu=()=>{this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!1})},this.onAnchorMouseDown=t=>{this.willBlur=this.state.show&&t.currentTarget===this._anchor},this.onAnchorKeyDown=t=>{var i;if(t.keyCode===f.Keys.tab){const l=t.target,e=l&&((i=l.closest(".k-grid"))==null?void 0:i.getElementsByClassName("k-grid-content")[0]);e&&e.scrollWidth>e.clientWidth&&l.scrollIntoView({inline:"center"})}}}render(){const{columnMenu:t,...i}=this.props,{column:l}=this.props,e=I.provideLocalizationService(this),s=l.title||l.field,n=s?`${s} `:"";return o.createElement(o.Fragment,null,o.createElement("a",{className:"k-grid-header-menu k-grid-column-menu",ref:a=>this._anchor=a,onClick:this.anchorClick,onMouseDown:this.onAnchorMouseDown,onKeyDown:this.onAnchorKeyDown,href:"#","aria-label":`${n}${e.toLanguageString(ke,w[ke])}`},o.createElement(f.IconWrap,{name:"filter",icon:N.filterIcon})),o.createElement(ii.Popup,{anchor:this._anchor,show:this.state.show,popupClass:"k-column-menu k-column-menu-popup k-grid-columnmenu-popup"},o.createElement("div",{ref:a=>this._content=a,tabIndex:0,onBlur:this.blur,onFocus:this.focus,style:{outline:"none"}},t&&o.createElement(t,{...i,onCloseMenu:this.closeMenu}))))}}class Et extends o.Component{render(){const{columnMenuWrapperProps:t}=this.props,i=this.props.onClick?{onClick:this.props.onClick}:{},l=o.createElement("span",{className:"k-cell-inner"},o.createElement("span",{className:f.classNames("k-link",{"!k-cursor-default":!this.props.columnMenuWrapperProps.sortable}),...i},o.createElement("span",{className:"k-column-title"},this.props.title||this.props.field||" "),this.props.children),t.columnMenu&&o.createElement(He,{...t}));return this.props.render?this.props.render.call(void 0,l,this.props):l}}const mi={true:{asc:"desc",desc:"","":"asc"},false:{asc:"desc",desc:"asc","":"asc"}},Ci={none:"none",asc:"ascending",desc:"descending"};class St extends o.Component{constructor(t){super(t),this.serviceIndex=0,this.index=-1,this.cellKeyDown=(i,l)=>{i.isDefaultPrevented()||i.keyCode===f.Keys.enter&&this.cellClick(i,l)},this.cells=i=>i.map(l=>{const e=this.props.columns[l],s=this.props.sortable&&e.sortable,n=this.props.sort?this.props.sort.findIndex(k=>k.field===e.field):-1,a=n>=0&&this.props.sort[n].dir||"none",h=e.columnMenu===null?null:e.columnMenu||this.props.columnMenu,c=f.classNames({"k-first":e.kFirst,"k-filterable":!!h,"k-table-th":!0,"k-header":!0,"k-grid-header-sticky":e.locked,"k-sorted":this.props.sort&&this.props.sort.some(k=>k.field===e.field)},e.headerClassName);e.locked===!1&&(e.left=0);const d=e.left!==void 0?this.props.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},u=I.provideLocalizationService(this).toLanguageString(Le,w[Le]),C=e.isAccessible?{ariaSort:Ci[a],role:"columnheader",ariaColumnIndex:e.ariaColumnIndex,ariaSelected:!1,ariaDescription:s?u:""}:{role:"presentation"},g=e.declarationIndex>=0?++this.index:--this.serviceIndex,E=e.headerCell?e.headerCell:Et,y=o.createElement(E,{key:1,field:e.field,onClick:s&&(k=>this.cellClick(k,e))||void 0,selectionChange:this.props.selectionChange,title:e.title,selectionValue:e.headerSelectionValue,render:this.props.cellRender,children:this.sortIcon(n),columnMenuWrapperProps:{column:{field:e.field,title:e.title,locked:e.locked,filter:e.filter,id:e.id},sortable:s&&this.props.sortable,sort:this.props.sort,onSortChange:this.props.sortChange,filter:this.props.filter,filterable:this.props.filterable&&e.filterable,filterOperators:this.props.filterOperators,onFilterChange:this.props.filterChange,group:this.props.group,groupable:this.props.groupable,onGroupChange:this.props.groupChange,columnMenu:h}}),x={...C,key:g,colSpan:e.colSpan,rowSpan:e.rowSpan,className:c,style:d,columnId:e.id,navigatable:e.navigatable,onKeyDown:s&&(k=>this.cellKeyDown(k,e))||void 0,role:"columnheader"},S=[y,this.props.columnResize&&this.props.columnResize.resizable&&e.resizable&&o.createElement(b.ColumnResizer,{key:2,resize:(k,B,_)=>this.props.columnResize&&this.props.columnResize.dragHandler(k,e,B,_),autofit:k=>this.props.columnResize&&this.props.columnResize.dblClickHandler(k,[e.id])})],F=pe(this.props.cells,e.cells);if(F&&F.headerCell){const k=F.headerCell;return o.createElement(k,{key:g,thProps:x,index:l},S)}return o.createElement(b.HeaderThElement,{...x,key:g},S)}),this.cellClick=this.cellClick.bind(this)}cellClick(t,i){if(t.preventDefault(),!this.props.sortChange)return;const{allowUnsort:l,mode:e}=xt(this.props.sortable||!1,i.sortable||!1),s=(this.props.sort||[]).filter(h=>h.field===i.field)[0],n=mi[l][s&&s.dir||""],a=e==="single"?[]:(this.props.sort||[]).filter(h=>h.field!==i.field);n!==""&&i.field&&a.push({field:i.field,dir:n}),this.props.sortChange(a,t)}sortIcon(t){return this.props.sort?t>=0&&[o.createElement("span",{key:1,className:"k-sort-icon"},o.createElement(f.IconWrap,{name:"sort-"+this.props.sort[t].dir+"-small",icon:this.props.sort[t].dir==="asc"?N.sortAscSmallIcon:N.sortDescSmallIcon})),this.props.sort.length>1&&o.createElement("span",{key:2,className:"k-sort-icon"},o.createElement("span",{className:"k-sort-order"},t+1))]:null}render(){return this.serviceIndex=0,this.index=-1,this.props.columnsMap.map((t,i)=>this.props.pressHandler&&o.createElement(fi,{key:i,pressHandler:this.props.pressHandler,dragHandler:this.props.dragHandler,releaseHandler:this.props.releaseHandler,ariaRowIndex:i+1,dragClue:this.props.dragClue,headerRef:this.props.headerRef,containerRef:this.props.containerRef},this.cells(t))||o.createElement("tr",{key:i,className:"k-table-row",role:"row","aria-rowindex":i+1},this.cells(t)))}}I.registerForLocalization(St);const bi=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],_e={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},R=r=>r==="isnull"||r==="isnotnull"||r==="isempty"||r==="isnotempty",ie=(r,t)=>r.map(i=>({text:t.toLanguageString(i.text,w[i.text]),operator:i.operator})),vi="eq",Re=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],xi={text:!1,numeric:!1,date:!1,boolean:!0},Ae=(r,t,i)=>{const l=It(i.operators);let e=i.operator;switch(i.filterType){case"numeric":(!e||R(e))&&(e=l),r===null&&e===l&&(e="");break;case"date":(!e||R(e))&&(e=l),r===null&&e===l&&(e="");break;case"text":(!e||R(e))&&(e=l),!r&&e===l&&(e="");break;default:return}i.onChange({value:r,operator:e,syntheticEvent:t})},It=(r,t)=>t?r[t][0].operator:r[0].operator,Ke=r=>r||"text",Be=(r,t)=>{const i=r.target.value;t({value:i.operator,operator:i.operator===""?"":vi,syntheticEvent:r.syntheticEvent})},We=(r,t,i)=>{let l=t;const e=r.target.value;r.target.state.opened&&(R(e.operator)&&(l=null),t===null&&!R(e.operator)&&(l=void 0),i({value:l,operator:e.operator,syntheticEvent:r.syntheticEvent}))};class Te extends o.Component{constructor(t){super(t),this._inputRef=o.createRef(),this.renderOperatorEditor=i=>{if(this.props.filterType==="boolean")return;const l=this.props.operators.find(e=>e.operator===this.props.operator)||null;return o.createElement(Z.DropDownList,{size:this.props.size,value:l,onChange:this.operatorChange,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",svgIcon:N.filterIcon,data:this.props.operators,textField:"text",title:i.toLanguageString(Me,w[Me]),popupSettings:{width:""}})},this.inputChange=this.inputChange.bind(this),this.clear=this.clear.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){const t=I.provideLocalizationService(this),i=o.createElement("div",{className:"k-filtercell"},o.createElement("div",{className:"k-filtercell-wrapper"},this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues),o.createElement("div",{className:"k-filtercell-operator"},this.renderOperatorEditor(t)," ",o.createElement(K.Button,{size:this.props.size,icon:"filter-clear",svgIcon:N.filterClearIcon,className:f.classNames({"k-clear-button-visible":!!(!(this.props.value===null||this.props.value==="")||this.props.operator)}),title:t.toLanguageString(P,w[P]),type:"button",onClick:this.clear,disabled:!(!(this.props.value===null||this.props.value==="")||this.props.operator)}))));return this.props.render?this.props.render.call(void 0,i,this.props):i}inputChange(t,i){Ae(t,i,this.props)}operatorChange(t){We(t,this.props.value,this.props.onChange)}boolDropdownChange(t){Be(t,this.props.onChange)}clear(t){t.preventDefault(),this.props.onChange({value:"",operator:"",syntheticEvent:t}),this._inputRef.current&&(this._inputRef.current.element.value="",setTimeout(()=>{this._inputRef.current.element.focus()},0))}filterComponent(t,i,l){switch(t){case"numeric":return o.createElement(L.NumericTextBox,{ref:this._inputRef,size:this.props.size,value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"date":return o.createElement(xe.DatePicker,{ref:this._inputRef,size:this.props.size,value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"boolean":{const e=s=>s==null;return o.createElement(Z.DropDownList,{ref:this._inputRef,size:this.props.size,onChange:this.boolDropdownChange,value:l.find(s=>s.operator===(e(i)?"":i)),data:l,textField:"text",title:this.props.title,ariaLabel:this.props.ariaLabel})}default:return o.createElement(L.TextBox,{ref:this._inputRef,size:this.props.size,value:i||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)},title:this.props.title,"aria-label":this.props.ariaLabel})}}}I.registerForLocalization(Te);const Ei="k-table-row k-filter-row";class wt extends o.Component{headerCellClassName(t,i){let l=`${i?"k-grid-header-sticky":""}`;return this.props.sort&&this.props.sort.filter(e=>e.field===t).length>0&&(l+=" k-sorted"),l}setFilter(t,i,l,e){if(!this.props.filterChange)return;const s=[];(t!==""&&t!==null||i!=="")&&s.push({field:l,operator:i,value:t}),this.props.filter&&this.props.filter.filters&&(this.props.filter.filters||[]).forEach(h=>{const c=h;c&&c.field!==l&&s.push(c)});const n=this.props.filter&&this.props.filter.logic?this.props.filter.logic:"and";this.props.filterChange(s.length>0?{logic:n,filters:s}:null,e)}render(){const t=I.provideLocalizationService(this),i=this.props.filter&&this.props.filter.filters||[],l=a=>{if(a===void 0)return;const h=i.filter(c=>c.field===a);return h.length?h[0]:void 0};let e=0,s=-1;const n=this.props.columns.filter(a=>a.children.length===0).map(a=>{const h=Ke(a.filter),c=l(a.field),d=a.filterable?t.toLanguageString(De,w[De]):void 0;let u=c&&c.value;u===void 0&&(u=h==="text"?"":null);const C=a.filterable&&{render:this.props.cellRender,field:a.field,title:a.filterTitle,value:u,operator:c&&c.operator,operators:ie(this.props.filterOperators[h]||[],t),booleanValues:ie(Re,t),filterType:h,ariaLabel:d,onChange:k=>{this.setFilter(k.value,k.operator,a.field,k.syntheticEvent)}},g=a.declarationIndex>=0?++s:--e,E={ariaLabel:d,ariaColumnIndex:a.ariaColumnIndex},y=a.left!==void 0?this.props.isRtl?{left:a.right,right:a.left}:{left:a.left,right:a.right}:{},x={columnId:b.tableKeyboardNavigationTools.getFilterColumnId(a.id),navigatable:a.navigatable,style:y,className:f.classNames("k-table-th",this.headerCellClassName(a.field,a.locked)||void 0),role:"columnheader",...E},S=C&&(a.filterCell?o.createElement(a.filterCell,{...C}):o.createElement(Te,{size:this.props.size,...C})),F=pe(this.props.cells,a.cells);if(F&&F.filterCell){const k=F.filterCell;return o.createElement(k,{key:g,...C,thProps:x,index:s},S)}return o.createElement(b.HeaderThElement,{key:g,...x},S)});return o.createElement("tr",{className:Ei,"aria-rowindex":this.props.ariaRowIndex,role:"row"},n)}}I.registerForLocalization(wt);class kt extends o.Component{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.onPress&&this.props.onPress(t.event,i)},this.onDrag=t=>{const i=this.draggable&&this.draggable.element;i&&this.props.onDrag&&this.props.onDrag(t.event,i)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.onRelease&&this.props.onRelease(t.event)},this.sortChange=t=>{if(t.preventDefault(),this.props.onSortChange){const i=this.props.dir==="asc"?"desc":"asc";this.props.onSortChange(t,i)}},this.groupRemove=t=>{t.preventDefault(),t.stopPropagation(),this.props.onRemove&&this.props.onRemove(t)},this.onContextMenu=t=>{const i={title:this.props.title,dir:this.props.dir,index:this.props.index};this.props.onContextMenu&&this.props.onContextMenu.call(void 0,t,{dataItem:{...i}})}}render(){const{dir:t}=this.props;return o.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:i=>{this.draggable=i}},o.createElement("div",{className:"k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",onClick:this.sortChange,onContextMenu:this.onContextMenu,role:"button",style:{touchAction:"none"}},o.createElement("span",null,o.createElement(f.IconWrap,{name:"sort-"+t+"-small",icon:t==="asc"?N.sortAscSmallIcon:N.sortDescSmallIcon,size:"small"})),o.createElement("span",{className:"k-chip-content"},this.props.title),o.createElement("span",{className:"k-chip-actions"},o.createElement("span",{className:"k-chip-action k-chip-remove-action",onClick:this.groupRemove},o.createElement(f.IconWrap,{name:"x-circle",icon:N.xCircleIcon,size:"small"})))))}}I.registerForLocalization(kt);class yt extends o.Component{constructor(){super(...arguments),this.onGroupRemove=(t,i)=>{const l=this.props.group.slice();l.splice(i,1),this.props.groupChange(l,t)},this.onGroupSortChange=(t,i,l,e)=>{const s=Object.assign({},l,{dir:e}),n=this.props.group.slice();n.splice(i,1,s),this.props.groupChange(n,t)}}render(){const i=(this.props.group||[]).map((l,e)=>o.createElement(kt,{key:e,index:e,dir:l.dir||"asc",title:this.props.resolveTitle(l.field),onRemove:s=>{this.onGroupRemove(s,e)},onSortChange:(s,n)=>{this.onGroupSortChange(s,e,l,n)},onPress:this.props.pressHandler,onDrag:this.props.dragHandler,onRelease:this.props.releaseHandler,onContextMenu:this.props.onContextMenu}));return o.createElement("div",{ref:this.props.refCallback,className:"k-grouping-header",role:"toolbar","aria-label":I.provideLocalizationService(this).toLanguageString(Oe,w[Oe]),"aria-controls":this.props.ariaControls||""},o.createElement("div",{className:"k-chip-list k-chip-list-md",role:"none"},i),o.createElement("div",{className:"k-grouping-drop-container"},!i.length&&I.provideLocalizationService(this).toLanguageString(we,w[we])," "))}}I.registerForLocalization(yt);class Si extends o.Component{constructor(){super(...arguments),this.footerWrap=null,this.table=null,this.scrollbarWidth=f.getScrollbarWidth()}componentDidMount(){this.setState({})}setScrollLeft(t){this.footerWrap&&(this.footerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?o.createElement("div",{className:"k-grid-footer",role:"presentation"},o.createElement("div",{ref:t=>{this.footerWrap=t},className:"k-grid-footer-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},role:"presentation"},o.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-footer-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},o.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupFooter=t},role:"presentation"},this.props.cols),o.createElement("tfoot",{className:"k-table-tfoot",role:"presentation"},this.props.row)))):o.createElement("tfoot",{className:"k-table-tfoot"},this.props.row)}}class Ii{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=o.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=o.createRef(),this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(o.version),this.topItems=(i,l)=>{if(!this.container||l)return{topItemsCount:0,topItemsHeight:0};const e=this.container.clientHeight,s=Math.ceil(e/i[0].line),n=Math.ceil((i.length-s)/2);let a=0;for(let h=0;h<n;h++)a+=i[h].line+i[h].acc;return{topItemsCount:n,topItemsHeight:a,itemsNeededOnScreen:s+s/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,t&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}get rowHeights(){const t=[],i=this.tableBodyRef.current&&this.tableBodyRef.current.children||[];let l=0;for(let e=0;e<i.length;e++){if(i[e].className.indexOf("k-grouping-row")>-1){l+=i[e].scrollHeight;continue}i[e].className.indexOf("k-detail-row")>-1?t[t.length-1].line+=i[e].scrollHeight:(t.push({line:i[e].scrollHeight,acc:l}),l=0)}return t}changePage(t,i){this.attendedSkip=t-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,t-this.topCacheCount),take:this.pageSize},i)}translate(t,i){this.tableTranslate=t,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||i?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(t){if(!this.container)return;const i=this.rowHeights,l=this.container.scrollTop;let e=this.tableTranslate,s=0;const{topItemsCount:n,topItemsHeight:a,itemsNeededOnScreen:h}=this.topItems(i,!!this.topCacheCount),c=l-e;if(!(c>a||i.length<=h)){for(;s<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-s>0&&!(e+(i[i.length-1-s].line+i[i.length-1-s].acc)+c<=l);)e-=i[i.length-1-s].line+i[i.length-1-s].acc,s++;if(s===0&&this.topCacheCount===0&&this.attendedSkip>0&&(e=Math.max(e-i[0].line,0),s=1),this.propsSkip-s<=0&&e>l){this.translate(0),this.changePage(0,t),this.container.scrollTop=0;return}if(e>l&&(e=l),e!==this.tableTranslate){this.translate(Math.max(0,e-a));const d=Math.max(0,this.propsSkip-s-n);this.changePage(d,t)}}}localScrollDown(t){if(!this.container)return;const i=this.rowHeights,l=this.container.scrollTop;let e=this.tableTranslate,s=0;const{topItemsCount:n,topItemsHeight:a,itemsNeededOnScreen:h}=this.topItems(i,!!this.topCacheCount);for(;s<i.length-this.topCacheCount&&!(e+i[s].line+i[s].acc>l);)e+=i[s].line+i[s].acc,s++;n>this.propsSkip+s||i.length<=h||(s>=i.length-this.topCacheCount&&this.propsSkip+s>=this.total?(this.translate(e-a),this.changePage(this.total-1-n,t)):e!==this.tableTranslate&&this.propsSkip+s-n!==this.propsSkip&&(this.translate(e-a),this.changePage(this.propsSkip+s-n,t)))}scrollNonStrict(t){const i=this.total*this.prevScrollPos/this.containerHeight;let l=Math.floor(i);l>=this.total&&(l=this.total-1);const e=Math.min(i-l,1);let s=0;const n=l-this.propsSkip,a=this.rowHeights;n>=0&&n<=1?s=-((a[0].line+a[0].acc)*e):n===-1&&(s=-((a[a.length-1].line+a[a.length-1].acc)*e));const{topItemsCount:h,topItemsHeight:c}=this.topItems(a,!!this.topCacheCount);this.translate(Math.max(0,s-c-this.horizontalScrollbarHeight()+this.containerHeight*i/this.total)),this.changePage(l-h,t)}scrollHandler(t){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const i=this.container.scrollTop,l=this.prevScrollPos;if(this.prevScrollPos=i,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,t),this.prevScrollPos=i,this.askedSkip=void 0;return}i-l<0&&i>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(t):i-l>0&&i<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(t):this.scrollNonStrict(t),this.prevScrollPos=i}}class Nt{constructor(t=0,i,l,e){this.total=t,this.offsets=[],this.heights=[];let s=0;for(let n=0;n<t;n++){this.offsets.push(s);const a=e&&e[n].expanded&&e[n].rowType==="data"?l:i;s+=a,this.heights.push(a)}}height(t){return this.heights[t]}index(t){if(t<0)return;const i=this.offsets.reduce((l,e,s)=>{if(l!==void 0)return l;if(e===t)return s;if(e>t)return s-1},void 0);return i===void 0?this.total-1:i}offset(t){return this.offsets[t]}totalHeight(){const t=this.offsets[this.offsets.length-1],i=this.heights[this.heights.length-1];return t+i}}class Ft{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=o.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=o.createRef(),this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(o.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}translate(t,i){this.scrollableVirtual&&this.table&&(Se||this.reactVersion<=17||i?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,i){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},i)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef.current)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const i=this.container.scrollTop,l=this.lastScrollTop>=i,e=!l;this.lastScrollTop=i;let s=this.rowHeightService.index(i),n=this.rowHeightService.offset(s);const{offsetHeight:a}=this.containerRef.current,h=this.rowHeightService.index(i+a);if(e&&h>=this.lastLoaded&&this.lastLoaded<this.total){const c=s+this.pageSize-this.total;c>0&&(s=s-c,n=this.rowHeightService.offset(s)),this.firstLoaded=s,this.translate(n);let d=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(d,this.total),this.changePage(this.firstLoaded,t)}else if(l&&s<this.firstLoaded){const c=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(s-c,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}const wi=1,ki=20;class yi{constructor(t){this.columns=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=i=>{this.isRtl=i},this.dragHandler=(i,l,e,s)=>{const n=i.originalEvent;s||(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation());const a=e.closest("th");if(!a||!a)return;const h=a.clientWidth;let c=h;if(this.isRtl?c+=e.getBoundingClientRect().right-e.offsetWidth/2-i.clientX:c+=i.clientX-e.getBoundingClientRect().left-e.offsetWidth/2,!s&&Math.abs(c-h)<1)return;this.fixateInitialWidths(a.parentElement.clientWidth),this.setWidths(l,Math.floor(c)/h);const d=this.columns.filter(u=>!u.children.length).findIndex(u=>u.id===l.id);this.onResize(d,h,c,n,s,l.id)},this.dblClickHandler=(i,l)=>{const e=this.columns.filter(C=>l.indexOf(C.id)>-1);if(!this.colGroupMain||!e.length)return;const s={},n=e;for(;n.length>0;){const C=n.pop();if(!C)break;C.children.length?n.push(...C.children):s[C.id]=C}const a=this.columns.filter(C=>!C.children.length),h=[];a.forEach((C,g)=>{s[C.id]&&h.push(g)});const c=[this.colGroupMain.parentElement],d=[this.colGroupMain];this.colGroupHeader&&(c.push(this.colGroupHeader.parentElement),d.push(this.colGroupHeader)),this.colGroupFooter&&(c.push(this.colGroupFooter.parentElement),d.push(this.colGroupFooter)),c.forEach(C=>C.classList.add("k-autofitting"));let u=[];d.forEach(C=>{h.forEach(g=>{C.children[g]&&(C.children[g].width="",u[g]=Math.max(u[g]||0,C.children[g].offsetWidth+wi))})}),d.forEach(C=>{h.forEach(g=>{C.children[g]&&(C.children[g].width=u[g]+"px",a[g].width=u[g])})}),c.forEach(C=>C.classList.remove("k-autofitting")),this.onResize(h[0],0,0,i,!0,l[0])},this.updateColElements=i=>{const l=this.columns.filter(s=>!s.children.length);let e=1e-10;for(let s=0;s<i.length;s++){const n=i[s],a=l.findIndex(u=>u.id===n.id),h=parseFloat((n.width||0).toString()),c=Math.floor(h);e+=h-c;const d=c+Math.floor(e);if(e-=Math.floor(e),this.colGroupMain&&this.colGroupMain.children[a]){const u=parseInt(this.colGroupMain.children[a].width,10);this.colGroupMain.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupMain.parentElement,n,u-d)}if(this.colGroupHeader&&this.colGroupHeader.children[a]){const u=parseInt(this.colGroupHeader.children[a].width,10);this.colGroupHeader.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupHeader.parentElement,n,u-d)}if(this.colGroupFooter&&this.colGroupFooter.children[a]){const u=parseInt(this.colGroupFooter.children[a].width,10);this.colGroupFooter.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupFooter.parentElement,n,u-d)}}},this.onResize=t}fixateInitialWidths(t){const i=this.columns.filter(n=>!n.children.length);let l=0,e=this.colGroupMain?this.colGroupMain.children:[];for(let n=0;n<e.length;n++)e[n].width?t-=parseFloat(e[n].width):l++;if(l===0)return;const s=Math.floor(t/l);for(let n=0;n<e.length;n++){const a=e[n];a.width||(a.width=s,i[n].width=s.toString(),this.colGroupHeader&&(this.colGroupHeader.children[n].width=s),this.colGroupFooter&&(this.colGroupFooter.children[n].width=s))}}setWidths(t,i){const l=this.columns.findIndex(n=>n.id===t.id),e=[];let s=t.children.length;for(let n=l+1;s>0&&n<this.columns.length;n++,s--){const a=this.columns[n];a.children.length?s+=a.children.length:e.push(a)}return e.length===0&&e.push(t),e.forEach(n=>{let a=n.width?parseFloat(n.width.toString())*i:0;const h=n.minResizableWidth===void 0?10:n.minResizableWidth;a<h&&(a=h),n.width=a}),this.updateColElements(e),e}updateNextLockedCol(t,i,l){const e=i.index,s=this.colGroupMain.parentElement.closest(".k-grid"),n=s==null?void 0:s.clientWidth,a=this.columns.filter(h=>h.locked).map(h=>parseInt(h.width+"",10)).reduce((h,c)=>h+c,0);!i.locked||n<=a+ki||this.columns.forEach(h=>{if(h!=null&&h.locked&&l){const c=t==null?void 0:t.querySelectorAll('[aria-colindex="'+h.ariaColumnIndex+'"]');c==null||c.forEach(d=>{const u=d.style;this.isRtl?(h.index>e&&u&&u.right&&(u.right=parseInt(u.right,10)-l+"px"),h.index<e&&u&&u.left&&(u.left=parseInt(u.left,10)-l+"px")):(h.index>e&&u&&u.left&&(u.left=parseInt(u.left,10)-l+"px"),h.index<e&&u&&u.right&&(u.right=parseInt(u.right,10)-l+"px"))})}})}}class Gt{constructor(t,i,l){this.refDragElementClue=o.createRef(),this.refDropElementClue=o.createRef(),this.columns=[],this.reorderable=!1,this.groupable=!1,this.startColumn=-1,this.startGroup=-1,this.currentColumn=-1,this.currentGroup=-1,this.groupPanelDivElement=null,this.refGroupPanelDiv=e=>{this.groupPanelDivElement=e&&e.children?e.children[0]:e},this.pressHandler=(e,s)=>{const n=this.getColumnIndex(e,s);if(this.startGroup=this.getGroupIndex(e),n>=0){const a=this.columns[n];(a.reorderable&&this.reorderable||a.groupable&&this.groupable)&&(this.startColumn=n)}},this.dragHandler=(e,s)=>{if(e.isTouch||e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),this.startColumn===-1&&this.startGroup===-1)return;this.currentColumn=this.getColumnIndex(e,s);const n=this.groupPanelDivElement&&this.groupPanelDivElement.children;this.currentGroup=this.isTargetGroupingContainer(e)?n&&n.length?n.length:0:this.getGroupIndex(e);const a=!this.isValid();a&&(this.currentColumn=-1,this.currentGroup=-1);const h=this.currentColumn>=0?s.children[this.columns[this.currentColumn].index]:this.isTargetGroupingContainer(e)?e.originalEvent.target:this.groupPanelDivElement&&this.groupPanelDivElement.children[this.currentGroup];this.updateDragElementClue(e,s,h,a),this.updateDropElementClue(e,s,h,a)},this.releaseHandler=e=>{const s=this.startColumn,n=this.currentColumn,a=this.startGroup,h=this.currentGroup;e.originalEvent.preventDefault(),this.dropElementClue&&this.dropElementClue.setState({visible:!1}),this.dragElementClue&&this.dragElementClue.setState({visible:!1});const c=this.isValid();this.startColumn=this.startGroup=this.currentColumn=this.currentGroup=-1,c&&(s>=0&&n>=0?this.columnReorder(s,n,e.originalEvent):a>=0&&h>=0?this.groupReorder(a,h,e.originalEvent):s>=0&&h>=0&&this.columnToGroup(s,h,e.originalEvent))},this.columnReorder=t,this.groupReorder=i,this.columnToGroup=l}get dragClueRef(){return this.refDragElementClue}get dropClueRef(){return this.refDropElementClue}get dragElementClue(){return this.refDragElementClue.current}get dropElementClue(){return this.refDropElementClue.current}getColumnIndex(t,i){if(!i||i.parentElement===this.groupPanelDivElement)return-1;const l=b.getIndex(t,i);if(l===-1)return-1;for(let e=0;e<i.parentNode.children.length;e++)if(i.parentNode.children[e]===i)return this.columns.findIndex(s=>s.index===l&&s.depth===e);return-1}isTargetGroupingContainer(t){const i=t.originalEvent.target;return i.className.indexOf?i.className.indexOf("k-grouping-drop-container")!==-1:!1}getGroupIndex(t){return b.getIndex(t,this.groupPanelDivElement)}isValid(){return this.startGroup>=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:this.startColumn===-1?!1:this.currentGroup>=0?this.columns[this.startColumn].groupable===!0&&this.groupable===!0:this.reorderable===!0&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&this.columns[this.startColumn].reorderable===!0&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex}updateDragElementClue(t,i,l,e){if(!this.dragElementClue)return;const s=this.startColumn>=0?i.children[this.columns[this.startColumn].index].innerText:i.innerText;this.dragElementClue.setState({visible:!0,top:t.pageY+10,left:t.pageX,innerText:s,status:e||!l?"k-i-cancel":"k-i-plus"})}updateDropElementClue(t,i,l,e){if(!this.dropElementClue)return;if(e||!l){this.dropElementClue.setState({visible:!1});return}const s=l.getBoundingClientRect(),a=(l.closest(".k-grouping-header")||l).getBoundingClientRect();let h=s.left+t.pageX-t.clientX-6;!this.isTargetGroupingContainer(t)&&(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&this.startGroup!==-1)&&(h+=s.width);const c=a.top+t.pageY-t.clientY;this.dropElementClue.setState({visible:!0,top:c,left:h,height:this.currentColumn>=0?i.clientHeight:a.height})}}const Mt=r=>{let t=null;const i=I.useInternationalization(),l=b.useTableKeyboardNavigation(r.id),e=o.useCallback(c=>{r.onContextMenu&&r.onContextMenu.call(void 0,c,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]);let s=null,n=null;if(r.rowType==="groupFooter")s={onContextMenu:e,className:r.className},t=o.createElement("td",{...s});else if(r.rowType!=="groupHeader"){if(r.field!==void 0){const d=H(r.field,r.dataItem);d!=null&&(n=r.format?i.format(r.format,d):d.toString())}const c=f.classNames("k-table-td",r.className,{"k-selected":r.isSelected});s={onContextMenu:e,colSpan:r.colSpan,style:r.style,className:c,role:"gridcell","aria-colindex":r.ariaColumnIndex,"aria-selected":r.isSelected,[U]:r.columnIndex,...l},t=o.createElement("td",{...s},n)}const a=r.rowType||"data",h=r.cells;if(h&&h[a]){const c=h[a];return o.createElement(c,{...r,tdProps:s},n)}return r.render?r.render.call(void 0,t,r):t},Pe=r=>{let t=null;const{columnIndex:i,level:l,columnsCount:e,rowType:s,dataItem:n,field:a,onChange:h,expanded:c,render:d,dataIndex:u,ariaColumnIndex:C,isRtl:g}=r,E=a||"",y=b.useTableKeyboardNavigation(r.id),x=I.useLocalization();let S=null,F=null,k=null;const B=o.useCallback(D=>{D.isDefaultPrevented()||D.keyCode===f.Keys.enter&&h&&(D.preventDefault(),h({dataItem:n,dataIndex:u,syntheticEvent:D,field:void 0,value:!c}))},[c,h,n,u]),_=o.useCallback(D=>{r.onContextMenu&&r.onContextMenu.call(void 0,D,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),me=(D,Xe)=>{const Ce=c?ut:pt,Ye=x.toLanguageString(Ce,w[Ce]);return S={className:"k-table-td",style:{...r.style,...Xe},colSpan:D,key:"g-colspan",role:"gridcell",["aria-selected"]:!1,["aria-expanded"]:c,["aria-colindex"]:C,onKeyDown:B,onContextMenu:_,...y},k=o.createElement("p",{className:"k-reset"},o.createElement("a",{onClick:oe=>{oe.preventDefault(),h&&h({dataItem:n,dataIndex:u,syntheticEvent:oe,field:void 0,value:!c})},href:"#",tabIndex:-1,"aria-label":Ye},o.createElement(f.IconWrap,{name:c?"caret-alt-down":g?"caret-alt-left":"caret-alt-right",icon:c?N.caretAltDownIcon:g?N.caretAltLeftIcon:N.caretAltRightIcon})),n[E]instanceof Date&&n[E].toString?n[E].toString():n[E]),o.createElement("td",{...S,key:S.key},k)};i===void 0||l===void 0||i<l||e===void 0||s!=="groupHeader"||n[E]===void 0?(S={style:r.style,key:"g"+i,className:f.classNames("k-table-td","k-group-cell",{"k-grid-content-sticky":r.locked}),role:"gridcell",onContextMenu:_},t=o.createElement("td",{...S,key:S.key})):i<=l&&!r.locked?t=me(e-i,{}):i<=l&&r.locked&&(F={className:"k-table-td",role:"gridcell",colSpan:e-i,style:{borderLeftWidth:0,borderRightWidth:0},onContextMenu:_},t=o.createElement(o.Fragment,null,me(0,{position:"sticky",zIndex:2}),o.createElement("td",{...F})));const le=r.rowType||"data",X=r.cells;if(X&&X.group&&X.group[le]){const D=X.group[le];return o.createElement(D,{...r,tdProps:S,td2Props:F},k)}return d?d.call(void 0,t,r):t};class zt extends o.Component{render(){const t=f.classNames("k-table-row",{"k-table-group-row k-grouping-row":this.props.rowType==="groupHeader","k-group-footer":this.props.rowType==="groupFooter","k-master-row":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter","k-table-alt-row k-alt":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter"&&this.props.isAltRow,"k-selected":this.props.isSelected,"k-grid-edit-row":this.props.isInEdit}),i=o.createElement("tr",{id:this.props.id,onClick:this.props.onClick,onDoubleClick:this.props.onDoubleClick,className:t,style:{height:this.props.rowHeight?this.props.rowHeight+"px":"",visibility:this.props.isHidden?"hidden":""},role:"row","aria-rowindex":this.props.ariaRowIndex,"absolute-row-index":this.props.absoluteRowIndex,key:this.props.absoluteRowIndex,[bt]:this.props.rowType==="data"?this.props.dataIndex:void 0},this.props.children);return this.props.render?this.props.render.call(void 0,i,this.props):i}}class Lt extends o.Component{get _inputId(){return this.props.id}render(){const t=I.provideLocalizationService(this),{columnMenuWrapperProps:i}=this.props,l=[o.createElement("span",{key:0,className:"k-checkbox-wrap"},o.createElement("input",{id:this._inputId,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(te,w[te]),"aria-checked":this.props.selectionValue,checked:this.props.selectionValue,onChange:e=>this.props.selectionChange({field:this.props.field,syntheticEvent:e})})),i.columnMenu&&o.createElement(He,{...i})];return this.props.render?this.props.render.call(void 0,l,this.props):l}}I.registerForLocalization(Lt);const Ni=f.withIdHOC(Lt);class ue extends o.Component{render(){return this.props.children||I.provideLocalizationService(this).toLanguageString(Ie,w[Ie])}}ue.displayName="KendoReactGridNoRecords",I.registerForLocalization(ue);class Fi extends o.Component{constructor(){super(...arguments),this._element=null,this.renderCell=(t,i)=>{const l={colSpan:t.colSpan!==1?t.colSpan:void 0,style:t.left!==void 0?this.props.isRtl?{left:t.right,right:t.left}:{left:t.left,right:t.right}:{},className:f.classNames("k-table-td",t.locked&&t.left!==void 0?"k-grid-footer-sticky":""),key:i,role:"gridcell",["aria-colindex"]:t.ariaColumnIndex},e={field:t.field,ariaColumnIndex:t.ariaColumnIndex,...l},s=pe(this.props.cells,t.cells);if(s&&s.footerCell){const n=s.footerCell;return o.createElement(n,{...e,tdProps:l,index:i})}return t.footerCell&&o.createElement(t.footerCell,{...e,key:i})||o.createElement("td",{...l})}}get element(){return this._element}render(){return o.createElement("tr",{className:"k-table-row",role:"row","aria-rowindex":this.props.ariaRowIndex},ni(this.props.columns).map(this.renderCell))}}const Gi=({buttonCount:r=10,info:t=!0,type:i="numeric",pageSizes:l=void 0,previousNext:e=!0,responsive:s=void 0,pageSizeValue:n=void 0})=>({buttonCount:r,info:t,pageSizes:l===!0?[5,10,20]:l||void 0,previousNext:e,responsive:s!==!1,type:i,pageSizeValue:n}),Mi=r=>Gi(r===!0?{}:r),Dt={name:"@progress/kendo-react-grid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},zi=r=>{const{colSpan:t,ariaColIndex:i,dataItem:l,dataIndex:e,id:s}=r,n=b.useTableKeyboardNavigation(s),a=o.useCallback(h=>{r.onContextMenu&&r.onContextMenu.call(void 0,h,r.dataItem)},[r.onContextMenu,r.dataItem]);return o.createElement("td",{onContextMenu:a,className:"k-table-td k-detail-cell",colSpan:t,"aria-colindex":i,role:"gridcell",...n},o.createElement(r.detail,{dataItem:l,dataIndex:e}))},Li=r=>{const t=b.useTableKeyboardNavigation(r.id);return o.createElement("td",{className:"k-table-td k-hierarchy-cell",...t,role:"gridcell"})};let $=class extends o.Component{constructor(t){super(t),this._columns=[],this._columnsMap=[[]],this._columnsMutations=0,this._resized=!1,this._shouldUpdateLeftRight=!0,this.contextStateRef={current:void 0},this.navigationStateRef={current:void 0},this._data=[],this._slicedData=void 0,this.wrapperScrollTop=0,this.showLicenseWatermark=!1,this.headerRef=o.createRef(),this.headerElementRef=o.createRef(),this._element=null,this.tableElement=null,this.containerRef=o.createRef(),this.tableBodyRef=o.createRef(),this._footer=null,this.forceUpdateTimeout=void 0,this.isRtl=!1,this.observer=null,this.handleIntersection=e=>{const s={rowIndex:this.rowIndex};e.forEach(n=>{n.isIntersecting||this.setCurrentOnTop(s)})},this.setCurrentOnTop=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.observer&&this.observer.disconnect();const{rowIndex:s}=e;if(this.props.scrollable==="virtual")this.vs.askedSkip=s,this.vs.container.scroll(0,Math.round(this.vs.askedSkip/this.vs.total*this.vs.container.scrollHeight));else if(this.element){const n=s<1?this.element.querySelector("tbody > tr:nth-child(1)"):this.element.querySelector(`tbody > tr:nth-child(${s+1})`);n&&this.containerRef.current&&(this.containerRef.current.scrollTop=n.offsetTop)}},this.scrollIntoView=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.rowIndex=e.rowIndex;const{rowIndex:s}=e,n=this.element;if(this.observer&&n){this.observer.disconnect();const a=n.querySelector(`[absolute-row-index="${s}"]`);a?this.observer.observe(a):this.setCurrentOnTop(e)}},this.fitColumns=e=>{this.columnResize.dblClickHandler(null,e)},this.onContextMenu=(e,s,n)=>{if(this.props.onContextMenu){const a={target:this,syntheticEvent:e,nativeEvent:e.nativeEvent,dataItem:s,field:n};this.props.onContextMenu.call(void 0,a)}},this.getVirtualScroll=e=>{const{rowHeight:s,detailRowHeight:n,detail:a,expandField:h,groupable:c}=e,d=this.isAllData(),u=s!==void 0&&s>0,C=n!==void 0&&n>0,g=c===!0||typeof c=="object"&&c.enabled!==!1;return!u||g&&!d||!!(a&&h)&&(!C||!d)?Ii:Ft},this.isAllData=()=>{const{data:e,total:s}=this.props;return Array.isArray(e)?e.length===s:e?s===e.total:!1},this.initializeVirtualization=(e,s)=>{if(this.reInitVirtualization(this.props.scrollable==="virtual",this.props.total,this.props.filter,this.props.group,this.props.sort,s||this.props.rowHeight===void 0||this.props.rowHeight===0),this.vs.fixedScroll=this.props.fixedScroll||!1,this.vs.PageChange=this.pageChange,this.vs.realSkip=this.props.skip||0,this.vs.pageSize=(this.props.take!==void 0?this.props.take:this.props.pageSize)||0,this.vs.scrollableVirtual=this.props.scrollable==="virtual",this.vs.total=e,this.vs.propsSkip=(this.props.skip||0)+(this.props.scrollable==="virtual"?this.vs.topCacheCount+(this.vs.attendedSkip-(this.props.skip||0)):0),this.props.rowHeight!==void 0&&this.props.rowHeight>0&&!s){const n=this.props.rowHeight*e;this.vs.containerHeight=Se?Math.min(rt,n):n}else this.vs.containerHeight=1533915;if(this.vs.containerRef=this.containerRef,this.vs.tableBodyRef=this.tableBodyRef,this.vs.table=this.tableElement,this._slicedData=void 0,this.vs instanceof Ft){const{rowHeight:n=0,detail:a,expandField:h}=this.props;let{detailRowHeight:c=0}=this.props;c=a&&h?c:n,this.isAllData()?(this.vs.total=this._data.length,this._slicedData=this._data.slice(this.vs.realSkip,this.vs.realSkip+this.vs.pageSize),this.vs.rowHeightService=this.rowHeightService(this.vs,this._data.length,n,c,this._data)):this.vs.rowHeightService=new Nt(e,n,c);const d=this.vs.rowHeightService.totalHeight();this.vs.containerHeight=Se?Math.min(rt,d):d}},this.scrollHandler=e=>{if(e.target!==e.currentTarget)return;clearTimeout(this.forceUpdateTimeout),this.vs.table=this.tableElement;const s=e.currentTarget.scrollLeft,n=e.currentTarget.scrollTop;this.props.columnVirtualization&&(!this.vs.scrollableVirtual||n===this.wrapperScrollTop)&&(this.forceUpdateTimeout=window.setTimeout(()=>{this.forceUpdate()},0)),this._header&&this._header.setScrollLeft(s),this._footer&&this._footer.setScrollLeft(s),this.vs&&n!==this.wrapperScrollTop&&this.vs.scrollHandler(e),f.dispatchEvent(this.props.onScroll,e,this,void 0),this.wrapperScrollTop=n},this.onKeyDown=e=>{if(b.tableKeyboardNavigation.onKeyDown(e,{contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,onNavigationAction:this.onNavigationAction}),this.props.onKeyDown){const{mode:s,cell:n}=b.getSelectionOptions(this.props.selectable),a={dataItems:this.getLeafDataItems(),mode:s,cell:n,componentId:this._gridId,selectedField:this.props.selectedField,...this.getArguments(e)};this.props.onKeyDown.call(void 0,a)}},this.onFocus=e=>{b.tableKeyboardNavigation.onFocus(e,{contextStateRef:this.contextStateRef})},this.onNavigationAction=e=>{if(this.props.onNavigationAction){const s={focusElement:e.focusElement,...this.getArguments(e.event)};this.props.onNavigationAction.call(void 0,s)}},this.rowClick=(e,s)=>{this.props.onRowClick&&e.target.nodeName==="TD"&&this.props.onRowClick.call(void 0,{dataItem:s.dataItem,...this.getArguments(e)})},this.rowDblClick=(e,s)=>{this.props.onRowDoubleClick&&e.target.nodeName==="TD"&&this.props.onRowDoubleClick.call(void 0,{dataItem:s.dataItem,...this.getArguments(e)})},this.itemChange=e=>{const s=this.props.onItemChange;if(e.field===this.props.expandField||this.props.group&&e.field===void 0){const n=this.props.onExpandChange;n&&n.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,dataIndex:e.dataIndex,value:e.value});return}s&&s.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,field:e.field,value:e.value})},this.onHeaderSelectionChange=e=>{this.props.onHeaderSelectionChange&&this.props.onHeaderSelectionChange.call(void 0,{field:e.field,nativeEvent:e.syntheticEvent&&e.syntheticEvent.nativeEvent,syntheticEvent:e.syntheticEvent,target:this,dataItems:this.getLeafDataItems(),selectedField:this.props.selectedField})},this.selectionRelease=e=>{if(this.props.onSelectionChange){const s={syntheticEvent:void 0,target:this,selectedField:this.props.selectedField||"",componentId:this._gridId,dataItems:this.getLeafDataItems(),dataItem:null,...e};this.props.onSelectionChange.call(void 0,s)}},this.pageChange=(e,s,n)=>{this.raiseDataEvent(this.props.onPageChange,{page:e},{skip:e.skip,take:e.take},s,n)},this.pagerPageChange=e=>{this.pageChange({skip:e.skip,take:e.take},e.syntheticEvent,e.targetEvent)},this.sortChange=(e,s)=>{this.raiseDataEvent(this.props.onSortChange,{sort:e},{sort:e,...this.props.scrollable==="virtual"?{skip:0}:{}},s)},this.filterChange=(e,s)=>{this.raiseDataEvent(this.props.onFilterChange,{filter:e},{filter:e||void 0,skip:0},s)},this.groupChange=(e,s)=>{const n=s.nativeEvent?s:{nativeEvent:s.nativeEvent||s.originalEvent};this.raiseDataEvent(this.props.onGroupChange,{group:e},{group:e,skip:0},n)},this.onClipboard=(e,s)=>{if(this.props.onClipboard){if(!this.inActiveElement()||!e)return;this.props.onClipboard.call(void 0,{type:e,nativeEvent:s,columns:this._columns,dataItemKey:this.props.dataItemKey||"",...typeof this.props.clipboard!="boolean"?this.props.clipboard:{}})}},this.inActiveElement=()=>{var h,c,d;if(!f.canUseDOM)return!1;const e=f.getActiveElement(this.document),s=e?e.matches(".k-table-td")?e:(h=this.document)==null?void 0:h.body:(c=this.document)==null?void 0:c.body,n=s.closest(".k-grid-container"),a=s&&((d=this._element)==null?void 0:d.contains(s));return!!(s&&a&&n)},this.onResize=(e,s,n,a,h,c)=>{this.resetTableWidth(),this._shouldUpdateLeftRight=!0,this._resized=!0,this._columnsMutations++,this.props.onColumnResize&&this.props.onColumnResize.call(void 0,{columns:this.columns,nativeEvent:a,targetColumnId:c,index:e,newWidth:s,oldWidth:n,end:h,target:this})},this.reInitVirtualization=f.memoizeOne((e,s,n,a,h,c)=>{this.vs.reset();const d=this.getVirtualScroll(this.props);this.vs=new d(c)}),this.flatData=f.memoizeOne((e,s,n,a,h,c,d)=>{const u=[],C=et(u,e,s,{index:n},a!==void 0,h);return{flattedData:u,resolvedGroupsCount:C}}),this.rowHeightService=f.memoizeOne((e,s,n,a,h)=>new Nt(s,n,a,h)),this.childrenToArray=f.memoizeOne(e=>o.Children.toArray(e)),this.readColumns=f.memoizeOne((e,s,n)=>{const a=e.filter(h=>h&&h.type&&h.type.displayName==="KendoReactGridColumn");return tt(a,this.columns,{prevId:0,idPrefix:s})}),this.mapColumns=f.memoizeOne(e=>b.mapColumns(e)),this.configureColumns=f.memoizeOne((e,s,n)=>{this.props.selectedField&&e.forEach(c=>{c.field===this.props.selectedField?(c.width=c.width||"50px",c.cell=c.cell||mt,c.headerCell=c.headerCell||Ni):c.width=void 0});const a={id:"",resizable:!0,width:"32px",title:" ",declarationIndex:-1,orderIndex:-1,children:[],parentIndex:-1,depth:0,colSpan:0,rowSpan:0,left:0,right:0,index:0,rightBorder:!1,ariaColumnIndex:0,isAccessible:!0};let h=0;this.props.expandField&&this.props.onExpandChange&&this.props.detail&&(e.unshift({...a,cell:Ct,field:this.props.expandField,headerClassName:"k-hierarchy-cell k-header",id:b.tableKeyboardNavigationTools.generateNavigatableId(`${this._columns.length}`,n,"column")}),h++);for(let c=0;c<s;c++)e.unshift({...a,isAccessible:!1,cell:Pe,field:"value",locked:this.props.lockGroups}),h++;e.slice(h).forEach(c=>c.parentIndex>=0&&(c.parentIndex+=h))}),this.getHeaderRow=f.memoizeOne((e,s,n,a,h,c,d,u,C,g,E,y)=>o.createElement(St,{cells:this.props.cells,sort:e,sortable:s,sortChange:this.sortChange,group:n||[],groupable:a,groupChange:this.groupChange,filter:h,filterable:c,filterOperators:d,filterChange:this.filterChange,columnMenu:C,selectionChange:this.onHeaderSelectionChange,columns:g,columnResize:this.columnResize,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,columnsMap:E,cellRender:u,isRtl:y,dragClue:this.dragLogic.dragClueRef,headerRef:this.headerElementRef,containerRef:this.containerRef})),this.resolveTitle=e=>{const s=this._columns.find(a=>a.field===e),n=s&&(s.title||s.field);return n===void 0?e:n},this.getLeafDataItems=()=>this._data.filter(e=>e.rowType==="data").map(e=>e.dataItem),f.validatePackage(Dt),this.showLicenseWatermark=f.shouldShowValidationUI(Dt);const i=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1,l=this.getVirtualScroll(t);this.vs=new l(i||t.rowHeight===void 0||t.rowHeight===0),this.dragLogic=new Gt(this.columnReorder.bind(this),this.groupReorder.bind(this),this.columnToGroup.bind(this)),this.columnResize=new yi(this.onResize),this.props.clipboard&&(this.clipboardService=new b.ClipboardService(this.onClipboard)),b.tableKeyboardNavigation.onConstructor({navigatable:!!t.navigatable,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,idPrefix:this._gridId})}get columns(){const t=this._columns.filter(i=>i.declarationIndex>=0&&i.parentIndex===-1);return it(t)}get element(){return this._element}get document(){if(f.canUseDOM)return this.element&&this.element.ownerDocument||document}get _header(){return this.headerRef.current}get _gridId(){return this.props.id+"-role-element-id"}componentDidMount(){this.resetTableWidth(),f.setScrollbarWidth();const t=b.isRtl(this.element);this.isRtl=t,b.tableKeyboardNavigation.onComponentDidMount({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),this.isRtl&&this.forceUpdate();const i={rootMargin:"0px",threshold:.9};this.clipboardService&&this.clipboardService.addEventListeners(this.document),this.observer=f.canUseDOM&&window.IntersectionObserver&&new window.IntersectionObserver(this.handleIntersection,i)||null}getSnapshotBeforeUpdate(){return b.tableKeyboardNavigation.onGetSnapshotBeforeUpdate({document:this.document,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),null}componentDidUpdate(){this.resetTableWidth(),f.setScrollbarWidth(),this.vs.tableTransform&&this.vs.table&&(this.vs.table.style.transform=this.vs.tableTransform,this.vs.tableTransform=""),b.tableKeyboardNavigation.onComponentDidUpdate({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}componentWillUnmount(){clearTimeout(this.forceUpdateTimeout),this.clipboardService&&this.clipboardService.removeEventListeners(this.document)}render(){var ei;let t=this.props.total||0;const i=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);let l=[];Array.isArray(this.props.data)?(l=this.props.data,t=t||this.props.data.length):this.props.data&&(l=this.props.data.data,t=t||this.props.data.total);const e=typeof this.props.groupable=="object"&&this.props.groupable.footer||"none",{resolvedGroupsCount:s,flattedData:n}=this.flatData(l,e,this.props.skip||0,this.props.group,this.props.expandField,this.props.filter,this.props.sort);this._data=n;const a=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1;this.columnResize.resizable=this.props.resizable||!1,this.dragLogic.reorderable=this.props.reorderable||!1,this.dragLogic.groupable=a;const h=this.props.selectable&&this.props.selectable.drag?"none":void 0;this.initializeVirtualization(t,a);const c=this.childrenToArray(this.props.children);this.initColumns(c,s);const d=c.map(v=>v&&v.type&&v.type.displayName==="KendoReactGridToolbar"?o.cloneElement(v,{...v.props,ariaControls:this._gridId}):null),u=c.filter(v=>v&&v.type&&v.type.displayName==="KendoReactGridNoRecords"),C=c.filter(v=>v&&v.type&&v.type.displayName==="KendoReactGridStatusBar"),g=this._columns.filter(v=>v.children.length===0),E=a&&o.createElement(yt,{group:this.props.group||[],groupChange:this.groupChange,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,refCallback:this.dragLogic.refGroupPanelDiv,resolveTitle:this.resolveTitle,ariaControls:this._gridId,onContextMenu:this.onContextMenu}),{sort:y,sortable:x,group:S,filter:F,filterable:k,filterOperators:B=_e,headerCellRender:_,columnMenu:me}=this.props,le=o.createElement(gi,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",scrollableDataElement:()=>this.vs.container,draggable:this.props.reorderable||a,ref:this.headerRef,elemRef:this.headerElementRef,headerRow:this.getHeaderRow(y,x,S,a,F,k,B,_,me,this._columns,this._columnsMap,this.isRtl),filterRow:this.props.filterable&&o.createElement(wt,{cells:this.props.cells,size:this.props.size,columns:this._columns,filter:this.props.filter,filterOperators:this.props.filterOperators||_e,filterChange:this.filterChange,sort:this.props.sort,cellRender:this.props.filterCellRender,isRtl:this.isRtl,ariaRowIndex:this._columnsMap.length+1})||void 0,cols:g.map((v,M)=>o.createElement("col",{key:M.toString(),width:Ee(v)}))}),X=this.vs&&this.vs.container&&this.vs.container.scrollLeft||0,D=parseFloat(((this.props.style||{}).width||"").toString()),{colSpans:Xe,hiddenColumns:Ce}=b.tableColumnsVirtualization({enabled:this.props.columnVirtualization,columns:g,tableViewPortWidth:D,scrollLeft:X}),Ye=(v,M,z)=>{let Y=!1;const V=this.props.selectedField?H(this.props.selectedField,v.dataItem):void 0;return{row:g.map((G,O)=>{if(Ce[O])return null;const ae=G.id?G.id:O,he=`${G.className?G.className+" ":""}${G.locked?"k-grid-content-sticky":""}`,W=G.left!==void 0?this.isRtl?{left:G.right,right:G.left}:{left:G.left,right:G.right}:{};let T=!1;if(G.editable&&this.props.editField){const A=H(this.props.editField,v.dataItem);A&&(A===!0||A===G.field)&&(Y=!0,T=!0)}const Qe=G.cell||T&&vt||Mt;return o.createElement(Qe,{onContextMenu:this.onContextMenu,key:ae,locked:this.props.lockGroups,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${M}-${String(O)}`,i),colSpan:Xe[O],dataItem:v.dataItem,field:G.field,editor:G.editor,format:G.format,className:he,render:this.props.cellRender,cells:pe(this.props.cells,G.cells),onChange:this.itemChange,selectionChange:this.props.onSelectionChange?A=>{this.selectionChange({event:A,dataItem:v.dataItem,dataIndex:z,columnIndex:O})}:void 0,columnIndex:O,columnsCount:g.length,rowType:v.rowType,level:v.level,expanded:v.expanded,dataIndex:v.dataIndex,style:W,ariaColumnIndex:G.ariaColumnIndex,isSelected:Array.isArray(V)&&V.indexOf(O)>-1})}),isInEdit:Y,isSelected:typeof V=="boolean"&&V}};let oe=0;if(this.props.scrollable==="virtual")for(let v=0;v<this.vs.topCacheCount+this.vs.attendedSkip-(this.props.skip||0);v++){const M=this._data.shift();if(M)this._data.push(M),oe++,M.rowType==="groupHeader"&&v--;else break}const qt=v=>v>=this._data.length-oe;let Ut=this.vs.realSkip||0;const be=[];let Je=!1;const Ze=this._columnsMap.length+(this.props.filterable?1:0)+1,$t=o.createElement("div",{key:"no-records",className:"k-grid-norecords","aria-rowindex":Ze},o.createElement("div",{className:"k-grid-norecords-template"},u.length?u:o.createElement(ue,null)));let ne=0;if(this._data.length){let v=-1,M=0;(this._slicedData||this._data).forEach((z,Y)=>{z.rowType==="data"&&(Ut++,v++);const V=Ut%2===0,G=this.props.dataItemKey&&f.getter(this.props.dataItemKey)(z.dataItem),O=Y+(this.vs.realSkip||0),ae=G||"ai"+O,he=ae+"_1",W=Ye(z,ae,v);if(ne=O+Ze+M,be.push(o.createElement(zt,{key:ae,dataItem:z.dataItem,isAltRow:V,isInEdit:W.isInEdit,rowType:z.rowType,isHidden:qt(Y),onClick:T=>this.rowClick(T,z),onDoubleClick:T=>this.rowDblClick(T,z),selectedField:this.props.selectedField,rowHeight:this.props.rowHeight,render:this.props.rowRender,ariaRowIndex:ne,absoluteRowIndex:O,dataIndex:v,isSelected:W.isSelected},W.row)),this.props.detail&&z.rowType==="data"&&z.expanded){const T=g.length-(this.props.expandField?1:0)-(this.props.group?this.props.group.length:0)||1;M++,ne=O+Ze+M,be.push(o.createElement("tr",{key:he,className:f.classNames("k-table-row",V?"k-detail-row k-table-alt-row k-alt":"k-detail-row"),style:{visibility:qt(Y)?"hidden":"",height:this.props.detailRowHeight},role:"row","aria-rowindex":ne},this.props.group&&this.props.group.map((Qe,A)=>{var ti;const ce=(ti=W==null?void 0:W.row[A])==null?void 0:ti.props.style,Ki=ce?this.isRtl?{left:ce.right,right:ce.left}:{left:ce.left,right:ce.right}:{};return o.createElement(Pe,{id:"",dataIndex:z.dataIndex,field:Qe.field,dataItem:z.dataItem,key:A,style:Ki,ariaColumnIndex:1+A,isSelected:!1,locked:this.props.lockGroups,isRtl:this.isRtl,cells:this.props.cells})}),this.props.expandField&&o.createElement(Li,{id:b.tableKeyboardNavigationTools.generateNavigatableId(`${he}-dhcell`,i)}),o.createElement(zi,{onContextMenu:this.onContextMenu,dataItem:z.dataItem,dataIndex:z.dataIndex,colSpan:T,ariaColIndex:2+(this.props.group?this.props.group.length:0),detail:this.props.detail,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${he}-dcell`,i)})))}})}else Je=!0;const jt={size:this.props.size,onPageChange:this.pagerPageChange,total:t,dir:this.isRtl?"rtl":void 0,skip:this.vs.propsSkip||0,take:(this.props.take!==void 0?this.props.take:this.props.pageSize)||10,messagesMap:pi,...Mi(this.props.pageable||{})},Xt=this.props.pager?o.createElement(this.props.pager,{...jt}):o.createElement(b.Pager,{className:"k-grid-pager",...jt}),Ri=v=>this.props.sort&&this.props.sort.filter(M=>M.field===v).length>0,Ai=(v,M)=>o.createElement("col",{key:M.toString(),width:Ee(v)}),Yt=(ei=this.props.cells)!=null&&ei.footerCell||this._columns.some(v=>{var M;return!!(v.footerCell||(M=v.cells)!=null&&M.footerCell)})?o.createElement(Si,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",ref:v=>this._footer=v,row:o.createElement(Fi,{cells:this.props.cells,columns:this._columns,isRtl:this.isRtl,ariaRowIndex:ne+1}),cols:g.map(Ai)}):null,Jt=o.createElement("colgroup",{ref:v=>{this.columnResize.colGroupMain=v}},g.map((v,M)=>o.createElement("col",{key:M.toString(),className:Ri(v.field)?"k-sorted":void 0,width:Ee(v)}))),Zt=this.dragLogic.reorderable||this.dragLogic.groupable,Qt=this.props.columnVirtualization?"block":"table";if(this.props.scrollable==="none")return o.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},o.createElement("div",{id:this.props.id,style:this.props.style,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),ref:v=>{this._element=v},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,E,o.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:v=>{this.tableElement=v}},o.createElement("table",{className:f.classNames("k-table k-grid-table",{[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),style:{userSelect:h,display:Qt}},Jt,le,o.createElement("tbody",{role:"rowgroup",className:"k-table-tbody",...b.tableKeyboardNavigationBodyAttributes},be),Yt)),Je&&$t,Zt&&o.createElement(o.Fragment,null,o.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),o.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue}))),C,this.props.pageable&&Xt);let ve=this.props.style||{};return this.props.scrollable==="virtual"&&(ve.height||(ve=Object.assign({},ve,{height:"450px"}))),o.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},o.createElement("div",{id:this.props.id,style:ve,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size,"k-grid-virtual":this.props.scrollable==="virtual"},this.props.className),ref:v=>{this._element=v},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,E,o.createElement("div",{className:"k-grid-aria-root",role:"grid","aria-colcount":g.length,"aria-rowcount":t,id:this._gridId},le,o.createElement("div",{className:"k-grid-container",role:"presentation"},o.createElement("div",{ref:this.containerRef,className:"k-grid-content k-virtual-content",onScroll:this.scrollHandler,role:"presentation"},o.createElement("div",{className:"k-grid-table-wrap",role:"presentation"},o.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:v=>{this.tableElement=v}},o.createElement("table",{className:f.classNames("k-table k-grid-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),role:"presentation",style:{userSelect:h,display:Qt}},Jt,o.createElement("tbody",{className:"k-table-tbody",ref:this.tableBodyRef,role:"rowgroup",...b.tableKeyboardNavigationBodyAttributes},be))),Je&&$t),o.createElement("div",{className:"k-height-container",role:"presentation"},o.createElement("div",{style:this.props.scrollable==="virtual"?{height:this.vs.containerHeight+"px"}:{}})))),Yt,Zt&&o.createElement(o.Fragment,null,o.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),o.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue})),this.showLicenseWatermark&&o.createElement(f.WatermarkOverlay,null)),C,this.props.pageable&&Xt))}selectionChange(t){if(this.props.onSelectionChange){const{event:i,dataItem:l,dataIndex:e,columnIndex:s}=t,{mode:n,cell:a}=b.getSelectionOptions(this.props.selectable),h={...this.getArguments(i.syntheticEvent),dataItem:l,startColIndex:s,endColIndex:s,startRowIndex:e,endRowIndex:e,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:n,cell:a,isDrag:!1,componentId:this._gridId,selectedField:this.props.selectedField||""};this.props.onSelectionChange.call(void 0,h)}}raiseDataEvent(t,i,l,e,s){const n=this.props.onDataStateChange;if(t){const a={...this.getArguments(e),...i,targetEvent:s};t.call(void 0,a)}else n&&n.call(void 0,{...this.getArguments(e),targetEvent:s||{},dataState:{...this.getDataState(),...l}})}columnReorder(t,i,l){const e=this._columns[t],s=e.depth,n=d=>{do d++;while(d<this._columns.length&&this._columns[d].depth>s);return d},a=this._columns.splice(t,n(t)-t);this._columns.splice(t<i?n(i-a.length):i,0,...a),this._columns.filter(d=>d.declarationIndex>=0).forEach((d,u)=>d.orderIndex=u),this._columnsMutations++;const h=this._columns[t].locked&&this._columns[i].locked;b.updateLeft(this._columnsMap,this._columns,h||this._shouldUpdateLeftRight),b.updateRight(this._columnsMap,this._columns,h||this._shouldUpdateLeftRight),this._resized&&(this._shouldUpdateLeftRight=!1,this._resized=!1);const c=this.columns;if(this.forceUpdate(),this.props.onColumnReorder){const d={target:this,columns:c,columnId:e.id,nativeEvent:l};this.props.onColumnReorder.call(void 0,d)}}groupReorder(t,i,l){if(this.props.group===void 0)return;const e=this.props.group.slice();e.splice(i,0,...e.splice(t,1)),this.groupChange(e,l)}columnToGroup(t,i,l){const e=this._columns[t].field;if(!e)return;const s=(this.props.group||[]).slice();s.splice(i,0,{field:e}),this.groupChange(s,l)}resetTableWidth(){let t=0;if(!this.columnResize.colGroupMain)return;const i=this.columnResize.colGroupMain.children;for(let l=0;l<i.length;l++){const e=i[l].width;if(!e)return;t+=parseFloat(e.toString())}t=Math.round(t),this._header&&this._header.setWidth(t),this._footer&&this._footer.setWidth(t),this.tableElement&&(this.tableElement.style.width=t+"px")}initColumns(t,i){const l=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);this._columns=this.readColumns(t,l,this._columnsMutations),this._columns.length===0&&(this._columns=li(this.props.data,this.props.group,this.props.expandField,{prevId:0,idPrefix:l})),this.configureColumns(this._columns,i,l),this._columnsMap=this.mapColumns(this._columns),this.columnResize.columns=this._columns,this.dragLogic.columns=this._columns}getDataState(){return{filter:this.props.filter,sort:this.props.sort,skip:this.props.skip,take:this.props.take!==void 0?this.props.take:this.props.pageSize,group:this.props.group}}getArguments(t){return{nativeEvent:t&&t.nativeEvent,syntheticEvent:t,target:this}}};$.displayName="KendoReactGrid",$.defaultProps={},$.propTypes={data:p.oneOfType([p.array,p.shape({data:p.array,total:p.number})]),sortable:p.oneOfType([p.bool,p.shape({mode:p.oneOf(["single","multiple"]),allowUnsort:p.bool})]),onSortChange:p.func,sort:p.array,filterable:p.bool,filter:p.any,onFilterChange:p.func,pageable:p.oneOfType([p.bool,p.shape({buttonCount:p.number,responsive:p.bool,info:p.bool,type:p.oneOf(["numeric","input"]),pageSizes:p.oneOfType([p.bool,p.arrayOf(p.oneOfType([p.string,p.number]))]),previousNext:p.bool})]),pageSize:p.number,onPageChange:p.func,total:p.number,skip:p.number,take:p.number,fixedScroll:p.bool,onExpandChange:p.func,expandField:p.string,selectedField:p.string,onSelectionChange:p.func,onHeaderSelectionChange:p.func,resizable:p.bool,reorderable:p.bool,group:p.any,groupable:p.oneOfType([p.bool,p.shape({enabled:p.bool,footer:p.oneOf(["always","visible","none"])})]),onGroupChange:p.func,onRowClick:p.func,onRowDoubleClick:p.func,onItemChange:p.func,editField:p.string,scrollable:p.oneOf(["none","scrollable","virtual"]),rowHeight:p.number,detailRowHeight:p.number,detail:p.any,style:p.object,onDataStateChange:p.func,onColumnResize:p.func,onColumnReorder:p.func,dataItemKey:p.string,navigatable:p.bool,size:p.oneOf(["small","medium"])},$.contextType=b.TableKeyboardNavigationContext;class re extends o.Component{render(){const{children:t}=this.props;return o.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-wrapper",this.props.className),style:this.props.style},t)}}class j extends o.Component{render(){const{title:t,iconClass:i,svgIcon:l,selected:e}=this.props;return o.createElement("div",{onClick:this.props.onClick,className:`k-columnmenu-item ${e?"k-selected":""}`},(i||l)&&o.createElement(f.IconWrap,{name:i&&f.toIconName(i),icon:l}),t)}}class Ve extends o.Component{constructor(){super(...arguments),this.onGroupClick=t=>{if(t.preventDefault(),this.props.onGroupChange){const{column:i}=this.props;if(!i.field)return;const l=(this.props.group||[]).slice(),e=l.findIndex(s=>s.field===i.field);e>-1?l.splice(e,1):l.push({field:i.field}),this.props.onGroupChange(l,t)}this.props.onCloseMenu&&this.props.onCloseMenu()}}render(){const{group:t,column:i}=this.props,l=I.provideLocalizationService(this),e=!!(t&&i.field&&t.find(n=>n.field===i.field)),s=e?dt:ct;return o.createElement(re,null,o.createElement(j,{title:l.toLanguageString(s,w[s]),iconClass:e?"k-i-ungroup":"k-i-group",svgIcon:e?N.ungroupIcon:N.groupIcon,onClick:this.onGroupClick}))}}I.registerForIntl(Ve),I.registerForLocalization(Ve);const Ot="asc",Ht="desc",Di={true:{asc:{asc:"",desc:"desc"},desc:{asc:"asc",desc:""},"":{asc:"asc",desc:"desc"}},false:{asc:{asc:"asc",desc:"desc"},desc:{asc:"asc",desc:"desc"},"":{asc:"asc",desc:"desc"}}},_t=(r,t)=>t?t.findIndex(i=>i.field===r):-1,Rt=(r,t)=>!!(t&&r>-1&&t[r].dir===Ot),At=(r,t)=>!!(t&&r>-1&&t[r].dir===Ht);class ge extends o.Component{constructor(){super(...arguments),this.onAscClick=t=>{this.onSort(t,Ot),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onDescClick=t=>{this.onSort(t,Ht),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onSort=(t,i)=>{if(t.preventDefault(),!this.props.onSortChange)return;const{column:l,sortable:e,sort:s}=this.props,{allowUnsort:n,mode:a}=xt(e||!1,!1),h=(s||[]).filter(u=>u.field===l.field)[0],c=Di[n][h&&h.dir||""][i],d=a==="single"?[]:(this.props.sort||[]).filter(u=>u.field!==l.field);c!==""&&l.field&&d.push({field:l.field,dir:c}),this.props.onSortChange(d,t)}}render(){const{sort:t,column:i}=this.props,l=_t(i.field,t),e=I.provideLocalizationService(this);return o.createElement(re,null,o.createElement(j,{title:e.toLanguageString(ye,w[ye]),iconClass:"k-i-sort-asc-sm",svgIcon:N.sortAscSmallIcon,selected:Rt(l,t),onClick:this.onAscClick}),o.createElement(j,{title:e.toLanguageString(Ne,w[Ne]),iconClass:"k-i-sort-desc-sm",svgIcon:N.sortDescSmallIcon,selected:At(l,t),onClick:this.onDescClick}))}}ge.active=(r,t)=>{const i=_t(r,t);return At(i,t)||Rt(i,t)},I.registerForIntl(ge),I.registerForLocalization(ge);class qe extends o.Component{render(){return o.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-content",this.props.className),style:this.props.style},o.createElement(ri.Reveal,{style:{position:"relative",display:"block"}},this.props.show?this.props.children:null))}}class Ue extends o.Component{constructor(t){super(t),this.renderOperatorEditor=()=>{if(this.props.filterType==="boolean")return;const i=this.props.operators.find(l=>l.operator===this.props.operator)||null;return o.createElement(Z.DropDownList,{value:i,onChange:this.operatorChange,data:this.props.operators,textField:"text"})},this.inputChange=this.inputChange.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){return o.createElement(o.Fragment,null,this.renderOperatorEditor(),this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues))}inputChange(t,i){Ae(t,i,this.props)}operatorChange(t){We(t,this.props.value,this.props.onChange)}boolDropdownChange(t){Be(t,this.props.onChange)}filterComponent(t,i,l){switch(t){case"numeric":return o.createElement(L.NumericTextBox,{value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},rangeOnEnter:!1});case"date":return o.createElement(xe.DatePicker,{value:i,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)}});case"boolean":{const e=s=>s==null;return o.createElement(Z.DropDownList,{onChange:this.boolDropdownChange,value:l.find(s=>s.operator===(e(i)?"":i)),data:l,textField:"text"})}default:return o.createElement(L.Input,{value:i||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)}})}}}class Kt extends o.Component{render(){const{firstFilterProps:t,hideSecondFilter:i,secondFilterProps:l,logicData:e,logicValue:s,onLogicChange:n}=this.props;return o.createElement(o.Fragment,null,o.createElement(Ue,{...t}),!i&&o.createElement(o.Fragment,null,o.createElement(Z.DropDownList,{data:e,value:s,onChange:n,className:"k-filter-and",textField:"text"}),o.createElement(Ue,{...l})))}}const fe=r=>r||{filters:[],logic:"and"},se=(r,t)=>fe(t).filters.filter(e=>de.isCompositeFilterDescriptor(e)?e.filters&&e.filters.length&&e.filters.length<=2&&!e.filters.find(s=>de.isCompositeFilterDescriptor(s)||s.field!==r):!1)[0]||null;class $e extends o.Component{constructor(t){super(t),this.removeGroup=(l,e)=>{const s=[...e.filters],n=s.findIndex(a=>a===l);return n>-1&&s.splice(n,1),{...e,filters:s}},this.insertGroup=(l,e)=>({...e,filters:[l,...e.filters]}),this.isControlled=()=>this.props.expanded!==void 0,this.onFilterExpand=()=>{const l=this.isControlled(),e=!(l?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(e),l||this.setState({expanded:e})},this.firstFilterChange=l=>{this.filterChange(0,l)},this.secondFilterChange=l=>{this.filterChange(1,l)},this.filterChange=(l,e)=>{const s=this.state.filterGroup.filters.map((n,a)=>a===l?{...n,value:e.value,operator:e.operator}:n);this.setState({filterGroup:{...this.state.filterGroup,filters:s}})},this.logicChange=l=>{this.setState({filterGroup:{...this.state.filterGroup,logic:l.target.value.operator}})},this.clear=l=>{if(l.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,s=fe(this.props.filter),n=se(e,this.props.filter),a=s.filters.filter(h=>h!==n);a.length?this.props.onFilterChange({...s,filters:a},l):this.props.onFilterChange(null,l),this.props.onCloseMenu&&this.props.onCloseMenu()},this.currentFilterGroup=()=>({...this.state.filterGroup,filters:this.state.filterGroup.filters.filter(l=>l.value!==void 0&&l.value!==null&&l.value!==""||l.value===null&&l.operator)}),this.submit=l=>{if(l.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,s=fe(this.props.filter),n=se(e,this.props.filter),a=this.currentFilterGroup();let h=null;if(n&&a.filters.length>0){const c=s.filters.map(d=>d===n?a:d);h={...s,filters:c}}else if(a.filters.length===0){const c=s.filters.filter(d=>d!==n);c.length&&(h={...s,filters:c})}else h={...s,filters:[...s.filters,a]};this.props.onFilterChange(h,l),this.props.onCloseMenu&&this.props.onCloseMenu()};let i;if(t.column&&t.column.field){const l=Ke(t.column.filter),e=It(t.filterOperators,l);i=se(t.column.field,t.filter),i=i?{...i,filters:i.filters.map(s=>({...s}))}:{logic:"and",filters:[{field:t.column.field,operator:e,value:R(e)?null:void 0},{field:t.column.field,operator:e,value:R(e)?null:void 0}]},i.filters.filter(s=>s.field===t.column.field).length===1&&i.filters.splice(1,0,{field:t.column.field,operator:e})}this.state={expanded:t.expanded||!1,filterGroup:i}}render(){const{column:t,filterUI:i,hideSecondFilter:l,filterOperators:e}=this.props;if(!t||!t.field)return o.createElement("div",null);const s=Ke(t.filter),n=l!==void 0?l:xi[s],a=I.provideLocalizationService(this),h=this.state.filterGroup.filters,c=ie(e[s],a),d=ie(Re,a),u={field:t.field,value:h[0].value,operator:h[0].operator,operators:c,booleanValues:d,onChange:this.firstFilterChange,filterType:s},C={field:t.field,value:h[1].value,operator:h[1].operator,operators:c,booleanValues:d,onChange:this.secondFilterChange,filterType:s},g=this.state.filterGroup.logic,E=ie(bi,a),y={value:E.find(_=>_.operator===(g===null?"":g)),onChange:this.logicChange,data:E},x=i,S={firstFilterProps:u,secondFilterProps:C,logicData:y.data,logicValue:y.value,onLogicChange:y.onChange,hideSecondFilter:n},F=this.currentFilterGroup().filters.length!==0||R(h[0].operator)||R(h[1].operator),k=this.isControlled()?this.props.expanded:this.state.expanded,B=this.props.alwaysExpand;return o.createElement(re,null,!B&&o.createElement(j,{title:a.toLanguageString(ee,w[ee]),iconClass:"k-i-filter",svgIcon:N.filterIcon,onClick:this.onFilterExpand}),o.createElement(qe,{show:B||!!k},o.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear,onKeyDown:_=>_.stopPropagation()},o.createElement("div",{className:"k-filter-menu-container"},x?o.createElement(x,{...S}):o.createElement(Kt,{...S}),o.createElement("div",{className:"k-actions k-actions-stretched"},o.createElement(K.Button,{themeColor:"primary",disabled:!F},a.toLanguageString(Q,w[Q])),o.createElement(K.Button,{type:"reset"},a.toLanguageString(P,w[P])))))))}}$e.active=(r,t)=>!!se(r,t),I.registerForLocalization($e);const Oi=(r,t)=>r.length!==t.length?!1:r.every((i,l)=>i===t[l]);class je extends o.Component{constructor(t){super(t),this.defaultFilter=()=>this.props.filter?f.clone(this.props.filter):{filters:[],logic:"and"},this.isControlled=()=>this.props.expanded!==void 0,this.parseData=(i,l)=>{const e=this.props.column.field||"",s=i.map(n=>H(e,n));return l?s.filter((n,a)=>s.indexOf(n)===a):s},this.getFilterIndex=()=>{const i=this.props.column.field;return this.defaultFilter().filters.findIndex(s=>s.filters&&s.filters.length>0&&s.filters[0].field===i)},this.onFilterExpand=()=>{const i=this.isControlled(),l=!(i?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(l),i||this.setState({expanded:l})},this.handleSearchChange=i=>{const l=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",e={logic:"and",filters:[{field:this.props.column.field,operator:l,value:i.target.value,ignoreCase:!0}]};this.setState({value:i.target.value,data:this.parseData(de.filterBy(this.props.data||[],e),this.props.uniqueData)})},this.handleClear=()=>{const i=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",l={logic:"and",filters:[{field:this.props.column.field,operator:i,value:"",ignoreCase:!0}]};this.setState({value:"",data:this.parseData(de.filterBy(this.props.data||[],l),this.props.uniqueData)})},this.clear=i=>{if(i.preventDefault(),!this.props.onFilterChange)return;const l=this.state.currentFilter||null;l!==null&&l.filters.length>0?(this.compositeFilterIndex>=0&&l.filters.splice(this.compositeFilterIndex,1),this.props.onFilterChange(l,i)):this.props.onFilterChange(null,i),this.props.onCloseMenu&&this.props.onCloseMenu()},this.submit=i=>{if(i.preventDefault(),!this.props.onFilterChange)return;const l=this.state.currentFilter||null;this.props.onFilterChange(l,i),this.props.onCloseMenu&&this.props.onCloseMenu()},this.handleCheckBoxChange=(i,l)=>{const e=this.props.column.field||"",s={...this.state.currentFilter},n=[...this.state.currentFilter.filters];let a=[];if(this.compositeFilterIndex!==-1&&s.filters[this.compositeFilterIndex].filters&&l!=="all"&&(a=s.filters[this.compositeFilterIndex].filters),i.value&&l==="all")this.state.data.forEach(h=>{a.push({field:e,operator:"eq",value:h})});else if(i.value)a.push({field:e,operator:"eq",value:l});else if(this.state.currentFilter){const h=a.findIndex(c=>c.value===l);a.splice(h,1)}s.logic="and",this.compositeFilterIndex!==-1?n[this.compositeFilterIndex]={logic:"or",filters:a}:n.push({logic:"or",filters:a}),(!i.value&&l==="all"||a.length===0)&&n.splice(this.compositeFilterIndex,1),s.filters=n,this.setState({currentFilter:s})},this.isAllSelected=()=>{let i=!1;if(this.state.currentFilter){const l=[...this.state.currentFilter.filters];return this.compositeFilterIndex===-1?!1:(i=this.state.data.every(e=>this.compositeFilterIndex!==-1&&l[this.compositeFilterIndex].filters?l[this.compositeFilterIndex].filters.findIndex(n=>n.value===e)>=0:!1),i)}return i},this.compositeFilterIndex=this.getFilterIndex(),this.state={expanded:t.expanded||!1,value:"",data:this.parseData(this.props.data,this.props.uniqueData)||[],dataFromProps:this.parseData(this.props.data,!1)||[],currentFilter:this.defaultFilter()}}componentDidUpdate(){const t=this.props.column.field||"",i=this.props.data.map(l=>H(t,l));Oi(i,this.state.dataFromProps)||this.setState({data:i,dataFromProps:i})}render(){const{column:t}=this.props;if(!t||!t.field)return o.createElement("div",null);const i=I.provideLocalizationService(this),l=this.isControlled()?this.props.expanded:this.state.expanded,e=[];if(this.state.currentFilter){const a=[...this.state.currentFilter.filters];this.compositeFilterIndex=a.findIndex(h=>h.filters&&h.filters.length>0?h.filters[0].field===t.field:!1),this.compositeFilterIndex!==-1&&a[this.compositeFilterIndex].filters.length>0&&a[this.compositeFilterIndex].filters.forEach(h=>{h.field===this.props.column.field&&e.push(h.value)})}const s=this.props.searchBox?o.createElement(this.props.searchBox,{value:this.state.value,onChange:this.handleSearchChange}):o.createElement("div",{className:"k-searchbox k-textbox k-input k-input-md k-input-solid"},o.createElement(f.IconWrap,{className:"k-input-icon",name:"search",icon:N.searchIcon}),o.createElement(L.Input,{className:"k-input-inner",type:"text",placeholder:i.toLanguageString(Fe,w[Fe]),value:this.state.value,onChange:a=>this.handleSearchChange(a.nativeEvent)}),o.createElement(K.Button,{type:"button",rounded:null,className:"k-input-button",onClick:this.handleClear,icon:"x",svgIcon:N.xIcon})),n=e.filter((a,h)=>e.indexOf(a)===h);return o.createElement(re,null,o.createElement(j,{title:i.toLanguageString(ee,w[ee]),iconClass:"k-i-filter",svgIcon:N.filterIcon,onClick:this.onFilterExpand}),o.createElement(qe,{show:!!l},o.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear},o.createElement("div",{className:"k-filter-menu-container"},s,o.createElement("ul",{className:"k-reset k-multicheck-wrap"},o.createElement("li",{className:"k-item k-check-all-wrap"},o.createElement(L.Checkbox,{label:i.toLanguageString(Ge,w[Ge]),onChange:a=>this.handleCheckBoxChange(a,"all"),checked:this.isAllSelected()})),this.state.data.map((a,h)=>o.createElement("li",{className:"k-item",key:h},o.createElement(L.Checkbox,{label:String(a),onChange:c=>this.handleCheckBoxChange(c,a),checked:n.includes(a)})))),o.createElement("div",{className:"k-filter-selected-items"},n.length+" "+i.toLanguageString(ze,w[ze])),o.createElement("div",{className:"k-actions k-hstack k-justify-content-stretch"},o.createElement(K.Button,{themeColor:"primary",type:"submit"},i.toLanguageString(Q,w[Q])),o.createElement(K.Button,{className:"k-button",type:"reset"},i.toLanguageString(P,w[P])))))))}}je.defaultProps={uniqueData:!0},I.registerForLocalization(je);const Bt=r=>{const[t,i]=o.useState(""),l=o.useMemo(()=>new Set(r.columnsState.map(g=>g.id)),[r.columnsState]),e=o.useMemo(()=>r.columns.filter(g=>{var E;return(E=g.title||g.field)==null?void 0:E.toLowerCase().includes(t.toLowerCase())}),[r.columns,t]),[s,n]=o.useState(r.columns.map(g=>l.has(g.id))),a=o.useCallback(()=>{const g=r.columns.filter((E,y)=>s[y]);r.onColumnsChange.call(void 0,g),r.onCloseMenu.call(void 0)},[s,r.columns,r.onColumnsChange,r.onCloseMenu]),h=o.useCallback(()=>{n(r.columns.map(g=>l.has(g.id)))},[l,r.columns]),c=s.filter(g=>g).length,d=c===s.length,u=o.useCallback(()=>{n(r.columns.map((g,E)=>d&&E===0?!0:!d))},[r.columns,d]),C=o.useCallback((g,E)=>{const y=s.slice();y[E]=g,n(y)},[s]);return o.createElement("form",{className:"k-filter-menu"},o.createElement("div",{className:"k-filter-menu-container"},o.createElement(L.TextBox,{className:"k-searchbox",value:t,onChange:g=>i(String(g.target.value)),prefix:()=>o.createElement(L.InputPrefix,null,o.createElement(f.IconWrap,{name:"search",icon:N.searchIcon}))}),o.createElement("ul",{className:"k-reset k-multicheck-wrap"},!t&&o.createElement("li",{className:"k-item k-check-all-wrap"},o.createElement(L.Checkbox,{checked:d,onChange:u,label:"(Select all)"})),e.map((g,E)=>o.createElement("li",{key:g.id,className:"k-item"},o.createElement(L.Checkbox,{disabled:s[E]&&c===1,checked:s[E],onChange:y=>{var x;return C(!!((x=y.target.element)!=null&&x.checked),E)},label:g.title||g.field})))),o.createElement("div",{className:"k-filter-selected-items"},c," selected items"),o.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},o.createElement(K.Button,{type:"button",themeColor:"primary",onClick:a},"Apply"),o.createElement(K.Button,{type:"button",onClick:h},"Reset"))))};Bt.displayName="GridColumnMenuColumnsList";class Hi extends o.Component{render(){return null}}class Wt extends o.Component{render(){return o.createElement("div",{className:f.classNames("k-toolbar k-grid-toolbar",{"k-toolbar-md":!this.props.size,[`k-toolbar-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),"aria-label":this.props.ariaLabel,"aria-controls":this.props.ariaControls,role:"toolbar"},this.props.children)}}Wt.displayName="KendoReactGridToolbar";const Tt=r=>{const{data:t=[]}=r;return o.createElement("div",{className:"k-selection-aggregates k-grid-selection-aggregates"},t.map((i,l)=>o.createElement("div",{key:l},o.createElement("span",{className:"k-selection-aggregates-item-text"},i.type,": "),o.createElement("span",{className:"k-selection-aggregates-item-value"},i.formattedValue))))};Tt.displayName="KendoReactGridStatusBar";const Pt=r=>{var i;const t=r.slice();for(let l=0;l<t.length;l++)for(;t[l]&&((i=t[l].children)!=null&&i.length);)t.splice(l,1,...t[l].children);return t},_i=r=>{const{dataItems:t,target:i,selectedField:l}=r,s=Pt(i.columns).map(x=>x.field).filter(x=>x&&typeof x=="string").map(x=>f.getter(x)),n=f.getter(l),a={dates:[],numbers:[],booleans:[],others:[]},h=x=>{typeof x=="number"?a.numbers.push(x):typeof x=="boolean"?a.booleans.push(x):x instanceof Date?a.dates.push(x):a.others.push(x)};t.forEach(x=>{const S=n(x);S&&S.forEach(F=>{h(s[F](x))})});const c=a.dates.map(x=>x.getTime()),d=a.booleans.filter(x=>x).length,u=a.booleans.filter(x=>!x).length,C=a.numbers.length?a.numbers.reduce((x,S)=>x+=S,0):void 0,g={sum:C,average:typeof C=="number"?C/a.numbers.length:void 0,min:a.numbers.length?Math.min(...a.numbers):void 0,max:a.numbers.length?Math.max(...a.numbers):void 0,count:a.numbers.length+a.booleans.length+a.dates.length+a.others.length,isTrue:d>0?d:void 0,isFalse:u>0?u:void 0,earliest:a.dates.length?new Date(Math.min(...c)):void 0,latest:a.dates.length?new Date(Math.max(...c)):void 0},E=(x,S)=>(S==="sum"||S==="average")&&typeof x=="number"?x.toFixed(2):(S==="earliest"||S==="latest")&&x instanceof Date?x.toLocaleDateString():String(x),y=[];return Object.keys(g).forEach(x=>{const S=x,F=g[S];F!==void 0&&y.push({type:S,value:F,formattedValue:E(F,S)})}),y},Vt=f.withIdHOC($);Vt.displayName="KendoReactGrid",Object.defineProperty(m,"getSelectedState",{enumerable:!0,get:()=>b.getSelectedState}),Object.defineProperty(m,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>b.getSelectedStateFromKeyDown}),Object.defineProperty(m,"setSelectedState",{enumerable:!0,get:()=>b.setSelectedState}),m.GRID_COL_INDEX_ATTRIBUTE=U,m.GRID_PREVENT_SELECTION_ELEMENT=ui,m.GRID_ROW_INDEX_ATTRIBUTE=bt,m.Grid=Vt,m.GridCell=Mt,m.GridClassComponent=$,m.GridColumn=q,m.GridColumnMenuCheckboxFilter=je,m.GridColumnMenuColumnsList=Bt,m.GridColumnMenuFilter=$e,m.GridColumnMenuFilterCell=Ue,m.GridColumnMenuFilterUI=Kt,m.GridColumnMenuGroup=Ve,m.GridColumnMenuItem=j,m.GridColumnMenuItemContent=qe,m.GridColumnMenuItemGroup=re,m.GridColumnMenuSort=ge,m.GridColumnMenuWrapper=He,m.GridCommonDragLogic=Gt,m.GridDetailRow=Hi,m.GridEditCell=vt,m.GridFilterCell=Te,m.GridGroupCell=Pe,m.GridHeaderCell=Et,m.GridHierarchyCell=Ct,m.GridNoRecords=ue,m.GridRow=zt,m.GridSelectionCell=mt,m.GridToolbar=Wt,m.StatusBar=Tt,m.booleanFilterValues=Re,m.cellBoolDropdownChange=Be,m.cellInputChange=Ae,m.cellOperatorChange=We,m.filterGroupByField=se,m.getStatusData=_i,m.gridMessages=w,m.leafColumns=Pt,m.operators=_e,m.pagerFirstPage=lt,m.pagerInfo=st,m.pagerItemPerPage=ht,m.pagerLastPage=at,m.pagerNextPage=nt,m.pagerPreviousPage=ot,m.rootFilterOrDefault=fe,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
package/index.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const rs=require("react"),p=require("prop-types"),f=require("@progress/kendo-react-common"),b=require("@progress/kendo-react-data-tools"),E=require("@progress/kendo-react-intl"),w=require("@progress/kendo-svg-icons"),M=require("@progress/kendo-react-inputs"),Be=require("@progress/kendo-react-dateinputs"),is=require("@progress/kendo-react-popup"),B=require("@progress/kendo-react-buttons"),ie=require("@progress/kendo-react-dropdowns"),ue=require("@progress/kendo-data-query"),os=require("@progress/kendo-react-animation");function ns(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const n=ns(rs),j=r=>null;j.displayName="KendoReactGridColumn";j.defaultProps={filterable:!0,editable:!0,sortable:!0,resizable:!0,reorderable:!0,groupable:!0};j.propTypes={field:p.string,title:p.string,editable:p.bool,sortable:p.oneOfType([p.bool,p.shape({allowUnsort:p.bool.isRequired})]),cell:p.any,filterCell:p.any,filterTitle:p.string,filterable:p.bool,filter:p.oneOf(["text","numeric","boolean","date"]),editor:p.oneOf(["text","numeric","boolean","date"]),width:p.oneOfType([p.string,p.number]),minResizableWidth:p.number,headerCell:p.any,footerCell:p.any,headerSelectionValue:p.bool,format:p.string,headerClassName:p.string,className:p.string,reorderable:p.bool,resizable:p.bool,orderIndex:p.number,groupable:p.bool,columnMenu:p.any,locked:p.bool};function L(r,t){const s=(r||"").split(".");let o=t;return s.forEach(e=>{o=o?o[e]:void 0}),o}function ut(r,t,s,o,e,i,l=0){let a=l;for(let c=0;c<t.length;c++){if(!e||t[c].value===void 0||t[c].items===void 0){r[r.length]={dataIndex:o.index,dataItem:t[c],rowType:"data",level:l,expanded:i===void 0||L(i,t[c])},o.index++;continue}a=Math.max(a,l+1);const h=i===void 0||L(i,t[c])===void 0||L(i,t[c]);r[r.length]={dataIndex:-1,dataItem:t[c],level:l,rowType:"groupHeader",expanded:h},h&&(a=Math.max(ut(r,t[c].items,s,o,e,i,l+1),a)),(s==="always"||h&&s==="visible")&&(r[r.length]={dataIndex:-1,dataItem:t[c],rowType:"groupFooter",level:l,expanded:h})}return a}function gt(r,t,s,o=0){let e=[];if(!r)return[];r&&r.length===void 0&&(r=[r]),r.forEach((l,a)=>{l=l.props?l.props:l;const c=t[a]||null,h=gt(l.children,c&&c.children||[],s,o+1);e.push(Object.assign({depth:o},j.defaultProps,h.length?{cell:()=>null,filterCell:()=>null}:{},c?{width:c.width,orderIndex:c.orderIndex}:{},l,{id:l.id?l.id:b.tableKeyboardNavigationTools.generateNavigatableId(`${s.prevId++}`,s.idPrefix,"column"),declarationIndex:e.length,children:h,rowSpan:0,colSpan:0,isAccessible:!0,left:c&&Math.floor(c.left),right:c&&Math.floor(c.right)}))});const i=(l,a)=>l.orderIndex===a.orderIndex?l.declarationIndex-a.declarationIndex:(l.orderIndex||0)-(a.orderIndex||0);if(e.sort(i),o===0){let l=[];const a=(c,h)=>c.forEach(d=>{d.parentIndex=h,a(d.children,l.push(d)-1)});return a(e,-1),l}return e}function ls(r,t,s,o){let e=[];Array.isArray(r)?e=r:r&&(e=r.data);const i=[];if(e.length>0){let l=e[0];if(t)for(let c=0;c<t.length;c++)l=l.items&&l.items[0];Object.getOwnPropertyNames(l).forEach(c=>{c!==s&&i.push(Object.assign({id:b.tableKeyboardNavigationTools.generateNavigatableId(`${o.prevId++}`,o.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},j.defaultProps,{field:c}))})}return i}const as=(r,t)=>{let s=r[t.parentIndex];for(;s;){if(s.footerCell)return!0;s=r[s.parentIndex]}return!1},cs=r=>r.filter(t=>as(r,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),Se=r=>r.width!==void 0?Math.floor(parseFloat(r.width.toString()))+"px":void 0,ft=r=>(r.sort((t,s)=>t.declarationIndex-s.declarationIndex),r.map(t=>{const{declarationIndex:s,parentIndex:o,depth:e,colSpan:i,rowSpan:l,index:a,kFirst:c,children:h,...d}=t;return h.length?{children:ft(h),...d}:d})),Ie=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),ct=17895697,fe=(r,t)=>{if(!(!r&&!t))return t?r?{...r,...t,select:{...r.select||{},...t.select||{}},hierarchy:{...r.hierarchy||{},...t.hierarchy||{}},group:{...r.group||{},...t.group||{}},edit:{...r.edit||{},...t.edit||{}}}:t:r},ye="grid.noRecords",mt="grid.pagerInfo",Ct="grid.pagerFirstPage",bt="grid.pagerPreviousPage",vt="grid.pagerNextPage",xt="grid.pagerLastPage",kt="grid.pagerItemsPerPage",hs="grid.pagerPage",ds="grid.pagerPageSizeAriaLabel",ps="grid.pagerOf",us="grid.pagerTotalPages",we="grid.groupPanelEmpty",Et="grid.groupColumn",St="grid.ungroupColumn",Re="grid.columnMenu",K="grid.filterClearButton",oe="grid.filterSubmitButton",ne="grid.filterTitle",Ne="grid.sortAscending",Fe="grid.sortDescending",De="grid.searchPlaceholder",Te="grid.filterCheckAll",Ge="grid.filterChooseOperator",Me="grid.filterSelectedItems",ze="grid.sortAriaLabel",Le="grid.filterAriaLabel",Oe="grid.groupPanelAriaLabel",It="grid.groupExpand",yt="grid.groupCollapse",wt="grid.detailExpand",Rt="grid.detailCollapse",le="grid.selectRow",I={[wt]:"Expand detail row",[Rt]:"Collapse detail row",[It]:"Expand group",[yt]:"Collapse Group",[ye]:"No records available",[we]:"Drag a column header and drop it here to group by that column",[K]:"Clear",[oe]:"Filter",[ne]:"Filter",[Ne]:"Sort Ascending",[Fe]:"Sort Descending",[ze]:"Sortable",[Et]:"Group Column",[St]:"Ungroup Column",[Re]:"Column menu",[kt]:"items per page",[mt]:"{0} - {1} of {2} items",[Ct]:"Go to the first page",[bt]:"Go to the previous page",[vt]:"Go to the next page",[xt]:"Go to the last page",[hs]:"Page",[ds]:"Page size",[ps]:"of",[us]:"{0}",[De]:"Search",[Te]:"Check All",[Ge]:"Choose Operator",[Me]:"selected items",[Le]:"Filter",[Oe]:"Group panel",[le]:"Select Row","grid.filterEqOperator":"Is equal to","grid.filterNotEqOperator":"Is not equal to","grid.filterIsNullOperator":"Is null","grid.filterIsNotNullOperator":"Is not null","grid.filterIsEmptyOperator":"Is empty","grid.filterIsNotEmptyOperator":"Is not empty","grid.filterStartsWithOperator":"Starts with","grid.filterContainsOperator":"Contains","grid.filterNotContainsOperator":"Does not contain","grid.filterEndsWithOperator":"Ends with","grid.filterGteOperator":"Is greater than or equal to","grid.filterGtOperator":"Is greater than","grid.filterLteOperator":"Is less than or equal to","grid.filterLtOperator":"Is less than","grid.filterIsTrue":"Is true","grid.filterIsFalse":"Is false","grid.filterBooleanAll":"(All)","grid.filterAfterOrEqualOperator":"Is after or equal to","grid.filterAfterOperator":"Is after","grid.filterBeforeOperator":"Is before","grid.filterBeforeOrEqualOperator":"Is before or equal to","grid.filterAndLogic":"And","grid.filterOrLogic":"Or"};function gs(r){const t=r.replace(/^pager\.([a-z])/,(s,o)=>"grid.pager"+o.toUpperCase());return{messageKey:t,defaultMessage:I[t]}}const Nt=r=>{const t=E.useLocalization(),s=n.useCallback(m=>{r.selectionChange&&r.selectionChange({syntheticEvent:m})},[r.selectionChange]),o=f.useId(),e=L(r.field,r.dataItem),i=b.useTableKeyboardNavigation(r.id),l={colSpan:r.colSpan,style:r.style,className:r.className,"aria-colindex":r.ariaColumnIndex,role:"gridcell",...i},a=typeof e=="boolean"&&e,c=n.createElement("span",{key:1,className:"k-checkbox-wrap"},n.createElement("input",{id:o,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(le,I[le]),"aria-checked":a,checked:a,onChange:s})),h=r.rowType!=="groupHeader"?n.createElement("td",{...l},c):null,d=r.rowType||"data",u=r.cells;if(u&&u.select&&u.select[d]){const m=u.select[d];return n.createElement(m,{...r,tdProps:l},c)}return r.render?r.render.call(void 0,h,r):h},Ft=r=>{let t=null,s=null,o=null;const e=L(r.field,r.dataItem),i=b.useTableKeyboardNavigation(r.id),l=E.useLocalization(),a=n.useCallback(d=>{d.isDefaultPrevented()||d.keyCode===f.Keys.enter&&r.onChange&&(d.preventDefault(),r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:d,field:r.field,value:!e}))},[r.dataItem,r.dataIndex,r.field,r.onChange,e]);if(r.rowType==="groupFooter")s={className:"k-table-td k-hierarchy-cell",role:"gridcell",...i},t=n.createElement("td",{...s});else if(r.rowType!=="groupHeader"){const d=e?Rt:wt,u=l.toLanguageString(d,I[d]);s={className:"k-table-td k-hierarchy-cell",onKeyDown:a,"aria-expanded":!!e,role:"gridcell","aria-colindex":r.ariaColumnIndex,...i},o=n.createElement("a",{onClick:m=>{m.preventDefault(),r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:m,field:r.field,value:!e})},"aria-label":u,href:"#",tabIndex:-1},n.createElement(f.IconWrap,{name:e?"minus":"plus",icon:e?w.minusIcon:w.plusIcon})),t=n.createElement("td",{...s},o)}const c=r.rowType||"data",h=r.cells;if(h&&h.hierarchy&&h.hierarchy[c]){const d=h.hierarchy[c];return n.createElement(d,{...r,tdProps:s},o)}return r.render?r.render.call(void 0,t,r):t},Dt=b.TABLE_ROW_INDEX_ATTRIBUTE,U=b.TABLE_COL_INDEX_ATTRIBUTE,fs=b.TABLE_PREVENT_SELECTION_ELEMENT,Tt=r=>{const t=L(r.field,r.dataItem);let s=null;const o=f.classNames("k-table-td","k-grid-edit-cell",{["k-selected"]:r.isSelected},r.className),e=f.useId(),i=b.useTableKeyboardNavigation(r.id);let l=null,a=null;const c=n.useCallback(g=>{if(r.onChange){const x=g.target.type==="checkbox"?g.target.checked:g.target.value;r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g,value:x})}},[r.onChange,r.dataItem,r.dataIndex,r.field]),h=n.useCallback(g=>{r.onContextMenu&&r.onContextMenu.call(void 0,g,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),d=n.useCallback(g=>{r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g.syntheticEvent,value:g.value})},[r.onChange,r.dataItem,r.dataIndex,r.field]);switch(r.editor){case"numeric":{l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=n.createElement(M.NumericTextBox,{width:"100%",value:t===void 0?null:t,onChange:d}),s=n.createElement("td",{...l},a);break}case"date":l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=n.createElement(Be.DatePicker,{width:"100%",value:t,onChange:d}),s=n.createElement("td",{...l},a);break;case"boolean":l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=[n.createElement("span",{key:1,className:"k-checkbox-wrap"},n.createElement("input",{checked:t||!1,id:e,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",onChange:c})),n.createElement("label",{className:"k-checkbox-label",htmlFor:e,key:2})],s=n.createElement("td",{...l},a);break;default:l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=n.createElement("input",{style:{width:"100%"},className:"k-input",value:t||"",onChange:c}),s=n.createElement("td",{...l},a)}const u=r.editor||"text",m=r.cells;if(m&&m.edit&&m.edit[u]){const g=m.edit[u];return n.createElement(g,{...r,tdProps:l},a)}return r.render?r.render.call(void 0,s,r):s};class ms extends n.Component{constructor(){super(...arguments),this.headerWrap=null,this.table=null,this.syncScroll=!1,this.scrollbarWidth=f.getScrollbarWidth(),this.onScroll=t=>{if(this.syncScroll){this.syncScroll=!1;return}if(!this.headerWrap)return;const s=this.headerWrap.scrollLeft,o=this.props.scrollableDataElement();o&&o.scrollLeft!==s&&(o.scrollLeft=s)}}get element(){return this.props.elemRef.current}componentDidMount(){const t=b.isRtl(this.element);this.props.columnResize&&this.props.columnResize.setIsRtl(t),this.forceUpdate()}setScrollLeft(t){this.headerWrap&&this.headerWrap.scrollLeft!==t&&(this.syncScroll=!0,this.headerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?n.createElement("div",{ref:this.props.elemRef,className:f.classNames("k-grid-header",{"k-grid-draggable-header":this.props.draggable}),role:"presentation"},n.createElement("div",{ref:t=>{this.headerWrap=t},className:"k-grid-header-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},onScroll:this.onScroll,role:"presentation"},n.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-header-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},n.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupHeader=t}},this.props.cols),n.createElement("thead",{className:"k-table-thead",role:"rowgroup",...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)))):n.createElement("thead",{role:"presentation",className:f.classNames("k-table-thead",{"k-grid-draggable-header":this.props.draggable}),...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)}}const Gt=(...r)=>Object.assign({allowUnsort:!0,mode:"single"},...r);class Cs extends n.PureComponent{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.pressHandler&&this.props.pressHandler(t.event,s)},this.onDrag=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.dragHandler&&this.props.dragHandler(t.event,s)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.releaseHandler&&this.props.releaseHandler(t.event)}}render(){return n.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,hint:this.props.dragClue,autoScroll:{boundaryElementRef:this.props.headerRef,direction:{horizontal:!0,vertical:!1}},scrollContainer:this.props.containerRef||void 0,ref:t=>{this.draggable=t}},n.createElement("tr",{className:"k-table-row",style:{touchAction:"none"},role:"row","aria-rowindex":this.props.ariaRowIndex},this.props.children))}}class We extends n.Component{constructor(){super(...arguments),this.state={show:!1},this._anchor=null,this._content=null,this.blurTimeout=void 0,this.willBlur=!1,this.blur=()=>{if(this.willBlur){this.willBlur=!1;return}clearTimeout(this.blurTimeout),this.blurTimeout=window.setTimeout(()=>{this.closeMenu()})},this.focus=()=>{clearTimeout(this.blurTimeout)},this.anchorClick=t=>{t.preventDefault(),this.state.show&&this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!this.state.show},()=>this.state.show&&this._content&&this._content.focus())},this.closeMenu=()=>{this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!1})},this.onAnchorMouseDown=t=>{this.willBlur=this.state.show&&t.currentTarget===this._anchor},this.onAnchorKeyDown=t=>{var s;if(t.keyCode===f.Keys.tab){const o=t.target,e=o&&((s=o.closest(".k-grid"))==null?void 0:s.getElementsByClassName("k-grid-content")[0]);e&&e.scrollWidth>e.clientWidth&&o.scrollIntoView({inline:"center"})}}}render(){const{columnMenu:t,...s}=this.props,{column:o}=this.props,e=E.provideLocalizationService(this),i=o.title||o.field,l=i?`${i} `:"";return n.createElement(n.Fragment,null,n.createElement("a",{className:"k-grid-header-menu k-grid-column-menu",ref:a=>this._anchor=a,onClick:this.anchorClick,onMouseDown:this.onAnchorMouseDown,onKeyDown:this.onAnchorKeyDown,href:"#","aria-label":`${l}${e.toLanguageString(Re,I[Re])}`},n.createElement(f.IconWrap,{name:"filter",icon:w.filterIcon})),n.createElement(is.Popup,{anchor:this._anchor,show:this.state.show,popupClass:"k-column-menu k-column-menu-popup k-grid-columnmenu-popup"},n.createElement("div",{ref:a=>this._content=a,tabIndex:0,onBlur:this.blur,onFocus:this.focus,style:{outline:"none"}},t&&n.createElement(t,{...s,onCloseMenu:this.closeMenu}))))}}class Mt extends n.Component{render(){const{columnMenuWrapperProps:t}=this.props,s=this.props.onClick?{onClick:this.props.onClick}:{},o=n.createElement("span",{className:"k-cell-inner"},n.createElement("span",{className:f.classNames("k-link",{"!k-cursor-default":!this.props.columnMenuWrapperProps.sortable}),...s},n.createElement("span",{className:"k-column-title"},this.props.title||this.props.field||" "),this.props.children),t.columnMenu&&n.createElement(We,{...t}));return this.props.render?this.props.render.call(void 0,o,this.props):o}}const bs={true:{asc:"desc",desc:"","":"asc"},false:{asc:"desc",desc:"asc","":"asc"}},vs={none:"none",asc:"ascending",desc:"descending"};class zt extends n.Component{constructor(t){super(t),this.serviceIndex=0,this.index=-1,this.cellKeyDown=(s,o)=>{s.isDefaultPrevented()||s.keyCode===f.Keys.enter&&this.cellClick(s,o)},this.cells=s=>s.map(o=>{const e=this.props.columns[o],i=this.props.sortable&&e.sortable,l=this.props.sort?this.props.sort.findIndex(S=>S.field===e.field):-1,a=l>=0&&this.props.sort[l].dir||"none",c=e.columnMenu===null?null:e.columnMenu||this.props.columnMenu,h=f.classNames({"k-first":e.kFirst,"k-filterable":!!c,"k-table-th":!0,"k-header":!0,"k-grid-header-sticky":e.locked,"k-sorted":this.props.sort&&this.props.sort.some(S=>S.field===e.field)},e.headerClassName),d=e.left!==void 0?this.props.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},u=E.provideLocalizationService(this).toLanguageString(ze,I[ze]);let m=e.isAccessible?{ariaSort:vs[a],role:"columnheader",ariaColumnIndex:e.ariaColumnIndex,ariaSelected:!1,ariaDescription:i?u:""}:{role:"presentation"};const g=e.declarationIndex>=0?++this.index:--this.serviceIndex,x=e.headerCell?e.headerCell:Mt,y=n.createElement(x,{key:1,field:e.field,onClick:i&&(S=>this.cellClick(S,e))||void 0,selectionChange:this.props.selectionChange,title:e.title,selectionValue:e.headerSelectionValue,render:this.props.cellRender,children:this.sortIcon(l),columnMenuWrapperProps:{column:{field:e.field,title:e.title,locked:e.locked,filter:e.filter,id:e.id},sortable:i&&this.props.sortable,sort:this.props.sort,onSortChange:this.props.sortChange,filter:this.props.filter,filterable:this.props.filterable&&e.filterable,filterOperators:this.props.filterOperators,onFilterChange:this.props.filterChange,group:this.props.group,groupable:this.props.groupable,onGroupChange:this.props.groupChange,columnMenu:c}}),v={...m,key:g,colSpan:e.colSpan,rowSpan:e.rowSpan,className:h,style:d,columnId:e.id,navigatable:e.navigatable,onKeyDown:i&&(S=>this.cellKeyDown(S,e))||void 0,role:"columnheader"},k=[y,this.props.columnResize&&this.props.columnResize.resizable&&e.resizable&&n.createElement(b.ColumnResizer,{key:2,resize:(S,_,z)=>this.props.columnResize&&this.props.columnResize.dragHandler(S,e,_,z),autofit:S=>this.props.columnResize&&this.props.columnResize.dblClickHandler(S,[e.id])})],R=fe(this.props.cells,e.cells);if(R&&R.headerCell){const S=R.headerCell;return n.createElement(S,{key:g,thProps:v,index:o},k)}return n.createElement(b.HeaderThElement,{...v,key:g},k)}),this.cellClick=this.cellClick.bind(this)}cellClick(t,s){if(t.preventDefault(),!this.props.sortChange)return;const{allowUnsort:o,mode:e}=Gt(this.props.sortable||!1,s.sortable||!1),i=(this.props.sort||[]).filter(c=>c.field===s.field)[0],l=bs[o][i&&i.dir||""],a=e==="single"?[]:(this.props.sort||[]).filter(c=>c.field!==s.field);l!==""&&s.field&&a.push({field:s.field,dir:l}),this.props.sortChange(a,t)}sortIcon(t){return this.props.sort?t>=0&&[n.createElement("span",{key:1,className:"k-sort-icon"},n.createElement(f.IconWrap,{name:"sort-"+this.props.sort[t].dir+"-small",icon:this.props.sort[t].dir==="asc"?w.sortAscSmallIcon:w.sortDescSmallIcon})),this.props.sort.length>1&&n.createElement("span",{key:2,className:"k-sort-icon"},n.createElement("span",{className:"k-sort-order"},t+1))]:null}render(){return this.serviceIndex=0,this.index=-1,this.props.columnsMap.map((t,s)=>this.props.pressHandler&&n.createElement(Cs,{key:s,pressHandler:this.props.pressHandler,dragHandler:this.props.dragHandler,releaseHandler:this.props.releaseHandler,ariaRowIndex:s+1,dragClue:this.props.dragClue,headerRef:this.props.headerRef,containerRef:this.props.containerRef},this.cells(t))||n.createElement("tr",{key:s,className:"k-table-row",role:"row","aria-rowindex":s+1},this.cells(t)))}}E.registerForLocalization(zt);const xs=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],He={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},H=r=>r==="isnull"||r==="isnotnull"||r==="isempty"||r==="isnotempty",se=(r,t)=>r.map(s=>({text:t.toLanguageString(s.text,I[s.text]),operator:s.operator})),ks="eq",Ke=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],Es={text:!1,numeric:!1,date:!1,boolean:!0},Ve=(r,t,s)=>{const o=Lt(s.operators);let e=s.operator;switch(s.filterType){case"numeric":(!e||H(e))&&(e=o),r===null&&e===o&&(e="");break;case"date":(!e||H(e))&&(e=o),r===null&&e===o&&(e="");break;case"text":(!e||H(e))&&(e=o),!r&&e===o&&(e="");break;default:return}s.onChange({value:r,operator:e,syntheticEvent:t})},Lt=(r,t)=>t?r[t][0].operator:r[0].operator,_e=r=>r||"text",qe=(r,t)=>{const s=r.target.value;t({value:s.operator,operator:s.operator===""?"":ks,syntheticEvent:r.syntheticEvent})},Ue=(r,t,s)=>{let o=t;const e=r.target.value;r.target.state.opened&&(H(e.operator)&&(o=null),t===null&&!H(e.operator)&&(o=void 0),s({value:o,operator:e.operator,syntheticEvent:r.syntheticEvent}))};class $e extends n.Component{constructor(t){super(t),this._inputRef=n.createRef(),this.renderOperatorEditor=s=>{if(this.props.filterType==="boolean")return;const o=this.props.operators.find(e=>e.operator===this.props.operator)||null;return n.createElement(ie.DropDownList,{size:this.props.size,value:o,onChange:this.operatorChange,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",svgIcon:w.filterIcon,data:this.props.operators,textField:"text",title:s.toLanguageString(Ge,I[Ge]),popupSettings:{width:""}})},this.inputChange=this.inputChange.bind(this),this.clear=this.clear.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){const t=E.provideLocalizationService(this),s=n.createElement("div",{className:"k-filtercell"},n.createElement("div",{className:"k-filtercell-wrapper"},this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues),n.createElement("div",{className:"k-filtercell-operator"},this.renderOperatorEditor(t)," ",n.createElement(B.Button,{size:this.props.size,icon:"filter-clear",svgIcon:w.filterClearIcon,className:f.classNames({"k-clear-button-visible":!!(!(this.props.value===null||this.props.value==="")||this.props.operator)}),title:t.toLanguageString(K,I[K]),type:"button",onClick:this.clear,disabled:!(!(this.props.value===null||this.props.value==="")||this.props.operator)}))));return this.props.render?this.props.render.call(void 0,s,this.props):s}inputChange(t,s){Ve(t,s,this.props)}operatorChange(t){Ue(t,this.props.value,this.props.onChange)}boolDropdownChange(t){qe(t,this.props.onChange)}clear(t){t.preventDefault(),this.props.onChange({value:"",operator:"",syntheticEvent:t}),this._inputRef.current&&(this._inputRef.current.element.value="",setTimeout(()=>{this._inputRef.current.element.focus()},0))}filterComponent(t,s,o){switch(t){case"numeric":return n.createElement(M.NumericTextBox,{ref:this._inputRef,size:this.props.size,value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"date":return n.createElement(Be.DatePicker,{ref:this._inputRef,size:this.props.size,value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"boolean":{const e=i=>i==null;return n.createElement(ie.DropDownList,{ref:this._inputRef,size:this.props.size,onChange:this.boolDropdownChange,value:o.find(i=>i.operator===(e(s)?"":s)),data:o,textField:"text",title:this.props.title,ariaLabel:this.props.ariaLabel})}default:return n.createElement(M.TextBox,{ref:this._inputRef,size:this.props.size,value:s||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)},title:this.props.title,"aria-label":this.props.ariaLabel})}}}E.registerForLocalization($e);const Ss="k-table-row k-filter-row";class Ot extends n.Component{headerCellClassName(t,s){let o=`${s?"k-grid-header-sticky":""}`;return this.props.sort&&this.props.sort.filter(e=>e.field===t).length>0&&(o+=" k-sorted"),o}setFilter(t,s,o,e){if(!this.props.filterChange)return;const i=[];(t!==""&&t!==null||s!=="")&&i.push({field:o,operator:s,value:t}),this.props.filter&&this.props.filter.filters&&(this.props.filter.filters||[]).forEach(c=>{const h=c;h&&h.field!==o&&i.push(h)});const l=this.props.filter&&this.props.filter.logic?this.props.filter.logic:"and";this.props.filterChange(i.length>0?{logic:l,filters:i}:null,e)}render(){const t=E.provideLocalizationService(this),s=this.props.filter&&this.props.filter.filters||[],o=a=>{if(a===void 0)return;const c=s.filter(h=>h.field===a);return c.length?c[0]:void 0};let e=0,i=-1;const l=this.props.columns.filter(a=>a.children.length===0).map(a=>{const c=_e(a.filter),h=o(a.field),d=a.filterable?t.toLanguageString(Le,I[Le]):void 0;let u=h&&h.value;u===void 0&&(u=c==="text"?"":null);const m=a.filterable&&{render:this.props.cellRender,field:a.field,title:a.filterTitle,value:u,operator:h&&h.operator,operators:se(this.props.filterOperators[c]||[],t),booleanValues:se(Ke,t),filterType:c,ariaLabel:d,onChange:S=>{this.setFilter(S.value,S.operator,a.field,S.syntheticEvent)}},g=a.declarationIndex>=0?++i:--e,x={ariaLabel:d,ariaColumnIndex:a.ariaColumnIndex},y=a.left!==void 0?this.props.isRtl?{left:a.right,right:a.left}:{left:a.left,right:a.right}:{},v={columnId:b.tableKeyboardNavigationTools.getFilterColumnId(a.id),navigatable:a.navigatable,style:y,className:f.classNames("k-table-th",this.headerCellClassName(a.field,a.locked)||void 0),role:"columnheader",...x},k=m&&(a.filterCell?n.createElement(a.filterCell,{...m}):n.createElement($e,{size:this.props.size,...m})),R=fe(this.props.cells,a.cells);if(R&&R.filterCell){const S=R.filterCell;return n.createElement(S,{key:g,...m,thProps:v,index:i},k)}return n.createElement(b.HeaderThElement,{key:g,...v},k)});return n.createElement("tr",{className:Ss,"aria-rowindex":this.props.ariaRowIndex,role:"row"},l)}}E.registerForLocalization(Ot);class Ht extends n.Component{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.onPress&&this.props.onPress(t.event,s)},this.onDrag=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.onDrag&&this.props.onDrag(t.event,s)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.onRelease&&this.props.onRelease(t.event)},this.sortChange=t=>{if(t.preventDefault(),this.props.onSortChange){const s=this.props.dir==="asc"?"desc":"asc";this.props.onSortChange(t,s)}},this.groupRemove=t=>{t.preventDefault(),t.stopPropagation(),this.props.onRemove&&this.props.onRemove(t)},this.onContextMenu=t=>{const s={title:this.props.title,dir:this.props.dir,index:this.props.index};this.props.onContextMenu&&this.props.onContextMenu.call(void 0,t,{dataItem:{...s}})}}render(){const{dir:t}=this.props;return n.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:s=>{this.draggable=s}},n.createElement("div",{className:"k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",onClick:this.sortChange,onContextMenu:this.onContextMenu,role:"button",style:{touchAction:"none"}},n.createElement("span",null,n.createElement(f.IconWrap,{name:"sort-"+t+"-small",icon:t==="asc"?w.sortAscSmallIcon:w.sortDescSmallIcon,size:"small"})),n.createElement("span",{className:"k-chip-content"},this.props.title),n.createElement("span",{className:"k-chip-actions"},n.createElement("span",{className:"k-chip-action k-chip-remove-action",onClick:this.groupRemove},n.createElement(f.IconWrap,{name:"x-circle",icon:w.xCircleIcon,size:"small"})))))}}E.registerForLocalization(Ht);class _t extends n.Component{constructor(){super(...arguments),this.onGroupRemove=(t,s)=>{const o=this.props.group.slice();o.splice(s,1),this.props.groupChange(o,t)},this.onGroupSortChange=(t,s,o,e)=>{const i=Object.assign({},o,{dir:e}),l=this.props.group.slice();l.splice(s,1,i),this.props.groupChange(l,t)}}render(){const s=(this.props.group||[]).map((o,e)=>n.createElement(Ht,{key:e,index:e,dir:o.dir||"asc",title:this.props.resolveTitle(o.field),onRemove:i=>{this.onGroupRemove(i,e)},onSortChange:(i,l)=>{this.onGroupSortChange(i,e,o,l)},onPress:this.props.pressHandler,onDrag:this.props.dragHandler,onRelease:this.props.releaseHandler,onContextMenu:this.props.onContextMenu}));return n.createElement("div",{ref:this.props.refCallback,className:"k-grouping-header",role:"toolbar","aria-label":E.provideLocalizationService(this).toLanguageString(Oe,I[Oe]),"aria-controls":this.props.ariaControls||""},n.createElement("div",{className:"k-chip-list k-chip-list-md",role:"none"},s),n.createElement("div",{className:"k-grouping-drop-container"},!s.length&&E.provideLocalizationService(this).toLanguageString(we,I[we])," "))}}E.registerForLocalization(_t);class Is extends n.Component{constructor(){super(...arguments),this.footerWrap=null,this.table=null,this.scrollbarWidth=f.getScrollbarWidth()}componentDidMount(){this.setState({})}setScrollLeft(t){this.footerWrap&&(this.footerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?n.createElement("div",{className:"k-grid-footer",role:"presentation"},n.createElement("div",{ref:t=>{this.footerWrap=t},className:"k-grid-footer-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},role:"presentation"},n.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-footer-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},n.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupFooter=t},role:"presentation"},this.props.cols),n.createElement("tfoot",{className:"k-table-tfoot",role:"presentation"},this.props.row)))):n.createElement("tfoot",{className:"k-table-tfoot"},this.props.row)}}class ys{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=n.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=n.createRef(),this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(n.version),this.topItems=(s,o)=>{if(!this.container||o)return{topItemsCount:0,topItemsHeight:0};const e=this.container.clientHeight,i=Math.ceil(e/s[0].line),l=Math.ceil((s.length-i)/2);let a=0;for(let c=0;c<l;c++)a+=s[c].line+s[c].acc;return{topItemsCount:l,topItemsHeight:a,itemsNeededOnScreen:i+i/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,t&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}get rowHeights(){const t=[],s=this.tableBodyRef.current&&this.tableBodyRef.current.children||[];let o=0;for(let e=0;e<s.length;e++){if(s[e].className.indexOf("k-grouping-row")>-1){o+=s[e].scrollHeight;continue}s[e].className.indexOf("k-detail-row")>-1?t[t.length-1].line+=s[e].scrollHeight:(t.push({line:s[e].scrollHeight,acc:o}),o=0)}return t}changePage(t,s){this.attendedSkip=t-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,t-this.topCacheCount),take:this.pageSize},s)}translate(t,s){this.tableTranslate=t,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||s?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(t){if(!this.container)return;const s=this.rowHeights,o=this.container.scrollTop;let e=this.tableTranslate,i=0;const{topItemsCount:l,topItemsHeight:a,itemsNeededOnScreen:c}=this.topItems(s,!!this.topCacheCount),h=o-e;if(!(h>a||s.length<=c)){for(;i<this.topCacheCount+this.attendedSkip-this.realSkip+l&&this.propsSkip-i>0&&!(e+(s[s.length-1-i].line+s[s.length-1-i].acc)+h<=o);)e-=s[s.length-1-i].line+s[s.length-1-i].acc,i++;if(i===0&&this.topCacheCount===0&&this.attendedSkip>0&&(e=Math.max(e-s[0].line,0),i=1),this.propsSkip-i<=0&&e>o){this.translate(0),this.changePage(0,t),this.container.scrollTop=0;return}if(e>o&&(e=o),e!==this.tableTranslate){this.translate(Math.max(0,e-a));const d=Math.max(0,this.propsSkip-i-l);this.changePage(d,t)}}}localScrollDown(t){if(!this.container)return;const s=this.rowHeights,o=this.container.scrollTop;let e=this.tableTranslate,i=0;const{topItemsCount:l,topItemsHeight:a,itemsNeededOnScreen:c}=this.topItems(s,!!this.topCacheCount);for(;i<s.length-this.topCacheCount&&!(e+s[i].line+s[i].acc>o);)e+=s[i].line+s[i].acc,i++;l>this.propsSkip+i||s.length<=c||(i>=s.length-this.topCacheCount&&this.propsSkip+i>=this.total?(this.translate(e-a),this.changePage(this.total-1-l,t)):e!==this.tableTranslate&&this.propsSkip+i-l!==this.propsSkip&&(this.translate(e-a),this.changePage(this.propsSkip+i-l,t)))}scrollNonStrict(t){const s=this.total*this.prevScrollPos/this.containerHeight;let o=Math.floor(s);o>=this.total&&(o=this.total-1);const e=Math.min(s-o,1);let i=0;const l=o-this.propsSkip,a=this.rowHeights;l>=0&&l<=1?i=-((a[0].line+a[0].acc)*e):l===-1&&(i=-((a[a.length-1].line+a[a.length-1].acc)*e));const{topItemsCount:c,topItemsHeight:h}=this.topItems(a,!!this.topCacheCount);this.translate(Math.max(0,i-h-this.horizontalScrollbarHeight()+this.containerHeight*s/this.total)),this.changePage(o-c,t)}scrollHandler(t){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const s=this.container.scrollTop,o=this.prevScrollPos;if(this.prevScrollPos=s,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,t),this.prevScrollPos=s,this.askedSkip=void 0;return}s-o<0&&s>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(t):s-o>0&&s<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(t):this.scrollNonStrict(t),this.prevScrollPos=s}}class ht{constructor(t=0,s,o,e){this.total=t,this.offsets=[],this.heights=[];let i=0;for(let l=0;l<t;l++){this.offsets.push(i);const a=e&&e[l].expanded&&e[l].rowType==="data"?o:s;i+=a,this.heights.push(a)}}height(t){return this.heights[t]}index(t){if(t<0)return;const s=this.offsets.reduce((o,e,i)=>{if(o!==void 0)return o;if(e===t)return i;if(e>t)return i-1},void 0);return s===void 0?this.total-1:s}offset(t){return this.offsets[t]}totalHeight(){const t=this.offsets[this.offsets.length-1],s=this.heights[this.heights.length-1];return t+s}}class dt{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=n.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=n.createRef(),this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(n.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}translate(t,s){this.scrollableVirtual&&this.table&&(Ie||this.reactVersion<=17||s?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,s){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},s)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef.current)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const s=this.container.scrollTop,o=this.lastScrollTop>=s,e=!o;this.lastScrollTop=s;let i=this.rowHeightService.index(s),l=this.rowHeightService.offset(i);const{offsetHeight:a}=this.containerRef.current,c=this.rowHeightService.index(s+a);if(e&&c>=this.lastLoaded&&this.lastLoaded<this.total){const h=i+this.pageSize-this.total;h>0&&(i=i-h,l=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(l);let d=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(d,this.total),this.changePage(this.firstLoaded,t)}else if(o&&i<this.firstLoaded){const h=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-h,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}const ws=1,Rs=20;class Ns{constructor(t){this.columns=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=s=>{this.isRtl=s},this.dragHandler=(s,o,e,i)=>{const l=s.originalEvent;i||(l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation());const a=e.closest("th");if(!a||!a)return;const c=a.clientWidth;let h=c;if(this.isRtl?h+=e.getBoundingClientRect().right-e.offsetWidth/2-s.clientX:h+=s.clientX-e.getBoundingClientRect().left-e.offsetWidth/2,!i&&Math.abs(h-c)<1)return;this.fixateInitialWidths(a.parentElement.clientWidth),this.setWidths(o,Math.floor(h)/c);const d=this.columns.filter(u=>!u.children.length).findIndex(u=>u.id===o.id);this.onResize(d,c,h,l,i,o.id)},this.dblClickHandler=(s,o)=>{const e=this.columns.filter(m=>o.indexOf(m.id)>-1);if(!this.colGroupMain||!e.length)return;const i={},l=e;for(;l.length>0;){const m=l.pop();if(!m)break;m.children.length?l.push(...m.children):i[m.id]=m}const a=this.columns.filter(m=>!m.children.length),c=[];a.forEach((m,g)=>{i[m.id]&&c.push(g)});const h=[this.colGroupMain.parentElement],d=[this.colGroupMain];this.colGroupHeader&&(h.push(this.colGroupHeader.parentElement),d.push(this.colGroupHeader)),this.colGroupFooter&&(h.push(this.colGroupFooter.parentElement),d.push(this.colGroupFooter)),h.forEach(m=>m.classList.add("k-autofitting"));let u=[];d.forEach(m=>{c.forEach(g=>{m.children[g]&&(m.children[g].width="",u[g]=Math.max(u[g]||0,m.children[g].offsetWidth+ws))})}),d.forEach(m=>{c.forEach(g=>{m.children[g]&&(m.children[g].width=u[g]+"px",a[g].width=u[g])})}),h.forEach(m=>m.classList.remove("k-autofitting")),this.onResize(c[0],0,0,s,!0,o[0])},this.updateColElements=s=>{const o=this.columns.filter(i=>!i.children.length);let e=1e-10;for(let i=0;i<s.length;i++){const l=s[i],a=o.findIndex(u=>u.id===l.id),c=parseFloat((l.width||0).toString()),h=Math.floor(c);e+=c-h;const d=h+Math.floor(e);if(e-=Math.floor(e),this.colGroupMain&&this.colGroupMain.children[a]){const u=parseInt(this.colGroupMain.children[a].width,10);this.colGroupMain.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupMain.parentElement,l,u-d)}if(this.colGroupHeader&&this.colGroupHeader.children[a]){const u=parseInt(this.colGroupHeader.children[a].width,10);this.colGroupHeader.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupHeader.parentElement,l,u-d)}if(this.colGroupFooter&&this.colGroupFooter.children[a]){const u=parseInt(this.colGroupFooter.children[a].width,10);this.colGroupFooter.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupFooter.parentElement,l,u-d)}}},this.onResize=t}fixateInitialWidths(t){const s=this.columns.filter(l=>!l.children.length);let o=0,e=this.colGroupMain?this.colGroupMain.children:[];for(let l=0;l<e.length;l++)e[l].width?t-=parseFloat(e[l].width):o++;if(o===0)return;const i=Math.floor(t/o);for(let l=0;l<e.length;l++){const a=e[l];a.width||(a.width=i,s[l].width=i.toString(),this.colGroupHeader&&(this.colGroupHeader.children[l].width=i),this.colGroupFooter&&(this.colGroupFooter.children[l].width=i))}}setWidths(t,s){const o=this.columns.findIndex(l=>l.id===t.id),e=[];let i=t.children.length;for(let l=o+1;i>0&&l<this.columns.length;l++,i--){const a=this.columns[l];a.children.length?i+=a.children.length:e.push(a)}return e.length===0&&e.push(t),e.forEach(l=>{let a=l.width?parseFloat(l.width.toString())*s:0;const c=l.minResizableWidth===void 0?10:l.minResizableWidth;a<c&&(a=c),l.width=a}),this.updateColElements(e),e}updateNextLockedCol(t,s,o){const e=s.index,i=this.colGroupMain.parentElement.closest(".k-grid"),l=i==null?void 0:i.clientWidth,a=this.columns.filter(c=>c.locked).map(c=>parseInt(c.width+"",10)).reduce((c,h)=>c+h,0);!s.locked||l<=a+Rs||this.columns.forEach(c=>{if(c!=null&&c.locked&&o){const h=t==null?void 0:t.querySelectorAll('[aria-colindex="'+c.ariaColumnIndex+'"]');h==null||h.forEach(d=>{const u=d.style;this.isRtl?(c.index>e&&u&&u.right&&(u.right=parseInt(u.right,10)-o+"px"),c.index<e&&u&&u.left&&(u.left=parseInt(u.left,10)-o+"px")):(c.index>e&&u&&u.left&&(u.left=parseInt(u.left,10)-o+"px"),c.index<e&&u&&u.right&&(u.right=parseInt(u.right,10)-o+"px"))})}})}}class Pt{constructor(t,s,o){this.refDragElementClue=n.createRef(),this.refDropElementClue=n.createRef(),this.columns=[],this.reorderable=!1,this.groupable=!1,this.startColumn=-1,this.startGroup=-1,this.currentColumn=-1,this.currentGroup=-1,this.groupPanelDivElement=null,this.refGroupPanelDiv=e=>{this.groupPanelDivElement=e&&e.children?e.children[0]:e},this.pressHandler=(e,i)=>{const l=this.getColumnIndex(e,i);if(this.startGroup=this.getGroupIndex(e),l>=0){const a=this.columns[l];(a.reorderable&&this.reorderable||a.groupable&&this.groupable)&&(this.startColumn=l)}},this.dragHandler=(e,i)=>{if(e.isTouch||e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),this.startColumn===-1&&this.startGroup===-1)return;this.currentColumn=this.getColumnIndex(e,i);const l=this.groupPanelDivElement&&this.groupPanelDivElement.children;this.currentGroup=this.isTargetGroupingContainer(e)?l&&l.length?l.length:0:this.getGroupIndex(e);const a=!this.isValid();a&&(this.currentColumn=-1,this.currentGroup=-1);const c=this.currentColumn>=0?i.children[this.columns[this.currentColumn].index]:this.isTargetGroupingContainer(e)?e.originalEvent.target:this.groupPanelDivElement&&this.groupPanelDivElement.children[this.currentGroup];this.updateDragElementClue(e,i,c,a),this.updateDropElementClue(e,i,c,a)},this.releaseHandler=e=>{const i=this.startColumn,l=this.currentColumn,a=this.startGroup,c=this.currentGroup;e.originalEvent.preventDefault(),this.dropElementClue&&this.dropElementClue.setState({visible:!1}),this.dragElementClue&&this.dragElementClue.setState({visible:!1});const h=this.isValid();this.startColumn=this.startGroup=this.currentColumn=this.currentGroup=-1,h&&(i>=0&&l>=0?this.columnReorder(i,l,e.originalEvent):a>=0&&c>=0?this.groupReorder(a,c,e.originalEvent):i>=0&&c>=0&&this.columnToGroup(i,c,e.originalEvent))},this.columnReorder=t,this.groupReorder=s,this.columnToGroup=o}get dragClueRef(){return this.refDragElementClue}get dropClueRef(){return this.refDropElementClue}get dragElementClue(){return this.refDragElementClue.current}get dropElementClue(){return this.refDropElementClue.current}getColumnIndex(t,s){if(!s||s.parentElement===this.groupPanelDivElement)return-1;const o=b.getIndex(t,s);if(o===-1)return-1;for(let e=0;e<s.parentNode.children.length;e++)if(s.parentNode.children[e]===s)return this.columns.findIndex(i=>i.index===o&&i.depth===e);return-1}isTargetGroupingContainer(t){const s=t.originalEvent.target;return s.className.indexOf?s.className.indexOf("k-grouping-drop-container")!==-1:!1}getGroupIndex(t){return b.getIndex(t,this.groupPanelDivElement)}isValid(){return this.startGroup>=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:this.startColumn===-1?!1:this.currentGroup>=0?this.columns[this.startColumn].groupable===!0&&this.groupable===!0:this.reorderable===!0&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&this.columns[this.startColumn].reorderable===!0&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex}updateDragElementClue(t,s,o,e){if(!this.dragElementClue)return;const i=this.startColumn>=0?s.children[this.columns[this.startColumn].index].innerText:s.innerText;this.dragElementClue.setState({visible:!0,top:t.pageY+10,left:t.pageX,innerText:i,status:e||!o?"k-i-cancel":"k-i-plus"})}updateDropElementClue(t,s,o,e){if(!this.dropElementClue)return;if(e||!o){this.dropElementClue.setState({visible:!1});return}const i=o.getBoundingClientRect(),a=(o.closest(".k-grouping-header")||o).getBoundingClientRect();let c=i.left+t.pageX-t.clientX-6;!this.isTargetGroupingContainer(t)&&(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&this.startGroup!==-1)&&(c+=i.width);const h=a.top+t.pageY-t.clientY;this.dropElementClue.setState({visible:!0,top:h,left:c,height:this.currentColumn>=0?s.clientHeight:a.height})}}const At=r=>{let t=null;const s=E.useInternationalization(),o=b.useTableKeyboardNavigation(r.id),e=n.useCallback(h=>{r.onContextMenu&&r.onContextMenu.call(void 0,h,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]);let i=null,l=null;if(r.rowType==="groupFooter")i={onContextMenu:e,className:r.className},t=n.createElement("td",{...i});else if(r.rowType!=="groupHeader"){if(r.field!==void 0){const d=L(r.field,r.dataItem);d!=null&&(l=r.format?s.format(r.format,d):d.toString())}const h=f.classNames("k-table-td",r.className,{"k-selected":r.isSelected});i={onContextMenu:e,colSpan:r.colSpan,style:r.style,className:h,role:"gridcell","aria-colindex":r.ariaColumnIndex,"aria-selected":r.isSelected,[U]:r.columnIndex,...o},t=n.createElement("td",{...i},l)}const a=r.rowType||"data",c=r.cells;if(c&&c[a]){const h=c[a];return n.createElement(h,{...r,tdProps:i},l)}return r.render?r.render.call(void 0,t,r):t},Pe=r=>{let t=null;const{columnIndex:s,level:o,columnsCount:e,rowType:i,dataItem:l,field:a,onChange:c,expanded:h,render:d,dataIndex:u,ariaColumnIndex:m,isRtl:g}=r,x=a||"",y=b.useTableKeyboardNavigation(r.id),v=E.useLocalization();let k=null,R=null,S=null;const _=n.useCallback(T=>{T.isDefaultPrevented()||T.keyCode===f.Keys.enter&&c&&(T.preventDefault(),c({dataItem:l,dataIndex:u,syntheticEvent:T,field:void 0,value:!h}))},[h,c,l,u]),z=n.useCallback(T=>{r.onContextMenu&&r.onContextMenu.call(void 0,T,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),ce=(T,be)=>{const he=h?yt:It,ve=v.toLanguageString(he,I[he]);return k={className:"k-table-td",style:{...r.style,...be},colSpan:T,key:"g-colspan",role:"gridcell",["aria-selected"]:!1,["aria-expanded"]:h,["aria-colindex"]:m,onKeyDown:_,onContextMenu:z,...y},S=n.createElement("p",{className:"k-reset"},n.createElement("a",{onClick:Q=>{Q.preventDefault(),c&&c({dataItem:l,dataIndex:u,syntheticEvent:Q,field:void 0,value:!h})},href:"#",tabIndex:-1,"aria-label":ve},n.createElement(f.IconWrap,{name:h?"caret-alt-down":g?"caret-alt-left":"caret-alt-right",icon:h?w.caretAltDownIcon:g?w.caretAltLeftIcon:w.caretAltRightIcon})),l[x]instanceof Date&&l[x].toString?l[x].toString():l[x]),n.createElement("td",{...k,key:k.key},S)};s===void 0||o===void 0||s<o||e===void 0||i!=="groupHeader"||l[x]===void 0?(k={style:r.style,key:"g"+s,className:f.classNames("k-table-td","k-group-cell",{"k-grid-content-sticky":r.locked}),role:"gridcell",onContextMenu:z},t=n.createElement("td",{...k,key:k.key})):s<=o&&!r.locked?t=ce(e-s,{}):s<=o&&r.locked&&(R={className:"k-table-td",role:"gridcell",colSpan:e-s,style:{borderLeftWidth:0,borderRightWidth:0},onContextMenu:z},t=n.createElement(n.Fragment,null,ce(0,{position:"sticky",zIndex:2}),n.createElement("td",{...R})));const Y=r.rowType||"data",V=r.cells;if(V&&V.group&&V.group[Y]){const T=V.group[Y];return n.createElement(T,{...r,tdProps:k,td2Props:R},S)}return d?d.call(void 0,t,r):t};class Bt extends n.Component{render(){const t=f.classNames("k-table-row",{"k-table-group-row k-grouping-row":this.props.rowType==="groupHeader","k-group-footer":this.props.rowType==="groupFooter","k-master-row":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter","k-table-alt-row k-alt":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter"&&this.props.isAltRow,"k-selected":this.props.isSelected,"k-grid-edit-row":this.props.isInEdit}),s=n.createElement("tr",{id:this.props.id,onClick:this.props.onClick,onDoubleClick:this.props.onDoubleClick,className:t,style:{height:this.props.rowHeight?this.props.rowHeight+"px":"",visibility:this.props.isHidden?"hidden":""},role:"row","aria-rowindex":this.props.ariaRowIndex,"absolute-row-index":this.props.absoluteRowIndex,key:this.props.absoluteRowIndex,[Dt]:this.props.rowType==="data"?this.props.dataIndex:void 0},this.props.children);return this.props.render?this.props.render.call(void 0,s,this.props):s}}class Wt extends n.Component{get _inputId(){return this.props.id}render(){const t=E.provideLocalizationService(this),{columnMenuWrapperProps:s}=this.props,o=[n.createElement("span",{key:0,className:"k-checkbox-wrap"},n.createElement("input",{id:this._inputId,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(le,I[le]),"aria-checked":this.props.selectionValue,checked:this.props.selectionValue,onChange:e=>this.props.selectionChange({field:this.props.field,syntheticEvent:e})})),s.columnMenu&&n.createElement(We,{...s})];return this.props.render?this.props.render.call(void 0,o,this.props):o}}E.registerForLocalization(Wt);const Fs=f.withIdHOC(Wt);class me extends n.Component{render(){return this.props.children||E.provideLocalizationService(this).toLanguageString(ye,I[ye])}}me.displayName="KendoReactGridNoRecords";E.registerForLocalization(me);class Ds extends n.Component{constructor(){super(...arguments),this._element=null,this.renderCell=(t,s)=>{const o={colSpan:t.colSpan!==1?t.colSpan:void 0,style:t.left!==void 0?this.props.isRtl?{left:t.right,right:t.left}:{left:t.left,right:t.right}:{},className:f.classNames("k-table-td",t.locked&&t.left!==void 0?"k-grid-footer-sticky":""),key:s,role:"gridcell",["aria-colindex"]:t.ariaColumnIndex},e={field:t.field,ariaColumnIndex:t.ariaColumnIndex,...o},i=fe(this.props.cells,t.cells);if(i&&i.footerCell){const l=i.footerCell;return n.createElement(l,{...e,tdProps:o,index:s})}return t.footerCell&&n.createElement(t.footerCell,{...e,key:s})||n.createElement("td",{...o})}}get element(){return this._element}render(){return n.createElement("tr",{className:"k-table-row",role:"row","aria-rowindex":this.props.ariaRowIndex},cs(this.props.columns).map(this.renderCell))}}const Ts=({buttonCount:r=10,info:t=!0,type:s="numeric",pageSizes:o=void 0,previousNext:e=!0,responsive:i=void 0,pageSizeValue:l=void 0})=>({buttonCount:r,info:t,pageSizes:o===!0?[5,10,20]:o||void 0,previousNext:e,responsive:i!==!1,type:s,pageSizeValue:l}),Gs=r=>Ts(r===!0?{}:r),pt={name:"@progress/kendo-react-grid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},Ms=r=>{const{colSpan:t,ariaColIndex:s,dataItem:o,dataIndex:e,id:i}=r,l=b.useTableKeyboardNavigation(i),a=n.useCallback(c=>{r.onContextMenu&&r.onContextMenu.call(void 0,c,r.dataItem)},[r.onContextMenu,r.dataItem]);return n.createElement("td",{onContextMenu:a,className:"k-table-td k-detail-cell",colSpan:t,"aria-colindex":s,role:"gridcell",...l},n.createElement(r.detail,{dataItem:o,dataIndex:e}))},zs=r=>{const t=b.useTableKeyboardNavigation(r.id);return n.createElement("td",{className:"k-table-td k-hierarchy-cell",...t,role:"gridcell"})};let X=class extends n.Component{constructor(t){super(t),this._columns=[],this._columnsMap=[[]],this._columnsMutations=0,this._resized=!1,this._shouldUpdateLeftRight=!0,this.contextStateRef={current:void 0},this.navigationStateRef={current:void 0},this._data=[],this._slicedData=void 0,this.wrapperScrollTop=0,this.showLicenseWatermark=!1,this.headerRef=n.createRef(),this.headerElementRef=n.createRef(),this._element=null,this.tableElement=null,this.containerRef=n.createRef(),this.tableBodyRef=n.createRef(),this._footer=null,this.forceUpdateTimeout=void 0,this.isRtl=!1,this.observer=null,this.handleIntersection=e=>{const i={rowIndex:this.rowIndex};e.forEach(l=>{l.isIntersecting||this.setCurrentOnTop(i)})},this.setCurrentOnTop=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.observer&&this.observer.disconnect();const{rowIndex:i}=e;if(this.props.scrollable==="virtual")this.vs.askedSkip=i,this.vs.container.scroll(0,Math.round(this.vs.askedSkip/this.vs.total*this.vs.container.scrollHeight));else if(this.element){const l=i<1?this.element.querySelector("tbody > tr:nth-child(1)"):this.element.querySelector(`tbody > tr:nth-child(${i+1})`);l&&this.containerRef.current&&(this.containerRef.current.scrollTop=l.offsetTop)}},this.scrollIntoView=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.rowIndex=e.rowIndex;const{rowIndex:i}=e,l=this.element;if(this.observer&&l){this.observer.disconnect();const a=l.querySelector(`[absolute-row-index="${i}"]`);a?this.observer.observe(a):this.setCurrentOnTop(e)}},this.fitColumns=e=>{this.columnResize.dblClickHandler(null,e)},this.onContextMenu=(e,i,l)=>{if(this.props.onContextMenu){const a={target:this,syntheticEvent:e,nativeEvent:e.nativeEvent,dataItem:i,field:l};this.props.onContextMenu.call(void 0,a)}},this.getVirtualScroll=e=>{const{rowHeight:i,detailRowHeight:l,detail:a,expandField:c,groupable:h}=e,d=this.isAllData(),u=i!==void 0&&i>0,m=l!==void 0&&l>0,g=h===!0||typeof h=="object"&&h.enabled!==!1;return!u||g&&!d||!!(a&&c)&&(!m||!d)?ys:dt},this.isAllData=()=>{const{data:e,total:i}=this.props;return Array.isArray(e)?e.length===i:e?i===e.total:!1},this.initializeVirtualization=(e,i)=>{if(this.reInitVirtualization(this.props.scrollable==="virtual",this.props.total,this.props.filter,this.props.group,this.props.sort,i||this.props.rowHeight===void 0||this.props.rowHeight===0),this.vs.fixedScroll=this.props.fixedScroll||!1,this.vs.PageChange=this.pageChange,this.vs.realSkip=this.props.skip||0,this.vs.pageSize=(this.props.take!==void 0?this.props.take:this.props.pageSize)||0,this.vs.scrollableVirtual=this.props.scrollable==="virtual",this.vs.total=e,this.vs.propsSkip=(this.props.skip||0)+(this.props.scrollable==="virtual"?this.vs.topCacheCount+(this.vs.attendedSkip-(this.props.skip||0)):0),this.props.rowHeight!==void 0&&this.props.rowHeight>0&&!i){const l=this.props.rowHeight*e;this.vs.containerHeight=Ie?Math.min(ct,l):l}else this.vs.containerHeight=1533915;if(this.vs.containerRef=this.containerRef,this.vs.tableBodyRef=this.tableBodyRef,this.vs.table=this.tableElement,this._slicedData=void 0,this.vs instanceof dt){const{rowHeight:l=0,detail:a,expandField:c}=this.props;let{detailRowHeight:h=0}=this.props;h=a&&c?h:l,this.isAllData()?(this.vs.total=this._data.length,this._slicedData=this._data.slice(this.vs.realSkip,this.vs.realSkip+this.vs.pageSize),this.vs.rowHeightService=this.rowHeightService(this.vs,this._data.length,l,h,this._data)):this.vs.rowHeightService=new ht(e,l,h);const d=this.vs.rowHeightService.totalHeight();this.vs.containerHeight=Ie?Math.min(ct,d):d}},this.scrollHandler=e=>{if(e.target!==e.currentTarget)return;clearTimeout(this.forceUpdateTimeout),this.vs.table=this.tableElement;const i=e.currentTarget.scrollLeft,l=e.currentTarget.scrollTop;this.props.columnVirtualization&&(!this.vs.scrollableVirtual||l===this.wrapperScrollTop)&&(this.forceUpdateTimeout=window.setTimeout(()=>{this.forceUpdate()},0)),this._header&&this._header.setScrollLeft(i),this._footer&&this._footer.setScrollLeft(i),this.vs&&l!==this.wrapperScrollTop&&this.vs.scrollHandler(e),f.dispatchEvent(this.props.onScroll,e,this,void 0),this.wrapperScrollTop=l},this.onKeyDown=e=>{if(b.tableKeyboardNavigation.onKeyDown(e,{contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,onNavigationAction:this.onNavigationAction}),this.props.onKeyDown){const{mode:i,cell:l}=b.getSelectionOptions(this.props.selectable),a={dataItems:this.getLeafDataItems(),mode:i,cell:l,componentId:this._gridId,selectedField:this.props.selectedField,...this.getArguments(e)};this.props.onKeyDown.call(void 0,a)}},this.onFocus=e=>{b.tableKeyboardNavigation.onFocus(e,{contextStateRef:this.contextStateRef})},this.onNavigationAction=e=>{if(this.props.onNavigationAction){const i={focusElement:e.focusElement,...this.getArguments(e.event)};this.props.onNavigationAction.call(void 0,i)}},this.rowClick=(e,i)=>{this.props.onRowClick&&e.target.nodeName==="TD"&&this.props.onRowClick.call(void 0,{dataItem:i.dataItem,...this.getArguments(e)})},this.rowDblClick=(e,i)=>{this.props.onRowDoubleClick&&e.target.nodeName==="TD"&&this.props.onRowDoubleClick.call(void 0,{dataItem:i.dataItem,...this.getArguments(e)})},this.itemChange=e=>{const i=this.props.onItemChange;if(e.field===this.props.expandField||this.props.group&&e.field===void 0){const l=this.props.onExpandChange;l&&l.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,dataIndex:e.dataIndex,value:e.value});return}i&&i.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,field:e.field,value:e.value})},this.onHeaderSelectionChange=e=>{this.props.onHeaderSelectionChange&&this.props.onHeaderSelectionChange.call(void 0,{field:e.field,nativeEvent:e.syntheticEvent&&e.syntheticEvent.nativeEvent,syntheticEvent:e.syntheticEvent,target:this,dataItems:this.getLeafDataItems(),selectedField:this.props.selectedField})},this.selectionRelease=e=>{if(this.props.onSelectionChange){const i={syntheticEvent:void 0,target:this,selectedField:this.props.selectedField||"",componentId:this._gridId,dataItems:this.getLeafDataItems(),dataItem:null,...e};this.props.onSelectionChange.call(void 0,i)}},this.pageChange=(e,i,l)=>{this.raiseDataEvent(this.props.onPageChange,{page:e},{skip:e.skip,take:e.take},i,l)},this.pagerPageChange=e=>{this.pageChange({skip:e.skip,take:e.take},e.syntheticEvent,e.targetEvent)},this.sortChange=(e,i)=>{this.raiseDataEvent(this.props.onSortChange,{sort:e},{sort:e,...this.props.scrollable==="virtual"?{skip:0}:{}},i)},this.filterChange=(e,i)=>{this.raiseDataEvent(this.props.onFilterChange,{filter:e},{filter:e||void 0,skip:0},i)},this.groupChange=(e,i)=>{const l=i.nativeEvent?i:{nativeEvent:i.nativeEvent||i.originalEvent};this.raiseDataEvent(this.props.onGroupChange,{group:e},{group:e,skip:0},l)},this.onClipboard=(e,i)=>{if(this.props.onClipboard){if(!this.inActiveElement()||!e)return;this.props.onClipboard.call(void 0,{type:e,nativeEvent:i,columns:this._columns,dataItemKey:this.props.dataItemKey||"",...typeof this.props.clipboard!="boolean"?this.props.clipboard:{}})}},this.inActiveElement=()=>{var c,h,d;if(!f.canUseDOM)return!1;const e=f.getActiveElement(this.document),i=e?e.matches(".k-table-td")?e:(c=this.document)==null?void 0:c.body:(h=this.document)==null?void 0:h.body,l=i.closest(".k-grid-container"),a=i&&((d=this._element)==null?void 0:d.contains(i));return!!(i&&a&&l)},this.onResize=(e,i,l,a,c,h)=>{this.resetTableWidth(),this._shouldUpdateLeftRight=!0,this._resized=!0,this._columnsMutations++,this.props.onColumnResize&&this.props.onColumnResize.call(void 0,{columns:this.columns,nativeEvent:a,targetColumnId:h,index:e,newWidth:i,oldWidth:l,end:c,target:this})},this.reInitVirtualization=f.memoizeOne((e,i,l,a,c,h)=>{this.vs.reset();const d=this.getVirtualScroll(this.props);this.vs=new d(h)}),this.flatData=f.memoizeOne((e,i,l,a,c,h,d)=>{const u=[],m=ut(u,e,i,{index:l},a!==void 0,c);return{flattedData:u,resolvedGroupsCount:m}}),this.rowHeightService=f.memoizeOne((e,i,l,a,c)=>new ht(i,l,a,c)),this.childrenToArray=f.memoizeOne(e=>n.Children.toArray(e)),this.readColumns=f.memoizeOne((e,i,l)=>{const a=e.filter(c=>c&&c.type&&c.type.displayName==="KendoReactGridColumn");return gt(a,this.columns,{prevId:0,idPrefix:i})}),this.mapColumns=f.memoizeOne(e=>b.mapColumns(e)),this.configureColumns=f.memoizeOne((e,i,l)=>{this.props.selectedField&&e.filter(h=>h.field===this.props.selectedField).forEach(h=>{h.width=h.width||"50px",h.cell=h.cell||Nt,h.headerCell=h.headerCell||Fs});const a={id:"",resizable:!0,width:"32px",title:" ",declarationIndex:-1,orderIndex:-1,children:[],parentIndex:-1,depth:0,colSpan:0,rowSpan:0,left:0,right:0,index:0,rightBorder:!1,ariaColumnIndex:0,isAccessible:!0};let c=0;this.props.expandField&&this.props.onExpandChange&&this.props.detail&&(e.unshift({...a,cell:Ft,field:this.props.expandField,headerClassName:"k-hierarchy-cell k-header",id:b.tableKeyboardNavigationTools.generateNavigatableId(`${this._columns.length}`,l,"column")}),c++);for(let h=0;h<i;h++)e.unshift({...a,isAccessible:!1,cell:Pe,field:"value",locked:this.props.lockGroups}),c++;e.slice(c).forEach(h=>h.parentIndex>=0&&(h.parentIndex+=c))}),this.getHeaderRow=f.memoizeOne((e,i,l,a,c,h,d,u,m,g,x,y)=>n.createElement(zt,{cells:this.props.cells,sort:e,sortable:i,sortChange:this.sortChange,group:l||[],groupable:a,groupChange:this.groupChange,filter:c,filterable:h,filterOperators:d,filterChange:this.filterChange,columnMenu:m,selectionChange:this.onHeaderSelectionChange,columns:g,columnResize:this.columnResize,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,columnsMap:x,cellRender:u,isRtl:y,dragClue:this.dragLogic.dragClueRef,headerRef:this.headerElementRef,containerRef:this.containerRef})),this.resolveTitle=e=>{const i=this._columns.find(a=>a.field===e),l=i&&(i.title||i.field);return l===void 0?e:l},this.getLeafDataItems=()=>this._data.filter(e=>e.rowType==="data").map(e=>e.dataItem),f.validatePackage(pt),this.showLicenseWatermark=f.shouldShowValidationUI(pt);const s=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1,o=this.getVirtualScroll(t);this.vs=new o(s||t.rowHeight===void 0||t.rowHeight===0),this.dragLogic=new Pt(this.columnReorder.bind(this),this.groupReorder.bind(this),this.columnToGroup.bind(this)),this.columnResize=new Ns(this.onResize),this.props.clipboard&&(this.clipboardService=new b.ClipboardService(this.onClipboard)),b.tableKeyboardNavigation.onConstructor({navigatable:!!t.navigatable,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,idPrefix:this._gridId})}get columns(){const t=this._columns.filter(s=>s.declarationIndex>=0&&s.parentIndex===-1);return ft(t)}get element(){return this._element}get document(){if(f.canUseDOM)return this.element&&this.element.ownerDocument||document}get _header(){return this.headerRef.current}get _gridId(){return this.props.id+"-role-element-id"}componentDidMount(){this.resetTableWidth(),f.setScrollbarWidth();const t=b.isRtl(this.element);this.isRtl=t,b.tableKeyboardNavigation.onComponentDidMount({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),this.isRtl&&this.forceUpdate();const s={rootMargin:"0px",threshold:.9};this.clipboardService&&this.clipboardService.addEventListeners(this.document),this.observer=f.canUseDOM&&window.IntersectionObserver&&new window.IntersectionObserver(this.handleIntersection,s)||null}getSnapshotBeforeUpdate(){return b.tableKeyboardNavigation.onGetSnapshotBeforeUpdate({document:this.document,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),null}componentDidUpdate(){this.resetTableWidth(),f.setScrollbarWidth(),this.vs.tableTransform&&this.vs.table&&(this.vs.table.style.transform=this.vs.tableTransform,this.vs.tableTransform=""),b.tableKeyboardNavigation.onComponentDidUpdate({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}componentWillUnmount(){clearTimeout(this.forceUpdateTimeout),this.clipboardService&&this.clipboardService.removeEventListeners(this.document)}render(){var lt;let t=this.props.total||0;const s=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);let o=[];Array.isArray(this.props.data)?(o=this.props.data,t=t||this.props.data.length):this.props.data&&(o=this.props.data.data,t=t||this.props.data.total);const e=typeof this.props.groupable=="object"&&this.props.groupable.footer||"none",{resolvedGroupsCount:i,flattedData:l}=this.flatData(o,e,this.props.skip||0,this.props.group,this.props.expandField,this.props.filter,this.props.sort);this._data=l;const a=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1;this.columnResize.resizable=this.props.resizable||!1,this.dragLogic.reorderable=this.props.reorderable||!1,this.dragLogic.groupable=a;const c=this.props.selectable&&this.props.selectable.drag?"none":void 0;this.initializeVirtualization(t,a);const h=this.childrenToArray(this.props.children);this.initColumns(h,i);const d=h.map(C=>C&&C.type&&C.type.displayName==="KendoReactGridToolbar"?n.cloneElement(C,{...C.props,ariaControls:this._gridId}):null),u=h.filter(C=>C&&C.type&&C.type.displayName==="KendoReactGridNoRecords"),m=h.filter(C=>C&&C.type&&C.type.displayName==="KendoReactGridStatusBar"),g=this._columns.filter(C=>C.children.length===0),x=a&&n.createElement(_t,{group:this.props.group||[],groupChange:this.groupChange,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,refCallback:this.dragLogic.refGroupPanelDiv,resolveTitle:this.resolveTitle,ariaControls:this._gridId,onContextMenu:this.onContextMenu}),{sort:y,sortable:v,group:k,filter:R,filterable:S,filterOperators:_=He,headerCellRender:z,columnMenu:ce}=this.props,Y=n.createElement(ms,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",scrollableDataElement:()=>this.vs.container,draggable:this.props.reorderable||a,ref:this.headerRef,elemRef:this.headerElementRef,headerRow:this.getHeaderRow(y,v,k,a,R,S,_,z,ce,this._columns,this._columnsMap,this.isRtl),filterRow:this.props.filterable&&n.createElement(Ot,{cells:this.props.cells,size:this.props.size,columns:this._columns,filter:this.props.filter,filterOperators:this.props.filterOperators||He,filterChange:this.filterChange,sort:this.props.sort,cellRender:this.props.filterCellRender,isRtl:this.isRtl,ariaRowIndex:this._columnsMap.length+1})||void 0,cols:g.map((C,F)=>n.createElement("col",{key:F.toString(),width:Se(C)}))}),V=this.vs&&this.vs.container&&this.vs.container.scrollLeft||0,T=parseFloat(((this.props.style||{}).width||"").toString()),{colSpans:be,hiddenColumns:he}=b.tableColumnsVirtualization({enabled:this.props.columnVirtualization,columns:g,tableViewPortWidth:T,scrollLeft:V}),ve=(C,F,D)=>{let q=!1;const W=this.props.selectedField?L(this.props.selectedField,C.dataItem):void 0;return{row:g.map((N,G)=>{if(he[G])return null;const Z=N.id?N.id:G,ee=`${N.className?N.className+" ":""}${N.locked?"k-grid-content-sticky":""}`,P=N.left!==void 0?this.isRtl?{left:N.right,right:N.left}:{left:N.left,right:N.right}:{};let A=!1;if(N.editable&&this.props.editField){const O=L(this.props.editField,C.dataItem);O&&(O===!0||O===N.field)&&(q=!0,A=!0)}const Ee=N.cell||A&&Tt||At;return n.createElement(Ee,{onContextMenu:this.onContextMenu,key:Z,locked:this.props.lockGroups,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${F}-${String(G)}`,s),colSpan:be[G],dataItem:C.dataItem,field:N.field,editor:N.editor,format:N.format,className:ee,render:this.props.cellRender,cells:fe(this.props.cells,N.cells),onChange:this.itemChange,selectionChange:this.props.onSelectionChange?O=>{this.selectionChange({event:O,dataItem:C.dataItem,dataIndex:D,columnIndex:G})}:void 0,columnIndex:G,columnsCount:g.length,rowType:C.rowType,level:C.level,expanded:C.expanded,dataIndex:C.dataIndex,style:P,ariaColumnIndex:N.ariaColumnIndex,isSelected:Array.isArray(W)&&W.indexOf(G)>-1})}),isInEdit:q,isSelected:typeof W=="boolean"&&W}};let Q=0;if(this.props.scrollable==="virtual")for(let C=0;C<this.vs.topCacheCount+this.vs.attendedSkip-(this.props.skip||0);C++){const F=this._data.shift();if(F)this._data.push(F),Q++,F.rowType==="groupHeader"&&C--;else break}const Je=C=>C>=this._data.length-Q;let Ze=this.vs.realSkip||0;const de=[];let xe=!1;const ke=this._columnsMap.length+(this.props.filterable?1:0)+1,et=n.createElement("div",{key:"no-records",className:"k-grid-norecords","aria-rowindex":ke},n.createElement("div",{className:"k-grid-norecords-template"},u.length?u:n.createElement(me,null)));let J=0;if(this._data.length){let C=-1,F=0;(this._slicedData||this._data).forEach((D,q)=>{D.rowType==="data"&&(Ze++,C++);const W=Ze%2===0,N=this.props.dataItemKey&&f.getter(this.props.dataItemKey)(D.dataItem),G=q+(this.vs.realSkip||0),Z=N||"ai"+G,ee=Z+"_1",P=ve(D,Z,C);if(J=G+ke+F,de.push(n.createElement(Bt,{key:Z,dataItem:D.dataItem,isAltRow:W,isInEdit:P.isInEdit,rowType:D.rowType,isHidden:Je(q),onClick:A=>this.rowClick(A,D),onDoubleClick:A=>this.rowDblClick(A,D),selectedField:this.props.selectedField,rowHeight:this.props.rowHeight,render:this.props.rowRender,ariaRowIndex:J,absoluteRowIndex:G,dataIndex:C,isSelected:P.isSelected},P.row)),this.props.detail&&D.rowType==="data"&&D.expanded){const A=g.length-(this.props.expandField?1:0)-(this.props.group?this.props.group.length:0)||1;F++,J=G+ke+F,de.push(n.createElement("tr",{key:ee,className:f.classNames("k-table-row",W?"k-detail-row k-table-alt-row k-alt":"k-detail-row"),style:{visibility:Je(q)?"hidden":"",height:this.props.detailRowHeight},role:"row","aria-rowindex":J},this.props.group&&this.props.group.map((Ee,O)=>{var at;const te=(at=P==null?void 0:P.row[O])==null?void 0:at.props.style,ss=te?this.isRtl?{left:te.right,right:te.left}:{left:te.left,right:te.right}:{};return n.createElement(Pe,{id:"",dataIndex:D.dataIndex,field:Ee.field,dataItem:D.dataItem,key:O,style:ss,ariaColumnIndex:1+O,isSelected:!1,locked:this.props.lockGroups,isRtl:this.isRtl,cells:this.props.cells})}),this.props.expandField&&n.createElement(zs,{id:b.tableKeyboardNavigationTools.generateNavigatableId(`${ee}-dhcell`,s)}),n.createElement(Ms,{onContextMenu:this.onContextMenu,dataItem:D.dataItem,dataIndex:D.dataIndex,colSpan:A,ariaColIndex:2+(this.props.group?this.props.group.length:0),detail:this.props.detail,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${ee}-dcell`,s)})))}})}else xe=!0;const tt={size:this.props.size,onPageChange:this.pagerPageChange,total:t,dir:this.isRtl?"rtl":void 0,skip:this.vs.propsSkip||0,take:(this.props.take!==void 0?this.props.take:this.props.pageSize)||10,messagesMap:gs,...Gs(this.props.pageable||{})},st=this.props.pager?n.createElement(this.props.pager,{...tt}):n.createElement(b.Pager,{className:"k-grid-pager",...tt}),es=C=>this.props.sort&&this.props.sort.filter(F=>F.field===C).length>0,ts=(C,F)=>n.createElement("col",{key:F.toString(),width:Se(C)}),rt=(lt=this.props.cells)!=null&&lt.footerCell||this._columns.some(C=>{var F;return!!(C.footerCell||(F=C.cells)!=null&&F.footerCell)})?n.createElement(Is,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",ref:C=>this._footer=C,row:n.createElement(Ds,{cells:this.props.cells,columns:this._columns,isRtl:this.isRtl,ariaRowIndex:J+1}),cols:g.map(ts)}):null,it=n.createElement("colgroup",{ref:C=>{this.columnResize.colGroupMain=C}},g.map((C,F)=>n.createElement("col",{key:F.toString(),className:es(C.field)?"k-sorted":void 0,width:Se(C)}))),ot=this.dragLogic.reorderable||this.dragLogic.groupable,nt=this.props.columnVirtualization?"block":"table";if(this.props.scrollable==="none")return n.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},n.createElement("div",{id:this.props.id,style:this.props.style,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),ref:C=>{this._element=C},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,x,n.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:C=>{this.tableElement=C}},n.createElement("table",{className:f.classNames("k-table k-grid-table",{[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),style:{userSelect:c,display:nt}},it,Y,n.createElement("tbody",{role:"rowgroup",className:"k-table-tbody",...b.tableKeyboardNavigationBodyAttributes},de),rt)),xe&&et,ot&&n.createElement(n.Fragment,null,n.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),n.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue}))),m,this.props.pageable&&st);let pe=this.props.style||{};return this.props.scrollable==="virtual"&&(pe.height||(pe=Object.assign({},pe,{height:"450px"}))),n.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},n.createElement("div",{id:this.props.id,style:pe,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size,"k-grid-virtual":this.props.scrollable==="virtual"},this.props.className),ref:C=>{this._element=C},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,x,n.createElement("div",{className:"k-grid-aria-root",role:"grid","aria-colcount":g.length,"aria-rowcount":t,id:this._gridId},Y,n.createElement("div",{className:"k-grid-container",role:"presentation"},n.createElement("div",{ref:this.containerRef,className:"k-grid-content k-virtual-content",onScroll:this.scrollHandler,role:"presentation"},n.createElement("div",{className:"k-grid-table-wrap",role:"presentation"},n.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:C=>{this.tableElement=C}},n.createElement("table",{className:f.classNames("k-table k-grid-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),role:"presentation",style:{userSelect:c,display:nt}},it,n.createElement("tbody",{className:"k-table-tbody",ref:this.tableBodyRef,role:"rowgroup",...b.tableKeyboardNavigationBodyAttributes},de))),xe&&et),n.createElement("div",{className:"k-height-container",role:"presentation"},n.createElement("div",{style:this.props.scrollable==="virtual"?{height:this.vs.containerHeight+"px"}:{}})))),rt,ot&&n.createElement(n.Fragment,null,n.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),n.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue})),this.showLicenseWatermark&&n.createElement(f.WatermarkOverlay,null)),m,this.props.pageable&&st))}selectionChange(t){if(this.props.onSelectionChange){const{event:s,dataItem:o,dataIndex:e,columnIndex:i}=t,{mode:l,cell:a}=b.getSelectionOptions(this.props.selectable),c={...this.getArguments(s.syntheticEvent),dataItem:o,startColIndex:i,endColIndex:i,startRowIndex:e,endRowIndex:e,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:l,cell:a,isDrag:!1,componentId:this._gridId,selectedField:this.props.selectedField||""};this.props.onSelectionChange.call(void 0,c)}}raiseDataEvent(t,s,o,e,i){const l=this.props.onDataStateChange;if(t){const a={...this.getArguments(e),...s,targetEvent:i};t.call(void 0,a)}else l&&l.call(void 0,{...this.getArguments(e),targetEvent:i||{},dataState:{...this.getDataState(),...o}})}columnReorder(t,s,o){const e=this._columns[t],i=e.depth,l=d=>{do d++;while(d<this._columns.length&&this._columns[d].depth>i);return d},a=this._columns.splice(t,l(t)-t);this._columns.splice(t<s?l(s-a.length):s,0,...a),this._columns.filter(d=>d.declarationIndex>=0).forEach((d,u)=>d.orderIndex=u),this._columnsMutations++;const c=this._columns[t].locked&&this._columns[s].locked;b.updateLeft(this._columnsMap,this._columns,c||this._shouldUpdateLeftRight),b.updateRight(this._columnsMap,this._columns,c||this._shouldUpdateLeftRight),this._resized&&(this._shouldUpdateLeftRight=!1,this._resized=!1);const h=this.columns;if(this.forceUpdate(),this.props.onColumnReorder){const d={target:this,columns:h,columnId:e.id,nativeEvent:o};this.props.onColumnReorder.call(void 0,d)}}groupReorder(t,s,o){if(this.props.group===void 0)return;const e=this.props.group.slice();e.splice(s,0,...e.splice(t,1)),this.groupChange(e,o)}columnToGroup(t,s,o){const e=this._columns[t].field;if(!e)return;const i=(this.props.group||[]).slice();i.splice(s,0,{field:e}),this.groupChange(i,o)}resetTableWidth(){let t=0;if(!this.columnResize.colGroupMain)return;const s=this.columnResize.colGroupMain.children;for(let o=0;o<s.length;o++){const e=s[o].width;if(!e)return;t+=parseFloat(e.toString())}t=Math.round(t),this._header&&this._header.setWidth(t),this._footer&&this._footer.setWidth(t),this.tableElement&&(this.tableElement.style.width=t+"px")}initColumns(t,s){const o=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);this._columns=this.readColumns(t,o,this._columnsMutations),this._columns.length===0&&(this._columns=ls(this.props.data,this.props.group,this.props.expandField,{prevId:0,idPrefix:o})),this.configureColumns(this._columns,s,o),this._columnsMap=this.mapColumns(this._columns),this.columnResize.columns=this._columns,this.dragLogic.columns=this._columns}getDataState(){return{filter:this.props.filter,sort:this.props.sort,skip:this.props.skip,take:this.props.take!==void 0?this.props.take:this.props.pageSize,group:this.props.group}}getArguments(t){return{nativeEvent:t&&t.nativeEvent,syntheticEvent:t,target:this}}};X.displayName="KendoReactGrid";X.defaultProps={};X.propTypes={data:p.oneOfType([p.array,p.shape({data:p.array,total:p.number})]),sortable:p.oneOfType([p.bool,p.shape({mode:p.oneOf(["single","multiple"]),allowUnsort:p.bool})]),onSortChange:p.func,sort:p.array,filterable:p.bool,filter:p.any,onFilterChange:p.func,pageable:p.oneOfType([p.bool,p.shape({buttonCount:p.number,responsive:p.bool,info:p.bool,type:p.oneOf(["numeric","input"]),pageSizes:p.oneOfType([p.bool,p.arrayOf(p.oneOfType([p.string,p.number]))]),previousNext:p.bool})]),pageSize:p.number,onPageChange:p.func,total:p.number,skip:p.number,take:p.number,fixedScroll:p.bool,onExpandChange:p.func,expandField:p.string,selectedField:p.string,onSelectionChange:p.func,onHeaderSelectionChange:p.func,resizable:p.bool,reorderable:p.bool,group:p.any,groupable:p.oneOfType([p.bool,p.shape({enabled:p.bool,footer:p.oneOf(["always","visible","none"])})]),onGroupChange:p.func,onRowClick:p.func,onRowDoubleClick:p.func,onItemChange:p.func,editField:p.string,scrollable:p.oneOf(["none","scrollable","virtual"]),rowHeight:p.number,detailRowHeight:p.number,detail:p.any,style:p.object,onDataStateChange:p.func,onColumnResize:p.func,onColumnReorder:p.func,dataItemKey:p.string,navigatable:p.bool,size:p.oneOf(["small","medium"])};X.contextType=b.TableKeyboardNavigationContext;class ae extends n.Component{render(){const{children:t}=this.props;return n.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-wrapper",this.props.className),style:this.props.style},t)}}class $ extends n.Component{render(){const{title:t,iconClass:s,svgIcon:o,selected:e}=this.props;return n.createElement("div",{onClick:this.props.onClick,className:`k-columnmenu-item ${e?"k-selected":""}`},(s||o)&&n.createElement(f.IconWrap,{name:s&&f.toIconName(s),icon:o}),t)}}class je extends n.Component{constructor(){super(...arguments),this.onGroupClick=t=>{if(t.preventDefault(),this.props.onGroupChange){const{column:s}=this.props;if(!s.field)return;const o=(this.props.group||[]).slice(),e=o.findIndex(i=>i.field===s.field);e>-1?o.splice(e,1):o.push({field:s.field}),this.props.onGroupChange(o,t)}this.props.onCloseMenu&&this.props.onCloseMenu()}}render(){const{group:t,column:s}=this.props,o=E.provideLocalizationService(this),e=!!(t&&s.field&&t.find(l=>l.field===s.field)),i=e?St:Et;return n.createElement(ae,null,n.createElement($,{title:o.toLanguageString(i,I[i]),iconClass:e?"k-i-ungroup":"k-i-group",svgIcon:e?w.ungroupIcon:w.groupIcon,onClick:this.onGroupClick}))}}E.registerForIntl(je);E.registerForLocalization(je);const Kt="asc",Vt="desc",Ls={true:{asc:{asc:"",desc:"desc"},desc:{asc:"asc",desc:""},"":{asc:"asc",desc:"desc"}},false:{asc:{asc:"asc",desc:"desc"},desc:{asc:"asc",desc:"desc"},"":{asc:"asc",desc:"desc"}}},qt=(r,t)=>t?t.findIndex(s=>s.field===r):-1,Ut=(r,t)=>!!(t&&r>-1&&t[r].dir===Kt),$t=(r,t)=>!!(t&&r>-1&&t[r].dir===Vt);class Ce extends n.Component{constructor(){super(...arguments),this.onAscClick=t=>{this.onSort(t,Kt),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onDescClick=t=>{this.onSort(t,Vt),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onSort=(t,s)=>{if(t.preventDefault(),!this.props.onSortChange)return;const{column:o,sortable:e,sort:i}=this.props,{allowUnsort:l,mode:a}=Gt(e||!1,!1),c=(i||[]).filter(u=>u.field===o.field)[0],h=Ls[l][c&&c.dir||""][s],d=a==="single"?[]:(this.props.sort||[]).filter(u=>u.field!==o.field);h!==""&&o.field&&d.push({field:o.field,dir:h}),this.props.onSortChange(d,t)}}render(){const{sort:t,column:s}=this.props,o=qt(s.field,t),e=E.provideLocalizationService(this);return n.createElement(ae,null,n.createElement($,{title:e.toLanguageString(Ne,I[Ne]),iconClass:"k-i-sort-asc-sm",svgIcon:w.sortAscSmallIcon,selected:Ut(o,t),onClick:this.onAscClick}),n.createElement($,{title:e.toLanguageString(Fe,I[Fe]),iconClass:"k-i-sort-desc-sm",svgIcon:w.sortDescSmallIcon,selected:$t(o,t),onClick:this.onDescClick}))}}Ce.active=(r,t)=>{const s=qt(r,t);return $t(s,t)||Ut(s,t)};E.registerForIntl(Ce);E.registerForLocalization(Ce);class Xe extends n.Component{render(){return n.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-content",this.props.className),style:this.props.style},n.createElement(os.Reveal,{style:{position:"relative",display:"block"}},this.props.show?this.props.children:null))}}class Ae extends n.Component{constructor(t){super(t),this.renderOperatorEditor=()=>{if(this.props.filterType==="boolean")return;const s=this.props.operators.find(o=>o.operator===this.props.operator)||null;return n.createElement(ie.DropDownList,{value:s,onChange:this.operatorChange,data:this.props.operators,textField:"text"})},this.inputChange=this.inputChange.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){return n.createElement(n.Fragment,null,this.renderOperatorEditor(),this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues))}inputChange(t,s){Ve(t,s,this.props)}operatorChange(t){Ue(t,this.props.value,this.props.onChange)}boolDropdownChange(t){qe(t,this.props.onChange)}filterComponent(t,s,o){switch(t){case"numeric":return n.createElement(M.NumericTextBox,{value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},rangeOnEnter:!1});case"date":return n.createElement(Be.DatePicker,{value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)}});case"boolean":{const e=i=>i==null;return n.createElement(ie.DropDownList,{onChange:this.boolDropdownChange,value:o.find(i=>i.operator===(e(s)?"":s)),data:o,textField:"text"})}default:return n.createElement(M.Input,{value:s||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)}})}}}class jt extends n.Component{render(){const{firstFilterProps:t,hideSecondFilter:s,secondFilterProps:o,logicData:e,logicValue:i,onLogicChange:l}=this.props;return n.createElement(n.Fragment,null,n.createElement(Ae,{...t}),!s&&n.createElement(n.Fragment,null,n.createElement(ie.DropDownList,{data:e,value:i,onChange:l,className:"k-filter-and",textField:"text"}),n.createElement(Ae,{...o})))}}const ge=r=>r||{filters:[],logic:"and"},re=(r,t)=>ge(t).filters.filter(e=>ue.isCompositeFilterDescriptor(e)?e.filters&&e.filters.length&&e.filters.length<=2&&!e.filters.find(i=>ue.isCompositeFilterDescriptor(i)||i.field!==r):!1)[0]||null;class Ye extends n.Component{constructor(t){super(t),this.removeGroup=(o,e)=>{const i=[...e.filters],l=i.findIndex(a=>a===o);return l>-1&&i.splice(l,1),{...e,filters:i}},this.insertGroup=(o,e)=>({...e,filters:[o,...e.filters]}),this.isControlled=()=>this.props.expanded!==void 0,this.onFilterExpand=()=>{const o=this.isControlled(),e=!(o?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(e),o||this.setState({expanded:e})},this.firstFilterChange=o=>{this.filterChange(0,o)},this.secondFilterChange=o=>{this.filterChange(1,o)},this.filterChange=(o,e)=>{const i=this.state.filterGroup.filters.map((l,a)=>a===o?{...l,value:e.value,operator:e.operator}:l);this.setState({filterGroup:{...this.state.filterGroup,filters:i}})},this.logicChange=o=>{this.setState({filterGroup:{...this.state.filterGroup,logic:o.target.value.operator}})},this.clear=o=>{if(o.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,i=ge(this.props.filter),l=re(e,this.props.filter),a=i.filters.filter(c=>c!==l);a.length?this.props.onFilterChange({...i,filters:a},o):this.props.onFilterChange(null,o),this.props.onCloseMenu&&this.props.onCloseMenu()},this.currentFilterGroup=()=>({...this.state.filterGroup,filters:this.state.filterGroup.filters.filter(o=>o.value!==void 0&&o.value!==null&&o.value!==""||o.value===null&&o.operator)}),this.submit=o=>{if(o.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,i=ge(this.props.filter),l=re(e,this.props.filter),a=this.currentFilterGroup();let c=null;if(l&&a.filters.length>0){const h=i.filters.map(d=>d===l?a:d);c={...i,filters:h}}else if(a.filters.length===0){const h=i.filters.filter(d=>d!==l);h.length&&(c={...i,filters:h})}else c={...i,filters:[...i.filters,a]};this.props.onFilterChange(c,o),this.props.onCloseMenu&&this.props.onCloseMenu()};let s;if(t.column&&t.column.field){const o=_e(t.column.filter),e=Lt(t.filterOperators,o);s=re(t.column.field,t.filter),s=s?{...s,filters:s.filters.map(i=>({...i}))}:{logic:"and",filters:[{field:t.column.field,operator:e,value:H(e)?null:void 0},{field:t.column.field,operator:e,value:H(e)?null:void 0}]},s.filters.filter(i=>i.field===t.column.field).length===1&&s.filters.splice(1,0,{field:t.column.field,operator:e})}this.state={expanded:t.expanded||!1,filterGroup:s}}render(){const{column:t,filterUI:s,hideSecondFilter:o,filterOperators:e}=this.props;if(!t||!t.field)return n.createElement("div",null);const i=_e(t.filter),l=o!==void 0?o:Es[i],a=E.provideLocalizationService(this),c=this.state.filterGroup.filters,h=se(e[i],a),d=se(Ke,a),u={field:t.field,value:c[0].value,operator:c[0].operator,operators:h,booleanValues:d,onChange:this.firstFilterChange,filterType:i},m={field:t.field,value:c[1].value,operator:c[1].operator,operators:h,booleanValues:d,onChange:this.secondFilterChange,filterType:i},g=this.state.filterGroup.logic,x=se(xs,a),y={value:x.find(z=>z.operator===(g===null?"":g)),onChange:this.logicChange,data:x},v=s,k={firstFilterProps:u,secondFilterProps:m,logicData:y.data,logicValue:y.value,onLogicChange:y.onChange,hideSecondFilter:l},R=this.currentFilterGroup().filters.length!==0||H(c[0].operator)||H(c[1].operator),S=this.isControlled()?this.props.expanded:this.state.expanded,_=this.props.alwaysExpand;return n.createElement(ae,null,!_&&n.createElement($,{title:a.toLanguageString(ne,I[ne]),iconClass:"k-i-filter",svgIcon:w.filterIcon,onClick:this.onFilterExpand}),n.createElement(Xe,{show:_||!!S},n.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear,onKeyDown:z=>z.stopPropagation()},n.createElement("div",{className:"k-filter-menu-container"},v?n.createElement(v,{...k}):n.createElement(jt,{...k}),n.createElement("div",{className:"k-actions k-actions-stretched"},n.createElement(B.Button,{themeColor:"primary",disabled:!R},a.toLanguageString(oe,I[oe])),n.createElement(B.Button,{type:"reset"},a.toLanguageString(K,I[K])))))))}}Ye.active=(r,t)=>!!re(r,t);E.registerForLocalization(Ye);const Os=(r,t)=>r.length!==t.length?!1:r.every((s,o)=>s===t[o]);class Qe extends n.Component{constructor(t){super(t),this.defaultFilter=()=>this.props.filter?f.clone(this.props.filter):{filters:[],logic:"and"},this.isControlled=()=>this.props.expanded!==void 0,this.parseData=(s,o)=>{const e=this.props.column.field||"",i=s.map(l=>L(e,l));return o?i.filter((l,a)=>i.indexOf(l)===a):i},this.getFilterIndex=()=>{const s=this.props.column.field;return this.defaultFilter().filters.findIndex(i=>i.filters&&i.filters.length>0&&i.filters[0].field===s)},this.onFilterExpand=()=>{const s=this.isControlled(),o=!(s?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(o),s||this.setState({expanded:o})},this.handleSearchChange=s=>{const o=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",e={logic:"and",filters:[{field:this.props.column.field,operator:o,value:s.target.value,ignoreCase:!0}]};this.setState({value:s.target.value,data:this.parseData(ue.filterBy(this.props.data||[],e),this.props.uniqueData)})},this.handleClear=()=>{const s=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",o={logic:"and",filters:[{field:this.props.column.field,operator:s,value:"",ignoreCase:!0}]};this.setState({value:"",data:this.parseData(ue.filterBy(this.props.data||[],o),this.props.uniqueData)})},this.clear=s=>{if(s.preventDefault(),!this.props.onFilterChange)return;const o=this.state.currentFilter||null;o!==null&&o.filters.length>0?(this.compositeFilterIndex>=0&&o.filters.splice(this.compositeFilterIndex,1),this.props.onFilterChange(o,s)):this.props.onFilterChange(null,s),this.props.onCloseMenu&&this.props.onCloseMenu()},this.submit=s=>{if(s.preventDefault(),!this.props.onFilterChange)return;const o=this.state.currentFilter||null;this.props.onFilterChange(o,s),this.props.onCloseMenu&&this.props.onCloseMenu()},this.handleCheckBoxChange=(s,o)=>{const e=this.props.column.field||"",i={...this.state.currentFilter},l=[...this.state.currentFilter.filters];let a=[];if(this.compositeFilterIndex!==-1&&i.filters[this.compositeFilterIndex].filters&&o!=="all"&&(a=i.filters[this.compositeFilterIndex].filters),s.value&&o==="all")this.state.data.forEach(c=>{a.push({field:e,operator:"eq",value:c})});else if(s.value)a.push({field:e,operator:"eq",value:o});else if(this.state.currentFilter){const c=a.findIndex(h=>h.value===o);a.splice(c,1)}i.logic="and",this.compositeFilterIndex!==-1?l[this.compositeFilterIndex]={logic:"or",filters:a}:l.push({logic:"or",filters:a}),(!s.value&&o==="all"||a.length===0)&&l.splice(this.compositeFilterIndex,1),i.filters=l,this.setState({currentFilter:i})},this.isAllSelected=()=>{let s=!1;if(this.state.currentFilter){const o=[...this.state.currentFilter.filters];return this.compositeFilterIndex===-1?!1:(s=this.state.data.every(e=>this.compositeFilterIndex!==-1&&o[this.compositeFilterIndex].filters?o[this.compositeFilterIndex].filters.findIndex(l=>l.value===e)>=0:!1),s)}return s},this.compositeFilterIndex=this.getFilterIndex(),this.state={expanded:t.expanded||!1,value:"",data:this.parseData(this.props.data,this.props.uniqueData)||[],dataFromProps:this.parseData(this.props.data,!1)||[],currentFilter:this.defaultFilter()}}componentDidUpdate(){const t=this.props.column.field||"",s=this.props.data.map(o=>L(t,o));Os(s,this.state.dataFromProps)||this.setState({data:s,dataFromProps:s})}render(){const{column:t}=this.props;if(!t||!t.field)return n.createElement("div",null);const s=E.provideLocalizationService(this),o=this.isControlled()?this.props.expanded:this.state.expanded,e=[];if(this.state.currentFilter){const a=[...this.state.currentFilter.filters];this.compositeFilterIndex=a.findIndex(c=>c.filters&&c.filters.length>0?c.filters[0].field===t.field:!1),this.compositeFilterIndex!==-1&&a[this.compositeFilterIndex].filters.length>0&&a[this.compositeFilterIndex].filters.forEach(c=>{c.field===this.props.column.field&&e.push(c.value)})}const i=this.props.searchBox?n.createElement(this.props.searchBox,{value:this.state.value,onChange:this.handleSearchChange}):n.createElement("div",{className:"k-searchbox k-textbox k-input k-input-md k-input-solid"},n.createElement(f.IconWrap,{className:"k-input-icon",name:"search",icon:w.searchIcon}),n.createElement(M.Input,{className:"k-input-inner",type:"text",placeholder:s.toLanguageString(De,I[De]),value:this.state.value,onChange:a=>this.handleSearchChange(a.nativeEvent)}),n.createElement(B.Button,{type:"button",rounded:null,className:"k-input-button",onClick:this.handleClear,icon:"x",svgIcon:w.xIcon})),l=e.filter((a,c)=>e.indexOf(a)===c);return n.createElement(ae,null,n.createElement($,{title:s.toLanguageString(ne,I[ne]),iconClass:"k-i-filter",svgIcon:w.filterIcon,onClick:this.onFilterExpand}),n.createElement(Xe,{show:!!o},n.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear},n.createElement("div",{className:"k-filter-menu-container"},i,n.createElement("ul",{className:"k-reset k-multicheck-wrap"},n.createElement("li",{className:"k-item k-check-all-wrap"},n.createElement(M.Checkbox,{label:s.toLanguageString(Te,I[Te]),onChange:a=>this.handleCheckBoxChange(a,"all"),checked:this.isAllSelected()})),this.state.data.map((a,c)=>n.createElement("li",{className:"k-item",key:c},n.createElement(M.Checkbox,{label:String(a),onChange:h=>this.handleCheckBoxChange(h,a),checked:l.includes(a)})))),n.createElement("div",{className:"k-filter-selected-items"},l.length+" "+s.toLanguageString(Me,I[Me])),n.createElement("div",{className:"k-actions k-hstack k-justify-content-stretch"},n.createElement(B.Button,{themeColor:"primary",type:"submit"},s.toLanguageString(oe,I[oe])),n.createElement(B.Button,{className:"k-button",type:"reset"},s.toLanguageString(K,I[K])))))))}}Qe.defaultProps={uniqueData:!0};E.registerForLocalization(Qe);const Xt=r=>{const[t,s]=n.useState(""),o=n.useMemo(()=>new Set(r.columnsState.map(g=>g.id)),[r.columnsState]),e=n.useMemo(()=>r.columns.filter(g=>{var x;return(x=g.title||g.field)==null?void 0:x.toLowerCase().includes(t.toLowerCase())}),[r.columns,t]),[i,l]=n.useState(r.columns.map(g=>o.has(g.id))),a=n.useCallback(()=>{const g=r.columns.filter((x,y)=>i[y]);r.onColumnsChange.call(void 0,g),r.onCloseMenu.call(void 0)},[i,r.columns,r.onColumnsChange,r.onCloseMenu]),c=n.useCallback(()=>{l(r.columns.map(g=>o.has(g.id)))},[o,r.columns]),h=i.filter(g=>g).length,d=h===i.length,u=n.useCallback(()=>{l(r.columns.map((g,x)=>d&&x===0?!0:!d))},[r.columns,d]),m=n.useCallback((g,x)=>{const y=i.slice();y[x]=g,l(y)},[i]);return n.createElement("form",{className:"k-filter-menu"},n.createElement("div",{className:"k-filter-menu-container"},n.createElement(M.TextBox,{className:"k-searchbox",value:t,onChange:g=>s(String(g.target.value)),prefix:()=>n.createElement(M.InputPrefix,null,n.createElement(f.IconWrap,{name:"search",icon:w.searchIcon}))}),n.createElement("ul",{className:"k-reset k-multicheck-wrap"},!t&&n.createElement("li",{className:"k-item k-check-all-wrap"},n.createElement(M.Checkbox,{checked:d,onChange:u,label:"(Select all)"})),e.map((g,x)=>n.createElement("li",{key:g.id,className:"k-item"},n.createElement(M.Checkbox,{disabled:i[x]&&h===1,checked:i[x],onChange:y=>{var v;return m(!!((v=y.target.element)!=null&&v.checked),x)},label:g.title||g.field})))),n.createElement("div",{className:"k-filter-selected-items"},h," selected items"),n.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},n.createElement(B.Button,{type:"button",themeColor:"primary",onClick:a},"Apply"),n.createElement(B.Button,{type:"button",onClick:c},"Reset"))))};Xt.displayName="GridColumnMenuColumnsList";class Hs extends n.Component{render(){return null}}class Yt extends n.Component{render(){return n.createElement("div",{className:f.classNames("k-toolbar k-grid-toolbar",{"k-toolbar-md":!this.props.size,[`k-toolbar-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),"aria-label":this.props.ariaLabel,"aria-controls":this.props.ariaControls,role:"toolbar"},this.props.children)}}Yt.displayName="KendoReactGridToolbar";const Qt=r=>{const{data:t=[]}=r;return n.createElement("div",{className:"k-selection-aggregates k-grid-selection-aggregates"},t.map((s,o)=>n.createElement("div",{key:o},n.createElement("span",{className:"k-selection-aggregates-item-text"},s.type,": "),n.createElement("span",{className:"k-selection-aggregates-item-value"},s.formattedValue))))};Qt.displayName="KendoReactGridStatusBar";const Jt=r=>{var s;const t=r.slice();for(let o=0;o<t.length;o++)for(;t[o]&&((s=t[o].children)!=null&&s.length);)t.splice(o,1,...t[o].children);return t},_s=r=>{const{dataItems:t,target:s,selectedField:o}=r,i=Jt(s.columns).map(v=>v.field).filter(v=>v&&typeof v=="string").map(v=>f.getter(v)),l=f.getter(o),a={dates:[],numbers:[],booleans:[],others:[]},c=v=>{typeof v=="number"?a.numbers.push(v):typeof v=="boolean"?a.booleans.push(v):v instanceof Date?a.dates.push(v):a.others.push(v)};t.forEach(v=>{const k=l(v);k&&k.forEach(R=>{c(i[R](v))})});const h=a.dates.map(v=>v.getTime()),d=a.booleans.filter(v=>v).length,u=a.booleans.filter(v=>!v).length,m=a.numbers.length?a.numbers.reduce((v,k)=>v+=k,0):void 0,g={sum:m,average:typeof m=="number"?m/a.numbers.length:void 0,min:a.numbers.length?Math.min(...a.numbers):void 0,max:a.numbers.length?Math.max(...a.numbers):void 0,count:a.numbers.length+a.booleans.length+a.dates.length+a.others.length,isTrue:d>0?d:void 0,isFalse:u>0?u:void 0,earliest:a.dates.length?new Date(Math.min(...h)):void 0,latest:a.dates.length?new Date(Math.max(...h)):void 0},x=(v,k)=>(k==="sum"||k==="average")&&typeof v=="number"?v.toFixed(2):(k==="earliest"||k==="latest")&&v instanceof Date?v.toLocaleDateString():String(v),y=[];return Object.keys(g).forEach(v=>{const k=v,R=g[k];R!==void 0&&y.push({type:k,value:R,formattedValue:x(R,k)})}),y},Zt=f.withIdHOC(X);Zt.displayName="KendoReactGrid";Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>b.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>b.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>b.setSelectedState});exports.GRID_COL_INDEX_ATTRIBUTE=U;exports.GRID_PREVENT_SELECTION_ELEMENT=fs;exports.GRID_ROW_INDEX_ATTRIBUTE=Dt;exports.Grid=Zt;exports.GridCell=At;exports.GridClassComponent=X;exports.GridColumn=j;exports.GridColumnMenuCheckboxFilter=Qe;exports.GridColumnMenuColumnsList=Xt;exports.GridColumnMenuFilter=Ye;exports.GridColumnMenuFilterCell=Ae;exports.GridColumnMenuFilterUI=jt;exports.GridColumnMenuGroup=je;exports.GridColumnMenuItem=$;exports.GridColumnMenuItemContent=Xe;exports.GridColumnMenuItemGroup=ae;exports.GridColumnMenuSort=Ce;exports.GridColumnMenuWrapper=We;exports.GridCommonDragLogic=Pt;exports.GridDetailRow=Hs;exports.GridEditCell=Tt;exports.GridFilterCell=$e;exports.GridGroupCell=Pe;exports.GridHeaderCell=Mt;exports.GridHierarchyCell=Ft;exports.GridNoRecords=me;exports.GridRow=Bt;exports.GridSelectionCell=Nt;exports.GridToolbar=Yt;exports.StatusBar=Qt;exports.booleanFilterValues=Ke;exports.cellBoolDropdownChange=qe;exports.cellInputChange=Ve;exports.cellOperatorChange=Ue;exports.filterGroupByField=re;exports.getStatusData=_s;exports.gridMessages=I;exports.leafColumns=Jt;exports.operators=He;exports.pagerFirstPage=Ct;exports.pagerInfo=mt;exports.pagerItemPerPage=kt;exports.pagerLastPage=xt;exports.pagerNextPage=vt;exports.pagerPreviousPage=bt;exports.rootFilterOrDefault=ge;
5
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const rs=require("react"),p=require("prop-types"),f=require("@progress/kendo-react-common"),b=require("@progress/kendo-react-data-tools"),E=require("@progress/kendo-react-intl"),w=require("@progress/kendo-svg-icons"),M=require("@progress/kendo-react-inputs"),Be=require("@progress/kendo-react-dateinputs"),is=require("@progress/kendo-react-popup"),B=require("@progress/kendo-react-buttons"),ie=require("@progress/kendo-react-dropdowns"),ue=require("@progress/kendo-data-query"),os=require("@progress/kendo-react-animation");function ns(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const n=ns(rs),j=r=>null;j.displayName="KendoReactGridColumn";j.defaultProps={filterable:!0,editable:!0,sortable:!0,resizable:!0,reorderable:!0,groupable:!0};j.propTypes={field:p.string,title:p.string,editable:p.bool,sortable:p.oneOfType([p.bool,p.shape({allowUnsort:p.bool.isRequired})]),cell:p.any,filterCell:p.any,filterTitle:p.string,filterable:p.bool,filter:p.oneOf(["text","numeric","boolean","date"]),editor:p.oneOf(["text","numeric","boolean","date"]),width:p.oneOfType([p.string,p.number]),minResizableWidth:p.number,headerCell:p.any,footerCell:p.any,headerSelectionValue:p.bool,format:p.string,headerClassName:p.string,className:p.string,reorderable:p.bool,resizable:p.bool,orderIndex:p.number,groupable:p.bool,columnMenu:p.any,locked:p.bool};function L(r,t){const s=(r||"").split(".");let o=t;return s.forEach(e=>{o=o?o[e]:void 0}),o}function ut(r,t,s,o,e,i,l=0){let a=l;for(let c=0;c<t.length;c++){if(!e||t[c].value===void 0||t[c].items===void 0){r[r.length]={dataIndex:o.index,dataItem:t[c],rowType:"data",level:l,expanded:i===void 0||L(i,t[c])},o.index++;continue}a=Math.max(a,l+1);const h=i===void 0||L(i,t[c])===void 0||L(i,t[c]);r[r.length]={dataIndex:-1,dataItem:t[c],level:l,rowType:"groupHeader",expanded:h},h&&(a=Math.max(ut(r,t[c].items,s,o,e,i,l+1),a)),(s==="always"||h&&s==="visible")&&(r[r.length]={dataIndex:-1,dataItem:t[c],rowType:"groupFooter",level:l,expanded:h})}return a}function gt(r,t,s,o=0){let e=[];if(!r)return[];r&&r.length===void 0&&(r=[r]),r.forEach((l,a)=>{l=l.props?l.props:l;const c=t[a]||null,h=gt(l.children,c&&c.children||[],s,o+1);e.push(Object.assign({depth:o},j.defaultProps,h.length?{cell:()=>null,filterCell:()=>null}:{},c?{width:c.width,orderIndex:c.orderIndex}:{},l,{id:l.id?l.id:b.tableKeyboardNavigationTools.generateNavigatableId(`${s.prevId++}`,s.idPrefix,"column"),declarationIndex:e.length,children:h,rowSpan:0,colSpan:0,isAccessible:!0,left:c&&Math.floor(c.left),right:c&&Math.floor(c.right)}))});const i=(l,a)=>l.orderIndex===a.orderIndex?l.declarationIndex-a.declarationIndex:(l.orderIndex||0)-(a.orderIndex||0);if(e.sort(i),o===0){let l=[];const a=(c,h)=>c.forEach(d=>{d.parentIndex=h,a(d.children,l.push(d)-1)});return a(e,-1),l}return e}function ls(r,t,s,o){let e=[];Array.isArray(r)?e=r:r&&(e=r.data);const i=[];if(e.length>0){let l=e[0];if(t)for(let c=0;c<t.length;c++)l=l.items&&l.items[0];Object.getOwnPropertyNames(l).forEach(c=>{c!==s&&i.push(Object.assign({id:b.tableKeyboardNavigationTools.generateNavigatableId(`${o.prevId++}`,o.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},j.defaultProps,{field:c}))})}return i}const as=(r,t)=>{let s=r[t.parentIndex];for(;s;){if(s.footerCell)return!0;s=r[s.parentIndex]}return!1},cs=r=>r.filter(t=>as(r,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),Se=r=>r.width!==void 0?Math.floor(parseFloat(r.width.toString()))+"px":void 0,ft=r=>(r.sort((t,s)=>t.declarationIndex-s.declarationIndex),r.map(t=>{const{declarationIndex:s,parentIndex:o,depth:e,colSpan:i,rowSpan:l,index:a,kFirst:c,children:h,...d}=t;return h.length?{children:ft(h),...d}:d})),Ie=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),ct=17895697,fe=(r,t)=>{if(!(!r&&!t))return t?r?{...r,...t,select:{...r.select||{},...t.select||{}},hierarchy:{...r.hierarchy||{},...t.hierarchy||{}},group:{...r.group||{},...t.group||{}},edit:{...r.edit||{},...t.edit||{}}}:t:r},ye="grid.noRecords",mt="grid.pagerInfo",Ct="grid.pagerFirstPage",bt="grid.pagerPreviousPage",vt="grid.pagerNextPage",xt="grid.pagerLastPage",kt="grid.pagerItemsPerPage",hs="grid.pagerPage",ds="grid.pagerPageSizeAriaLabel",ps="grid.pagerOf",us="grid.pagerTotalPages",we="grid.groupPanelEmpty",Et="grid.groupColumn",St="grid.ungroupColumn",Re="grid.columnMenu",K="grid.filterClearButton",oe="grid.filterSubmitButton",ne="grid.filterTitle",Ne="grid.sortAscending",Fe="grid.sortDescending",De="grid.searchPlaceholder",Te="grid.filterCheckAll",Ge="grid.filterChooseOperator",Me="grid.filterSelectedItems",ze="grid.sortAriaLabel",Le="grid.filterAriaLabel",Oe="grid.groupPanelAriaLabel",It="grid.groupExpand",yt="grid.groupCollapse",wt="grid.detailExpand",Rt="grid.detailCollapse",le="grid.selectRow",I={[wt]:"Expand detail row",[Rt]:"Collapse detail row",[It]:"Expand group",[yt]:"Collapse Group",[ye]:"No records available",[we]:"Drag a column header and drop it here to group by that column",[K]:"Clear",[oe]:"Filter",[ne]:"Filter",[Ne]:"Sort Ascending",[Fe]:"Sort Descending",[ze]:"Sortable",[Et]:"Group Column",[St]:"Ungroup Column",[Re]:"Column menu",[kt]:"items per page",[mt]:"{0} - {1} of {2} items",[Ct]:"Go to the first page",[bt]:"Go to the previous page",[vt]:"Go to the next page",[xt]:"Go to the last page",[hs]:"Page",[ds]:"Page size",[ps]:"of",[us]:"{0}",[De]:"Search",[Te]:"Check All",[Ge]:"Choose Operator",[Me]:"selected items",[Le]:"Filter",[Oe]:"Group panel",[le]:"Select Row","grid.filterEqOperator":"Is equal to","grid.filterNotEqOperator":"Is not equal to","grid.filterIsNullOperator":"Is null","grid.filterIsNotNullOperator":"Is not null","grid.filterIsEmptyOperator":"Is empty","grid.filterIsNotEmptyOperator":"Is not empty","grid.filterStartsWithOperator":"Starts with","grid.filterContainsOperator":"Contains","grid.filterNotContainsOperator":"Does not contain","grid.filterEndsWithOperator":"Ends with","grid.filterGteOperator":"Is greater than or equal to","grid.filterGtOperator":"Is greater than","grid.filterLteOperator":"Is less than or equal to","grid.filterLtOperator":"Is less than","grid.filterIsTrue":"Is true","grid.filterIsFalse":"Is false","grid.filterBooleanAll":"(All)","grid.filterAfterOrEqualOperator":"Is after or equal to","grid.filterAfterOperator":"Is after","grid.filterBeforeOperator":"Is before","grid.filterBeforeOrEqualOperator":"Is before or equal to","grid.filterAndLogic":"And","grid.filterOrLogic":"Or"};function gs(r){const t=r.replace(/^pager\.([a-z])/,(s,o)=>"grid.pager"+o.toUpperCase());return{messageKey:t,defaultMessage:I[t]}}const Nt=r=>{const t=E.useLocalization(),s=n.useCallback(m=>{r.selectionChange&&r.selectionChange({syntheticEvent:m})},[r.selectionChange]),o=f.useId(),e=L(r.field,r.dataItem),i=b.useTableKeyboardNavigation(r.id),l={colSpan:r.colSpan,style:r.style,className:r.className,"aria-colindex":r.ariaColumnIndex,role:"gridcell",...i},a=typeof e=="boolean"&&e,c=n.createElement("span",{key:1,className:"k-checkbox-wrap"},n.createElement("input",{id:o,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(le,I[le]),"aria-checked":a,checked:a,onChange:s})),h=r.rowType!=="groupHeader"?n.createElement("td",{...l},c):null,d=r.rowType||"data",u=r.cells;if(u&&u.select&&u.select[d]){const m=u.select[d];return n.createElement(m,{...r,tdProps:l},c)}return r.render?r.render.call(void 0,h,r):h},Ft=r=>{let t=null,s=null,o=null;const e=L(r.field,r.dataItem),i=b.useTableKeyboardNavigation(r.id),l=E.useLocalization(),a=n.useCallback(d=>{d.isDefaultPrevented()||d.keyCode===f.Keys.enter&&r.onChange&&(d.preventDefault(),r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:d,field:r.field,value:!e}))},[r.dataItem,r.dataIndex,r.field,r.onChange,e]);if(r.rowType==="groupFooter")s={className:"k-table-td k-hierarchy-cell",role:"gridcell",...i},t=n.createElement("td",{...s});else if(r.rowType!=="groupHeader"){const d=e?Rt:wt,u=l.toLanguageString(d,I[d]);s={className:"k-table-td k-hierarchy-cell",onKeyDown:a,"aria-expanded":!!e,role:"gridcell","aria-colindex":r.ariaColumnIndex,...i},o=n.createElement("a",{onClick:m=>{m.preventDefault(),r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,syntheticEvent:m,field:r.field,value:!e})},"aria-label":u,href:"#",tabIndex:-1},n.createElement(f.IconWrap,{name:e?"minus":"plus",icon:e?w.minusIcon:w.plusIcon})),t=n.createElement("td",{...s},o)}const c=r.rowType||"data",h=r.cells;if(h&&h.hierarchy&&h.hierarchy[c]){const d=h.hierarchy[c];return n.createElement(d,{...r,tdProps:s},o)}return r.render?r.render.call(void 0,t,r):t},Dt=b.TABLE_ROW_INDEX_ATTRIBUTE,U=b.TABLE_COL_INDEX_ATTRIBUTE,fs=b.TABLE_PREVENT_SELECTION_ELEMENT,Tt=r=>{const t=L(r.field,r.dataItem);let s=null;const o=f.classNames("k-table-td","k-grid-edit-cell",{["k-selected"]:r.isSelected},r.className),e=f.useId(),i=b.useTableKeyboardNavigation(r.id);let l=null,a=null;const c=n.useCallback(g=>{if(r.onChange){const x=g.target.type==="checkbox"?g.target.checked:g.target.value;r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g,value:x})}},[r.onChange,r.dataItem,r.dataIndex,r.field]),h=n.useCallback(g=>{r.onContextMenu&&r.onContextMenu.call(void 0,g,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),d=n.useCallback(g=>{r.onChange&&r.onChange({dataItem:r.dataItem,dataIndex:r.dataIndex,field:r.field,syntheticEvent:g.syntheticEvent,value:g.value})},[r.onChange,r.dataItem,r.dataIndex,r.field]);switch(r.editor){case"numeric":{l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=n.createElement(M.NumericTextBox,{width:"100%",value:t===void 0?null:t,onChange:d}),s=n.createElement("td",{...l},a);break}case"date":l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=n.createElement(Be.DatePicker,{width:"100%",value:t,onChange:d}),s=n.createElement("td",{...l},a);break;case"boolean":l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=[n.createElement("span",{key:1,className:"k-checkbox-wrap"},n.createElement("input",{checked:t||!1,id:e,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",onChange:c})),n.createElement("label",{className:"k-checkbox-label",htmlFor:e,key:2})],s=n.createElement("td",{...l},a);break;default:l={onContextMenu:h,colSpan:r.colSpan,style:r.style,className:o,["aria-colindex"]:r.ariaColumnIndex,["aria-selected"]:r.isSelected,[U]:r.columnIndex,role:"gridcell",...i},a=n.createElement("input",{style:{width:"100%"},className:"k-input",value:t||"",onChange:c}),s=n.createElement("td",{...l},a)}const u=r.editor||"text",m=r.cells;if(m&&m.edit&&m.edit[u]){const g=m.edit[u];return n.createElement(g,{...r,tdProps:l},a)}return r.render?r.render.call(void 0,s,r):s};class ms extends n.Component{constructor(){super(...arguments),this.headerWrap=null,this.table=null,this.syncScroll=!1,this.scrollbarWidth=f.getScrollbarWidth(),this.onScroll=t=>{if(this.syncScroll){this.syncScroll=!1;return}if(!this.headerWrap)return;const s=this.headerWrap.scrollLeft,o=this.props.scrollableDataElement();o&&o.scrollLeft!==s&&(o.scrollLeft=s)}}get element(){return this.props.elemRef.current}componentDidMount(){const t=b.isRtl(this.element);this.props.columnResize&&this.props.columnResize.setIsRtl(t),this.forceUpdate()}setScrollLeft(t){this.headerWrap&&this.headerWrap.scrollLeft!==t&&(this.syncScroll=!0,this.headerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?n.createElement("div",{ref:this.props.elemRef,className:f.classNames("k-grid-header",{"k-grid-draggable-header":this.props.draggable}),role:"presentation"},n.createElement("div",{ref:t=>{this.headerWrap=t},className:"k-grid-header-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},onScroll:this.onScroll,role:"presentation"},n.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-header-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},n.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupHeader=t}},this.props.cols),n.createElement("thead",{className:"k-table-thead",role:"rowgroup",...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)))):n.createElement("thead",{role:"presentation",className:f.classNames("k-table-thead",{"k-grid-draggable-header":this.props.draggable}),...b.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)}}const Gt=(...r)=>Object.assign({allowUnsort:!0,mode:"single"},...r);class Cs extends n.PureComponent{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.pressHandler&&this.props.pressHandler(t.event,s)},this.onDrag=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.dragHandler&&this.props.dragHandler(t.event,s)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.releaseHandler&&this.props.releaseHandler(t.event)}}render(){return n.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,hint:this.props.dragClue,autoScroll:{boundaryElementRef:this.props.headerRef,direction:{horizontal:!0,vertical:!1}},scrollContainer:this.props.containerRef||void 0,ref:t=>{this.draggable=t}},n.createElement("tr",{className:"k-table-row",style:{touchAction:"none"},role:"row","aria-rowindex":this.props.ariaRowIndex},this.props.children))}}class We extends n.Component{constructor(){super(...arguments),this.state={show:!1},this._anchor=null,this._content=null,this.blurTimeout=void 0,this.willBlur=!1,this.blur=()=>{if(this.willBlur){this.willBlur=!1;return}clearTimeout(this.blurTimeout),this.blurTimeout=window.setTimeout(()=>{this.closeMenu()})},this.focus=()=>{clearTimeout(this.blurTimeout)},this.anchorClick=t=>{t.preventDefault(),this.state.show&&this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!this.state.show},()=>this.state.show&&this._content&&this._content.focus())},this.closeMenu=()=>{this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!1})},this.onAnchorMouseDown=t=>{this.willBlur=this.state.show&&t.currentTarget===this._anchor},this.onAnchorKeyDown=t=>{var s;if(t.keyCode===f.Keys.tab){const o=t.target,e=o&&((s=o.closest(".k-grid"))==null?void 0:s.getElementsByClassName("k-grid-content")[0]);e&&e.scrollWidth>e.clientWidth&&o.scrollIntoView({inline:"center"})}}}render(){const{columnMenu:t,...s}=this.props,{column:o}=this.props,e=E.provideLocalizationService(this),i=o.title||o.field,l=i?`${i} `:"";return n.createElement(n.Fragment,null,n.createElement("a",{className:"k-grid-header-menu k-grid-column-menu",ref:a=>this._anchor=a,onClick:this.anchorClick,onMouseDown:this.onAnchorMouseDown,onKeyDown:this.onAnchorKeyDown,href:"#","aria-label":`${l}${e.toLanguageString(Re,I[Re])}`},n.createElement(f.IconWrap,{name:"filter",icon:w.filterIcon})),n.createElement(is.Popup,{anchor:this._anchor,show:this.state.show,popupClass:"k-column-menu k-column-menu-popup k-grid-columnmenu-popup"},n.createElement("div",{ref:a=>this._content=a,tabIndex:0,onBlur:this.blur,onFocus:this.focus,style:{outline:"none"}},t&&n.createElement(t,{...s,onCloseMenu:this.closeMenu}))))}}class Mt extends n.Component{render(){const{columnMenuWrapperProps:t}=this.props,s=this.props.onClick?{onClick:this.props.onClick}:{},o=n.createElement("span",{className:"k-cell-inner"},n.createElement("span",{className:f.classNames("k-link",{"!k-cursor-default":!this.props.columnMenuWrapperProps.sortable}),...s},n.createElement("span",{className:"k-column-title"},this.props.title||this.props.field||" "),this.props.children),t.columnMenu&&n.createElement(We,{...t}));return this.props.render?this.props.render.call(void 0,o,this.props):o}}const bs={true:{asc:"desc",desc:"","":"asc"},false:{asc:"desc",desc:"asc","":"asc"}},vs={none:"none",asc:"ascending",desc:"descending"};class zt extends n.Component{constructor(t){super(t),this.serviceIndex=0,this.index=-1,this.cellKeyDown=(s,o)=>{s.isDefaultPrevented()||s.keyCode===f.Keys.enter&&this.cellClick(s,o)},this.cells=s=>s.map(o=>{const e=this.props.columns[o],i=this.props.sortable&&e.sortable,l=this.props.sort?this.props.sort.findIndex(S=>S.field===e.field):-1,a=l>=0&&this.props.sort[l].dir||"none",c=e.columnMenu===null?null:e.columnMenu||this.props.columnMenu,h=f.classNames({"k-first":e.kFirst,"k-filterable":!!c,"k-table-th":!0,"k-header":!0,"k-grid-header-sticky":e.locked,"k-sorted":this.props.sort&&this.props.sort.some(S=>S.field===e.field)},e.headerClassName);e.locked===!1&&(e.left=0);const d=e.left!==void 0?this.props.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},u=E.provideLocalizationService(this).toLanguageString(ze,I[ze]),m=e.isAccessible?{ariaSort:vs[a],role:"columnheader",ariaColumnIndex:e.ariaColumnIndex,ariaSelected:!1,ariaDescription:i?u:""}:{role:"presentation"},g=e.declarationIndex>=0?++this.index:--this.serviceIndex,x=e.headerCell?e.headerCell:Mt,y=n.createElement(x,{key:1,field:e.field,onClick:i&&(S=>this.cellClick(S,e))||void 0,selectionChange:this.props.selectionChange,title:e.title,selectionValue:e.headerSelectionValue,render:this.props.cellRender,children:this.sortIcon(l),columnMenuWrapperProps:{column:{field:e.field,title:e.title,locked:e.locked,filter:e.filter,id:e.id},sortable:i&&this.props.sortable,sort:this.props.sort,onSortChange:this.props.sortChange,filter:this.props.filter,filterable:this.props.filterable&&e.filterable,filterOperators:this.props.filterOperators,onFilterChange:this.props.filterChange,group:this.props.group,groupable:this.props.groupable,onGroupChange:this.props.groupChange,columnMenu:c}}),v={...m,key:g,colSpan:e.colSpan,rowSpan:e.rowSpan,className:h,style:d,columnId:e.id,navigatable:e.navigatable,onKeyDown:i&&(S=>this.cellKeyDown(S,e))||void 0,role:"columnheader"},k=[y,this.props.columnResize&&this.props.columnResize.resizable&&e.resizable&&n.createElement(b.ColumnResizer,{key:2,resize:(S,_,z)=>this.props.columnResize&&this.props.columnResize.dragHandler(S,e,_,z),autofit:S=>this.props.columnResize&&this.props.columnResize.dblClickHandler(S,[e.id])})],R=fe(this.props.cells,e.cells);if(R&&R.headerCell){const S=R.headerCell;return n.createElement(S,{key:g,thProps:v,index:o},k)}return n.createElement(b.HeaderThElement,{...v,key:g},k)}),this.cellClick=this.cellClick.bind(this)}cellClick(t,s){if(t.preventDefault(),!this.props.sortChange)return;const{allowUnsort:o,mode:e}=Gt(this.props.sortable||!1,s.sortable||!1),i=(this.props.sort||[]).filter(c=>c.field===s.field)[0],l=bs[o][i&&i.dir||""],a=e==="single"?[]:(this.props.sort||[]).filter(c=>c.field!==s.field);l!==""&&s.field&&a.push({field:s.field,dir:l}),this.props.sortChange(a,t)}sortIcon(t){return this.props.sort?t>=0&&[n.createElement("span",{key:1,className:"k-sort-icon"},n.createElement(f.IconWrap,{name:"sort-"+this.props.sort[t].dir+"-small",icon:this.props.sort[t].dir==="asc"?w.sortAscSmallIcon:w.sortDescSmallIcon})),this.props.sort.length>1&&n.createElement("span",{key:2,className:"k-sort-icon"},n.createElement("span",{className:"k-sort-order"},t+1))]:null}render(){return this.serviceIndex=0,this.index=-1,this.props.columnsMap.map((t,s)=>this.props.pressHandler&&n.createElement(Cs,{key:s,pressHandler:this.props.pressHandler,dragHandler:this.props.dragHandler,releaseHandler:this.props.releaseHandler,ariaRowIndex:s+1,dragClue:this.props.dragClue,headerRef:this.props.headerRef,containerRef:this.props.containerRef},this.cells(t))||n.createElement("tr",{key:s,className:"k-table-row",role:"row","aria-rowindex":s+1},this.cells(t)))}}E.registerForLocalization(zt);const xs=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],He={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},H=r=>r==="isnull"||r==="isnotnull"||r==="isempty"||r==="isnotempty",se=(r,t)=>r.map(s=>({text:t.toLanguageString(s.text,I[s.text]),operator:s.operator})),ks="eq",Ke=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],Es={text:!1,numeric:!1,date:!1,boolean:!0},Ve=(r,t,s)=>{const o=Lt(s.operators);let e=s.operator;switch(s.filterType){case"numeric":(!e||H(e))&&(e=o),r===null&&e===o&&(e="");break;case"date":(!e||H(e))&&(e=o),r===null&&e===o&&(e="");break;case"text":(!e||H(e))&&(e=o),!r&&e===o&&(e="");break;default:return}s.onChange({value:r,operator:e,syntheticEvent:t})},Lt=(r,t)=>t?r[t][0].operator:r[0].operator,_e=r=>r||"text",qe=(r,t)=>{const s=r.target.value;t({value:s.operator,operator:s.operator===""?"":ks,syntheticEvent:r.syntheticEvent})},Ue=(r,t,s)=>{let o=t;const e=r.target.value;r.target.state.opened&&(H(e.operator)&&(o=null),t===null&&!H(e.operator)&&(o=void 0),s({value:o,operator:e.operator,syntheticEvent:r.syntheticEvent}))};class $e extends n.Component{constructor(t){super(t),this._inputRef=n.createRef(),this.renderOperatorEditor=s=>{if(this.props.filterType==="boolean")return;const o=this.props.operators.find(e=>e.operator===this.props.operator)||null;return n.createElement(ie.DropDownList,{size:this.props.size,value:o,onChange:this.operatorChange,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",svgIcon:w.filterIcon,data:this.props.operators,textField:"text",title:s.toLanguageString(Ge,I[Ge]),popupSettings:{width:""}})},this.inputChange=this.inputChange.bind(this),this.clear=this.clear.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){const t=E.provideLocalizationService(this),s=n.createElement("div",{className:"k-filtercell"},n.createElement("div",{className:"k-filtercell-wrapper"},this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues),n.createElement("div",{className:"k-filtercell-operator"},this.renderOperatorEditor(t)," ",n.createElement(B.Button,{size:this.props.size,icon:"filter-clear",svgIcon:w.filterClearIcon,className:f.classNames({"k-clear-button-visible":!!(!(this.props.value===null||this.props.value==="")||this.props.operator)}),title:t.toLanguageString(K,I[K]),type:"button",onClick:this.clear,disabled:!(!(this.props.value===null||this.props.value==="")||this.props.operator)}))));return this.props.render?this.props.render.call(void 0,s,this.props):s}inputChange(t,s){Ve(t,s,this.props)}operatorChange(t){Ue(t,this.props.value,this.props.onChange)}boolDropdownChange(t){qe(t,this.props.onChange)}clear(t){t.preventDefault(),this.props.onChange({value:"",operator:"",syntheticEvent:t}),this._inputRef.current&&(this._inputRef.current.element.value="",setTimeout(()=>{this._inputRef.current.element.focus()},0))}filterComponent(t,s,o){switch(t){case"numeric":return n.createElement(M.NumericTextBox,{ref:this._inputRef,size:this.props.size,value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"date":return n.createElement(Be.DatePicker,{ref:this._inputRef,size:this.props.size,value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"boolean":{const e=i=>i==null;return n.createElement(ie.DropDownList,{ref:this._inputRef,size:this.props.size,onChange:this.boolDropdownChange,value:o.find(i=>i.operator===(e(s)?"":s)),data:o,textField:"text",title:this.props.title,ariaLabel:this.props.ariaLabel})}default:return n.createElement(M.TextBox,{ref:this._inputRef,size:this.props.size,value:s||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)},title:this.props.title,"aria-label":this.props.ariaLabel})}}}E.registerForLocalization($e);const Ss="k-table-row k-filter-row";class Ot extends n.Component{headerCellClassName(t,s){let o=`${s?"k-grid-header-sticky":""}`;return this.props.sort&&this.props.sort.filter(e=>e.field===t).length>0&&(o+=" k-sorted"),o}setFilter(t,s,o,e){if(!this.props.filterChange)return;const i=[];(t!==""&&t!==null||s!=="")&&i.push({field:o,operator:s,value:t}),this.props.filter&&this.props.filter.filters&&(this.props.filter.filters||[]).forEach(c=>{const h=c;h&&h.field!==o&&i.push(h)});const l=this.props.filter&&this.props.filter.logic?this.props.filter.logic:"and";this.props.filterChange(i.length>0?{logic:l,filters:i}:null,e)}render(){const t=E.provideLocalizationService(this),s=this.props.filter&&this.props.filter.filters||[],o=a=>{if(a===void 0)return;const c=s.filter(h=>h.field===a);return c.length?c[0]:void 0};let e=0,i=-1;const l=this.props.columns.filter(a=>a.children.length===0).map(a=>{const c=_e(a.filter),h=o(a.field),d=a.filterable?t.toLanguageString(Le,I[Le]):void 0;let u=h&&h.value;u===void 0&&(u=c==="text"?"":null);const m=a.filterable&&{render:this.props.cellRender,field:a.field,title:a.filterTitle,value:u,operator:h&&h.operator,operators:se(this.props.filterOperators[c]||[],t),booleanValues:se(Ke,t),filterType:c,ariaLabel:d,onChange:S=>{this.setFilter(S.value,S.operator,a.field,S.syntheticEvent)}},g=a.declarationIndex>=0?++i:--e,x={ariaLabel:d,ariaColumnIndex:a.ariaColumnIndex},y=a.left!==void 0?this.props.isRtl?{left:a.right,right:a.left}:{left:a.left,right:a.right}:{},v={columnId:b.tableKeyboardNavigationTools.getFilterColumnId(a.id),navigatable:a.navigatable,style:y,className:f.classNames("k-table-th",this.headerCellClassName(a.field,a.locked)||void 0),role:"columnheader",...x},k=m&&(a.filterCell?n.createElement(a.filterCell,{...m}):n.createElement($e,{size:this.props.size,...m})),R=fe(this.props.cells,a.cells);if(R&&R.filterCell){const S=R.filterCell;return n.createElement(S,{key:g,...m,thProps:v,index:i},k)}return n.createElement(b.HeaderThElement,{key:g,...v},k)});return n.createElement("tr",{className:Ss,"aria-rowindex":this.props.ariaRowIndex,role:"row"},l)}}E.registerForLocalization(Ot);class Ht extends n.Component{constructor(){super(...arguments),this.draggable=null,this.onPress=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.onPress&&this.props.onPress(t.event,s)},this.onDrag=t=>{const s=this.draggable&&this.draggable.element;s&&this.props.onDrag&&this.props.onDrag(t.event,s)},this.onRelease=t=>{this.draggable&&this.draggable.element&&this.props.onRelease&&this.props.onRelease(t.event)},this.sortChange=t=>{if(t.preventDefault(),this.props.onSortChange){const s=this.props.dir==="asc"?"desc":"asc";this.props.onSortChange(t,s)}},this.groupRemove=t=>{t.preventDefault(),t.stopPropagation(),this.props.onRemove&&this.props.onRemove(t)},this.onContextMenu=t=>{const s={title:this.props.title,dir:this.props.dir,index:this.props.index};this.props.onContextMenu&&this.props.onContextMenu.call(void 0,t,{dataItem:{...s}})}}render(){const{dir:t}=this.props;return n.createElement(f.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:s=>{this.draggable=s}},n.createElement("div",{className:"k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",onClick:this.sortChange,onContextMenu:this.onContextMenu,role:"button",style:{touchAction:"none"}},n.createElement("span",null,n.createElement(f.IconWrap,{name:"sort-"+t+"-small",icon:t==="asc"?w.sortAscSmallIcon:w.sortDescSmallIcon,size:"small"})),n.createElement("span",{className:"k-chip-content"},this.props.title),n.createElement("span",{className:"k-chip-actions"},n.createElement("span",{className:"k-chip-action k-chip-remove-action",onClick:this.groupRemove},n.createElement(f.IconWrap,{name:"x-circle",icon:w.xCircleIcon,size:"small"})))))}}E.registerForLocalization(Ht);class _t extends n.Component{constructor(){super(...arguments),this.onGroupRemove=(t,s)=>{const o=this.props.group.slice();o.splice(s,1),this.props.groupChange(o,t)},this.onGroupSortChange=(t,s,o,e)=>{const i=Object.assign({},o,{dir:e}),l=this.props.group.slice();l.splice(s,1,i),this.props.groupChange(l,t)}}render(){const s=(this.props.group||[]).map((o,e)=>n.createElement(Ht,{key:e,index:e,dir:o.dir||"asc",title:this.props.resolveTitle(o.field),onRemove:i=>{this.onGroupRemove(i,e)},onSortChange:(i,l)=>{this.onGroupSortChange(i,e,o,l)},onPress:this.props.pressHandler,onDrag:this.props.dragHandler,onRelease:this.props.releaseHandler,onContextMenu:this.props.onContextMenu}));return n.createElement("div",{ref:this.props.refCallback,className:"k-grouping-header",role:"toolbar","aria-label":E.provideLocalizationService(this).toLanguageString(Oe,I[Oe]),"aria-controls":this.props.ariaControls||""},n.createElement("div",{className:"k-chip-list k-chip-list-md",role:"none"},s),n.createElement("div",{className:"k-grouping-drop-container"},!s.length&&E.provideLocalizationService(this).toLanguageString(we,I[we])," "))}}E.registerForLocalization(_t);class Is extends n.Component{constructor(){super(...arguments),this.footerWrap=null,this.table=null,this.scrollbarWidth=f.getScrollbarWidth()}componentDidMount(){this.setState({})}setScrollLeft(t){this.footerWrap&&(this.footerWrap.scrollLeft=t)}setWidth(t){this.table&&(this.table.style.width=t+"px")}render(){return this.props.staticHeaders?n.createElement("div",{className:"k-grid-footer",role:"presentation"},n.createElement("div",{ref:t=>{this.footerWrap=t},className:"k-grid-footer-wrap",style:this.scrollbarWidth?{}:{borderWidth:0},role:"presentation"},n.createElement("table",{ref:t=>{this.table=t},className:f.classNames("k-table k-grid-footer-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},n.createElement("colgroup",{ref:t=>{this.props.columnResize.colGroupFooter=t},role:"presentation"},this.props.cols),n.createElement("tfoot",{className:"k-table-tfoot",role:"presentation"},this.props.row)))):n.createElement("tfoot",{className:"k-table-tfoot"},this.props.row)}}class ys{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=n.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=n.createRef(),this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(n.version),this.topItems=(s,o)=>{if(!this.container||o)return{topItemsCount:0,topItemsHeight:0};const e=this.container.clientHeight,i=Math.ceil(e/s[0].line),l=Math.ceil((s.length-i)/2);let a=0;for(let c=0;c<l;c++)a+=s[c].line+s[c].acc;return{topItemsCount:l,topItemsHeight:a,itemsNeededOnScreen:i+i/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,t&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}get rowHeights(){const t=[],s=this.tableBodyRef.current&&this.tableBodyRef.current.children||[];let o=0;for(let e=0;e<s.length;e++){if(s[e].className.indexOf("k-grouping-row")>-1){o+=s[e].scrollHeight;continue}s[e].className.indexOf("k-detail-row")>-1?t[t.length-1].line+=s[e].scrollHeight:(t.push({line:s[e].scrollHeight,acc:o}),o=0)}return t}changePage(t,s){this.attendedSkip=t-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,t-this.topCacheCount),take:this.pageSize},s)}translate(t,s){this.tableTranslate=t,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||s?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(t){if(!this.container)return;const s=this.rowHeights,o=this.container.scrollTop;let e=this.tableTranslate,i=0;const{topItemsCount:l,topItemsHeight:a,itemsNeededOnScreen:c}=this.topItems(s,!!this.topCacheCount),h=o-e;if(!(h>a||s.length<=c)){for(;i<this.topCacheCount+this.attendedSkip-this.realSkip+l&&this.propsSkip-i>0&&!(e+(s[s.length-1-i].line+s[s.length-1-i].acc)+h<=o);)e-=s[s.length-1-i].line+s[s.length-1-i].acc,i++;if(i===0&&this.topCacheCount===0&&this.attendedSkip>0&&(e=Math.max(e-s[0].line,0),i=1),this.propsSkip-i<=0&&e>o){this.translate(0),this.changePage(0,t),this.container.scrollTop=0;return}if(e>o&&(e=o),e!==this.tableTranslate){this.translate(Math.max(0,e-a));const d=Math.max(0,this.propsSkip-i-l);this.changePage(d,t)}}}localScrollDown(t){if(!this.container)return;const s=this.rowHeights,o=this.container.scrollTop;let e=this.tableTranslate,i=0;const{topItemsCount:l,topItemsHeight:a,itemsNeededOnScreen:c}=this.topItems(s,!!this.topCacheCount);for(;i<s.length-this.topCacheCount&&!(e+s[i].line+s[i].acc>o);)e+=s[i].line+s[i].acc,i++;l>this.propsSkip+i||s.length<=c||(i>=s.length-this.topCacheCount&&this.propsSkip+i>=this.total?(this.translate(e-a),this.changePage(this.total-1-l,t)):e!==this.tableTranslate&&this.propsSkip+i-l!==this.propsSkip&&(this.translate(e-a),this.changePage(this.propsSkip+i-l,t)))}scrollNonStrict(t){const s=this.total*this.prevScrollPos/this.containerHeight;let o=Math.floor(s);o>=this.total&&(o=this.total-1);const e=Math.min(s-o,1);let i=0;const l=o-this.propsSkip,a=this.rowHeights;l>=0&&l<=1?i=-((a[0].line+a[0].acc)*e):l===-1&&(i=-((a[a.length-1].line+a[a.length-1].acc)*e));const{topItemsCount:c,topItemsHeight:h}=this.topItems(a,!!this.topCacheCount);this.translate(Math.max(0,i-h-this.horizontalScrollbarHeight()+this.containerHeight*s/this.total)),this.changePage(o-c,t)}scrollHandler(t){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const s=this.container.scrollTop,o=this.prevScrollPos;if(this.prevScrollPos=s,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,t),this.prevScrollPos=s,this.askedSkip=void 0;return}s-o<0&&s>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(t):s-o>0&&s<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(t):this.scrollNonStrict(t),this.prevScrollPos=s}}class ht{constructor(t=0,s,o,e){this.total=t,this.offsets=[],this.heights=[];let i=0;for(let l=0;l<t;l++){this.offsets.push(i);const a=e&&e[l].expanded&&e[l].rowType==="data"?o:s;i+=a,this.heights.push(a)}}height(t){return this.heights[t]}index(t){if(t<0)return;const s=this.offsets.reduce((o,e,i)=>{if(o!==void 0)return o;if(e===t)return i;if(e>t)return i-1},void 0);return s===void 0?this.total-1:s}offset(t){return this.offsets[t]}totalHeight(){const t=this.offsets[this.offsets.length-1],s=this.heights[this.heights.length-1];return t+s}}class dt{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=n.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=n.createRef(),this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(n.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}translate(t,s){this.scrollableVirtual&&this.table&&(Ie||this.reactVersion<=17||s?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,s){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},s)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef.current)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const s=this.container.scrollTop,o=this.lastScrollTop>=s,e=!o;this.lastScrollTop=s;let i=this.rowHeightService.index(s),l=this.rowHeightService.offset(i);const{offsetHeight:a}=this.containerRef.current,c=this.rowHeightService.index(s+a);if(e&&c>=this.lastLoaded&&this.lastLoaded<this.total){const h=i+this.pageSize-this.total;h>0&&(i=i-h,l=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(l);let d=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(d,this.total),this.changePage(this.firstLoaded,t)}else if(o&&i<this.firstLoaded){const h=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-h,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}const ws=1,Rs=20;class Ns{constructor(t){this.columns=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=s=>{this.isRtl=s},this.dragHandler=(s,o,e,i)=>{const l=s.originalEvent;i||(l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation());const a=e.closest("th");if(!a||!a)return;const c=a.clientWidth;let h=c;if(this.isRtl?h+=e.getBoundingClientRect().right-e.offsetWidth/2-s.clientX:h+=s.clientX-e.getBoundingClientRect().left-e.offsetWidth/2,!i&&Math.abs(h-c)<1)return;this.fixateInitialWidths(a.parentElement.clientWidth),this.setWidths(o,Math.floor(h)/c);const d=this.columns.filter(u=>!u.children.length).findIndex(u=>u.id===o.id);this.onResize(d,c,h,l,i,o.id)},this.dblClickHandler=(s,o)=>{const e=this.columns.filter(m=>o.indexOf(m.id)>-1);if(!this.colGroupMain||!e.length)return;const i={},l=e;for(;l.length>0;){const m=l.pop();if(!m)break;m.children.length?l.push(...m.children):i[m.id]=m}const a=this.columns.filter(m=>!m.children.length),c=[];a.forEach((m,g)=>{i[m.id]&&c.push(g)});const h=[this.colGroupMain.parentElement],d=[this.colGroupMain];this.colGroupHeader&&(h.push(this.colGroupHeader.parentElement),d.push(this.colGroupHeader)),this.colGroupFooter&&(h.push(this.colGroupFooter.parentElement),d.push(this.colGroupFooter)),h.forEach(m=>m.classList.add("k-autofitting"));let u=[];d.forEach(m=>{c.forEach(g=>{m.children[g]&&(m.children[g].width="",u[g]=Math.max(u[g]||0,m.children[g].offsetWidth+ws))})}),d.forEach(m=>{c.forEach(g=>{m.children[g]&&(m.children[g].width=u[g]+"px",a[g].width=u[g])})}),h.forEach(m=>m.classList.remove("k-autofitting")),this.onResize(c[0],0,0,s,!0,o[0])},this.updateColElements=s=>{const o=this.columns.filter(i=>!i.children.length);let e=1e-10;for(let i=0;i<s.length;i++){const l=s[i],a=o.findIndex(u=>u.id===l.id),c=parseFloat((l.width||0).toString()),h=Math.floor(c);e+=c-h;const d=h+Math.floor(e);if(e-=Math.floor(e),this.colGroupMain&&this.colGroupMain.children[a]){const u=parseInt(this.colGroupMain.children[a].width,10);this.colGroupMain.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupMain.parentElement,l,u-d)}if(this.colGroupHeader&&this.colGroupHeader.children[a]){const u=parseInt(this.colGroupHeader.children[a].width,10);this.colGroupHeader.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupHeader.parentElement,l,u-d)}if(this.colGroupFooter&&this.colGroupFooter.children[a]){const u=parseInt(this.colGroupFooter.children[a].width,10);this.colGroupFooter.children[a].width=d+"px",this.updateNextLockedCol(this.colGroupFooter.parentElement,l,u-d)}}},this.onResize=t}fixateInitialWidths(t){const s=this.columns.filter(l=>!l.children.length);let o=0,e=this.colGroupMain?this.colGroupMain.children:[];for(let l=0;l<e.length;l++)e[l].width?t-=parseFloat(e[l].width):o++;if(o===0)return;const i=Math.floor(t/o);for(let l=0;l<e.length;l++){const a=e[l];a.width||(a.width=i,s[l].width=i.toString(),this.colGroupHeader&&(this.colGroupHeader.children[l].width=i),this.colGroupFooter&&(this.colGroupFooter.children[l].width=i))}}setWidths(t,s){const o=this.columns.findIndex(l=>l.id===t.id),e=[];let i=t.children.length;for(let l=o+1;i>0&&l<this.columns.length;l++,i--){const a=this.columns[l];a.children.length?i+=a.children.length:e.push(a)}return e.length===0&&e.push(t),e.forEach(l=>{let a=l.width?parseFloat(l.width.toString())*s:0;const c=l.minResizableWidth===void 0?10:l.minResizableWidth;a<c&&(a=c),l.width=a}),this.updateColElements(e),e}updateNextLockedCol(t,s,o){const e=s.index,i=this.colGroupMain.parentElement.closest(".k-grid"),l=i==null?void 0:i.clientWidth,a=this.columns.filter(c=>c.locked).map(c=>parseInt(c.width+"",10)).reduce((c,h)=>c+h,0);!s.locked||l<=a+Rs||this.columns.forEach(c=>{if(c!=null&&c.locked&&o){const h=t==null?void 0:t.querySelectorAll('[aria-colindex="'+c.ariaColumnIndex+'"]');h==null||h.forEach(d=>{const u=d.style;this.isRtl?(c.index>e&&u&&u.right&&(u.right=parseInt(u.right,10)-o+"px"),c.index<e&&u&&u.left&&(u.left=parseInt(u.left,10)-o+"px")):(c.index>e&&u&&u.left&&(u.left=parseInt(u.left,10)-o+"px"),c.index<e&&u&&u.right&&(u.right=parseInt(u.right,10)-o+"px"))})}})}}class Pt{constructor(t,s,o){this.refDragElementClue=n.createRef(),this.refDropElementClue=n.createRef(),this.columns=[],this.reorderable=!1,this.groupable=!1,this.startColumn=-1,this.startGroup=-1,this.currentColumn=-1,this.currentGroup=-1,this.groupPanelDivElement=null,this.refGroupPanelDiv=e=>{this.groupPanelDivElement=e&&e.children?e.children[0]:e},this.pressHandler=(e,i)=>{const l=this.getColumnIndex(e,i);if(this.startGroup=this.getGroupIndex(e),l>=0){const a=this.columns[l];(a.reorderable&&this.reorderable||a.groupable&&this.groupable)&&(this.startColumn=l)}},this.dragHandler=(e,i)=>{if(e.isTouch||e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),this.startColumn===-1&&this.startGroup===-1)return;this.currentColumn=this.getColumnIndex(e,i);const l=this.groupPanelDivElement&&this.groupPanelDivElement.children;this.currentGroup=this.isTargetGroupingContainer(e)?l&&l.length?l.length:0:this.getGroupIndex(e);const a=!this.isValid();a&&(this.currentColumn=-1,this.currentGroup=-1);const c=this.currentColumn>=0?i.children[this.columns[this.currentColumn].index]:this.isTargetGroupingContainer(e)?e.originalEvent.target:this.groupPanelDivElement&&this.groupPanelDivElement.children[this.currentGroup];this.updateDragElementClue(e,i,c,a),this.updateDropElementClue(e,i,c,a)},this.releaseHandler=e=>{const i=this.startColumn,l=this.currentColumn,a=this.startGroup,c=this.currentGroup;e.originalEvent.preventDefault(),this.dropElementClue&&this.dropElementClue.setState({visible:!1}),this.dragElementClue&&this.dragElementClue.setState({visible:!1});const h=this.isValid();this.startColumn=this.startGroup=this.currentColumn=this.currentGroup=-1,h&&(i>=0&&l>=0?this.columnReorder(i,l,e.originalEvent):a>=0&&c>=0?this.groupReorder(a,c,e.originalEvent):i>=0&&c>=0&&this.columnToGroup(i,c,e.originalEvent))},this.columnReorder=t,this.groupReorder=s,this.columnToGroup=o}get dragClueRef(){return this.refDragElementClue}get dropClueRef(){return this.refDropElementClue}get dragElementClue(){return this.refDragElementClue.current}get dropElementClue(){return this.refDropElementClue.current}getColumnIndex(t,s){if(!s||s.parentElement===this.groupPanelDivElement)return-1;const o=b.getIndex(t,s);if(o===-1)return-1;for(let e=0;e<s.parentNode.children.length;e++)if(s.parentNode.children[e]===s)return this.columns.findIndex(i=>i.index===o&&i.depth===e);return-1}isTargetGroupingContainer(t){const s=t.originalEvent.target;return s.className.indexOf?s.className.indexOf("k-grouping-drop-container")!==-1:!1}getGroupIndex(t){return b.getIndex(t,this.groupPanelDivElement)}isValid(){return this.startGroup>=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:this.startColumn===-1?!1:this.currentGroup>=0?this.columns[this.startColumn].groupable===!0&&this.groupable===!0:this.reorderable===!0&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&this.columns[this.startColumn].reorderable===!0&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex}updateDragElementClue(t,s,o,e){if(!this.dragElementClue)return;const i=this.startColumn>=0?s.children[this.columns[this.startColumn].index].innerText:s.innerText;this.dragElementClue.setState({visible:!0,top:t.pageY+10,left:t.pageX,innerText:i,status:e||!o?"k-i-cancel":"k-i-plus"})}updateDropElementClue(t,s,o,e){if(!this.dropElementClue)return;if(e||!o){this.dropElementClue.setState({visible:!1});return}const i=o.getBoundingClientRect(),a=(o.closest(".k-grouping-header")||o).getBoundingClientRect();let c=i.left+t.pageX-t.clientX-6;!this.isTargetGroupingContainer(t)&&(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&this.startGroup!==-1)&&(c+=i.width);const h=a.top+t.pageY-t.clientY;this.dropElementClue.setState({visible:!0,top:h,left:c,height:this.currentColumn>=0?s.clientHeight:a.height})}}const At=r=>{let t=null;const s=E.useInternationalization(),o=b.useTableKeyboardNavigation(r.id),e=n.useCallback(h=>{r.onContextMenu&&r.onContextMenu.call(void 0,h,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]);let i=null,l=null;if(r.rowType==="groupFooter")i={onContextMenu:e,className:r.className},t=n.createElement("td",{...i});else if(r.rowType!=="groupHeader"){if(r.field!==void 0){const d=L(r.field,r.dataItem);d!=null&&(l=r.format?s.format(r.format,d):d.toString())}const h=f.classNames("k-table-td",r.className,{"k-selected":r.isSelected});i={onContextMenu:e,colSpan:r.colSpan,style:r.style,className:h,role:"gridcell","aria-colindex":r.ariaColumnIndex,"aria-selected":r.isSelected,[U]:r.columnIndex,...o},t=n.createElement("td",{...i},l)}const a=r.rowType||"data",c=r.cells;if(c&&c[a]){const h=c[a];return n.createElement(h,{...r,tdProps:i},l)}return r.render?r.render.call(void 0,t,r):t},Pe=r=>{let t=null;const{columnIndex:s,level:o,columnsCount:e,rowType:i,dataItem:l,field:a,onChange:c,expanded:h,render:d,dataIndex:u,ariaColumnIndex:m,isRtl:g}=r,x=a||"",y=b.useTableKeyboardNavigation(r.id),v=E.useLocalization();let k=null,R=null,S=null;const _=n.useCallback(T=>{T.isDefaultPrevented()||T.keyCode===f.Keys.enter&&c&&(T.preventDefault(),c({dataItem:l,dataIndex:u,syntheticEvent:T,field:void 0,value:!h}))},[h,c,l,u]),z=n.useCallback(T=>{r.onContextMenu&&r.onContextMenu.call(void 0,T,r.dataItem,r.field)},[r.onContextMenu,r.dataItem,r.field]),ce=(T,be)=>{const he=h?yt:It,ve=v.toLanguageString(he,I[he]);return k={className:"k-table-td",style:{...r.style,...be},colSpan:T,key:"g-colspan",role:"gridcell",["aria-selected"]:!1,["aria-expanded"]:h,["aria-colindex"]:m,onKeyDown:_,onContextMenu:z,...y},S=n.createElement("p",{className:"k-reset"},n.createElement("a",{onClick:Q=>{Q.preventDefault(),c&&c({dataItem:l,dataIndex:u,syntheticEvent:Q,field:void 0,value:!h})},href:"#",tabIndex:-1,"aria-label":ve},n.createElement(f.IconWrap,{name:h?"caret-alt-down":g?"caret-alt-left":"caret-alt-right",icon:h?w.caretAltDownIcon:g?w.caretAltLeftIcon:w.caretAltRightIcon})),l[x]instanceof Date&&l[x].toString?l[x].toString():l[x]),n.createElement("td",{...k,key:k.key},S)};s===void 0||o===void 0||s<o||e===void 0||i!=="groupHeader"||l[x]===void 0?(k={style:r.style,key:"g"+s,className:f.classNames("k-table-td","k-group-cell",{"k-grid-content-sticky":r.locked}),role:"gridcell",onContextMenu:z},t=n.createElement("td",{...k,key:k.key})):s<=o&&!r.locked?t=ce(e-s,{}):s<=o&&r.locked&&(R={className:"k-table-td",role:"gridcell",colSpan:e-s,style:{borderLeftWidth:0,borderRightWidth:0},onContextMenu:z},t=n.createElement(n.Fragment,null,ce(0,{position:"sticky",zIndex:2}),n.createElement("td",{...R})));const Y=r.rowType||"data",V=r.cells;if(V&&V.group&&V.group[Y]){const T=V.group[Y];return n.createElement(T,{...r,tdProps:k,td2Props:R},S)}return d?d.call(void 0,t,r):t};class Bt extends n.Component{render(){const t=f.classNames("k-table-row",{"k-table-group-row k-grouping-row":this.props.rowType==="groupHeader","k-group-footer":this.props.rowType==="groupFooter","k-master-row":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter","k-table-alt-row k-alt":this.props.rowType!=="groupHeader"&&this.props.rowType!=="groupFooter"&&this.props.isAltRow,"k-selected":this.props.isSelected,"k-grid-edit-row":this.props.isInEdit}),s=n.createElement("tr",{id:this.props.id,onClick:this.props.onClick,onDoubleClick:this.props.onDoubleClick,className:t,style:{height:this.props.rowHeight?this.props.rowHeight+"px":"",visibility:this.props.isHidden?"hidden":""},role:"row","aria-rowindex":this.props.ariaRowIndex,"absolute-row-index":this.props.absoluteRowIndex,key:this.props.absoluteRowIndex,[Dt]:this.props.rowType==="data"?this.props.dataIndex:void 0},this.props.children);return this.props.render?this.props.render.call(void 0,s,this.props):s}}class Wt extends n.Component{get _inputId(){return this.props.id}render(){const t=E.provideLocalizationService(this),{columnMenuWrapperProps:s}=this.props,o=[n.createElement("span",{key:0,className:"k-checkbox-wrap"},n.createElement("input",{id:this._inputId,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(le,I[le]),"aria-checked":this.props.selectionValue,checked:this.props.selectionValue,onChange:e=>this.props.selectionChange({field:this.props.field,syntheticEvent:e})})),s.columnMenu&&n.createElement(We,{...s})];return this.props.render?this.props.render.call(void 0,o,this.props):o}}E.registerForLocalization(Wt);const Fs=f.withIdHOC(Wt);class me extends n.Component{render(){return this.props.children||E.provideLocalizationService(this).toLanguageString(ye,I[ye])}}me.displayName="KendoReactGridNoRecords";E.registerForLocalization(me);class Ds extends n.Component{constructor(){super(...arguments),this._element=null,this.renderCell=(t,s)=>{const o={colSpan:t.colSpan!==1?t.colSpan:void 0,style:t.left!==void 0?this.props.isRtl?{left:t.right,right:t.left}:{left:t.left,right:t.right}:{},className:f.classNames("k-table-td",t.locked&&t.left!==void 0?"k-grid-footer-sticky":""),key:s,role:"gridcell",["aria-colindex"]:t.ariaColumnIndex},e={field:t.field,ariaColumnIndex:t.ariaColumnIndex,...o},i=fe(this.props.cells,t.cells);if(i&&i.footerCell){const l=i.footerCell;return n.createElement(l,{...e,tdProps:o,index:s})}return t.footerCell&&n.createElement(t.footerCell,{...e,key:s})||n.createElement("td",{...o})}}get element(){return this._element}render(){return n.createElement("tr",{className:"k-table-row",role:"row","aria-rowindex":this.props.ariaRowIndex},cs(this.props.columns).map(this.renderCell))}}const Ts=({buttonCount:r=10,info:t=!0,type:s="numeric",pageSizes:o=void 0,previousNext:e=!0,responsive:i=void 0,pageSizeValue:l=void 0})=>({buttonCount:r,info:t,pageSizes:o===!0?[5,10,20]:o||void 0,previousNext:e,responsive:i!==!1,type:s,pageSizeValue:l}),Gs=r=>Ts(r===!0?{}:r),pt={name:"@progress/kendo-react-grid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},Ms=r=>{const{colSpan:t,ariaColIndex:s,dataItem:o,dataIndex:e,id:i}=r,l=b.useTableKeyboardNavigation(i),a=n.useCallback(c=>{r.onContextMenu&&r.onContextMenu.call(void 0,c,r.dataItem)},[r.onContextMenu,r.dataItem]);return n.createElement("td",{onContextMenu:a,className:"k-table-td k-detail-cell",colSpan:t,"aria-colindex":s,role:"gridcell",...l},n.createElement(r.detail,{dataItem:o,dataIndex:e}))},zs=r=>{const t=b.useTableKeyboardNavigation(r.id);return n.createElement("td",{className:"k-table-td k-hierarchy-cell",...t,role:"gridcell"})};let X=class extends n.Component{constructor(t){super(t),this._columns=[],this._columnsMap=[[]],this._columnsMutations=0,this._resized=!1,this._shouldUpdateLeftRight=!0,this.contextStateRef={current:void 0},this.navigationStateRef={current:void 0},this._data=[],this._slicedData=void 0,this.wrapperScrollTop=0,this.showLicenseWatermark=!1,this.headerRef=n.createRef(),this.headerElementRef=n.createRef(),this._element=null,this.tableElement=null,this.containerRef=n.createRef(),this.tableBodyRef=n.createRef(),this._footer=null,this.forceUpdateTimeout=void 0,this.isRtl=!1,this.observer=null,this.handleIntersection=e=>{const i={rowIndex:this.rowIndex};e.forEach(l=>{l.isIntersecting||this.setCurrentOnTop(i)})},this.setCurrentOnTop=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.observer&&this.observer.disconnect();const{rowIndex:i}=e;if(this.props.scrollable==="virtual")this.vs.askedSkip=i,this.vs.container.scroll(0,Math.round(this.vs.askedSkip/this.vs.total*this.vs.container.scrollHeight));else if(this.element){const l=i<1?this.element.querySelector("tbody > tr:nth-child(1)"):this.element.querySelector(`tbody > tr:nth-child(${i+1})`);l&&this.containerRef.current&&(this.containerRef.current.scrollTop=l.offsetTop)}},this.scrollIntoView=e=>{if(!this.vs.container||this.props.scrollable==="none")return;this.rowIndex=e.rowIndex;const{rowIndex:i}=e,l=this.element;if(this.observer&&l){this.observer.disconnect();const a=l.querySelector(`[absolute-row-index="${i}"]`);a?this.observer.observe(a):this.setCurrentOnTop(e)}},this.fitColumns=e=>{this.columnResize.dblClickHandler(null,e)},this.onContextMenu=(e,i,l)=>{if(this.props.onContextMenu){const a={target:this,syntheticEvent:e,nativeEvent:e.nativeEvent,dataItem:i,field:l};this.props.onContextMenu.call(void 0,a)}},this.getVirtualScroll=e=>{const{rowHeight:i,detailRowHeight:l,detail:a,expandField:c,groupable:h}=e,d=this.isAllData(),u=i!==void 0&&i>0,m=l!==void 0&&l>0,g=h===!0||typeof h=="object"&&h.enabled!==!1;return!u||g&&!d||!!(a&&c)&&(!m||!d)?ys:dt},this.isAllData=()=>{const{data:e,total:i}=this.props;return Array.isArray(e)?e.length===i:e?i===e.total:!1},this.initializeVirtualization=(e,i)=>{if(this.reInitVirtualization(this.props.scrollable==="virtual",this.props.total,this.props.filter,this.props.group,this.props.sort,i||this.props.rowHeight===void 0||this.props.rowHeight===0),this.vs.fixedScroll=this.props.fixedScroll||!1,this.vs.PageChange=this.pageChange,this.vs.realSkip=this.props.skip||0,this.vs.pageSize=(this.props.take!==void 0?this.props.take:this.props.pageSize)||0,this.vs.scrollableVirtual=this.props.scrollable==="virtual",this.vs.total=e,this.vs.propsSkip=(this.props.skip||0)+(this.props.scrollable==="virtual"?this.vs.topCacheCount+(this.vs.attendedSkip-(this.props.skip||0)):0),this.props.rowHeight!==void 0&&this.props.rowHeight>0&&!i){const l=this.props.rowHeight*e;this.vs.containerHeight=Ie?Math.min(ct,l):l}else this.vs.containerHeight=1533915;if(this.vs.containerRef=this.containerRef,this.vs.tableBodyRef=this.tableBodyRef,this.vs.table=this.tableElement,this._slicedData=void 0,this.vs instanceof dt){const{rowHeight:l=0,detail:a,expandField:c}=this.props;let{detailRowHeight:h=0}=this.props;h=a&&c?h:l,this.isAllData()?(this.vs.total=this._data.length,this._slicedData=this._data.slice(this.vs.realSkip,this.vs.realSkip+this.vs.pageSize),this.vs.rowHeightService=this.rowHeightService(this.vs,this._data.length,l,h,this._data)):this.vs.rowHeightService=new ht(e,l,h);const d=this.vs.rowHeightService.totalHeight();this.vs.containerHeight=Ie?Math.min(ct,d):d}},this.scrollHandler=e=>{if(e.target!==e.currentTarget)return;clearTimeout(this.forceUpdateTimeout),this.vs.table=this.tableElement;const i=e.currentTarget.scrollLeft,l=e.currentTarget.scrollTop;this.props.columnVirtualization&&(!this.vs.scrollableVirtual||l===this.wrapperScrollTop)&&(this.forceUpdateTimeout=window.setTimeout(()=>{this.forceUpdate()},0)),this._header&&this._header.setScrollLeft(i),this._footer&&this._footer.setScrollLeft(i),this.vs&&l!==this.wrapperScrollTop&&this.vs.scrollHandler(e),f.dispatchEvent(this.props.onScroll,e,this,void 0),this.wrapperScrollTop=l},this.onKeyDown=e=>{if(b.tableKeyboardNavigation.onKeyDown(e,{contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,onNavigationAction:this.onNavigationAction}),this.props.onKeyDown){const{mode:i,cell:l}=b.getSelectionOptions(this.props.selectable),a={dataItems:this.getLeafDataItems(),mode:i,cell:l,componentId:this._gridId,selectedField:this.props.selectedField,...this.getArguments(e)};this.props.onKeyDown.call(void 0,a)}},this.onFocus=e=>{b.tableKeyboardNavigation.onFocus(e,{contextStateRef:this.contextStateRef})},this.onNavigationAction=e=>{if(this.props.onNavigationAction){const i={focusElement:e.focusElement,...this.getArguments(e.event)};this.props.onNavigationAction.call(void 0,i)}},this.rowClick=(e,i)=>{this.props.onRowClick&&e.target.nodeName==="TD"&&this.props.onRowClick.call(void 0,{dataItem:i.dataItem,...this.getArguments(e)})},this.rowDblClick=(e,i)=>{this.props.onRowDoubleClick&&e.target.nodeName==="TD"&&this.props.onRowDoubleClick.call(void 0,{dataItem:i.dataItem,...this.getArguments(e)})},this.itemChange=e=>{const i=this.props.onItemChange;if(e.field===this.props.expandField||this.props.group&&e.field===void 0){const l=this.props.onExpandChange;l&&l.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,dataIndex:e.dataIndex,value:e.value});return}i&&i.call(void 0,{...this.getArguments(e.syntheticEvent),dataItem:e.dataItem,field:e.field,value:e.value})},this.onHeaderSelectionChange=e=>{this.props.onHeaderSelectionChange&&this.props.onHeaderSelectionChange.call(void 0,{field:e.field,nativeEvent:e.syntheticEvent&&e.syntheticEvent.nativeEvent,syntheticEvent:e.syntheticEvent,target:this,dataItems:this.getLeafDataItems(),selectedField:this.props.selectedField})},this.selectionRelease=e=>{if(this.props.onSelectionChange){const i={syntheticEvent:void 0,target:this,selectedField:this.props.selectedField||"",componentId:this._gridId,dataItems:this.getLeafDataItems(),dataItem:null,...e};this.props.onSelectionChange.call(void 0,i)}},this.pageChange=(e,i,l)=>{this.raiseDataEvent(this.props.onPageChange,{page:e},{skip:e.skip,take:e.take},i,l)},this.pagerPageChange=e=>{this.pageChange({skip:e.skip,take:e.take},e.syntheticEvent,e.targetEvent)},this.sortChange=(e,i)=>{this.raiseDataEvent(this.props.onSortChange,{sort:e},{sort:e,...this.props.scrollable==="virtual"?{skip:0}:{}},i)},this.filterChange=(e,i)=>{this.raiseDataEvent(this.props.onFilterChange,{filter:e},{filter:e||void 0,skip:0},i)},this.groupChange=(e,i)=>{const l=i.nativeEvent?i:{nativeEvent:i.nativeEvent||i.originalEvent};this.raiseDataEvent(this.props.onGroupChange,{group:e},{group:e,skip:0},l)},this.onClipboard=(e,i)=>{if(this.props.onClipboard){if(!this.inActiveElement()||!e)return;this.props.onClipboard.call(void 0,{type:e,nativeEvent:i,columns:this._columns,dataItemKey:this.props.dataItemKey||"",...typeof this.props.clipboard!="boolean"?this.props.clipboard:{}})}},this.inActiveElement=()=>{var c,h,d;if(!f.canUseDOM)return!1;const e=f.getActiveElement(this.document),i=e?e.matches(".k-table-td")?e:(c=this.document)==null?void 0:c.body:(h=this.document)==null?void 0:h.body,l=i.closest(".k-grid-container"),a=i&&((d=this._element)==null?void 0:d.contains(i));return!!(i&&a&&l)},this.onResize=(e,i,l,a,c,h)=>{this.resetTableWidth(),this._shouldUpdateLeftRight=!0,this._resized=!0,this._columnsMutations++,this.props.onColumnResize&&this.props.onColumnResize.call(void 0,{columns:this.columns,nativeEvent:a,targetColumnId:h,index:e,newWidth:i,oldWidth:l,end:c,target:this})},this.reInitVirtualization=f.memoizeOne((e,i,l,a,c,h)=>{this.vs.reset();const d=this.getVirtualScroll(this.props);this.vs=new d(h)}),this.flatData=f.memoizeOne((e,i,l,a,c,h,d)=>{const u=[],m=ut(u,e,i,{index:l},a!==void 0,c);return{flattedData:u,resolvedGroupsCount:m}}),this.rowHeightService=f.memoizeOne((e,i,l,a,c)=>new ht(i,l,a,c)),this.childrenToArray=f.memoizeOne(e=>n.Children.toArray(e)),this.readColumns=f.memoizeOne((e,i,l)=>{const a=e.filter(c=>c&&c.type&&c.type.displayName==="KendoReactGridColumn");return gt(a,this.columns,{prevId:0,idPrefix:i})}),this.mapColumns=f.memoizeOne(e=>b.mapColumns(e)),this.configureColumns=f.memoizeOne((e,i,l)=>{this.props.selectedField&&e.forEach(h=>{h.field===this.props.selectedField?(h.width=h.width||"50px",h.cell=h.cell||Nt,h.headerCell=h.headerCell||Fs):h.width=void 0});const a={id:"",resizable:!0,width:"32px",title:" ",declarationIndex:-1,orderIndex:-1,children:[],parentIndex:-1,depth:0,colSpan:0,rowSpan:0,left:0,right:0,index:0,rightBorder:!1,ariaColumnIndex:0,isAccessible:!0};let c=0;this.props.expandField&&this.props.onExpandChange&&this.props.detail&&(e.unshift({...a,cell:Ft,field:this.props.expandField,headerClassName:"k-hierarchy-cell k-header",id:b.tableKeyboardNavigationTools.generateNavigatableId(`${this._columns.length}`,l,"column")}),c++);for(let h=0;h<i;h++)e.unshift({...a,isAccessible:!1,cell:Pe,field:"value",locked:this.props.lockGroups}),c++;e.slice(c).forEach(h=>h.parentIndex>=0&&(h.parentIndex+=c))}),this.getHeaderRow=f.memoizeOne((e,i,l,a,c,h,d,u,m,g,x,y)=>n.createElement(zt,{cells:this.props.cells,sort:e,sortable:i,sortChange:this.sortChange,group:l||[],groupable:a,groupChange:this.groupChange,filter:c,filterable:h,filterOperators:d,filterChange:this.filterChange,columnMenu:m,selectionChange:this.onHeaderSelectionChange,columns:g,columnResize:this.columnResize,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,columnsMap:x,cellRender:u,isRtl:y,dragClue:this.dragLogic.dragClueRef,headerRef:this.headerElementRef,containerRef:this.containerRef})),this.resolveTitle=e=>{const i=this._columns.find(a=>a.field===e),l=i&&(i.title||i.field);return l===void 0?e:l},this.getLeafDataItems=()=>this._data.filter(e=>e.rowType==="data").map(e=>e.dataItem),f.validatePackage(pt),this.showLicenseWatermark=f.shouldShowValidationUI(pt);const s=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1,o=this.getVirtualScroll(t);this.vs=new o(s||t.rowHeight===void 0||t.rowHeight===0),this.dragLogic=new Pt(this.columnReorder.bind(this),this.groupReorder.bind(this),this.columnToGroup.bind(this)),this.columnResize=new Ns(this.onResize),this.props.clipboard&&(this.clipboardService=new b.ClipboardService(this.onClipboard)),b.tableKeyboardNavigation.onConstructor({navigatable:!!t.navigatable,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,idPrefix:this._gridId})}get columns(){const t=this._columns.filter(s=>s.declarationIndex>=0&&s.parentIndex===-1);return ft(t)}get element(){return this._element}get document(){if(f.canUseDOM)return this.element&&this.element.ownerDocument||document}get _header(){return this.headerRef.current}get _gridId(){return this.props.id+"-role-element-id"}componentDidMount(){this.resetTableWidth(),f.setScrollbarWidth();const t=b.isRtl(this.element);this.isRtl=t,b.tableKeyboardNavigation.onComponentDidMount({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),this.isRtl&&this.forceUpdate();const s={rootMargin:"0px",threshold:.9};this.clipboardService&&this.clipboardService.addEventListeners(this.document),this.observer=f.canUseDOM&&window.IntersectionObserver&&new window.IntersectionObserver(this.handleIntersection,s)||null}getSnapshotBeforeUpdate(){return b.tableKeyboardNavigation.onGetSnapshotBeforeUpdate({document:this.document,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),null}componentDidUpdate(){this.resetTableWidth(),f.setScrollbarWidth(),this.vs.tableTransform&&this.vs.table&&(this.vs.table.style.transform=this.vs.tableTransform,this.vs.tableTransform=""),b.tableKeyboardNavigation.onComponentDidUpdate({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}componentWillUnmount(){clearTimeout(this.forceUpdateTimeout),this.clipboardService&&this.clipboardService.removeEventListeners(this.document)}render(){var lt;let t=this.props.total||0;const s=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);let o=[];Array.isArray(this.props.data)?(o=this.props.data,t=t||this.props.data.length):this.props.data&&(o=this.props.data.data,t=t||this.props.data.total);const e=typeof this.props.groupable=="object"&&this.props.groupable.footer||"none",{resolvedGroupsCount:i,flattedData:l}=this.flatData(o,e,this.props.skip||0,this.props.group,this.props.expandField,this.props.filter,this.props.sort);this._data=l;const a=this.props.groupable===!0||typeof this.props.groupable=="object"&&this.props.groupable.enabled!==!1;this.columnResize.resizable=this.props.resizable||!1,this.dragLogic.reorderable=this.props.reorderable||!1,this.dragLogic.groupable=a;const c=this.props.selectable&&this.props.selectable.drag?"none":void 0;this.initializeVirtualization(t,a);const h=this.childrenToArray(this.props.children);this.initColumns(h,i);const d=h.map(C=>C&&C.type&&C.type.displayName==="KendoReactGridToolbar"?n.cloneElement(C,{...C.props,ariaControls:this._gridId}):null),u=h.filter(C=>C&&C.type&&C.type.displayName==="KendoReactGridNoRecords"),m=h.filter(C=>C&&C.type&&C.type.displayName==="KendoReactGridStatusBar"),g=this._columns.filter(C=>C.children.length===0),x=a&&n.createElement(_t,{group:this.props.group||[],groupChange:this.groupChange,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler,refCallback:this.dragLogic.refGroupPanelDiv,resolveTitle:this.resolveTitle,ariaControls:this._gridId,onContextMenu:this.onContextMenu}),{sort:y,sortable:v,group:k,filter:R,filterable:S,filterOperators:_=He,headerCellRender:z,columnMenu:ce}=this.props,Y=n.createElement(ms,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",scrollableDataElement:()=>this.vs.container,draggable:this.props.reorderable||a,ref:this.headerRef,elemRef:this.headerElementRef,headerRow:this.getHeaderRow(y,v,k,a,R,S,_,z,ce,this._columns,this._columnsMap,this.isRtl),filterRow:this.props.filterable&&n.createElement(Ot,{cells:this.props.cells,size:this.props.size,columns:this._columns,filter:this.props.filter,filterOperators:this.props.filterOperators||He,filterChange:this.filterChange,sort:this.props.sort,cellRender:this.props.filterCellRender,isRtl:this.isRtl,ariaRowIndex:this._columnsMap.length+1})||void 0,cols:g.map((C,F)=>n.createElement("col",{key:F.toString(),width:Se(C)}))}),V=this.vs&&this.vs.container&&this.vs.container.scrollLeft||0,T=parseFloat(((this.props.style||{}).width||"").toString()),{colSpans:be,hiddenColumns:he}=b.tableColumnsVirtualization({enabled:this.props.columnVirtualization,columns:g,tableViewPortWidth:T,scrollLeft:V}),ve=(C,F,D)=>{let q=!1;const W=this.props.selectedField?L(this.props.selectedField,C.dataItem):void 0;return{row:g.map((N,G)=>{if(he[G])return null;const Z=N.id?N.id:G,ee=`${N.className?N.className+" ":""}${N.locked?"k-grid-content-sticky":""}`,P=N.left!==void 0?this.isRtl?{left:N.right,right:N.left}:{left:N.left,right:N.right}:{};let A=!1;if(N.editable&&this.props.editField){const O=L(this.props.editField,C.dataItem);O&&(O===!0||O===N.field)&&(q=!0,A=!0)}const Ee=N.cell||A&&Tt||At;return n.createElement(Ee,{onContextMenu:this.onContextMenu,key:Z,locked:this.props.lockGroups,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${F}-${String(G)}`,s),colSpan:be[G],dataItem:C.dataItem,field:N.field,editor:N.editor,format:N.format,className:ee,render:this.props.cellRender,cells:fe(this.props.cells,N.cells),onChange:this.itemChange,selectionChange:this.props.onSelectionChange?O=>{this.selectionChange({event:O,dataItem:C.dataItem,dataIndex:D,columnIndex:G})}:void 0,columnIndex:G,columnsCount:g.length,rowType:C.rowType,level:C.level,expanded:C.expanded,dataIndex:C.dataIndex,style:P,ariaColumnIndex:N.ariaColumnIndex,isSelected:Array.isArray(W)&&W.indexOf(G)>-1})}),isInEdit:q,isSelected:typeof W=="boolean"&&W}};let Q=0;if(this.props.scrollable==="virtual")for(let C=0;C<this.vs.topCacheCount+this.vs.attendedSkip-(this.props.skip||0);C++){const F=this._data.shift();if(F)this._data.push(F),Q++,F.rowType==="groupHeader"&&C--;else break}const Je=C=>C>=this._data.length-Q;let Ze=this.vs.realSkip||0;const de=[];let xe=!1;const ke=this._columnsMap.length+(this.props.filterable?1:0)+1,et=n.createElement("div",{key:"no-records",className:"k-grid-norecords","aria-rowindex":ke},n.createElement("div",{className:"k-grid-norecords-template"},u.length?u:n.createElement(me,null)));let J=0;if(this._data.length){let C=-1,F=0;(this._slicedData||this._data).forEach((D,q)=>{D.rowType==="data"&&(Ze++,C++);const W=Ze%2===0,N=this.props.dataItemKey&&f.getter(this.props.dataItemKey)(D.dataItem),G=q+(this.vs.realSkip||0),Z=N||"ai"+G,ee=Z+"_1",P=ve(D,Z,C);if(J=G+ke+F,de.push(n.createElement(Bt,{key:Z,dataItem:D.dataItem,isAltRow:W,isInEdit:P.isInEdit,rowType:D.rowType,isHidden:Je(q),onClick:A=>this.rowClick(A,D),onDoubleClick:A=>this.rowDblClick(A,D),selectedField:this.props.selectedField,rowHeight:this.props.rowHeight,render:this.props.rowRender,ariaRowIndex:J,absoluteRowIndex:G,dataIndex:C,isSelected:P.isSelected},P.row)),this.props.detail&&D.rowType==="data"&&D.expanded){const A=g.length-(this.props.expandField?1:0)-(this.props.group?this.props.group.length:0)||1;F++,J=G+ke+F,de.push(n.createElement("tr",{key:ee,className:f.classNames("k-table-row",W?"k-detail-row k-table-alt-row k-alt":"k-detail-row"),style:{visibility:Je(q)?"hidden":"",height:this.props.detailRowHeight},role:"row","aria-rowindex":J},this.props.group&&this.props.group.map((Ee,O)=>{var at;const te=(at=P==null?void 0:P.row[O])==null?void 0:at.props.style,ss=te?this.isRtl?{left:te.right,right:te.left}:{left:te.left,right:te.right}:{};return n.createElement(Pe,{id:"",dataIndex:D.dataIndex,field:Ee.field,dataItem:D.dataItem,key:O,style:ss,ariaColumnIndex:1+O,isSelected:!1,locked:this.props.lockGroups,isRtl:this.isRtl,cells:this.props.cells})}),this.props.expandField&&n.createElement(zs,{id:b.tableKeyboardNavigationTools.generateNavigatableId(`${ee}-dhcell`,s)}),n.createElement(Ms,{onContextMenu:this.onContextMenu,dataItem:D.dataItem,dataIndex:D.dataIndex,colSpan:A,ariaColIndex:2+(this.props.group?this.props.group.length:0),detail:this.props.detail,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${ee}-dcell`,s)})))}})}else xe=!0;const tt={size:this.props.size,onPageChange:this.pagerPageChange,total:t,dir:this.isRtl?"rtl":void 0,skip:this.vs.propsSkip||0,take:(this.props.take!==void 0?this.props.take:this.props.pageSize)||10,messagesMap:gs,...Gs(this.props.pageable||{})},st=this.props.pager?n.createElement(this.props.pager,{...tt}):n.createElement(b.Pager,{className:"k-grid-pager",...tt}),es=C=>this.props.sort&&this.props.sort.filter(F=>F.field===C).length>0,ts=(C,F)=>n.createElement("col",{key:F.toString(),width:Se(C)}),rt=(lt=this.props.cells)!=null&&lt.footerCell||this._columns.some(C=>{var F;return!!(C.footerCell||(F=C.cells)!=null&&F.footerCell)})?n.createElement(Is,{size:this.props.size,columnResize:this.columnResize,staticHeaders:this.props.scrollable!=="none",ref:C=>this._footer=C,row:n.createElement(Ds,{cells:this.props.cells,columns:this._columns,isRtl:this.isRtl,ariaRowIndex:J+1}),cols:g.map(ts)}):null,it=n.createElement("colgroup",{ref:C=>{this.columnResize.colGroupMain=C}},g.map((C,F)=>n.createElement("col",{key:F.toString(),className:es(C.field)?"k-sorted":void 0,width:Se(C)}))),ot=this.dragLogic.reorderable||this.dragLogic.groupable,nt=this.props.columnVirtualization?"block":"table";if(this.props.scrollable==="none")return n.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},n.createElement("div",{id:this.props.id,style:this.props.style,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),ref:C=>{this._element=C},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,x,n.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:C=>{this.tableElement=C}},n.createElement("table",{className:f.classNames("k-table k-grid-table",{[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),style:{userSelect:c,display:nt}},it,Y,n.createElement("tbody",{role:"rowgroup",className:"k-table-tbody",...b.tableKeyboardNavigationBodyAttributes},de),rt)),xe&&et,ot&&n.createElement(n.Fragment,null,n.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),n.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue}))),m,this.props.pageable&&st);let pe=this.props.style||{};return this.props.scrollable==="virtual"&&(pe.height||(pe=Object.assign({},pe,{height:"450px"}))),n.createElement(b.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},n.createElement("div",{id:this.props.id,style:pe,className:f.classNames("k-grid",{"k-grid-md":!this.props.size,[`k-grid-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size,"k-grid-virtual":this.props.scrollable==="virtual"},this.props.className),ref:C=>{this._element=C},"aria-label":this.props.ariaLabel,onKeyDown:this.onKeyDown,onFocus:this.onFocus,...b.tableKeyboardNavigationScopeAttributes},d,x,n.createElement("div",{className:"k-grid-aria-root",role:"grid","aria-colcount":g.length,"aria-rowcount":t,id:this._gridId},Y,n.createElement("div",{className:"k-grid-container",role:"presentation"},n.createElement("div",{ref:this.containerRef,className:"k-grid-content k-virtual-content",onScroll:this.scrollHandler,role:"presentation"},n.createElement("div",{className:"k-grid-table-wrap",role:"presentation"},n.createElement(b.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:C=>{this.tableElement=C}},n.createElement("table",{className:f.classNames("k-table k-grid-table",{"k-table-md":!this.props.size,[`k-table-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size}),role:"presentation",style:{userSelect:c,display:nt}},it,n.createElement("tbody",{className:"k-table-tbody",ref:this.tableBodyRef,role:"rowgroup",...b.tableKeyboardNavigationBodyAttributes},de))),xe&&et),n.createElement("div",{className:"k-height-container",role:"presentation"},n.createElement("div",{style:this.props.scrollable==="virtual"?{height:this.vs.containerHeight+"px"}:{}})))),rt,ot&&n.createElement(n.Fragment,null,n.createElement(b.DropClue,{ref:this.dragLogic.refDropElementClue}),n.createElement(b.DragClue,{ref:this.dragLogic.refDragElementClue})),this.showLicenseWatermark&&n.createElement(f.WatermarkOverlay,null)),m,this.props.pageable&&st))}selectionChange(t){if(this.props.onSelectionChange){const{event:s,dataItem:o,dataIndex:e,columnIndex:i}=t,{mode:l,cell:a}=b.getSelectionOptions(this.props.selectable),c={...this.getArguments(s.syntheticEvent),dataItem:o,startColIndex:i,endColIndex:i,startRowIndex:e,endRowIndex:e,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:l,cell:a,isDrag:!1,componentId:this._gridId,selectedField:this.props.selectedField||""};this.props.onSelectionChange.call(void 0,c)}}raiseDataEvent(t,s,o,e,i){const l=this.props.onDataStateChange;if(t){const a={...this.getArguments(e),...s,targetEvent:i};t.call(void 0,a)}else l&&l.call(void 0,{...this.getArguments(e),targetEvent:i||{},dataState:{...this.getDataState(),...o}})}columnReorder(t,s,o){const e=this._columns[t],i=e.depth,l=d=>{do d++;while(d<this._columns.length&&this._columns[d].depth>i);return d},a=this._columns.splice(t,l(t)-t);this._columns.splice(t<s?l(s-a.length):s,0,...a),this._columns.filter(d=>d.declarationIndex>=0).forEach((d,u)=>d.orderIndex=u),this._columnsMutations++;const c=this._columns[t].locked&&this._columns[s].locked;b.updateLeft(this._columnsMap,this._columns,c||this._shouldUpdateLeftRight),b.updateRight(this._columnsMap,this._columns,c||this._shouldUpdateLeftRight),this._resized&&(this._shouldUpdateLeftRight=!1,this._resized=!1);const h=this.columns;if(this.forceUpdate(),this.props.onColumnReorder){const d={target:this,columns:h,columnId:e.id,nativeEvent:o};this.props.onColumnReorder.call(void 0,d)}}groupReorder(t,s,o){if(this.props.group===void 0)return;const e=this.props.group.slice();e.splice(s,0,...e.splice(t,1)),this.groupChange(e,o)}columnToGroup(t,s,o){const e=this._columns[t].field;if(!e)return;const i=(this.props.group||[]).slice();i.splice(s,0,{field:e}),this.groupChange(i,o)}resetTableWidth(){let t=0;if(!this.columnResize.colGroupMain)return;const s=this.columnResize.colGroupMain.children;for(let o=0;o<s.length;o++){const e=s[o].width;if(!e)return;t+=parseFloat(e.toString())}t=Math.round(t),this._header&&this._header.setWidth(t),this._footer&&this._footer.setWidth(t),this.tableElement&&(this.tableElement.style.width=t+"px")}initColumns(t,s){const o=b.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);this._columns=this.readColumns(t,o,this._columnsMutations),this._columns.length===0&&(this._columns=ls(this.props.data,this.props.group,this.props.expandField,{prevId:0,idPrefix:o})),this.configureColumns(this._columns,s,o),this._columnsMap=this.mapColumns(this._columns),this.columnResize.columns=this._columns,this.dragLogic.columns=this._columns}getDataState(){return{filter:this.props.filter,sort:this.props.sort,skip:this.props.skip,take:this.props.take!==void 0?this.props.take:this.props.pageSize,group:this.props.group}}getArguments(t){return{nativeEvent:t&&t.nativeEvent,syntheticEvent:t,target:this}}};X.displayName="KendoReactGrid";X.defaultProps={};X.propTypes={data:p.oneOfType([p.array,p.shape({data:p.array,total:p.number})]),sortable:p.oneOfType([p.bool,p.shape({mode:p.oneOf(["single","multiple"]),allowUnsort:p.bool})]),onSortChange:p.func,sort:p.array,filterable:p.bool,filter:p.any,onFilterChange:p.func,pageable:p.oneOfType([p.bool,p.shape({buttonCount:p.number,responsive:p.bool,info:p.bool,type:p.oneOf(["numeric","input"]),pageSizes:p.oneOfType([p.bool,p.arrayOf(p.oneOfType([p.string,p.number]))]),previousNext:p.bool})]),pageSize:p.number,onPageChange:p.func,total:p.number,skip:p.number,take:p.number,fixedScroll:p.bool,onExpandChange:p.func,expandField:p.string,selectedField:p.string,onSelectionChange:p.func,onHeaderSelectionChange:p.func,resizable:p.bool,reorderable:p.bool,group:p.any,groupable:p.oneOfType([p.bool,p.shape({enabled:p.bool,footer:p.oneOf(["always","visible","none"])})]),onGroupChange:p.func,onRowClick:p.func,onRowDoubleClick:p.func,onItemChange:p.func,editField:p.string,scrollable:p.oneOf(["none","scrollable","virtual"]),rowHeight:p.number,detailRowHeight:p.number,detail:p.any,style:p.object,onDataStateChange:p.func,onColumnResize:p.func,onColumnReorder:p.func,dataItemKey:p.string,navigatable:p.bool,size:p.oneOf(["small","medium"])};X.contextType=b.TableKeyboardNavigationContext;class ae extends n.Component{render(){const{children:t}=this.props;return n.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-wrapper",this.props.className),style:this.props.style},t)}}class $ extends n.Component{render(){const{title:t,iconClass:s,svgIcon:o,selected:e}=this.props;return n.createElement("div",{onClick:this.props.onClick,className:`k-columnmenu-item ${e?"k-selected":""}`},(s||o)&&n.createElement(f.IconWrap,{name:s&&f.toIconName(s),icon:o}),t)}}class je extends n.Component{constructor(){super(...arguments),this.onGroupClick=t=>{if(t.preventDefault(),this.props.onGroupChange){const{column:s}=this.props;if(!s.field)return;const o=(this.props.group||[]).slice(),e=o.findIndex(i=>i.field===s.field);e>-1?o.splice(e,1):o.push({field:s.field}),this.props.onGroupChange(o,t)}this.props.onCloseMenu&&this.props.onCloseMenu()}}render(){const{group:t,column:s}=this.props,o=E.provideLocalizationService(this),e=!!(t&&s.field&&t.find(l=>l.field===s.field)),i=e?St:Et;return n.createElement(ae,null,n.createElement($,{title:o.toLanguageString(i,I[i]),iconClass:e?"k-i-ungroup":"k-i-group",svgIcon:e?w.ungroupIcon:w.groupIcon,onClick:this.onGroupClick}))}}E.registerForIntl(je);E.registerForLocalization(je);const Kt="asc",Vt="desc",Ls={true:{asc:{asc:"",desc:"desc"},desc:{asc:"asc",desc:""},"":{asc:"asc",desc:"desc"}},false:{asc:{asc:"asc",desc:"desc"},desc:{asc:"asc",desc:"desc"},"":{asc:"asc",desc:"desc"}}},qt=(r,t)=>t?t.findIndex(s=>s.field===r):-1,Ut=(r,t)=>!!(t&&r>-1&&t[r].dir===Kt),$t=(r,t)=>!!(t&&r>-1&&t[r].dir===Vt);class Ce extends n.Component{constructor(){super(...arguments),this.onAscClick=t=>{this.onSort(t,Kt),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onDescClick=t=>{this.onSort(t,Vt),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onSort=(t,s)=>{if(t.preventDefault(),!this.props.onSortChange)return;const{column:o,sortable:e,sort:i}=this.props,{allowUnsort:l,mode:a}=Gt(e||!1,!1),c=(i||[]).filter(u=>u.field===o.field)[0],h=Ls[l][c&&c.dir||""][s],d=a==="single"?[]:(this.props.sort||[]).filter(u=>u.field!==o.field);h!==""&&o.field&&d.push({field:o.field,dir:h}),this.props.onSortChange(d,t)}}render(){const{sort:t,column:s}=this.props,o=qt(s.field,t),e=E.provideLocalizationService(this);return n.createElement(ae,null,n.createElement($,{title:e.toLanguageString(Ne,I[Ne]),iconClass:"k-i-sort-asc-sm",svgIcon:w.sortAscSmallIcon,selected:Ut(o,t),onClick:this.onAscClick}),n.createElement($,{title:e.toLanguageString(Fe,I[Fe]),iconClass:"k-i-sort-desc-sm",svgIcon:w.sortDescSmallIcon,selected:$t(o,t),onClick:this.onDescClick}))}}Ce.active=(r,t)=>{const s=qt(r,t);return $t(s,t)||Ut(s,t)};E.registerForIntl(Ce);E.registerForLocalization(Ce);class Xe extends n.Component{render(){return n.createElement("div",{id:this.props.id,className:f.classNames("k-columnmenu-item-content",this.props.className),style:this.props.style},n.createElement(os.Reveal,{style:{position:"relative",display:"block"}},this.props.show?this.props.children:null))}}class Ae extends n.Component{constructor(t){super(t),this.renderOperatorEditor=()=>{if(this.props.filterType==="boolean")return;const s=this.props.operators.find(o=>o.operator===this.props.operator)||null;return n.createElement(ie.DropDownList,{value:s,onChange:this.operatorChange,data:this.props.operators,textField:"text"})},this.inputChange=this.inputChange.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){return n.createElement(n.Fragment,null,this.renderOperatorEditor(),this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues))}inputChange(t,s){Ve(t,s,this.props)}operatorChange(t){Ue(t,this.props.value,this.props.onChange)}boolDropdownChange(t){qe(t,this.props.onChange)}filterComponent(t,s,o){switch(t){case"numeric":return n.createElement(M.NumericTextBox,{value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)},rangeOnEnter:!1});case"date":return n.createElement(Be.DatePicker,{value:s,onChange:e=>{this.inputChange(e.value,e.syntheticEvent)}});case"boolean":{const e=i=>i==null;return n.createElement(ie.DropDownList,{onChange:this.boolDropdownChange,value:o.find(i=>i.operator===(e(s)?"":s)),data:o,textField:"text"})}default:return n.createElement(M.Input,{value:s||"",onChange:e=>{this.inputChange(e.target.value,e.syntheticEvent)}})}}}class jt extends n.Component{render(){const{firstFilterProps:t,hideSecondFilter:s,secondFilterProps:o,logicData:e,logicValue:i,onLogicChange:l}=this.props;return n.createElement(n.Fragment,null,n.createElement(Ae,{...t}),!s&&n.createElement(n.Fragment,null,n.createElement(ie.DropDownList,{data:e,value:i,onChange:l,className:"k-filter-and",textField:"text"}),n.createElement(Ae,{...o})))}}const ge=r=>r||{filters:[],logic:"and"},re=(r,t)=>ge(t).filters.filter(e=>ue.isCompositeFilterDescriptor(e)?e.filters&&e.filters.length&&e.filters.length<=2&&!e.filters.find(i=>ue.isCompositeFilterDescriptor(i)||i.field!==r):!1)[0]||null;class Ye extends n.Component{constructor(t){super(t),this.removeGroup=(o,e)=>{const i=[...e.filters],l=i.findIndex(a=>a===o);return l>-1&&i.splice(l,1),{...e,filters:i}},this.insertGroup=(o,e)=>({...e,filters:[o,...e.filters]}),this.isControlled=()=>this.props.expanded!==void 0,this.onFilterExpand=()=>{const o=this.isControlled(),e=!(o?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(e),o||this.setState({expanded:e})},this.firstFilterChange=o=>{this.filterChange(0,o)},this.secondFilterChange=o=>{this.filterChange(1,o)},this.filterChange=(o,e)=>{const i=this.state.filterGroup.filters.map((l,a)=>a===o?{...l,value:e.value,operator:e.operator}:l);this.setState({filterGroup:{...this.state.filterGroup,filters:i}})},this.logicChange=o=>{this.setState({filterGroup:{...this.state.filterGroup,logic:o.target.value.operator}})},this.clear=o=>{if(o.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,i=ge(this.props.filter),l=re(e,this.props.filter),a=i.filters.filter(c=>c!==l);a.length?this.props.onFilterChange({...i,filters:a},o):this.props.onFilterChange(null,o),this.props.onCloseMenu&&this.props.onCloseMenu()},this.currentFilterGroup=()=>({...this.state.filterGroup,filters:this.state.filterGroup.filters.filter(o=>o.value!==void 0&&o.value!==null&&o.value!==""||o.value===null&&o.operator)}),this.submit=o=>{if(o.preventDefault(),!this.props.onFilterChange)return;const e=this.props.column.field,i=ge(this.props.filter),l=re(e,this.props.filter),a=this.currentFilterGroup();let c=null;if(l&&a.filters.length>0){const h=i.filters.map(d=>d===l?a:d);c={...i,filters:h}}else if(a.filters.length===0){const h=i.filters.filter(d=>d!==l);h.length&&(c={...i,filters:h})}else c={...i,filters:[...i.filters,a]};this.props.onFilterChange(c,o),this.props.onCloseMenu&&this.props.onCloseMenu()};let s;if(t.column&&t.column.field){const o=_e(t.column.filter),e=Lt(t.filterOperators,o);s=re(t.column.field,t.filter),s=s?{...s,filters:s.filters.map(i=>({...i}))}:{logic:"and",filters:[{field:t.column.field,operator:e,value:H(e)?null:void 0},{field:t.column.field,operator:e,value:H(e)?null:void 0}]},s.filters.filter(i=>i.field===t.column.field).length===1&&s.filters.splice(1,0,{field:t.column.field,operator:e})}this.state={expanded:t.expanded||!1,filterGroup:s}}render(){const{column:t,filterUI:s,hideSecondFilter:o,filterOperators:e}=this.props;if(!t||!t.field)return n.createElement("div",null);const i=_e(t.filter),l=o!==void 0?o:Es[i],a=E.provideLocalizationService(this),c=this.state.filterGroup.filters,h=se(e[i],a),d=se(Ke,a),u={field:t.field,value:c[0].value,operator:c[0].operator,operators:h,booleanValues:d,onChange:this.firstFilterChange,filterType:i},m={field:t.field,value:c[1].value,operator:c[1].operator,operators:h,booleanValues:d,onChange:this.secondFilterChange,filterType:i},g=this.state.filterGroup.logic,x=se(xs,a),y={value:x.find(z=>z.operator===(g===null?"":g)),onChange:this.logicChange,data:x},v=s,k={firstFilterProps:u,secondFilterProps:m,logicData:y.data,logicValue:y.value,onLogicChange:y.onChange,hideSecondFilter:l},R=this.currentFilterGroup().filters.length!==0||H(c[0].operator)||H(c[1].operator),S=this.isControlled()?this.props.expanded:this.state.expanded,_=this.props.alwaysExpand;return n.createElement(ae,null,!_&&n.createElement($,{title:a.toLanguageString(ne,I[ne]),iconClass:"k-i-filter",svgIcon:w.filterIcon,onClick:this.onFilterExpand}),n.createElement(Xe,{show:_||!!S},n.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear,onKeyDown:z=>z.stopPropagation()},n.createElement("div",{className:"k-filter-menu-container"},v?n.createElement(v,{...k}):n.createElement(jt,{...k}),n.createElement("div",{className:"k-actions k-actions-stretched"},n.createElement(B.Button,{themeColor:"primary",disabled:!R},a.toLanguageString(oe,I[oe])),n.createElement(B.Button,{type:"reset"},a.toLanguageString(K,I[K])))))))}}Ye.active=(r,t)=>!!re(r,t);E.registerForLocalization(Ye);const Os=(r,t)=>r.length!==t.length?!1:r.every((s,o)=>s===t[o]);class Qe extends n.Component{constructor(t){super(t),this.defaultFilter=()=>this.props.filter?f.clone(this.props.filter):{filters:[],logic:"and"},this.isControlled=()=>this.props.expanded!==void 0,this.parseData=(s,o)=>{const e=this.props.column.field||"",i=s.map(l=>L(e,l));return o?i.filter((l,a)=>i.indexOf(l)===a):i},this.getFilterIndex=()=>{const s=this.props.column.field;return this.defaultFilter().filters.findIndex(i=>i.filters&&i.filters.length>0&&i.filters[0].field===s)},this.onFilterExpand=()=>{const s=this.isControlled(),o=!(s?this.props.expanded:this.state.expanded);this.props.onExpandChange&&this.props.onExpandChange(o),s||this.setState({expanded:o})},this.handleSearchChange=s=>{const o=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",e={logic:"and",filters:[{field:this.props.column.field,operator:o,value:s.target.value,ignoreCase:!0}]};this.setState({value:s.target.value,data:this.parseData(ue.filterBy(this.props.data||[],e),this.props.uniqueData)})},this.handleClear=()=>{const s=this.props.searchBoxFilterOperator?this.props.searchBoxFilterOperator:"startswith",o={logic:"and",filters:[{field:this.props.column.field,operator:s,value:"",ignoreCase:!0}]};this.setState({value:"",data:this.parseData(ue.filterBy(this.props.data||[],o),this.props.uniqueData)})},this.clear=s=>{if(s.preventDefault(),!this.props.onFilterChange)return;const o=this.state.currentFilter||null;o!==null&&o.filters.length>0?(this.compositeFilterIndex>=0&&o.filters.splice(this.compositeFilterIndex,1),this.props.onFilterChange(o,s)):this.props.onFilterChange(null,s),this.props.onCloseMenu&&this.props.onCloseMenu()},this.submit=s=>{if(s.preventDefault(),!this.props.onFilterChange)return;const o=this.state.currentFilter||null;this.props.onFilterChange(o,s),this.props.onCloseMenu&&this.props.onCloseMenu()},this.handleCheckBoxChange=(s,o)=>{const e=this.props.column.field||"",i={...this.state.currentFilter},l=[...this.state.currentFilter.filters];let a=[];if(this.compositeFilterIndex!==-1&&i.filters[this.compositeFilterIndex].filters&&o!=="all"&&(a=i.filters[this.compositeFilterIndex].filters),s.value&&o==="all")this.state.data.forEach(c=>{a.push({field:e,operator:"eq",value:c})});else if(s.value)a.push({field:e,operator:"eq",value:o});else if(this.state.currentFilter){const c=a.findIndex(h=>h.value===o);a.splice(c,1)}i.logic="and",this.compositeFilterIndex!==-1?l[this.compositeFilterIndex]={logic:"or",filters:a}:l.push({logic:"or",filters:a}),(!s.value&&o==="all"||a.length===0)&&l.splice(this.compositeFilterIndex,1),i.filters=l,this.setState({currentFilter:i})},this.isAllSelected=()=>{let s=!1;if(this.state.currentFilter){const o=[...this.state.currentFilter.filters];return this.compositeFilterIndex===-1?!1:(s=this.state.data.every(e=>this.compositeFilterIndex!==-1&&o[this.compositeFilterIndex].filters?o[this.compositeFilterIndex].filters.findIndex(l=>l.value===e)>=0:!1),s)}return s},this.compositeFilterIndex=this.getFilterIndex(),this.state={expanded:t.expanded||!1,value:"",data:this.parseData(this.props.data,this.props.uniqueData)||[],dataFromProps:this.parseData(this.props.data,!1)||[],currentFilter:this.defaultFilter()}}componentDidUpdate(){const t=this.props.column.field||"",s=this.props.data.map(o=>L(t,o));Os(s,this.state.dataFromProps)||this.setState({data:s,dataFromProps:s})}render(){const{column:t}=this.props;if(!t||!t.field)return n.createElement("div",null);const s=E.provideLocalizationService(this),o=this.isControlled()?this.props.expanded:this.state.expanded,e=[];if(this.state.currentFilter){const a=[...this.state.currentFilter.filters];this.compositeFilterIndex=a.findIndex(c=>c.filters&&c.filters.length>0?c.filters[0].field===t.field:!1),this.compositeFilterIndex!==-1&&a[this.compositeFilterIndex].filters.length>0&&a[this.compositeFilterIndex].filters.forEach(c=>{c.field===this.props.column.field&&e.push(c.value)})}const i=this.props.searchBox?n.createElement(this.props.searchBox,{value:this.state.value,onChange:this.handleSearchChange}):n.createElement("div",{className:"k-searchbox k-textbox k-input k-input-md k-input-solid"},n.createElement(f.IconWrap,{className:"k-input-icon",name:"search",icon:w.searchIcon}),n.createElement(M.Input,{className:"k-input-inner",type:"text",placeholder:s.toLanguageString(De,I[De]),value:this.state.value,onChange:a=>this.handleSearchChange(a.nativeEvent)}),n.createElement(B.Button,{type:"button",rounded:null,className:"k-input-button",onClick:this.handleClear,icon:"x",svgIcon:w.xIcon})),l=e.filter((a,c)=>e.indexOf(a)===c);return n.createElement(ae,null,n.createElement($,{title:s.toLanguageString(ne,I[ne]),iconClass:"k-i-filter",svgIcon:w.filterIcon,onClick:this.onFilterExpand}),n.createElement(Xe,{show:!!o},n.createElement("form",{className:"k-filter-menu",onSubmit:this.submit,onReset:this.clear},n.createElement("div",{className:"k-filter-menu-container"},i,n.createElement("ul",{className:"k-reset k-multicheck-wrap"},n.createElement("li",{className:"k-item k-check-all-wrap"},n.createElement(M.Checkbox,{label:s.toLanguageString(Te,I[Te]),onChange:a=>this.handleCheckBoxChange(a,"all"),checked:this.isAllSelected()})),this.state.data.map((a,c)=>n.createElement("li",{className:"k-item",key:c},n.createElement(M.Checkbox,{label:String(a),onChange:h=>this.handleCheckBoxChange(h,a),checked:l.includes(a)})))),n.createElement("div",{className:"k-filter-selected-items"},l.length+" "+s.toLanguageString(Me,I[Me])),n.createElement("div",{className:"k-actions k-hstack k-justify-content-stretch"},n.createElement(B.Button,{themeColor:"primary",type:"submit"},s.toLanguageString(oe,I[oe])),n.createElement(B.Button,{className:"k-button",type:"reset"},s.toLanguageString(K,I[K])))))))}}Qe.defaultProps={uniqueData:!0};E.registerForLocalization(Qe);const Xt=r=>{const[t,s]=n.useState(""),o=n.useMemo(()=>new Set(r.columnsState.map(g=>g.id)),[r.columnsState]),e=n.useMemo(()=>r.columns.filter(g=>{var x;return(x=g.title||g.field)==null?void 0:x.toLowerCase().includes(t.toLowerCase())}),[r.columns,t]),[i,l]=n.useState(r.columns.map(g=>o.has(g.id))),a=n.useCallback(()=>{const g=r.columns.filter((x,y)=>i[y]);r.onColumnsChange.call(void 0,g),r.onCloseMenu.call(void 0)},[i,r.columns,r.onColumnsChange,r.onCloseMenu]),c=n.useCallback(()=>{l(r.columns.map(g=>o.has(g.id)))},[o,r.columns]),h=i.filter(g=>g).length,d=h===i.length,u=n.useCallback(()=>{l(r.columns.map((g,x)=>d&&x===0?!0:!d))},[r.columns,d]),m=n.useCallback((g,x)=>{const y=i.slice();y[x]=g,l(y)},[i]);return n.createElement("form",{className:"k-filter-menu"},n.createElement("div",{className:"k-filter-menu-container"},n.createElement(M.TextBox,{className:"k-searchbox",value:t,onChange:g=>s(String(g.target.value)),prefix:()=>n.createElement(M.InputPrefix,null,n.createElement(f.IconWrap,{name:"search",icon:w.searchIcon}))}),n.createElement("ul",{className:"k-reset k-multicheck-wrap"},!t&&n.createElement("li",{className:"k-item k-check-all-wrap"},n.createElement(M.Checkbox,{checked:d,onChange:u,label:"(Select all)"})),e.map((g,x)=>n.createElement("li",{key:g.id,className:"k-item"},n.createElement(M.Checkbox,{disabled:i[x]&&h===1,checked:i[x],onChange:y=>{var v;return m(!!((v=y.target.element)!=null&&v.checked),x)},label:g.title||g.field})))),n.createElement("div",{className:"k-filter-selected-items"},h," selected items"),n.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},n.createElement(B.Button,{type:"button",themeColor:"primary",onClick:a},"Apply"),n.createElement(B.Button,{type:"button",onClick:c},"Reset"))))};Xt.displayName="GridColumnMenuColumnsList";class Hs extends n.Component{render(){return null}}class Yt extends n.Component{render(){return n.createElement("div",{className:f.classNames("k-toolbar k-grid-toolbar",{"k-toolbar-md":!this.props.size,[`k-toolbar-${f.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),"aria-label":this.props.ariaLabel,"aria-controls":this.props.ariaControls,role:"toolbar"},this.props.children)}}Yt.displayName="KendoReactGridToolbar";const Qt=r=>{const{data:t=[]}=r;return n.createElement("div",{className:"k-selection-aggregates k-grid-selection-aggregates"},t.map((s,o)=>n.createElement("div",{key:o},n.createElement("span",{className:"k-selection-aggregates-item-text"},s.type,": "),n.createElement("span",{className:"k-selection-aggregates-item-value"},s.formattedValue))))};Qt.displayName="KendoReactGridStatusBar";const Jt=r=>{var s;const t=r.slice();for(let o=0;o<t.length;o++)for(;t[o]&&((s=t[o].children)!=null&&s.length);)t.splice(o,1,...t[o].children);return t},_s=r=>{const{dataItems:t,target:s,selectedField:o}=r,i=Jt(s.columns).map(v=>v.field).filter(v=>v&&typeof v=="string").map(v=>f.getter(v)),l=f.getter(o),a={dates:[],numbers:[],booleans:[],others:[]},c=v=>{typeof v=="number"?a.numbers.push(v):typeof v=="boolean"?a.booleans.push(v):v instanceof Date?a.dates.push(v):a.others.push(v)};t.forEach(v=>{const k=l(v);k&&k.forEach(R=>{c(i[R](v))})});const h=a.dates.map(v=>v.getTime()),d=a.booleans.filter(v=>v).length,u=a.booleans.filter(v=>!v).length,m=a.numbers.length?a.numbers.reduce((v,k)=>v+=k,0):void 0,g={sum:m,average:typeof m=="number"?m/a.numbers.length:void 0,min:a.numbers.length?Math.min(...a.numbers):void 0,max:a.numbers.length?Math.max(...a.numbers):void 0,count:a.numbers.length+a.booleans.length+a.dates.length+a.others.length,isTrue:d>0?d:void 0,isFalse:u>0?u:void 0,earliest:a.dates.length?new Date(Math.min(...h)):void 0,latest:a.dates.length?new Date(Math.max(...h)):void 0},x=(v,k)=>(k==="sum"||k==="average")&&typeof v=="number"?v.toFixed(2):(k==="earliest"||k==="latest")&&v instanceof Date?v.toLocaleDateString():String(v),y=[];return Object.keys(g).forEach(v=>{const k=v,R=g[k];R!==void 0&&y.push({type:k,value:R,formattedValue:x(R,k)})}),y},Zt=f.withIdHOC(X);Zt.displayName="KendoReactGrid";Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>b.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>b.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>b.setSelectedState});exports.GRID_COL_INDEX_ATTRIBUTE=U;exports.GRID_PREVENT_SELECTION_ELEMENT=fs;exports.GRID_ROW_INDEX_ATTRIBUTE=Dt;exports.Grid=Zt;exports.GridCell=At;exports.GridClassComponent=X;exports.GridColumn=j;exports.GridColumnMenuCheckboxFilter=Qe;exports.GridColumnMenuColumnsList=Xt;exports.GridColumnMenuFilter=Ye;exports.GridColumnMenuFilterCell=Ae;exports.GridColumnMenuFilterUI=jt;exports.GridColumnMenuGroup=je;exports.GridColumnMenuItem=$;exports.GridColumnMenuItemContent=Xe;exports.GridColumnMenuItemGroup=ae;exports.GridColumnMenuSort=Ce;exports.GridColumnMenuWrapper=We;exports.GridCommonDragLogic=Pt;exports.GridDetailRow=Hs;exports.GridEditCell=Tt;exports.GridFilterCell=$e;exports.GridGroupCell=Pe;exports.GridHeaderCell=Mt;exports.GridHierarchyCell=Ft;exports.GridNoRecords=me;exports.GridRow=Bt;exports.GridSelectionCell=Nt;exports.GridToolbar=Yt;exports.StatusBar=Qt;exports.booleanFilterValues=Ke;exports.cellBoolDropdownChange=qe;exports.cellInputChange=Ve;exports.cellOperatorChange=Ue;exports.filterGroupByField=re;exports.getStatusData=_s;exports.gridMessages=I;exports.leafColumns=Jt;exports.operators=He;exports.pagerFirstPage=Ct;exports.pagerInfo=mt;exports.pagerItemPerPage=kt;exports.pagerLastPage=xt;exports.pagerNextPage=vt;exports.pagerPreviousPage=bt;exports.rootFilterOrDefault=ge;
package/index.mjs CHANGED
@@ -773,8 +773,9 @@ class jt extends n.Component {
773
773
  "k-header": !0,
774
774
  "k-grid-header-sticky": e.locked,
775
775
  "k-sorted": this.props.sort && this.props.sort.some((v) => v.field === e.field)
776
- }, e.headerClassName), d = e.left !== void 0 ? this.props.isRtl ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {}, u = D(this).toLanguageString(Ae, k[Ae]);
777
- let f = e.isAccessible ? {
776
+ }, e.headerClassName);
777
+ e.locked === !1 && (e.left = 0);
778
+ const d = e.left !== void 0 ? this.props.isRtl ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {}, u = D(this).toLanguageString(Ae, k[Ae]), f = e.isAccessible ? {
778
779
  ariaSort: mr[a],
779
780
  role: "columnheader",
780
781
  ariaColumnIndex: e.ariaColumnIndex,
@@ -782,8 +783,7 @@ class jt extends n.Component {
782
783
  ariaDescription: r ? u : ""
783
784
  } : {
784
785
  role: "presentation"
785
- };
786
- const g = e.declarationIndex >= 0 ? ++this.index : --this.serviceIndex, b = e.headerCell ? e.headerCell : gr, E = /* @__PURE__ */ n.createElement(
786
+ }, g = e.declarationIndex >= 0 ? ++this.index : --this.serviceIndex, b = e.headerCell ? e.headerCell : gr, E = /* @__PURE__ */ n.createElement(
787
787
  b,
788
788
  {
789
789
  key: 1,
@@ -2012,7 +2012,7 @@ const Tr = ({
2012
2012
  name: "@progress/kendo-react-grid",
2013
2013
  productName: "KendoReact",
2014
2014
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
2015
- publishDate: 1709029829,
2015
+ publishDate: 1709066398,
2016
2016
  version: "",
2017
2017
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
2018
2018
  }, Gr = (i) => {
@@ -2292,8 +2292,8 @@ let he = class extends n.Component {
2292
2292
  ), this.mapColumns = B(
2293
2293
  (e) => Fs(e)
2294
2294
  ), this.configureColumns = B((e, r, l) => {
2295
- this.props.selectedField && e.filter((h) => h.field === this.props.selectedField).forEach((h) => {
2296
- h.width = h.width || "50px", h.cell = h.cell || ar, h.headerCell = h.headerCell || Nr;
2295
+ this.props.selectedField && e.forEach((h) => {
2296
+ h.field === this.props.selectedField ? (h.width = h.width || "50px", h.cell = h.cell || ar, h.headerCell = h.headerCell || Nr) : h.width = void 0;
2297
2297
  });
2298
2298
  const a = {
2299
2299
  id: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-grid",
3
- "version": "7.2.3-develop.3",
3
+ "version": "7.2.4-develop.1",
4
4
  "description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -25,15 +25,15 @@
25
25
  "@progress/kendo-data-query": "^1.0.0",
26
26
  "@progress/kendo-drawing": "^1.19.0",
27
27
  "@progress/kendo-licensing": "^1.3.4",
28
- "@progress/kendo-react-animation": "7.2.3-develop.3",
29
- "@progress/kendo-react-buttons": "7.2.3-develop.3",
30
- "@progress/kendo-react-common": "7.2.3-develop.3",
31
- "@progress/kendo-react-data-tools": "7.2.3-develop.3",
32
- "@progress/kendo-react-dateinputs": "7.2.3-develop.3",
33
- "@progress/kendo-react-dropdowns": "7.2.3-develop.3",
34
- "@progress/kendo-react-inputs": "7.2.3-develop.3",
35
- "@progress/kendo-react-intl": "7.2.3-develop.3",
36
- "@progress/kendo-react-popup": "7.2.3-develop.3",
28
+ "@progress/kendo-react-animation": "7.2.4-develop.1",
29
+ "@progress/kendo-react-buttons": "7.2.4-develop.1",
30
+ "@progress/kendo-react-common": "7.2.4-develop.1",
31
+ "@progress/kendo-react-data-tools": "7.2.4-develop.1",
32
+ "@progress/kendo-react-dateinputs": "7.2.4-develop.1",
33
+ "@progress/kendo-react-dropdowns": "7.2.4-develop.1",
34
+ "@progress/kendo-react-inputs": "7.2.4-develop.1",
35
+ "@progress/kendo-react-intl": "7.2.4-develop.1",
36
+ "@progress/kendo-react-popup": "7.2.4-develop.1",
37
37
  "@progress/kendo-svg-icons": "^2.1.0",
38
38
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
39
39
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"